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 | export VERSION=latest
|
---|
14 | #export VERSION=custom
|
---|
15 |
|
---|
16 | ##################################################################
|
---|
17 | ### Build the Complete josm + Plugin Stuff
|
---|
18 | if true; then
|
---|
19 | (
|
---|
20 | echo "Build the Complete josm Stuff"
|
---|
21 |
|
---|
22 | echo "Compile Josm"
|
---|
23 | cd ../core
|
---|
24 | ant -q clean
|
---|
25 | ant -q compile || exit -1
|
---|
26 | cd ..
|
---|
27 |
|
---|
28 | echo "Compile Josm Plugins"
|
---|
29 | cd plugins
|
---|
30 | ant -q clean
|
---|
31 | ant -q dist || exit -1
|
---|
32 | ) || exit -1
|
---|
33 | fi
|
---|
34 |
|
---|
35 |
|
---|
36 | echo
|
---|
37 | echo "##################################################################"
|
---|
38 | echo "### Copy the required Stuff into the download Directory"
|
---|
39 | mkdir -p downloads
|
---|
40 | (
|
---|
41 | cd downloads
|
---|
42 |
|
---|
43 | # get latest josm version (and license)
|
---|
44 | cp ../../core/LICENSE LICENSE
|
---|
45 | cp ../../core/dist/josm-custom.jar josm-latest.jar
|
---|
46 |
|
---|
47 | # Get all plugins
|
---|
48 | cp ../../plugins/dist/*.jar .
|
---|
49 | )
|
---|
50 |
|
---|
51 | echo
|
---|
52 | echo "##################################################################"
|
---|
53 | echo "### convert jar to exe with launch4j"
|
---|
54 | # (makes attaching to file extensions a lot easier)
|
---|
55 | # launch4j - http://launch4j.sourceforge.net/
|
---|
56 | $LAUNCH4J ./launch4j.xml
|
---|
57 |
|
---|
58 | echo
|
---|
59 | echo "##################################################################"
|
---|
60 | echo "### create the installer exe with makensis"
|
---|
61 | # NSIS - http://nsis.sourceforge.net/Main_Page
|
---|
62 | # apt-get install nsis
|
---|
63 | makensis -DVERSION=$VERSION josm.nsi
|
---|