source: osm/applications/editors/josm/nsis/josm-setup-unix.sh@ 16215

Last change on this file since 16215 was 14277, checked in by ulf, 16 years ago

use wget settings, so we would download a new version of the webkit stuff

  • Property svn:executable set to *
File size: 2.9 KB
Line 
1#!/bin/bash
2
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
15## settings ##
16
17# trying to find launch4j
18if [ -s /cygdrive/c/Programme/Launch4j/launch4jc.exe ]; then
19 # Windows under cygwin
20 LAUNCH4J="/cygdrive/c/Programme/Launch4j/launch4jc.exe"
21elif [ -s /usr/share/launch4j/launch4j.jar ]; then
22 # as described above
23 LAUNCH4J="java -jar /usr/share/launch4j/launch4j.jar"
24else
25 # launch4j installed locally under this nsis folder
26 LAUNCH4J="java -jar ./launch4j/launch4j.jar"
27fi
28echo Using launch4j: $LAUNCH4J
29
30# trying to find makensis
31if [ -s /cygdrive/c/Programme/nsis/makensis.exe ]; then
32 # Windows under cygwin
33 MAKENSIS="/cygdrive/c/Programme/nsis/makensis.exe"
34else
35 # UNIX like
36 MAKENSIS=makensis
37fi
38echo Using NSIS: $MAKENSIS
39
40svncorerevision=`svnversion ../core`
41svnpluginsrevision=`svnversion ../plugins`
42svnrevision="$svncorerevision-$svnpluginsrevision"
43
44#export VERSION=latest
45export VERSION=custom-${svnrevision}
46
47echo "Creating Windows Installer for josm-$VERSION"
48
49echo
50echo "##################################################################"
51echo "### Download and unzip the webkit stuff"
52wget --continue --timestamping http://josm.openstreetmap.de/download/windows/webkit-image.zip
53mkdir -p webkit-image
54cd webkit-image
55unzip -o ../webkit-image.zip
56cd ..
57
58echo
59echo "##################################################################"
60echo "### Build the Complete josm + Plugin Stuff"
61if true; then
62 (
63 echo "Build the Complete josm Stuff"
64
65 echo "Compile Josm"
66 cd ../core
67 ant -q clean
68 ant -q compile || exit -1
69 cd ..
70
71 echo "Compile Josm Plugins"
72 cd plugins
73 ant -q clean
74 ant -q dist || exit -1
75 ) || exit -1
76fi
77
78echo
79echo "##################################################################"
80echo "### convert jar to exe with launch4j"
81# (an exe file makes attaching to file extensions a lot easier)
82# launch4j - http://launch4j.sourceforge.net/
83# delete old exe file first
84rm -f josm.exe
85$LAUNCH4J "launch4j.xml"
86
87if ! [ -s josm.exe ]; then
88 echo "NO Josm File Created"
89 exit -1
90fi
91
92echo
93echo "##################################################################"
94echo "### create the josm-installer-${VERSION}.exe with makensis"
95# NSIS - http://nsis.sourceforge.net/Main_Page
96# apt-get install nsis
97$MAKENSIS -V2 -DVERSION=$VERSION josm.nsi
98
99# keep the intermediate file, for debugging
100rm -f josm-intermediate.exe
101mv josm.exe josm-intermediate.exe
Note: See TracBrowser for help on using the repository browser.