[5230] | 1 | #!/bin/bash
|
---|
[2601] | 2 |
|
---|
[5230] | 3 | # Creates an josm-setup-xy.exe File
|
---|
| 4 | #
|
---|
| 5 | # for working on a debian-unix system install the nsis package with
|
---|
| 6 | # apt-get install nsis
|
---|
| 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
|
---|
| 14 |
|
---|
[2786] | 15 | ## settings ##
|
---|
[5230] | 16 | LAUNCH4J="java -jar /usr/share/launch4j/launch4j.jar"
|
---|
[2786] | 17 |
|
---|
[5230] | 18 | svncorerevision=`svnversion ../core`
|
---|
| 19 | svnpluginsrevision=`svnversion ../plugins`
|
---|
| 20 | svnrevision="$svncorerevision-$svnpluginsrevision"
|
---|
[2786] | 21 |
|
---|
[5230] | 22 | export VERSION=latest
|
---|
| 23 | #export VERSION=custom-${svnrevision}
|
---|
[2786] | 24 |
|
---|
[3771] | 25 | LAUNCH4J_XML="C:\Dokumente und Einstellungen\ulfl\Eigene Dateien\svn.openstreetmap.org\applications\editors\josm\nsis\launch4j.xml"
|
---|
[2786] | 26 |
|
---|
[5230] | 27 | echo "Creating Windows Installer for josm-$VERSION"
|
---|
[2786] | 28 |
|
---|
[5230] | 29 | ##################################################################
|
---|
| 30 | ### Build the Complete josm + Plugin Stuff
|
---|
| 31 | if true; then
|
---|
| 32 | (
|
---|
| 33 | echo "Build the Complete josm Stuff"
|
---|
| 34 |
|
---|
| 35 | echo "Compile Josm"
|
---|
| 36 | cd ../core
|
---|
| 37 | ant -q clean
|
---|
| 38 | ant -q compile || exit -1
|
---|
| 39 | cd ..
|
---|
| 40 |
|
---|
| 41 | echo "Compile Josm Plugins"
|
---|
| 42 | cd plugins
|
---|
| 43 | ant -q clean
|
---|
| 44 | ant -q dist || exit -1
|
---|
| 45 | ) || exit -1
|
---|
| 46 | fi
|
---|
| 47 |
|
---|
| 48 | echo
|
---|
| 49 | echo "##################################################################"
|
---|
| 50 | echo "### convert jar to exe with launch4j"
|
---|
| 51 | # (an exe file makes attaching to file extensions a lot easier)
|
---|
[2601] | 52 | # launch4j - http://launch4j.sourceforge.net/
|
---|
[5206] | 53 |
|
---|
| 54 | # delete old exe file first
|
---|
| 55 | rm josm.exe
|
---|
[5230] | 56 | "/cygdrive/c/Program Files/Launch4j/launch4jc.exe" "$LAUNCH4J_XML"
|
---|
[5206] | 57 | # using a relative path still doesn't work with launch4j 3.0.0-pre2
|
---|
[5230] | 58 | #"/cygdrive/c/Program Files/Launch4j/launch4jc.exe" ./launch4j.xml
|
---|
| 59 | if ! [ -s josm.exe ]; then
|
---|
| 60 | echo "NO Josm File Created"
|
---|
| 61 | exit -1
|
---|
| 62 | fi
|
---|
[2601] | 63 |
|
---|
[5230] | 64 | echo
|
---|
| 65 | echo "##################################################################"
|
---|
| 66 | echo "### create the installer exe with makensis"
|
---|
[2601] | 67 | # NSIS - http://nsis.sourceforge.net/Main_Page
|
---|
[5230] | 68 | "/cygdrive/c/Program Files/nsis/makensis.exe" /DVERSION=$VERSION josm.nsi
|
---|
[5214] | 69 |
|
---|
| 70 | # delete the intermediate file, just to avoid confusion
|
---|
| 71 | rm josm.exe
|
---|