Changeset 30580 in osm for applications/editors/josm/nsis
- Timestamp:
- 2014-08-11T02:02:24+02:00 (10 years ago)
- Location:
- applications/editors/josm/nsis
- Files:
-
- 3 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/Programme/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/Programme/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 -
applications/editors/josm/nsis/josm.nsi
r30517 r30580 6 6 ; If you get an error here, please update to at least NSIS 2.07! 7 7 SetCompressor /SOLID lzma 8 9 !define DEST "josm"10 8 11 9 ; Used to refresh the display of file association … … 47 45 !define MUI_WELCOMEPAGE_TEXT $(JOSM_WELCOME_TEXT) 48 46 49 !define MUI_FINISHPAGE_RUN "$INSTDIR\ josm.exe"47 !define MUI_FINISHPAGE_RUN "$INSTDIR\${DEST}.exe" 50 48 51 49 … … 267 265 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "DisplayName" "JOSM ${VERSION}" 268 266 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "UninstallString" '"$INSTDIR\uninstall.exe"' 269 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "Publisher" "The OpenStreetMap developer community, http://www.openstreetmap.org/"270 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "HelpLink" "mailto: newbies@openstreetmap.org."271 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "URLInfoAbout" "http ://www.openstreetmap.org/"272 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "URLUpdateInfo" "http ://wiki.openstreetmap.org/index.php/JOSM"267 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "Publisher" "The OpenStreetMap JOSM developers team, https://josm.openstreetmap.de" 268 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "HelpLink" "mailto:josm-dev@openstreetmap.org." 269 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "URLInfoAbout" "https://josm.openstreetmap.de" 270 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "URLUpdateInfo" "https://josm.openstreetmap.de" 273 271 WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "NoModify" 1 274 272 WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "NoRepair" 1 … … 276 274 277 275 ; Write an entry for ShellExecute 278 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\ josm.exe" "" '$INSTDIR\josm.exe'279 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\ josm.exe" "Path" '$INSTDIR'276 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${DEST}.exe" "" '$INSTDIR\${DEST}.exe' 277 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${DEST}.exe" "Path" '$INSTDIR' 280 278 281 279 SectionEnd ; "Required" … … 286 284 SectionIn 1 287 285 SetOutPath $INSTDIR 288 File " josm.exe"286 File "${DEST}.exe" 289 287 File "josm-tested.jar" 290 288 … … 328 326 ; To quote "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/ch11d.asp": 329 327 ; "Do not include Readme, Help, or Uninstall entries on the Programs menu." 330 CreateShortCut "$SMPROGRAMS\JOSM.lnk" "$INSTDIR\ josm.exe" "" "$INSTDIR\josm.exe" 0 "" "" $(JOSM_LINK_TEXT)328 CreateShortCut "$SMPROGRAMS\JOSM.lnk" "$INSTDIR\${DEST}.exe" "" "$INSTDIR\${DEST}.exe" 0 "" "" $(JOSM_LINK_TEXT) 331 329 SectionEnd 332 330 … … 335 333 ; Create desktop icon 336 334 ; Desktop icon for a program should not be installed as default! 337 CreateShortCut "$DESKTOP\JOSM.lnk" "$INSTDIR\ josm.exe" "" "$INSTDIR\josm.exe" 0 "" "" $(JOSM_LINK_TEXT)335 CreateShortCut "$DESKTOP\JOSM.lnk" "$INSTDIR\${DEST}.exe" "" "$INSTDIR\${DEST}.exe" 0 "" "" $(JOSM_LINK_TEXT) 338 336 SectionEnd 339 337 … … 342 340 ; Create quick launch icon. Does not really exist as of Windows 7/8 but still advanced users use it. 343 341 ; Only disable it by default, see #10241 344 CreateShortCut "$QUICKLAUNCH\JOSM.lnk" "$INSTDIR\ josm.exe" "" "$INSTDIR\josm.exe" 0 "" "" $(JOSM_LINK_TEXT)342 CreateShortCut "$QUICKLAUNCH\JOSM.lnk" "$INSTDIR\${DEST}.exe" "" "$INSTDIR\${DEST}.exe" 0 "" "" $(JOSM_LINK_TEXT) 345 343 SectionEnd 346 344 … … 350 348 ; Create File Extensions 351 349 WriteRegStr HKCR ${OSM_ASSOC} "" "OpenStreetMap data" 352 WriteRegStr HKCR "${OSM_ASSOC}\Shell\open\command" "" '"$INSTDIR\ josm.exe" "%1"'353 WriteRegStr HKCR "${OSM_ASSOC}\DefaultIcon" "" '"$INSTDIR\ josm.exe",0'350 WriteRegStr HKCR "${OSM_ASSOC}\Shell\open\command" "" '"$INSTDIR\${DEST}.exe" "%1"' 351 WriteRegStr HKCR "${OSM_ASSOC}\DefaultIcon" "" '"$INSTDIR\${DEST}.exe",0' 354 352 push $R0 355 353 StrCpy $R0 ".osm" … … 394 392 Abort $(un.JOSM_IN_USE_ERROR) 395 393 NoJOSMErrorMsg: 396 Delete "$INSTDIR\ josm.exe"394 Delete "$INSTDIR\${DEST}.exe" 397 395 Delete "$INSTDIR\imageformats\qjpeg4.dll" 398 396 RMDir "$INSTDIR\imageformats" … … 406 404 407 405 DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" 408 DeleteRegKey HKEY_LOCAL_MACHINE "Software\ josm.exe"409 DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\ josm.exe"406 DeleteRegKey HKEY_LOCAL_MACHINE "Software\${DEST}.exe" 407 DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${DEST}.exe" 410 408 411 409 ; Remove Language preference info -
applications/editors/josm/nsis/launch4j.xml
r30517 r30580 1 1 <launch4jConfig> 2 <headerType>gui</headerType> 3 <outfile>%TARGET%.exe</outfile> 4 <jar>josm-tested.jar</jar> 2 5 <dontWrapJar>true</dontWrapJar> 3 <headerType>0</headerType>4 <jar>josm-tested.jar</jar>5 <outfile>josm.exe</outfile>6 6 <errTitle></errTitle> 7 <downloadUrl>https://java.com/download</downloadUrl> 8 <supportUrl></supportUrl> 7 9 <cmdLine></cmdLine> 8 10 <chdir></chdir> 9 11 <priority>normal</priority> 10 <downloadUrl>https://java.com/download</downloadUrl>11 <supportUrl></supportUrl>12 <customProcName>false</customProcName>13 12 <stayAlive>true</stayAlive> 14 13 <icon>logo.ico</icon> … … 17 16 <minVersion>1.7.0</minVersion> 18 17 <maxVersion></maxVersion> 19 <dontUsePrivateJres>false</dontUsePrivateJres> 20 <initialHeapSize>128</initialHeapSize> 21 <maxHeapSize>1024</maxHeapSize> 18 <jdkPreference>preferJre</jdkPreference> 19 <runtimeBits>%RTBITS%</runtimeBits> 20 <initialHeapSize>%INIHEAP%</initialHeapSize> 21 <maxHeapSize>%MAXHEAP%</maxHeapSize> 22 22 </jre> 23 <versionInfo> 24 <fileVersion>1.5.0.%VERSION%</fileVersion> 25 <txtFileVersion>%VERSION%</txtFileVersion> 26 <fileDescription>Java OpenStreetMap Editor</fileDescription> 27 <copyright>GNU General Public License v2 or later</copyright> 28 <productVersion>1.5.0.%VERSION%</productVersion> 29 <txtProductVersion>%VERSION%</txtProductVersion> 30 <productName>JOSM</productName> 31 <companyName>OpenStreetMap</companyName> 32 <internalName>%TARGET%</internalName> 33 <originalFilename>%TARGET%.exe</originalFilename> 34 </versionInfo> 23 35 </launch4jConfig>
Note:
See TracChangeset
for help on using the changeset viewer.