Changeset 30580 in osm for applications/editors/josm/nsis/josm-setup-unix.sh
- Timestamp:
- 2014-08-11T02:02:24+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/nsis/josm-setup-unix.sh
r29984 r30580 6 6 # apt-get install nsis 7 7 # replace the /usr/share/nsis/Plugins/System.dll with the Version from the nsis .zip File 8 # The one com ming with the debian package is missing the Call:: Function8 # The one coming with the debian package is missing the Call:: Function 9 9 # See also /usr/share/doc/nsis/README.Debian 10 10 # 11 11 # Then download launch4j from http://launch4j.sourceforge.net/ 12 # wget http:// mesh.dl.sourceforge.net/sourceforge/launch4j/launch4j-3.0.0-pre2-linux.tgz12 # wget http://softlayer-ams.dl.sourceforge.net/project/launch4j/launch4j-3/3.4/launch4j-3.4-linux.tgz 13 13 # and unpack it to /usr/share/launch4j 14 14 … … 16 16 17 17 # trying to find launch4j 18 if [ -s /cygdrive/c/Program me/Launch4j/launch4jc.exe ]; then19 # Windows under cygwin 20 LAUNCH4J="/cygdrive/c/Program me/Launch4j/launch4jc.exe"18 if [ -s "/cygdrive/c/Program Files (x86)/Launch4j/launch4jc.exe" ]; then 19 # Windows under cygwin or MobaXterm 20 LAUNCH4J="/cygdrive/c/Program Files (x86)/Launch4j/launch4jc.exe" 21 21 elif [ -s /usr/share/launch4j/launch4j.jar ]; then 22 22 # as described above … … 33 33 34 34 # trying to find makensis 35 if [ -s /cygdrive/c/Program me/nsis/makensis.exe ]; then36 # Windows under cygwin 37 MAKENSIS="/cygdrive/c/Program me/nsis/makensis.exe"35 if [ -s "/cygdrive/c/Program Files (x86)/NSIS/makensis.exe" ]; then 36 # Windows under cygwin or MobaXterm 37 MAKENSIS="/cygdrive/c/Program Files (x86)/NSIS/makensis.exe" 38 38 else 39 39 # UNIX like … … 48 48 export JOSM_FILE="/home/josm/www/download/josm-tested.jar" 49 49 else 50 svncorerevision=`svnversion ../core` 51 svnpluginsrevision=`svnversion ../plugins` 52 svnrevision="$svncorerevision-$svnpluginsrevision" 50 svncorerevision=`svnversion -n ../core` 51 #svnpluginsrevision=`svnversion -n ../plugins` 52 #svnrevision="$svncorerevision-$svnpluginsrevision" 53 53 54 export VERSION=custom-${svnrevision} 54 #export VERSION=custom-${svnrevision} 55 export VERSION=`echo ${svncorerevision} | sed -e 's/M//g' -e 's/S//g' -e 's/P//g'` 55 56 export JOSM_BUILD="yes" 56 57 export WEBKIT_DOWNLOAD="yes" … … 58 59 fi 59 60 60 echo "Creating Windows Installer for josm-$VERSION" 61 echo "Creating Windows Installers for josm-$VERSION" 61 62 62 63 echo … … 96 97 97 98 /bin/cp $JOSM_FILE josm-tested.jar 98 echo99 echo "##################################################################"100 echo "### convert jar to exe with launch4j"101 # (an exe file makes attaching to file extensions a lot easier)102 # launch4j - http://launch4j.sourceforge.net/103 # delete old exe file first104 /bin/rm -f josm.exe105 $LAUNCH4J "launch4j.xml"106 99 107 if ! [ -s josm.exe ]; then 108 echo "NO Josm File Created" 109 exit -1 110 fi 100 function build_exe { 111 101 112 echo 113 echo "##################################################################" 114 echo "### create the josm-installer-${VERSION}.exe with makensis" 115 # NSIS - http://nsis.sourceforge.net/Main_Page 116 # apt-get install nsis 117 $MAKENSIS -V2 -DVERSION=$VERSION josm.nsi 102 export TARGET=$1 # josm / josm64. Used in file name of launcher and installer 103 #export RTBITS=$2 # L4J "runtimeBits" (JVM architecture used by launcher) 104 #export INIHEAP=$3 # L4J "initialHeapSize" (initial heap size in MB) 105 #export MAXHEAP=$4 # L4J "maxHeapSize" (max heap size in MB) 106 107 /bin/rm -f "launch4j_${TARGET}.xml" 108 /bin/sed -e "s/%TARGET%/$1/" -e "s/%RTBITS%/$2/" -e "s/%INIHEAP%/$3/" -e "s/%MAXHEAP%/$4/" -e "s/%VERSION%/$VERSION/" "launch4j.xml" > "launch4j_${TARGET}.xml" 109 110 echo 111 echo "##################################################################" 112 echo "### convert jar to ${TARGET}.exe with launch4j" 113 # (an exe file makes attaching to file extensions a lot easier) 114 # launch4j - http://launch4j.sourceforge.net/ 115 # delete old exe file first 116 /bin/rm -f ${TARGET}.exe 117 "$LAUNCH4J" "launch4j_${TARGET}.xml" 118 118 119 # keep the intermediate file, for debugging 120 /bin/rm josm-intermediate.exe 2>/dev/null >/dev/null 119 if ! [ -s ${TARGET}.exe ]; then 120 echo "NO ${TARGET}.exe File Created" 121 exit -1 122 fi 123 124 /bin/rm -f "launch4j_${TARGET}.xml" 125 126 echo 127 echo "##################################################################" 128 echo "### create the ${TARGET}-installer-${VERSION}.exe with makensis" 129 # NSIS - http://nsis.sourceforge.net/Main_Page 130 # apt-get install nsis 131 "$MAKENSIS" -V2 -DVERSION=$VERSION -DDEST=$TARGET josm.nsi 132 133 # keep the intermediate file, for debugging 134 /bin/rm -f ${TARGET}-intermediate.exe 2>/dev/null >/dev/null 135 /bin/mv ${TARGET}.exe ${TARGET}-intermediate.exe 2>/dev/null >/dev/null 136 } 137 138 build_exe "josm" "64\/32" 128 1024 139 build_exe "josm64" "64" 256 2048 140 121 141 /bin/rm -f josm-tested.jar 2>/dev/null >/dev/null 122 /bin/mv josm.exe josm-intermediate.exe 2>/dev/null >/dev/null
Note:
See TracChangeset
for help on using the changeset viewer.