Skip to content

Distributing

Tres Finocchiaro edited this page Oct 26, 2023 · 18 revisions

Create a QZ Tray distribution

This assumes Windows signing and macOS package signing have been configured.

Update the version

  • src/qz/common/Constants.java
  • js/qz-tray.js (two places)
  • js/package.json (for npm)

Before publishing make sure to commit the above version changes. We usually just call this Bump version.

Create the builds

Chain all three builds on macOS, following compiling tutorial.

ant nsis && cp out/*.exe ~/Desktop/ && \
ant pkgbuild && cp out/*.pkg ~/Desktop/ && \
ant makeself && cp out/*.run ~/Desktop/

Sign Windows Release

Sign the .exe using DigiCert EV cert on Windows. Note, if you're on a High DPI screen, the app might look weird. Use this regkey and manifest to fix it.

  • Insert the USB hardware key (if it's not ready, read this first)
  • Download the DigiCertUtil.exe
  • Wait for Windows to setup the hardware key (about 5 minutes)
  • If it's the first time using the key on this computer, click "Repair cert"
  • Sign using SHA1, then SHA2
    • When prompted for a password, Windows 10 may ask for a PIN, but actually use the full hardware password.

Notarize macOS Release

  • Send the package to Apple for notarization:

       xcrun notarytool submit --wait qz-tray-x.x.x-arm64.pkg --wait --apple-id <developer-id>@qz.io --password <the-secure-password> --team-id <team-id>
    • apple-id: The email of the apple developer account
    • password: The application-specific password (NOT the Apple developer password!)
    • team-id: The signing ID, e.g. P5DMU6659X
  • After a few minutes, it returns:

    Processing complete
       id: abcdefgh-abcd-1234-abcd-abcdefghij
    +  status: Accepted
  • Which then can be monitored remotely using:

    xcrun altool --eval-info a1b2c3d4e5-a1b2-a1b2-a1b2-a1b2c3d4e5f6 -u <developer-id>@qz.io
  • If approved, Apple will send an email:

    Subject: Your Mac software was notarized.
    Body: The Mac software that you uploaded (bundle identifier io.qz.qz-tray) was successfully notarized.

  • Finally, staple the installer:

    xcrun stapler staple qz-tray-x.x.x-arm64.pkg
    Processing: qz-tray-x.x.x-arm64.pkg
    Processing: qz-tray-x.x.x-arm64.pkg
    + The staple and validate action worked!

Publish

  • Upload builds to https://github.com/qzind/tray/releases/new

    • Tag: v2.x.x (remember the v)
    • Name: 2.x.x
  • Create simple, effective release notes. e.g.

    **201X-01-01**
    
    **Features**
    
    * CP-987 support (#954)
    
    **Fixes**
    
    * Fixes HTTPS connections (#956)
    * Better signing example for js (a1b2c3d)
  • Email premium clients (qz.io (slash) admin)

    • Include abridged version of release notes
    • Link to download
    • Provide any additional information (such as status of 2.x.x beta)
  • Post to Facebook, Twitter

  • Update npm Assumes npm is installed (e.g. brew install npm)

    • Open a terminal to js (e.g. ~/tray/js)
    • Ensure package.json version is up to date
    • If not already, call npm adduser
      • User: qzind
      • Public Email: support@qz.io
    • Finally, call npm publish