Build Notes - Windows (build_wxp) -------------------------------------------------------------------------------- Build requirements -------------------------------------------------------------------------------- - Cygwin - includes perl, awk, sed, autotools and make - includes gcc 3.4.4 - C:\Cygwin\Cygwin.bat - Allegro CL 9.0 - to build lisp sources - C:\Program Files\Allegro CL 9.0\ (C:\progra~1\allegr~1.0\) - Java 1.6.0 - to build java sources - C:\Program Files\Java\jdk1.6.0_22\ - Eclipse - to compile the java sources - C:\promot\tools\eclipse-java-helios-SR1-win32\eclipse\eclipse.exe - alternatively use a linux machine, see section 'Generate jar file' - Configure is used to set some variables in source files - Build.win is used on cygwin, but directories have to be adapted to your source directories - Actual dir of promot sources is C:\promot\src\promot-svn -------------------------------------------------------------------------------- Get SVN sources -------------------------------------------------------------------------------- Start SVN Checkout (TortoiseSVN) to checkout repository of URL: svn+ssh://svn.mpi-magdeburg.mpg.de/var/lib/svn/PromotDiva/Promot/trunk Copy ProMoT sources to directory C:\promot\src\promot-svn Or Update the ProMoT sources under C:\promot\src\promot-svn using TortoiseSVN) via mouse right-click, SVN Update Or start cygwin $ svn co svn+ssh://svn.mpi-magdeburg.mpg.de/var/lib/svn/PromotDiva/Promot/trunk promot-svn --username [your username] Or Use Eclipse and its svn plugin to update the sources (only java part) -------------------------------------------------------------------------------- Generate (lisp) executable -------------------------------------------------------------------------------- 1. clean lisp -------------------------- Remove all fasl files by hand in the following directories C:\promot\src\libsbml-2.2.0 and C:\promot\src\promot-svn Remove dir 'application' C:\promot\src\promot-svn\promot\application\ 2. Configure ProMoT ------------------------------------------------------- start cygwin $ ./build.win (C:\promot\src\promot-svn\) 3. Build/rebuild lisp interface of libsbml-2.2.0 ------------------------------------------------------- start alisp of acl9.0 (C:\Program Files\Allegro CL 9.0\alisp8.exe) (user who created the image will be set to the environment variable USER) ;;build/ rebuild lisp interface of libsbml-2.2.0 (require :asdf "c:/promot/src/promot-svn/code-generator/lisp-utilities/asdf.lisp") (load "c:/promot/src/libsbml-2.2.0/bindings/lisp/uffi/uffi.asd") (asdf:operate 'asdf:load-op 'uffi) (load "c:/promot/src/libsbml-2.2.0/bindings/lisp/cparse/cparse.asd") (asdf:operate 'asdf:load-op 'cparse) (load "c:/promot/src/libsbml-2.2.0/bindings/lisp/libsbml.asd") (asdf:operate 'asdf:load-op 'libsbml) 4. Build lisp application (enter commands) -------------------------------------------------------- Create a file, e.g. /cygdrive/c/Cygwin/home/promot/build-promot.lisp, with the following contents: --CUT-- (setq compiler::verify-type-declarations-switch nil) (load "c:/promot/src/promot-svn/promot/src/promot.asd") (asdf:operate 'asdf:load-op 'promot) (pk::generate-application) --CUT-- Now run from Cygwin: /cygdrive/c/Program\ Files/Allegro\ CL\ 9.0/alisp8.exe -qq -q -locale "C" -L /cygwin/home/promot/build-promot.lisp Notes: - image argument should not contain a cygwin path - promot.asd will load promot-config.lisp, which should contain the path to asdf - use the supplied asdf, the asdf coming with acl9.0 doesn't work with promot.asd - For libsbml2.2.0 and xerces2.7: creation of dlls using Visual Studio 2008 Express (dlls included for lisp image) - Visual Studio Project 'libsbml' is located under C:\promot\src\libsbml-2.2.0\win32, dlls are built at C:\promot\src\libsbml-2.2.0\win32\bin - Visual Studio Project 'xerces' is under C:\promot\src\xerces-c-src_2_7_0\Projects\Win32\vc7.1\xerces-all\XercesLib, dlls are built at C:\promot\src\xerces-c-src_2_7_0\Build\Win32\vc7.1\Release - dlls are copied to C:\promot\src\libsbml-2.2.0\lib, specified in C:\promot\src\libsbml-2.2.0\bindings\lisp -------------------------------------------------------------------------------- Generate jar file -------------------------------------------------------------------------------- The jar archive not necessarily have to build on a windows machine, linux is also possible. Then, in most cases, the manifest that is already included in the jar archive is fine (please check before). Also check the generated jar archive of content (no lips files should be there). 1. Regenerate/update corba binding (dir: C:\promot\src\promot-svn\src\gui\) ---------------------------------------------------- Corba binding not included in sources as files are generated from promotgui.idl, later only necessary for changes in idl definitions From the Command Prompt, run (idlj -fall promotgui.idl): C:\progra~1\Java\jdk1.6.0_22\bin\idlj.exe -fall C:\promot\src\promot-svn\promot\src\gui\promotgui.idl 2. Generate manifest (dir: C:\promot\src\promot-svn\src\gui\) ---------------------------------------------------- Replace absolute jar path in MANIFEST1.MF to relative path ..\lib. The resulting file is saved into a new file named MANIFEST2.MF. If line of jar path is longer than 72 chars manual breaks are needed, which are inserted with a perl command from makefile (using cygwin) perl -p -e 's/(.{72})/$1\n /g' MANIFEST.MF 3. Clean output and create jar file ---------------------------------------------------- Go to dir 'promot/bin' which is the Eclipse output dir. Clean output dir by removing/excluding all lisp and fasl files Generate the jar archive including the java compiled classes (*.class) found in Eclipse output dir ('promot/bin') and the generated manifest from generation dir (src/gui/). The name of the jar archive is PromotUI.jar. jar -cmf MANIFEST.MF ../PromotUI.jar * -------------------------------------------------------------------------------- Copy files for distro -------------------------------------------------------------------------------- 1. Copy files for lisp part -------------------------------- - Copy files from C:\promot\src\promot-svn\promot\application\version (e.g. v-0-8-5) to C:\promot\build\promot\bin - In particular these are: - promot.dxl (lisp image) - promot.lic (licence) - version (version number) 2. Copy files for java part -------------------------------- - copy jar file to C:\promot\build\promot\bin Notes: - promot.exe located in dir C:\promot\src\promot-svn\promot\application\version (e.g. v-0-8-5) is without icon - Instead use promot.exe in C:\promot\build\promot\bin that includes a promot icon and has the same functionality 3. Copy all the rest of files -------------------------------- This includes directories: - bin, docu, emacs, kb, lib, resources - Attention: some sub directories must be filtered This includes also files: - .PromotVizScenarios, bugs.txt, licences.txt, promot.bat, promot-server.bat, promot-ui.bat, readme.txt, versions.txt Tip: Check the content of an old self-extracting archive for reference, e.g. http://promottrac.mpi-magdeburg.mpg.de/dist/promot-v-0-8-5/windows/promot-v-0-8-5-windows.exe -------------------------------------------------------------------------------- Create self-extracting archive -------------------------------------------------------------------------------- A self-extracting archive can be created using 7-zip (http://www.7-zip.org/). - Installed on build_wxp at C:\Program Files\7-Zip - Right-click on the folder that you want to archive for context menu - Choose 'Add to Archive...' - The archive name should end on '*.exe', the archive format should be '7z' - Be sure to check the 'Create SFX archive' option -------------------------------------------------------------------------------- Batch files for scripts -------------------------------------------------------------------------------- - Use batch files (*.bat) to start ProMoT server, GUI or both - They will set PROMOT_HOME to installation dir (dir of *.bat file) - TODO: mdl2diana not considered at the moment -------------------------------------------------------------------------------- Misc -------------------------------------------------------------------------------- 1. Make clean ----------------------- - Lists of files to compile are stored in .mk files, which are generated/updated during make