Skip to content

Conversation

@AntonioBerna
Copy link

Solution

This implementation automatically creates Digital.app using native macOS tools and jpackage:

Key Features

  • Self-contained app with integrated Java runtime
  • Native icon generated from SVG using sips and iconutil
  • All resources included (libraries, examples, documentation)
  • Automated process with Maven integration
  • Zero external dependencies (only native macOS tools)

Requirements

  • macOS (to create macOS apps)
  • Java 17+ with jpackage
  • Maven (for project build)

Verify installation:

java --version
jpackage --version
mvn --version

Added Files

distribution/macos/
├── QUICK_START.md              # Quick guide
├── Makefile                    # Build automation
├── create-digital-app.sh       # Main script
├── generate-icon.sh            # Icon generation
└── prepare-input.sh            # Resource preparation

1. Icon Generation

The generate-icon.sh script converts the SVG icon to .icns format using sips and iconutil (native macOS tools).

2. Resource Preparation

The prepare-input.sh script copies all necessary files:

  • Main JAR (Digital.jar)
  • Component libraries (lib/)
  • Circuit examples (examples/)
  • Documentation (docu/)

3. App Creation

The create-digital-app.sh script uses jpackage to create Digital.app with integrated Java runtime.

Usage

Execution Methods

# Method 1: Direct script
cd distribution/macos
./create-digital-app.sh

# Method 2: Makefile
make app

# Method 3: Maven
mvn clean package -P macos-app

Available Makefile Commands

  • make app - Create the app quickly
  • make all - Complete build with icon
  • make install - Install to /Applications
  • make test - Run validation tests

Final Result

Digital.app - Native macOS application ready for distribution:

  • Size: ~200-300 MB (includes Java runtime)
  • Compatibility: macOS 10.14+ (requires Java 17+)
  • Distribution: Single file, zero configuration
  • Integration: Complete system integration with native icon

Benefits

  • No installation required - No need to install Java
  • Native integration - Standard macOS app behavior
  • Professional appearance - Custom icon and app bundle
  • Simplified distribution - Share a single .app file
  • Education ready - Perfect for educational environments

This implementation transforms Digital Circuit Simulator from a Java application requiring manual configuration into a professional and distributable macOS application, suitable for educational and professional environments.

closes #1468

- Add dig-file-association.properties for jpackage file association
- Update create-digital-app.sh to include --file-associations parameter
- Update QUICK_START.md with file association documentation
- Enable opening .dig files directly from Finder or command line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing Native macOS App for Digital Circuit Simulator

1 participant