[5148] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
[5204] | 3 | # Creates an josm-setup-xy.exe File
|
---|
[5229] | 4 | #
|
---|
[5148] | 5 | # for working on a debian-unix system install the nsis package with
|
---|
| 6 | # apt-get install nsis
|
---|
[5164] | 7 | # replace the /usr/share/nsis/Plugins/System.dll with the Version from the nsis .zip File
|
---|
| 8 | # The one comming with the debian package is missing the Call:: Function
|
---|
| 9 | # See also /usr/share/doc/nsis/README.Debian
|
---|
| 10 | #
|
---|
| 11 | # Then download launch4j from http://launch4j.sourceforge.net/
|
---|
| 12 | # wget http://mesh.dl.sourceforge.net/sourceforge/launch4j/launch4j-3.0.0-pre2-linux.tgz
|
---|
| 13 | # and unpack it to /usr/share/launch4j
|
---|
[5148] | 14 |
|
---|
| 15 | ## settings ##
|
---|
[5164] | 16 | LAUNCH4J="java -jar /usr/share/launch4j/launch4j.jar"
|
---|
[5148] | 17 |
|
---|
[5157] | 18 | svncorerevision=`svnversion ../core`
|
---|
| 19 | svnpluginsrevision=`svnversion ../plugins`
|
---|
| 20 | svnrevision="$svncorerevision-$svnpluginsrevision"
|
---|
[5148] | 21 |
|
---|
[5157] | 22 | #export VERSION=latest
|
---|
[5214] | 23 | export VERSION=custom-${svnrevision}
|
---|
[5157] | 24 |
|
---|
[5204] | 25 | echo "Creating Windows Installer for josm-$VERSION"
|
---|
[5157] | 26 |
|
---|
[5148] | 27 | ##################################################################
|
---|
| 28 | ### Build the Complete josm + Plugin Stuff
|
---|
| 29 | if true; then
|
---|
[5149] | 30 | (
|
---|
| 31 | echo "Build the Complete josm Stuff"
|
---|
[5148] | 32 |
|
---|
[5149] | 33 | echo "Compile Josm"
|
---|
| 34 | cd ../core
|
---|
[5156] | 35 | ant -q clean
|
---|
| 36 | ant -q compile || exit -1
|
---|
[5149] | 37 | cd ..
|
---|
| 38 |
|
---|
| 39 | echo "Compile Josm Plugins"
|
---|
| 40 | cd plugins
|
---|
[5156] | 41 | ant -q clean
|
---|
| 42 | ant -q dist || exit -1
|
---|
[5149] | 43 | ) || exit -1
|
---|
[5148] | 44 | fi
|
---|
| 45 |
|
---|
[5149] | 46 | echo
|
---|
| 47 | echo "##################################################################"
|
---|
| 48 | echo "### convert jar to exe with launch4j"
|
---|
[5204] | 49 | # (an exe file makes attaching to file extensions a lot easier)
|
---|
[5148] | 50 | # launch4j - http://launch4j.sourceforge.net/
|
---|
[5229] | 51 | # delete old exe file first
|
---|
[5164] | 52 | rm josm.exe
|
---|
[5148] | 53 | $LAUNCH4J ./launch4j.xml
|
---|
| 54 |
|
---|
[5164] | 55 | if ! [ -s josm.exe ]; then
|
---|
| 56 | echo "NO Josm File Created"
|
---|
| 57 | exit -1
|
---|
| 58 | fi
|
---|
| 59 |
|
---|
[5149] | 60 | echo
|
---|
| 61 | echo "##################################################################"
|
---|
| 62 | echo "### create the installer exe with makensis"
|
---|
[5148] | 63 | # NSIS - http://nsis.sourceforge.net/Main_Page
|
---|
| 64 | # apt-get install nsis
|
---|
[5163] | 65 | makensis -V2 -DVERSION=$VERSION josm.nsi
|
---|
[5214] | 66 |
|
---|
| 67 | # delete the intermediate file, just to avoid confusion
|
---|
| 68 | rm josm.exe
|
---|