PromotBuild: build_notes_wxp.txt

File build_notes_wxp.txt, 8.3 KB (added by mirschel, 13 years ago)

Description of build procedure for ProMoT (v0.8.5, acl9.0) on Windows XP

Line 
1
2Build Notes - Windows (build_wxp)
3
4--------------------------------------------------------------------------------
5Build 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--------------------------------------------------------------------------------
35Get SVN sources
36--------------------------------------------------------------------------------
37
38Start SVN Checkout (TortoiseSVN) to checkout repository of URL:
39svn+ssh://svn.mpi-magdeburg.mpg.de/var/lib/svn/PromotDiva/Promot/trunk
40
41Copy ProMoT sources to directory
42C:\promot\src\promot-svn
43
44Or
45
46Update the ProMoT sources under C:\promot\src\promot-svn
47using TortoiseSVN) via mouse right-click, SVN Update
48
49Or
50
51start cygwin
52$ svn co svn+ssh://svn.mpi-magdeburg.mpg.de/var/lib/svn/PromotDiva/Promot/trunk promot-svn --username [your username]
53
54Or
55
56Use Eclipse and its svn plugin to update the sources (only java part)
57
58
59--------------------------------------------------------------------------------
60Generate (lisp) executable
61--------------------------------------------------------------------------------
62
631. clean lisp
64--------------------------
65
66Remove all fasl files by hand in the following directories
67C:\promot\src\libsbml-2.2.0 and
68C:\promot\src\promot-svn
69
70Remove dir 'application'
71C:\promot\src\promot-svn\promot\application\
72
73
742. Configure ProMoT
75-------------------------------------------------------
76
77start cygwin
78$ ./build.win (C:\promot\src\promot-svn\)
79
80
813. Build/rebuild lisp interface of libsbml-2.2.0
82-------------------------------------------------------
83
84start 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
974. Build lisp application (enter commands)
98--------------------------------------------------------
99
100Create a file, e.g. /cygdrive/c/Cygwin/home/promot/build-promot.lisp,
101with 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
110Now 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
114Notes:
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--------------------------------------------------------------------------------
129Generate jar file
130--------------------------------------------------------------------------------
131
132The jar archive not necessarily have to build on a windows machine, linux is
133also possible. Then, in most cases, the manifest that is already included in
134the jar archive is fine (please check before). Also check the generated jar
135archive of content (no lips files should be there).
136
137
1381. Regenerate/update corba binding (dir: C:\promot\src\promot-svn\src\gui\)
139----------------------------------------------------
140
141Corba binding not included in sources as files are generated from promotgui.idl,
142later only necessary for changes in idl definitions
143
144From the Command Prompt, run (idlj -fall promotgui.idl):
145C:\progra~1\Java\jdk1.6.0_22\bin\idlj.exe -fall C:\promot\src\promot-svn\promot\src\gui\promotgui.idl
146
147
1482. Generate manifest (dir: C:\promot\src\promot-svn\src\gui\)
149----------------------------------------------------
150
151Replace absolute jar path in MANIFEST1.MF to relative path ..\lib.
152The resulting file is saved into a new file named MANIFEST2.MF.
153
154If line of jar path is longer than 72 chars manual breaks are needed, which are
155inserted with a perl command from makefile (using cygwin)
156perl -p -e 's/(.{72})/$1\n /g' <MANIFEST2.MF >MANIFEST.MF
157
158
1593. Clean output and create jar file
160----------------------------------------------------
161
162Go to dir 'promot/bin' which is the Eclipse output dir.
163Clean output dir by removing/excluding all lisp and fasl files
164
165Generate the jar archive including the java compiled classes (*.class)
166found in Eclipse output dir ('promot/bin') and the generated manifest from
167generation dir (src/gui/). The name of the jar archive is PromotUI.jar.
168 
169jar -cmf MANIFEST.MF ../PromotUI.jar *
170
171
172--------------------------------------------------------------------------------
173Copy files for distro
174--------------------------------------------------------------------------------
175
1761. 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
1872. Copy files for java part
188--------------------------------
189
190- copy jar file to C:\promot\build\promot\bin
191
192Notes:
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
1993. Copy all the rest of files
200--------------------------------
201
202This includes directories:
203- bin, docu, emacs, kb, lib, resources
204- Attention: some sub directories must be filtered
205
206This includes also files:
207- .PromotVizScenarios, bugs.txt, licences.txt, promot.bat, promot-server.bat,
208  promot-ui.bat, readme.txt, versions.txt
209
210Tip:
211Check the content of an old self-extracting archive for reference, e.g.
212http://promottrac.mpi-magdeburg.mpg.de/dist/promot-v-0-8-5/windows/promot-v-0-8-5-windows.exe
213
214
215--------------------------------------------------------------------------------
216Create self-extracting archive
217--------------------------------------------------------------------------------
218
219A 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--------------------------------------------------------------------------------
229Batch 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--------------------------------------------------------------------------------
238Misc
239--------------------------------------------------------------------------------
240
2411. Make clean
242-----------------------
243
244- Lists of files to compile are stored in .mk files, which are generated/updated during make