Changeset 18146 in josm


Ignore:
Timestamp:
2021-08-21T00:19:29+02:00 (3 years ago)
Author:
Don-vip
Message:

see #17083 - sign MSI file

Location:
trunk/native
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/native/macosx/macos-jpackage.sh

    r18138 r18146  
    77# CERT_MACOS_PW   Password for that certificate
    88
    9 set -Eeou pipefail
     9set -Eeo pipefail
    1010
    1111# Don't show one time passwords
     
    2828then
    2929    echo "CERT_MACOS_P12, CERT_MACOS_PW and APPLE_ID_PW are not set in the environment."
    30     echo "I will create a JOSM.app but I won't attempt to sign and notarize it."
     30    echo "A JOSM.app will be created but not signed nor notarized."
    3131    SIGNAPP=false
    3232else
     
    4949fi
    5050
     51set -u
     52
    5153if $SIGNAPP; then
    5254  JPACKAGEOPTIONS="--mac-sign --mac-signing-keychain $KEYCHAINPATH"
     
    5658
    5759echo "Building and signing app"
    58     jpackage $JPACKAGEOPTIONS -n "JOSM" --input dist --main-jar josm-custom.jar \
     60jpackage $JPACKAGEOPTIONS -n "JOSM" --input dist --main-jar josm-custom.jar \
    5961    --main-class org.openstreetmap.josm.gui.MainApplication \
    6062    --icon ./native/macosx/JOSM.icns --type app-image --dest app \
  • trunk/native/windows/win-jpackage.sh

    r18138 r18146  
    11#!/bin/bash
    22
    3 set -Eeou pipefail
     3## Expected environment, passed from GitHub secrets:
     4# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
     5# SIGN_CERT       PKCS12 certificate keystore used for code signing, base64 encoded
     6# SIGN_STOREPASS  Password for that keystore
     7# SIGN_TSA        URL of Time Stamping Authority to use
     8
     9set -Eeo pipefail
    410
    511# Don't show one time passwords
     
    1622mkdir app
    1723
     24if [ -z "$SIGN_CERT" ] || [ -z "$SIGN_STOREPASS" ] || [ -z "$SIGN_TSA" ]
     25then
     26    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."
     28    SIGNAPP=false
     29else
     30    SIGNAPP=true
     31fi
     32
     33set -u
     34
    1835JPACKAGEOPTIONS=""
    1936
    20 echo "Building app"
    21     jpackage $JPACKAGEOPTIONS -n "JOSM" --input dist --main-jar josm-custom.jar \
     37echo "Building MSI"
     38jpackage $JPACKAGEOPTIONS -n "JOSM" --input dist --main-jar josm-custom.jar \
    2239    --main-class org.openstreetmap.josm.gui.MainApplication \
    2340    --icon ./native/windows/logo.ico --type msi --dest app \
     
    4865
    4966echo "Building done."
     67
     68if $SIGNAPP; then
     69    CERTIFICATE_P12=certificate.p12
     70    echo "$SIGN_CERT" | base64 --decode > $CERTIFICATE_P12
     71    signtool 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"
     72    rm $CERTIFICATE_P12
     73fi
Note: See TracChangeset for help on using the changeset viewer.