Changeset 30580 in osm for applications/editors/josm/nsis


Ignore:
Timestamp:
2014-08-11T02:02:24+02:00 (10 years ago)
Author:
donvip
Message:

[josm_nsis] see #josm5302 - prepare ground for 64-bit binaries

Location:
applications/editors/josm/nsis
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/nsis/josm-setup-unix.sh

    r29984 r30580  
    66# apt-get install nsis
    77# 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
     8# The one coming with the debian package is missing the Call:: Function
    99# See also /usr/share/doc/nsis/README.Debian
    1010#
    1111# Then download launch4j from http://launch4j.sourceforge.net/
    12 # wget http://mesh.dl.sourceforge.net/sourceforge/launch4j/launch4j-3.0.0-pre2-linux.tgz
     12# wget http://softlayer-ams.dl.sourceforge.net/project/launch4j/launch4j-3/3.4/launch4j-3.4-linux.tgz
    1313# and unpack it to /usr/share/launch4j
    1414
     
    1616
    1717# trying to find launch4j
    18 if [ -s /cygdrive/c/Programme/Launch4j/launch4jc.exe ]; then
    19     # Windows under cygwin
    20     LAUNCH4J="/cygdrive/c/Programme/Launch4j/launch4jc.exe"
     18if [ -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"
    2121elif [ -s /usr/share/launch4j/launch4j.jar ]; then
    2222    # as described above
     
    3333
    3434# trying to find makensis
    35 if [ -s /cygdrive/c/Programme/nsis/makensis.exe ]; then
    36     # Windows under cygwin
    37     MAKENSIS="/cygdrive/c/Programme/nsis/makensis.exe"
     35if [ -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"
    3838else
    3939    # UNIX like
     
    4848  export JOSM_FILE="/home/josm/www/download/josm-tested.jar"
    4949else
    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"
    5353
    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'`
    5556  export JOSM_BUILD="yes"
    5657  export WEBKIT_DOWNLOAD="yes"
     
    5859fi
    5960
    60 echo "Creating Windows Installer for josm-$VERSION"
     61echo "Creating Windows Installers for josm-$VERSION"
    6162
    6263echo
     
    9697
    9798/bin/cp $JOSM_FILE josm-tested.jar
    98 echo
    99 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 first
    104 /bin/rm -f josm.exe
    105 $LAUNCH4J "launch4j.xml"
    10699
    107 if ! [ -s josm.exe ]; then
    108     echo "NO Josm File Created"
    109     exit -1
    110 fi
     100function build_exe {
    111101
    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"
    118118
    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
     138build_exe "josm" "64\/32" 128 1024
     139build_exe "josm64"  "64" 256 2048
     140
    121141/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  
    66; If you get an error here, please update to at least NSIS 2.07!
    77SetCompressor /SOLID lzma
    8 
    9 !define DEST "josm"
    108
    119; Used to refresh the display of file association
     
    4745!define MUI_WELCOMEPAGE_TEXT $(JOSM_WELCOME_TEXT)
    4846
    49 !define MUI_FINISHPAGE_RUN "$INSTDIR\josm.exe"
     47!define MUI_FINISHPAGE_RUN "$INSTDIR\${DEST}.exe"
    5048
    5149
     
    267265WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "DisplayName" "JOSM ${VERSION}"
    268266WriteRegStr 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"
     267WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "Publisher" "The OpenStreetMap JOSM developers team, https://josm.openstreetmap.de"
     268WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "HelpLink" "mailto:josm-dev@openstreetmap.org."
     269WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "URLInfoAbout" "https://josm.openstreetmap.de"
     270WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "URLUpdateInfo" "https://josm.openstreetmap.de"
    273271WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "NoModify" 1
    274272WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\OSM" "NoRepair" 1
     
    276274
    277275; 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'
     276WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${DEST}.exe" "" '$INSTDIR\${DEST}.exe'
     277WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${DEST}.exe" "Path" '$INSTDIR'
    280278
    281279SectionEnd ; "Required"
     
    286284SectionIn 1
    287285SetOutPath $INSTDIR
    288 File "josm.exe"
     286File "${DEST}.exe"
    289287File "josm-tested.jar"
    290288
     
    328326; To quote "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/ch11d.asp":
    329327; "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)
     328CreateShortCut "$SMPROGRAMS\JOSM.lnk" "$INSTDIR\${DEST}.exe" "" "$INSTDIR\${DEST}.exe" 0 "" "" $(JOSM_LINK_TEXT)
    331329SectionEnd
    332330
     
    335333; Create desktop icon
    336334; 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)
     335CreateShortCut "$DESKTOP\JOSM.lnk" "$INSTDIR\${DEST}.exe" "" "$INSTDIR\${DEST}.exe" 0 "" "" $(JOSM_LINK_TEXT)
    338336SectionEnd
    339337
     
    342340; Create quick launch icon. Does not really exist as of Windows 7/8 but still advanced users use it.
    343341; Only disable it by default, see #10241
    344 CreateShortCut "$QUICKLAUNCH\JOSM.lnk" "$INSTDIR\josm.exe" "" "$INSTDIR\josm.exe" 0 "" "" $(JOSM_LINK_TEXT)
     342CreateShortCut "$QUICKLAUNCH\JOSM.lnk" "$INSTDIR\${DEST}.exe" "" "$INSTDIR\${DEST}.exe" 0 "" "" $(JOSM_LINK_TEXT)
    345343SectionEnd
    346344
     
    350348; Create File Extensions
    351349WriteRegStr 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'
     350WriteRegStr HKCR "${OSM_ASSOC}\Shell\open\command" "" '"$INSTDIR\${DEST}.exe" "%1"'
     351WriteRegStr HKCR "${OSM_ASSOC}\DefaultIcon" "" '"$INSTDIR\${DEST}.exe",0'
    354352push $R0
    355353        StrCpy $R0 ".osm"
     
    394392        Abort $(un.JOSM_IN_USE_ERROR)
    395393NoJOSMErrorMsg:
    396 Delete "$INSTDIR\josm.exe"
     394Delete "$INSTDIR\${DEST}.exe"
    397395Delete "$INSTDIR\imageformats\qjpeg4.dll"
    398396RMDir "$INSTDIR\imageformats"
     
    406404
    407405DeleteRegKey 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"
     406DeleteRegKey HKEY_LOCAL_MACHINE "Software\${DEST}.exe"
     407DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\App Paths\${DEST}.exe"
    410408
    411409; Remove Language preference info
  • applications/editors/josm/nsis/launch4j.xml

    r30517 r30580  
    11<launch4jConfig>
     2  <headerType>gui</headerType>
     3  <outfile>%TARGET%.exe</outfile>
     4  <jar>josm-tested.jar</jar>
    25  <dontWrapJar>true</dontWrapJar>
    3   <headerType>0</headerType>
    4   <jar>josm-tested.jar</jar>
    5   <outfile>josm.exe</outfile>
    66  <errTitle></errTitle>
     7  <downloadUrl>https://java.com/download</downloadUrl>
     8  <supportUrl></supportUrl>
    79  <cmdLine></cmdLine>
    810  <chdir></chdir>
    911  <priority>normal</priority>
    10   <downloadUrl>https://java.com/download</downloadUrl>
    11   <supportUrl></supportUrl>
    12   <customProcName>false</customProcName>
    1312  <stayAlive>true</stayAlive>
    1413  <icon>logo.ico</icon>
     
    1716    <minVersion>1.7.0</minVersion>
    1817    <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>
    2222  </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>
    2335</launch4jConfig>
Note: See TracChangeset for help on using the changeset viewer.