1 | |
---|
2 | Build Notes - Windows (build_wxp) |
---|
3 | |
---|
4 | -------------------------------------------------------------------------------- |
---|
5 | Build requirements |
---|
6 | -------------------------------------------------------------------------------- |
---|
7 | |
---|
8 | - Cygwin |
---|
9 | - includes perl, awk, sed, autotools and make |
---|
10 | - includes gcc 3.4.4 |
---|
11 | - C:\Cygwin\Cygwin.bat |
---|
12 | |
---|
13 | - Allegro CL 9.0 |
---|
14 | - to build lisp sources |
---|
15 | - C:\Program Files\Allegro CL 9.0\ (C:\progra~1\allegr~1.0\) |
---|
16 | |
---|
17 | - Java 1.6.0 |
---|
18 | - to build java sources |
---|
19 | - C:\Program Files\Java\jdk1.6.0_22\ |
---|
20 | |
---|
21 | - Eclipse |
---|
22 | - to compile the java sources |
---|
23 | - C:\promot\tools\eclipse-java-helios-SR1-win32\eclipse\eclipse.exe |
---|
24 | - alternatively use a linux machine, see section 'Generate jar file' |
---|
25 | |
---|
26 | - Configure is used to set some variables in source files |
---|
27 | - Build.win is used on cygwin, but directories have to be adapted to |
---|
28 | your source directories |
---|
29 | |
---|
30 | - Actual dir of promot sources is |
---|
31 | C:\promot\src\promot-svn |
---|
32 | |
---|
33 | |
---|
34 | -------------------------------------------------------------------------------- |
---|
35 | Get SVN sources |
---|
36 | -------------------------------------------------------------------------------- |
---|
37 | |
---|
38 | Start SVN Checkout (TortoiseSVN) to checkout repository of URL: |
---|
39 | svn+ssh://svn.mpi-magdeburg.mpg.de/var/lib/svn/PromotDiva/Promot/trunk |
---|
40 | |
---|
41 | Copy ProMoT sources to directory |
---|
42 | C:\promot\src\promot-svn |
---|
43 | |
---|
44 | Or |
---|
45 | |
---|
46 | Update the ProMoT sources under C:\promot\src\promot-svn |
---|
47 | using TortoiseSVN) via mouse right-click, SVN Update |
---|
48 | |
---|
49 | Or |
---|
50 | |
---|
51 | start cygwin |
---|
52 | $ svn co svn+ssh://svn.mpi-magdeburg.mpg.de/var/lib/svn/PromotDiva/Promot/trunk promot-svn --username [your username] |
---|
53 | |
---|
54 | Or |
---|
55 | |
---|
56 | Use Eclipse and its svn plugin to update the sources (only java part) |
---|
57 | |
---|
58 | |
---|
59 | -------------------------------------------------------------------------------- |
---|
60 | Generate (lisp) executable |
---|
61 | -------------------------------------------------------------------------------- |
---|
62 | |
---|
63 | 1. clean lisp |
---|
64 | -------------------------- |
---|
65 | |
---|
66 | Remove all fasl files by hand in the following directories |
---|
67 | C:\promot\src\libsbml-2.2.0 and |
---|
68 | C:\promot\src\promot-svn |
---|
69 | |
---|
70 | Remove dir 'application' |
---|
71 | C:\promot\src\promot-svn\promot\application\ |
---|
72 | |
---|
73 | |
---|
74 | 2. Configure ProMoT |
---|
75 | ------------------------------------------------------- |
---|
76 | |
---|
77 | start cygwin |
---|
78 | $ ./build.win (C:\promot\src\promot-svn\) |
---|
79 | |
---|
80 | |
---|
81 | 3. Build/rebuild lisp interface of libsbml-2.2.0 |
---|
82 | ------------------------------------------------------- |
---|
83 | |
---|
84 | start alisp of acl9.0 (C:\Program Files\Allegro CL 9.0\alisp8.exe) |
---|
85 | (user who created the image will be set to the environment variable USER) |
---|
86 | |
---|
87 | ;;build/ rebuild lisp interface of libsbml-2.2.0 |
---|
88 | (require :asdf "c:/promot/src/promot-svn/code-generator/lisp-utilities/asdf.lisp") |
---|
89 | (load "c:/promot/src/libsbml-2.2.0/bindings/lisp/uffi/uffi.asd") |
---|
90 | (asdf:operate 'asdf:load-op 'uffi) |
---|
91 | (load "c:/promot/src/libsbml-2.2.0/bindings/lisp/cparse/cparse.asd") |
---|
92 | (asdf:operate 'asdf:load-op 'cparse) |
---|
93 | (load "c:/promot/src/libsbml-2.2.0/bindings/lisp/libsbml.asd") |
---|
94 | (asdf:operate 'asdf:load-op 'libsbml) |
---|
95 | |
---|
96 | |
---|
97 | 4. Build lisp application (enter commands) |
---|
98 | -------------------------------------------------------- |
---|
99 | |
---|
100 | Create a file, e.g. /cygdrive/c/Cygwin/home/promot/build-promot.lisp, |
---|
101 | with the following contents: |
---|
102 | |
---|
103 | --CUT-- |
---|
104 | (setq compiler::verify-type-declarations-switch nil) |
---|
105 | (load "c:/promot/src/promot-svn/promot/src/promot.asd") |
---|
106 | (asdf:operate 'asdf:load-op 'promot) |
---|
107 | (pk::generate-application) |
---|
108 | --CUT-- |
---|
109 | |
---|
110 | Now run from Cygwin: |
---|
111 | |
---|
112 | /cygdrive/c/Program\ Files/Allegro\ CL\ 9.0/alisp8.exe -qq -q -locale "C" -L /cygwin/home/promot/build-promot.lisp |
---|
113 | |
---|
114 | Notes: |
---|
115 | - image argument should not contain a cygwin path |
---|
116 | - promot.asd will load promot-config.lisp, which should contain the path to asdf |
---|
117 | - use the supplied asdf, the asdf coming with acl9.0 doesn't work with promot.asd |
---|
118 | |
---|
119 | - For libsbml2.2.0 and xerces2.7: creation of dlls using Visual Studio 2008 Express |
---|
120 | (dlls included for lisp image) |
---|
121 | - Visual Studio Project 'libsbml' is located under C:\promot\src\libsbml-2.2.0\win32, |
---|
122 | dlls are built at C:\promot\src\libsbml-2.2.0\win32\bin |
---|
123 | - Visual Studio Project 'xerces' is under C:\promot\src\xerces-c-src_2_7_0\Projects\Win32\vc7.1\xerces-all\XercesLib, |
---|
124 | dlls are built at C:\promot\src\xerces-c-src_2_7_0\Build\Win32\vc7.1\Release |
---|
125 | - dlls are copied to C:\promot\src\libsbml-2.2.0\lib, specified in C:\promot\src\libsbml-2.2.0\bindings\lisp |
---|
126 | |
---|
127 | |
---|
128 | -------------------------------------------------------------------------------- |
---|
129 | Generate jar file |
---|
130 | -------------------------------------------------------------------------------- |
---|
131 | |
---|
132 | The jar archive not necessarily have to build on a windows machine, linux is |
---|
133 | also possible. Then, in most cases, the manifest that is already included in |
---|
134 | the jar archive is fine (please check before). Also check the generated jar |
---|
135 | archive of content (no lips files should be there). |
---|
136 | |
---|
137 | |
---|
138 | 1. Regenerate/update corba binding (dir: C:\promot\src\promot-svn\src\gui\) |
---|
139 | ---------------------------------------------------- |
---|
140 | |
---|
141 | Corba binding not included in sources as files are generated from promotgui.idl, |
---|
142 | later only necessary for changes in idl definitions |
---|
143 | |
---|
144 | From the Command Prompt, run (idlj -fall promotgui.idl): |
---|
145 | C:\progra~1\Java\jdk1.6.0_22\bin\idlj.exe -fall C:\promot\src\promot-svn\promot\src\gui\promotgui.idl |
---|
146 | |
---|
147 | |
---|
148 | 2. Generate manifest (dir: C:\promot\src\promot-svn\src\gui\) |
---|
149 | ---------------------------------------------------- |
---|
150 | |
---|
151 | Replace absolute jar path in MANIFEST1.MF to relative path ..\lib. |
---|
152 | The resulting file is saved into a new file named MANIFEST2.MF. |
---|
153 | |
---|
154 | If line of jar path is longer than 72 chars manual breaks are needed, which are |
---|
155 | inserted with a perl command from makefile (using cygwin) |
---|
156 | perl -p -e 's/(.{72})/$1\n /g' <MANIFEST2.MF >MANIFEST.MF |
---|
157 | |
---|
158 | |
---|
159 | 3. Clean output and create jar file |
---|
160 | ---------------------------------------------------- |
---|
161 | |
---|
162 | Go to dir 'promot/bin' which is the Eclipse output dir. |
---|
163 | Clean output dir by removing/excluding all lisp and fasl files |
---|
164 | |
---|
165 | Generate the jar archive including the java compiled classes (*.class) |
---|
166 | found in Eclipse output dir ('promot/bin') and the generated manifest from |
---|
167 | generation dir (src/gui/). The name of the jar archive is PromotUI.jar. |
---|
168 | |
---|
169 | jar -cmf MANIFEST.MF ../PromotUI.jar * |
---|
170 | |
---|
171 | |
---|
172 | -------------------------------------------------------------------------------- |
---|
173 | Copy files for distro |
---|
174 | -------------------------------------------------------------------------------- |
---|
175 | |
---|
176 | 1. Copy files for lisp part |
---|
177 | -------------------------------- |
---|
178 | |
---|
179 | - Copy files from C:\promot\src\promot-svn\promot\application\version |
---|
180 | (e.g. v-0-8-5) to C:\promot\build\promot\bin |
---|
181 | - In particular these are: |
---|
182 | - promot.dxl (lisp image) |
---|
183 | - promot.lic (licence) |
---|
184 | - version (version number) |
---|
185 | |
---|
186 | |
---|
187 | 2. Copy files for java part |
---|
188 | -------------------------------- |
---|
189 | |
---|
190 | - copy jar file to C:\promot\build\promot\bin |
---|
191 | |
---|
192 | Notes: |
---|
193 | - promot.exe located in dir C:\promot\src\promot-svn\promot\application\version |
---|
194 | (e.g. v-0-8-5) is without icon |
---|
195 | - Instead use promot.exe in C:\promot\build\promot\bin that includes a promot icon |
---|
196 | and has the same functionality |
---|
197 | |
---|
198 | |
---|
199 | 3. Copy all the rest of files |
---|
200 | -------------------------------- |
---|
201 | |
---|
202 | This includes directories: |
---|
203 | - bin, docu, emacs, kb, lib, resources |
---|
204 | - Attention: some sub directories must be filtered |
---|
205 | |
---|
206 | This includes also files: |
---|
207 | - .PromotVizScenarios, bugs.txt, licences.txt, promot.bat, promot-server.bat, |
---|
208 | promot-ui.bat, readme.txt, versions.txt |
---|
209 | |
---|
210 | Tip: |
---|
211 | Check the content of an old self-extracting archive for reference, e.g. |
---|
212 | http://promottrac.mpi-magdeburg.mpg.de/dist/promot-v-0-8-5/windows/promot-v-0-8-5-windows.exe |
---|
213 | |
---|
214 | |
---|
215 | -------------------------------------------------------------------------------- |
---|
216 | Create self-extracting archive |
---|
217 | -------------------------------------------------------------------------------- |
---|
218 | |
---|
219 | A self-extracting archive can be created using 7-zip (http://www.7-zip.org/). |
---|
220 | |
---|
221 | - Installed on build_wxp at C:\Program Files\7-Zip |
---|
222 | - Right-click on the folder that you want to archive for context menu |
---|
223 | - Choose 'Add to Archive...' |
---|
224 | - The archive name should end on '*.exe', the archive format should be '7z' |
---|
225 | - Be sure to check the 'Create SFX archive' option |
---|
226 | |
---|
227 | |
---|
228 | -------------------------------------------------------------------------------- |
---|
229 | Batch files for scripts |
---|
230 | -------------------------------------------------------------------------------- |
---|
231 | |
---|
232 | - Use batch files (*.bat) to start ProMoT server, GUI or both |
---|
233 | - They will set PROMOT_HOME to installation dir (dir of *.bat file) |
---|
234 | - TODO: mdl2diana not considered at the moment |
---|
235 | |
---|
236 | |
---|
237 | -------------------------------------------------------------------------------- |
---|
238 | Misc |
---|
239 | -------------------------------------------------------------------------------- |
---|
240 | |
---|
241 | 1. Make clean |
---|
242 | ----------------------- |
---|
243 | |
---|
244 | - Lists of files to compile are stored in .mk files, which are generated/updated during make |
---|