Files
diy-layout-creator/diylc/diylc-swing/deploy/mac/README.md
T
Bane Stojkovic 4093641b7e Refactor/maven (#889)
* mavenize

* mavenization

* mavenization

* mavenization

* mavenization

* mavenization

* mavenization

* mavenization

* mavenization

* fix

* app framework update

* fix lib

* lib

* fix mavenized

* fix mavenized

* fix mavenized

* fix mavenized

* fix mavenized

* fix mavenized

* fix mavenized

* fix mavenized

* building for win and linux

* Create run.bat

* fixes for netlist

* cleanup

* unit tests

* unit tests

* configurable high dpi

* performance upgrade

* performance upgrade

* rotate bug

* Omit boards, wires, traces, terminals, etc from Spice netlist output

* splash version update

* optimize libs

* optimize libs

* updates

* mac build maven

* ruler optimization, moved images

* cleanup

* notarization

* test workflow

* build

* Update pom.xml

* Update pom.xml

* Create README.md

* Create test.yml

* maven

* build
2025-03-20 19:44:40 +01:00

4.5 KiB

Setting up macOS Build Environment for DIYLC

This document describes how to set up a macOS machine for building and signing DIYLC application bundles.

Prerequisites

  1. macOS System

    • macOS 11 (Big Sur) or later
    • Xcode Command Line Tools installed
    xcode-select --install
    
  2. Java Development Kit

    • Install JDK 17 (recommended to use SDKMAN!)
    # Install SDKMAN!
    curl -s "https://get.sdkman.io" | bash
    source "$HOME/.sdkman/bin/sdkman-init.sh"
    
    # Install JDK 17
    sdk install java 17.0.14-tem
    
  3. Maven

    • Install Maven 3.9 or later
    sdk install maven
    

Apple Developer Account Setup

  1. Apple Developer Account

  2. Developer Certificate

    • Open Keychain Access
    • Go to Certificate Assistant → Request a Certificate from a Certificate Authority
    • Fill in your email and name
    • Save to disk
    • Go to Apple Developer Certificates
    • Create a new Developer ID Application certificate
    • Download and double-click to install in Keychain
  3. Notarization Setup

    • Create an app-specific password:

      1. Go to Apple ID Account
      2. Security → App-Specific Passwords → Generate Password
      3. Save this password securely
    • Create a keychain profile for notarization:

    xcrun notarytool store-credentials "AC_PASSWORD" \
      --apple-id "your.email@example.com" \
      --team-id "YOUR_TEAM_ID" \
      --password "app-specific-password"
    

Environment Configuration

  1. Set Developer Identity

    • Find your Developer ID in Keychain Access
    security find-identity -v -p codesigning
    
    • Set the environment variable (add to your ~/.zshrc):
    export APPLE_DEVELOPER_IDENTITY="Developer ID Application: Your Name (TEAM_ID)"
    
  2. Verify Setup

    # Verify codesign is available
    codesign --version
    
    # Verify notarytool is available
    xcrun notarytool --version
    
    # Verify your identity is set
    echo $APPLE_DEVELOPER_IDENTITY
    

Building DIYLC

  1. Clone the Repository

    git clone https://github.com/bancika/diy-layout-creator.git
    cd diy-layout-creator/diylc
    
  2. Build for Intel Macs

    mvn clean package -P mac-x86
    
  3. Build for Apple Silicon Macs

    mvn clean package -P mac-arm
    
  4. Build Both Architectures

    mvn clean package -P mac-x86,mac-arm
    

Output Files

After successful builds, you'll find these files in the diylc-swing/target directory:

Signed and Notarized Builds:

  • diylc-<version>-osx-x86.zip - Signed and notarized Intel build
  • diylc-<version>-osx-arm.zip - Signed and notarized ARM build

Unsigned Builds:

  • diylc-<version>-osx-x86-unsigned.zip - Unsigned Intel build
  • diylc-<version>-osx-arm-unsigned.zip - Unsigned ARM build

The unsigned builds are created before the signing and notarization process and can be useful for testing or in environments where code signing is not required.

Troubleshooting

  1. Signing Issues

    • Verify your certificate is valid:
    security find-identity -v -p codesigning
    
    • Check certificate expiration in Keychain Access
  2. Notarization Issues

    • Check notarization status:
    xcrun notarytool log <submission-id> --keychain-profile "AC_PASSWORD"
    
    • Verify entitlements are correct in deploy/mac/entitlements.plist
  3. Build Issues

    • Clear Maven cache:
    rm -rf ~/.m2/repository/org/diylc
    
    • Verify JDK version:
    java -version
    

Common Issues

  1. "The specified item could not be found in the keychain"

    • Solution: Verify your Developer ID certificate is in the keychain
    • Check the exact name matches APPLE_DEVELOPER_IDENTITY
  2. "No account for team found"

    • Solution: Verify your Apple Developer membership is active
    • Check team ID in notarytool credentials
  3. "The binary is not signed"

    • Solution: Check that the signing process isn't being skipped
    • Verify all dependencies are properly signed

Support

For additional help: