Documentation

Compiling

Compatibility

  • ✅ 2.1 | ✅ 2.0 | ✅ 1.9 | ...

Steps

  1. First, install dependencies (jdk, git, ant, nsis/makeself) per Install Dependencies

  2. Clone the source code per Clone Source Code

  3. Pull in the latest source code

    cd tray
    git pull
  4. Compile

    ant

    Optional: Start the software up using this command.

  5. Package

    ant nsis       # <-- Windows installer
    ant pkgbuild   # <-- Apple installer (macOS only)
    ant makeself   # <-- Linux installer

    Note: The installer will be placed in ./out/qz-tray-x.x.x.x, (i.e. .exe, .run, .pkg)

  6. Build for another architecture:

    # Intel 64-bit
    ant -Dtarget.arch=x86_64  # nsis|pkgbuild|makeself
    
    # ARM 64-bit
    ant -Dtarget.arch=arm64   # nsis|pkgbuild|makeself
    
    # RISC-V 64-bit
    ant -Dtarget.arch=riscv64 # nsis|pkgbuild|makeself

IntelliJ

  1. Download and install IntelliJ Community Edition from https://www.jetbrains.com/idea/download/
  2. Launch IntelliJ
  3. Open the project
  4. Switch to project view using ALT + 1 (or Command + 1 on Mac)
  5. Click File, Project Structure
    • If you don't have a JDK installed, IntelliJ will offer to download this automatically. QZ Tray recommends the BellSoft Liberica SDK (The "standard" version, NOT the "full" version).
    • If you do have a JDK installed, check that the Project SDK is correct. We recommend Java 11 LTS however newer versions will also work.
    • If <No SDK>, click New, JDK and browse to the appropriate install location, e.g. C:\Program Files\<vendor>\openjdk 11.x.x
  6. From the Project Explorer, Navigate to:
    • tray, src, qz, App.java
    • Right Click, Run
    • On Windows, a firewall prompt may appear, click Run
  7. If you receive JavaFX errors, close and reopen the project. This startup jobs needs the JDK to run, so catch-22. :)
  8. Exit App.java by locating it in the System Tray, Right Click, Exit
    • Alternately, you can click Stop within IntelliJ from bottom left "Run" tab

Advanced

Clone the project directly from IntelliJ

  1. When prompted, click Check out from Version Control (GitHub)

    Host: github.com
    Auth type: password
    Login: <github username>
    Password: <github password>

  2. Clone Repository

    Git Repository URL: https://github.com/qzind/tray
    Parent Directory: <leave default, usually "C:\Users\username\IdeaProjects">
    Directory Name: <leave default, "tray">
    Note, if the Parent Directory doesn't exist, create it.

ANT Command Line

  • Override internal certificate used for signature validation*

    ant nsis -Dauthcert.use=path/to/override.crt

    *Since 2.0.2

ANT Properties File

  • Common uses:

    • Signing a Windows installer executable
    • Providing persistent ant property overrides
  • Create tray/.../private/private.properties

    hsm.storetype=AWS
    hsm.keystore=us-east-1
    hsm.alias=my-signing-alias
    # Must be formatted accesskey|secretaccesskey
    hsm.storepass=MY_ACCESS_KEY|MY_SECRET_KEY
    hsm.certfile=../private/full-chain.pem
    hsm.tsaurl=http://my.timestamp.authority
    hsm.algorithm=SHA-256
    #authcert.use=#path to signing auth cert

Troubleshooting

  • Error:(3, 24) java: cannot access javafx.animation.PauseTransition
  • If IntelliJ complains package sun.awt does not exist, see the workaround here
Edit this page