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

Last change on this file since 17364 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
RevLine 
[5148]1#!/bin/bash
2
[5204]3# Creates an josm-setup-xy.exe File
[5229]4#
[5148]5# for working on a debian-unix system install the nsis package with
6# apt-get install nsis
[5164]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
[5148]14
15## settings ##
16
[14191]17# trying to find launch4j
[14189]18if [ -s /cygdrive/c/Programme/Launch4j/launch4jc.exe ]; then
[14191]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"
[14189]27fi
[14191]28echo Using launch4j: $LAUNCH4J
[14189]29
[14191]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
[14189]39
[5157]40svncorerevision=`svnversion ../core`
41svnpluginsrevision=`svnversion ../plugins`
42svnrevision="$svncorerevision-$svnpluginsrevision"
[5148]43
[5157]44#export VERSION=latest
[5214]45export VERSION=custom-${svnrevision}
[5157]46
[5204]47echo "Creating Windows Installer for josm-$VERSION"
[5157]48
[14189]49echo
50echo "##################################################################"
51echo "### Download and unzip the webkit stuff"
[14277]52wget --continue --timestamping http://josm.openstreetmap.de/download/windows/webkit-image.zip
[14189]53mkdir -p webkit-image
54cd webkit-image
55unzip -o ../webkit-image.zip
56cd ..
57
58echo
59echo "##################################################################"
60echo "### Build the Complete josm + Plugin Stuff"
[5148]61if true; then
[5149]62 (
63 echo "Build the Complete josm Stuff"
[5148]64
[5149]65 echo "Compile Josm"
66 cd ../core
[5156]67 ant -q clean
68 ant -q compile || exit -1
[5149]69 cd ..
70
71 echo "Compile Josm Plugins"
72 cd plugins
[5156]73 ant -q clean
74 ant -q dist || exit -1
[5149]75 ) || exit -1
[5148]76fi
77
[5149]78echo
79echo "##################################################################"
80echo "### convert jar to exe with launch4j"
[5204]81# (an exe file makes attaching to file extensions a lot easier)
[5148]82# launch4j - http://launch4j.sourceforge.net/
[5229]83# delete old exe file first
[11437]84rm -f josm.exe
[14186]85$LAUNCH4J "launch4j.xml"
[5148]86
[5164]87if ! [ -s josm.exe ]; then
88 echo "NO Josm File Created"
89 exit -1
90fi
91
[5149]92echo
93echo "##################################################################"
[11594]94echo "### create the josm-installer-${VERSION}.exe with makensis"
[5148]95# NSIS - http://nsis.sourceforge.net/Main_Page
96# apt-get install nsis
[14186]97$MAKENSIS -V2 -DVERSION=$VERSION josm.nsi
[5214]98
[14186]99# keep the intermediate file, for debugging
100rm -f josm-intermediate.exe
[11437]101mv josm.exe josm-intermediate.exe
Note: See TracBrowser for help on using the repository browser.