Changeset 18155 in josm for trunk


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

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/ant.yml

    r18154 r18155  
    177177          upload_url: ${{ needs.createrelease.outputs.upload_url }} # This pulls from the CREATE RELEASE job above, referencing its ID to get its outputs object, which include a `upload_url`.
    178178          asset_path: app/JOSM.zip
    179           asset_name: JOSM-${{ runner.os}}-java${{ matrix.java }}.zip
     179          asset_name: JOSM-${{ runner.os}}-java${{ matrix.java }}-${{ needs.createrelease.outputs.josm_revision }}.zip
    180180          asset_content_type: application/zip
    181181
     182      - name: Upload Windows Installer executable
     183        if: ${{ runner.os == 'windows' && matrix.java != '8' && matrix.java != '11' && always() }}
     184        id: upload-msi
     185        uses: actions/upload-release-asset@v1
     186        env:
     187          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
     188        with:
     189          upload_url: ${{ needs.createrelease.outputs.upload_url }} # This pulls from the CREATE RELEASE job above, referencing its ID to get its outputs object, which include a `upload_url`.
     190          asset_path: app/JOSM.exe
     191          asset_name: JOSM-${{ runner.os}}-java${{ matrix.java }}-${{ needs.createrelease.outputs.josm_revision }}.exe
     192          asset_content_type: application/vnd.microsoft.portable-executable
     193
    182194      - name: Upload Windows Installer package
    183195        if: ${{ runner.os == 'windows' && matrix.java != '8' && matrix.java != '11' && always() }}
     
    189201          upload_url: ${{ needs.createrelease.outputs.upload_url }} # This pulls from the CREATE RELEASE job above, referencing its ID to get its outputs object, which include a `upload_url`.
    190202          asset_path: app/JOSM.msi
    191           asset_name: JOSM-${{ runner.os}}-java${{ matrix.java }}.msi
     203          asset_name: JOSM-${{ runner.os}}-java${{ matrix.java }}-${{ needs.createrelease.outputs.josm_revision }}.msi
    192204          asset_content_type: application/x-ole-storage
  • 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.