| 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 |
|
|---|
| 13 | svncorerevision=`svnversion ../core`
|
|---|
| 14 | svnpluginsrevision=`svnversion ../plugins`
|
|---|
| 15 | svnrevision="$svncorerevision-$svnpluginsrevision"
|
|---|
| 16 |
|
|---|
| 17 | #export VERSION=latest
|
|---|
| 18 | export VERSION=custom-${svnrevision}
|
|---|
| 19 |
|
|---|
| 20 | echo "Creating Windows Instller for josm-$VERSION"
|
|---|
| 21 |
|
|---|
| 22 | ##################################################################
|
|---|
| 23 | ### Build the Complete josm + Plugin Stuff
|
|---|
| 24 | if true; then
|
|---|
| 25 | (
|
|---|
| 26 | echo "Build the Complete josm Stuff"
|
|---|
| 27 |
|
|---|
| 28 | echo "Compile Josm"
|
|---|
| 29 | cd ../core
|
|---|
| 30 | ant -q clean
|
|---|
| 31 | ant -q compile || exit -1
|
|---|
| 32 | cd ..
|
|---|
| 33 |
|
|---|
| 34 | echo "Compile Josm Plugins"
|
|---|
| 35 | cd plugins
|
|---|
| 36 | ant -q clean
|
|---|
| 37 | ant -q dist || exit -1
|
|---|
| 38 | ) || exit -1
|
|---|
| 39 | fi
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 | echo
|
|---|
| 43 | echo "##################################################################"
|
|---|
| 44 | echo "### Copy the required Stuff into the download Directory"
|
|---|
| 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 |
|
|---|
| 57 | echo
|
|---|
| 58 | echo "##################################################################"
|
|---|
| 59 | echo "### convert jar to exe with launch4j"
|
|---|
| 60 | # (makes attaching to file extensions a lot easier)
|
|---|
| 61 | # launch4j - http://launch4j.sourceforge.net/
|
|---|
| 62 | $LAUNCH4J ./launch4j.xml
|
|---|
| 63 |
|
|---|
| 64 | echo
|
|---|
| 65 | echo "##################################################################"
|
|---|
| 66 | echo "### create the installer exe with makensis"
|
|---|
| 67 | # NSIS - http://nsis.sourceforge.net/Main_Page
|
|---|
| 68 | # apt-get install nsis
|
|---|
| 69 | makensis -DVERSION=$VERSION josm.nsi
|
|---|