Blame view

README_windows_cygwin_installation.md 8.08 KB
886c558b   Steve Greedy   SACAMOS Public Re...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
The Spice cable modelling software may be run on windows using
Cygwin as follows:

**Cygwin installation**

Go to the website www.cygwin.com

Under the heading Current Cygwin DLL version

Download the cygwin setup for your machine (32 or 64 bit as appropriate) i.e. click setup-x86.exe or setup-x86_64.exe as appropriate (the following notes are based on 64bit installation but I guess it shouldn't be too different for 32 bit.)
Save the file
Double click on the file to run it. (i.e. run the cygwin setup executable)

Click next at the copyright page

Choose a download source:
(e.g. Install from Internet)
Then click next

Choose Root directory:
(e.g. C:\cygwin64)
Select Install for all users
Then click next

Select Local Package Directory
(e.g. C:\Program Files (x86)\Mozilla Firefox)
Then click next

Select Your Internet Connection as appropriate
(e.g. Direct Connection)
Then click next

Choose a download Site
(e.g. cygwin.mirror.uk.sargasso.net works fine in the UK)
Then click next

Select Packages (i.e. what to install) Default is a minimal install and we need some extra stuff so add the following (by clicking where it says 'default' to change to 'install'):
Devel
X11
In the following click the + sign to expand the top level list (e.g. Editors) , find the package in the list (e.g. nedit), then click where it says 'skip' this then changes to the version number to be installed. 
Editors->nedit
Graphics->gnuplot

Geda requires the following: (use search and 'view' button) - some of these may already be flagged
atk-devel
crypt
file
gcc
gtk2-x11-devel
guile-devel
libgmp-devel
libtool1.5
make
pango-devel
patchutils
pcre-devel
pcre-doc
pkg-config
xorg-x11-devel
xorg-x11-fscl
xterm


Then click next

Resolving_dependencies
Ensure that the 'select required packages' box is ticked
Then click next

(I got an error here but things did proceed OK inspite of this)

The Cygwin setup proceeds. this takes quite a long time...

Postinstall script Errors:
Click next

Create Icons
Ensure that the 'Create icon on desktop' box is ticked
Click Finish

An icon 'Cygwin64 Terminal' appears on the desktop

Run Xlaunch from the programs menu
(Programs->Cygwin-X->Xlaunch)

Select Display Settings:
Select 'Multiple windows'
Click next

Select how to start clients
Click 'start no client'
Click next

Extra settings
Tick clipboard and Native OpenGL
Click next

Configuration complete
Click finish.

Start a cygwin terminal by clicking the icon on desktop.

Find the name of your cygwin home directory with the command
pwd
(The result will be something like /home/user)

**Ngspice software installation**

Go to the ngspice website
http://ngspice.sourceforge.net/download.html

click the download button

click the link 
Download_ngspice-26_140112.zip

download the file and save it to you cygwin home directory.
Unzip the file
unzip ngspice-26_140112.zip

This should produce the directory
spice

Go into the directory spice/bin
cd spice/bin

Check the permissions on the file ngspice.exe by trying to run it
ngpsice

if you get the message 
bash: ./ngspice: Permission denied

then give the file executable permissions with
chmod +x ngspice.exe

** gmsh software installation**

go to the gmsh website:

http://gmsh.info/

In the Download section click on the Windows 32 bit or 64 bit link as appropriate
Save the gmsh zip file in your cygwin home directory.

Unzip the file with the command:

unzip gmsh-2.13.1-Windows (or equivalent for your downloaded version)

the gmsh executable will be in the directory

gmsh-2.13.1-Windows

This directory should be included in your path to allow the software to find gmsh. This is
described towards the end of this README file. 

{
**wxWidgets installation**
goto the web page:
http://www.wxwidgets.org/downloads

under Previous Stable Release 2.8.12, click the 
wxAll: GZIP    button to download.
Save the file (wxWidgets-2.8.12.tar.gz) to your cygwin home directory

unzip the file with command
gunzip wxWidgets-2.8.12.tar.gz

untar the file with the command
tar -xvf wxWidgets-2.8.12.tar

go into the wxWidgets-2.8.12 directory
cd wxWidgets-2.8.12

mkdir my-build

cd my-build
configure with the following:
../configure --enable-unicode --without-subdirs --disable-compat26 --disable-xrc --host=i686-w64-mingw32 --build=i686-pc-cygwin --disable-precomp-headers
{ adding --disable-precomp-headers helps the compilation run further but it still fails...}

{if there is an error message to do with "guess build type"
check the latest version of automake

automake --version

if the version is 1.10 for example then

find the appropriate automake folder in /usr/share/automake.1.10/config.guess

replace config.guess from the wxWidgets-2.8.12 directory with /usr/share/automake.1.10/config.guess}

# fix a bug which stops it making for cygwin...
from wxWidgets-2.8.12
nedit include/wx/filename.h &

change
  // get the canonical path separator for this format
    static wxUniChar GetPathSeparator(wxPathFormat format = wxPATH_NATIVE)
        { return GetPathSeparators(format)[0u]; } 

to

  // get the canonical path separator for this format
    static wxUniChar GetPathSeparator(wxPathFormat format = wxPATH_NATIVE)
        { return GetPathSeparators(format)[(size_t)0u]; } 

{see http://stackoverflow.com/questions/23600736/cant-build-wxwidgets-on-cygwin-ambiguous-overload-for-operator-basedll-ape)

make

### starting to compile but fails ###
#######WORKING HERE##########


** geda for cygwin (gschem, gnetlist) **
See the following web page for instructions...
http://wiki.geda-project.org/geda:cygwin

got to the website:
www.geda-project.org

click download
download the gEDA/gaf (stable) version) Tarball

unzip with
gunzip geda-gaf-1.8.2.tar.gz
tar -xvf geda-gaf-1.8.2.tar.gz

Append these lines to your .bash_profile:

export LD_LIBRARY_PATH=$HOME/geda/lib:$LD_LIBRARY_PATH
export PATH=$HOME/geda/bin:$PATH
export PKG_CONFIG_PATH=$HOME/geda/lib/pkgconfig:$PKG_CONFIG_PATH

Update your environment:
source .bash_profile

# Fix cygwin compillation bug:

edit the following files and add /usr/lib/libgio-2.0.dll.a to *_LDADD 
nedit libgeda/src/Makefile.am gschem/src/Makefile.am gattrib/src/Makefile.am gsymmcheck/src/Makefile.am gnetlist/src/Makefile.am utils/gschlas/Makefile.am 

run configuration script
./configure --prefix=$HOME/geda 

make

make install
# The code compiles but gschem exits with segmentation fault.
#### WORKING HERE ####

**gspiceui installation**
go to the website:
http://sourceforge.net/projects/gspiceui
click the download button and save the file
gspiceui-v1.0.00.tar.gz to your cygwin home directory

unzip the file with command
gunzip gspiceui-v1.0.00.tar.gz

untar the file with the command
tar -xvf gspiceui-v1.0.00.tar

### WORKING HERE BUT NEED wxwidgets...###

}

** download gwave**
http://gwave.sourceforge.net/


**ESA_SPICE_CABLE_MODELLING software installation**

Go to the git server website:
128.243.70.77

Log in to GitLab using you username and password

go to the ESA_SPICE_CABLE_MODELLING project

click the Download zip button (top RH corner) and save the zip file
to your cygwin home directory.
The file name will be of the form
ESA_SPICE_CABLE_MODELLING-CHECKOUT_ID.zip
where CHECKOUT_ID is a long hex number

unzip the file with the command
unzip ESA_SPICE_CABLE_MODELLING-CHECKOUT_ID.zip

You should now have a directory 
ESA_SPICE_CABLE_MODELLING.git

Go into the source code directory and make the executables
cd ESA_SPICE_CABLE_MODELLING.git/SRC
make


**Setting your PATH correctly**
Once the software is installed yoout PATH needs to be set
so that the executables can be found

Go to your cygwin home directory and 
Edit or create a file .bash_profile with the command
nedit .bash_profile
Add the folllowing line to the end of the file to include ngspice and gmsh in your path
PATH="${HOME}/spice/bin:${HOME}/gmsh-2.13.1-Windows:.:${PATH}"
then save the file and exit the editor.



**Running the ESA_SPICE_CABLE_MODELLING software **

Go into the test case directory
cd ../TEST_CASES

Run all the available test cases with the command
./generate_spice_cable_model run

Plot all the results with the coommand
./generate_spice_cable_model plot

**Using the spice transmission line models in your own circuits**

You will need the following software:
gschem