Ignore:
Timestamp:
2021-08-22T02:57:40+02:00 (3 years ago)
Author:
Don-vip
Message:

see #17083 - build both exe and msi windows installers, include JOSM version in filename, add additional console launcher

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/native/windows/win-jpackage.sh

    r18153 r18155  
    1818fi
    1919
    20 echo "Building JOSM Windows Installer package"
     20echo "Building JOSM Windows Installer packages"
    2121
    2222mkdir app
     
    2525then
    2626    echo "SIGN_CERT, SIGN_STOREPASS and SIGN_TSA are not set in the environment."
    27     echo "A JOSM.msi will be created but not signed."
     27    echo "A JOSM.exe and JOSM.msi will be created but not signed."
    2828    SIGNAPP=false
    2929else
     
    3535JPACKAGEOPTIONS=""
    3636
    37 echo "Building MSI"
    38 jpackage $JPACKAGEOPTIONS -n "JOSM" --input dist --main-jar josm-custom.jar \
     37echo "Building EXE and MSI"
     38for type in exe msi
     39do
     40    jpackage $JPACKAGEOPTIONS -n "JOSM" --input dist --main-jar josm-custom.jar \
    3941    --main-class org.openstreetmap.josm.gui.MainApplication \
    40     --icon ./native/windows/logo.ico --type msi --dest app \
     42    --icon ./native/windows/logo.ico --type $type --dest app \
    4143    --java-options "--add-exports=java.base/sun.security.action=ALL-UNNAMED" \
    4244    --java-options "--add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED" \
     
    6062    --file-associations native/file-associations/osm.properties \
    6163    --file-associations native/file-associations/zip.properties \
     64    --add-launcher HWConsole=native/windows/MLConsole.properties \
    6265    --add-modules java.base,java.datatransfer,java.desktop,java.logging,java.management,java.naming,java.net.http,java.prefs,java.rmi,java.scripting,java.sql,java.transaction.xa,java.xml,jdk.crypto.ec,jdk.jfr,jdk.jsobject,jdk.unsupported,jdk.unsupported.desktop,jdk.xml.dom
     66done
    6367
     68mv app/JOSM-1.5.$1.exe app/JOSM.exe
    6469mv app/JOSM-1.5.$1.msi app/JOSM.msi
     70
     71# Workaround to https://bugs.openjdk.java.net/browse/JDK-8261845
     72# to remove after we switch to Java 17+ for jpackage builds
     73chmod u+w app/JOSM.exe
    6574
    6675echo "Building done."
     
    6978    CERTIFICATE_P12=certificate.p12
    7079    echo "$SIGN_CERT" | base64 --decode > $CERTIFICATE_P12
    71     signtool.exe sign //f $CERTIFICATE_P12 //d "Java OpenStreetMap Editor" //du "https://josm.openstreetmap.de" //p "$SIGN_STOREPASS" //v //fd SHA256 //tr "$SIGN_TSA" //td SHA256 "app/JOSM.msi"
     80    for ext in exe msi
     81    do
     82        signtool.exe sign //f $CERTIFICATE_P12 //d "Java OpenStreetMap Editor" //du "https://josm.openstreetmap.de" //p "$SIGN_STOREPASS" //v //fd SHA256 //tr "$SIGN_TSA" //td SHA256 "app/JOSM.$ext"
     83    done
    7284    rm $CERTIFICATE_P12
    7385fi
Note: See TracChangeset for help on using the changeset viewer.