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

Last change on this file since 5164 was 5164, checked in by joerg, 17 years ago

josm-setup-unix.sh: warn and exit if files are not build, move lanch4j executable to /usr/share

  • Property svn:executable set to *
File size: 2.1 KB
Line 
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 Version from the nsis .zip File
7# The one comming with the debian package is missing the Call:: Function
8# See also /usr/share/doc/nsis/README.Debian
9#
10# Then download launch4j from http://launch4j.sourceforge.net/
11# wget http://mesh.dl.sourceforge.net/sourceforge/launch4j/launch4j-3.0.0-pre2-linux.tgz
12# and unpack it to /usr/share/launch4j
13
14## settings ##
15LAUNCH4J="java -jar /usr/share/launch4j/launch4j.jar"
16
17svncorerevision=`svnversion ../core`
18svnpluginsrevision=`svnversion ../plugins`
19svnrevision="$svncorerevision-$svnpluginsrevision"
20
21#export VERSION=latest
22export VERSION=custom-${svnrevision}
23
24echo "Creating Windows Instller for josm-$VERSION"
25
26##################################################################
27### Build the Complete josm + Plugin Stuff
28if true; then
29 (
30 echo "Build the Complete josm Stuff"
31
32 echo "Compile Josm"
33 cd ../core
34 ant -q clean
35 ant -q compile || exit -1
36 cd ..
37
38 echo "Compile Josm Plugins"
39 cd plugins
40 ant -q clean
41 ant -q dist || exit -1
42 ) || exit -1
43fi
44
45
46echo
47echo "##################################################################"
48echo "### Copy the required Stuff into the download Directory"
49mkdir -p downloads
50(
51 cd downloads
52
53 # get latest josm version (and license)
54 cp ../../core/LICENSE LICENSE
55 cp ../../core/dist/josm-custom.jar josm-latest.jar
56
57 # Get all plugins
58 cp ../../plugins/dist/*.jar .
59)
60
61echo
62echo "##################################################################"
63echo "### convert jar to exe with launch4j"
64# (makes attaching to file extensions a lot easier)
65# launch4j - http://launch4j.sourceforge.net/
66rm josm.exe
67$LAUNCH4J ./launch4j.xml
68
69if ! [ -s josm.exe ]; then
70 echo "NO Josm File Created"
71 exit -1
72fi
73
74echo
75echo "##################################################################"
76echo "### create the installer exe with makensis"
77# NSIS - http://nsis.sourceforge.net/Main_Page
78# apt-get install nsis
79makensis -V2 -DVERSION=$VERSION josm.nsi
Note: See TracBrowser for help on using the repository browser.