source: subversion/applications/editors/josm/nsis/josm-setup-unix.sh @ 14189

Last change on this file since 14189 was 14189, checked in by ulf, 11 years ago

further unify files, add download/unzip of webkit stuff

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