[5148] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | # Creates an josm-install.exe File
|
---|
| 4 | # for working on a debian-unix system install the nsis package with
|
---|
| 5 | # apt-get install nsis
|
---|
| 6 | # replace the /usr/share/nsis/Plugins/System.dll with the new Version from the nsis .zip File
|
---|
| 7 | # The old one is missing the Call:: Function
|
---|
| 8 | # then download launch4j from http://launch4j.sourceforge.net/
|
---|
| 9 |
|
---|
| 10 | ## settings ##
|
---|
| 11 | LAUNCH4J="java -jar launch4j/launch4j.jar"
|
---|
| 12 |
|
---|
[5157] | 13 | svncorerevision=`svnversion ../core`
|
---|
| 14 | svnpluginsrevision=`svnversion ../plugins`
|
---|
| 15 | svnrevision="$svncorerevision-$svnpluginsrevision"
|
---|
[5148] | 16 |
|
---|
[5157] | 17 | #export VERSION=latest
|
---|
| 18 | export VERSION=custom-${svnrevision}
|
---|
| 19 |
|
---|
| 20 | echo "Creating Windows Instller for josm-$VERSION"
|
---|
| 21 |
|
---|
[5148] | 22 | ##################################################################
|
---|
| 23 | ### Build the Complete josm + Plugin Stuff
|
---|
| 24 | if true; then
|
---|
[5149] | 25 | (
|
---|
| 26 | echo "Build the Complete josm Stuff"
|
---|
[5148] | 27 |
|
---|
[5149] | 28 | echo "Compile Josm"
|
---|
| 29 | cd ../core
|
---|
[5156] | 30 | ant -q clean
|
---|
| 31 | ant -q compile || exit -1
|
---|
[5149] | 32 | cd ..
|
---|
| 33 |
|
---|
| 34 | echo "Compile Josm Plugins"
|
---|
| 35 | cd plugins
|
---|
[5156] | 36 | ant -q clean
|
---|
| 37 | ant -q dist || exit -1
|
---|
[5149] | 38 | ) || exit -1
|
---|
[5148] | 39 | fi
|
---|
| 40 |
|
---|
| 41 |
|
---|
[5149] | 42 | echo
|
---|
| 43 | echo "##################################################################"
|
---|
| 44 | echo "### Copy the required Stuff into the download Directory"
|
---|
[5148] | 45 | mkdir -p downloads
|
---|
| 46 | (
|
---|
| 47 | cd downloads
|
---|
| 48 |
|
---|
| 49 | # get latest josm version (and license)
|
---|
| 50 | cp ../../core/LICENSE LICENSE
|
---|
| 51 | cp ../../core/dist/josm-custom.jar josm-latest.jar
|
---|
| 52 |
|
---|
| 53 | # Get all plugins
|
---|
| 54 | cp ../../plugins/dist/*.jar .
|
---|
| 55 | )
|
---|
| 56 |
|
---|
[5149] | 57 | echo
|
---|
| 58 | echo "##################################################################"
|
---|
| 59 | echo "### convert jar to exe with launch4j"
|
---|
[5148] | 60 | # (makes attaching to file extensions a lot easier)
|
---|
| 61 | # launch4j - http://launch4j.sourceforge.net/
|
---|
| 62 | $LAUNCH4J ./launch4j.xml
|
---|
| 63 |
|
---|
[5149] | 64 | echo
|
---|
| 65 | echo "##################################################################"
|
---|
| 66 | echo "### create the installer exe with makensis"
|
---|
[5148] | 67 | # NSIS - http://nsis.sourceforge.net/Main_Page
|
---|
| 68 | # apt-get install nsis
|
---|
| 69 | makensis -DVERSION=$VERSION josm.nsi
|
---|