Skip to content

Commit 41c1451

Browse files
author
Ricardo Wagemaker
committed
created macos package
1 parent 4a7a9aa commit 41c1451

File tree

8 files changed

+640
-15
lines changed

8 files changed

+640
-15
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,5 @@ Thumbs.db
7575
# !/packages/SmallTextPad_1.4.5.jar
7676

7777
Gemfile
78-
Gemfile.lock
78+
Gemfile.lock
79+
nullsmaltextpad.cnf

docs/DISTRIBUTION.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# SmallTextPad Distribution Guide
2+
3+
The build script creates multiple distribution formats for different use cases:
4+
5+
## 📦 Distribution Files
6+
7+
### 1. ZIP Archive (Recommended) - `SmallTextPad-1.5.1-macOS-arm64-standalone.zip` (32MB)
8+
**Best for**: Direct sharing, GitHub releases, website downloads
9+
10+
**How users install**:
11+
1. Download and double-click the ZIP file
12+
2. Drag `SmallTextPad.app` to Applications folder
13+
3. Launch from Applications or Spotlight
14+
15+
**Advantages**:
16+
- Smallest file size
17+
- No mounting required
18+
- Works with all download methods
19+
- Easy to share via email/cloud storage
20+
21+
### 2. DMG Installer - `SmallTextPad-1.5.1-macOS-arm64-bundled.dmg` (34MB)
22+
**Best for**: Professional distribution, Mac App Store style experience
23+
24+
**How users install**:
25+
1. Download and double-click the DMG file
26+
2. Drag `SmallTextPad.app` to Applications folder shortcut
27+
3. Eject the DMG
28+
4. Launch from Applications
29+
30+
**Advantages**:
31+
- Professional installer experience
32+
- Applications folder shortcut included
33+
- Traditional Mac distribution method
34+
35+
### 3. TAR.GZ Archive - `SmallTextPad-1.5.1-macOS-arm64-standalone.tar.gz` (33MB)
36+
**Best for**: Command-line distribution, package managers
37+
38+
**How users install**:
39+
```bash
40+
tar -xzf SmallTextPad-1.5.1-macOS-arm64-standalone.tar.gz
41+
mv SmallTextPad.app /Applications/
42+
```
43+
44+
## 🔒 Code Signing (Optional)
45+
46+
For enhanced security and to avoid "unidentified developer" warnings:
47+
48+
```bash
49+
# Set your Developer ID before building
50+
export CODESIGN_IDENTITY="Developer ID Application: Your Name (TEAM_ID)"
51+
./packaging/build-macos-dmg.sh
52+
```
53+
54+
## ✅ What's Included
55+
56+
All distribution formats contain:
57+
- **Complete SmallTextPad application**
58+
- **Bundled Java Runtime Environment** (no Java installation required)
59+
- **All resources and dependencies**
60+
- **Native macOS launcher**
61+
- **File associations for .txt files**
62+
63+
## 🚀 Distribution Recommendations
64+
65+
### For GitHub Releases
66+
Upload the ZIP file - it's the most user-friendly format
67+
68+
### For Website Downloads
69+
Offer both ZIP (for simplicity) and DMG (for traditional Mac experience)
70+
71+
### For Enterprise Distribution
72+
Use the DMG format with code signing enabled
73+
74+
### For Package Managers (Homebrew, etc.)
75+
Use the TAR.GZ format
76+
77+
## 📋 File Sizes
78+
- App Bundle: 48MB (uncompressed)
79+
- ZIP Archive: 32MB
80+
- TAR.GZ Archive: 33MB
81+
- DMG Installer: 34MB
82+
83+
All formats are self-contained and require no additional software installation.

docs/README-local-development.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Local Documentation Development
2+
3+
## Quick Setup
4+
5+
The documentation site is automatically built and deployed via GitHub Actions, but you can also build it locally for testing.
6+
7+
### Install Jekyll (Optional)
8+
9+
```bash
10+
# Install Ruby and Jekyll
11+
gem install jekyll bundler
12+
13+
# Navigate to docs directory
14+
cd docs
15+
16+
# Install dependencies
17+
bundle install
18+
19+
# Build the site locally
20+
bundle exec jekyll build
21+
22+
# Serve locally (with auto-rebuild)
23+
bundle exec jekyll serve
24+
```
25+
26+
### Automatic Deployment
27+
28+
The site automatically rebuilds when you push to `main` branch:
29+
30+
1. **Add/edit** markdown files in `docs/`
31+
2. **Commit and push** to main branch
32+
3. **GitHub Actions** automatically builds and deploys
33+
4. **Site updates** at https://gcclinux.github.io/smalltextpad/
34+
35+
### File Structure
36+
37+
```
38+
docs/
39+
├── _config.yml # Jekyll configuration
40+
├── index.md # Homepage
41+
├── README-*.md # Platform-specific guides
42+
└── _site/ # Generated site (auto-built)
43+
```
44+
45+
### Adding New Documentation
46+
47+
1. Create new `.md` files in `docs/`
48+
2. Use Jekyll front matter if needed:
49+
```yaml
50+
---
51+
title: Page Title
52+
description: Page description
53+
---
54+
```
55+
3. Commit and push - automatic deployment handles the rest!

docs/README-macOS.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# macOS DMG Packaging for SmallTextPad
2+
3+
This directory contains the script to build a native macOS DMG package for SmallTextPad.
4+
5+
## Prerequisites
6+
7+
- Java 21+ installed (OpenJDK or Temurin)
8+
- macOS with Xcode Command Line Tools
9+
- Optional: ImageMagick for icon conversion (`brew install imagemagick`)
10+
11+
## Building the DMG
12+
13+
Run the build script from the project root or packaging directory:
14+
15+
```bash
16+
./packaging/build-macos-dmg.sh
17+
```
18+
19+
## What the script does
20+
21+
1. **Compiles the Java application** - Builds all source files and creates a JAR
22+
2. **Creates minimal JRE** - Uses `jlink` to create a custom, minimal Java runtime (~46MB)
23+
3. **Creates macOS app bundle** - Generates `SmallTextPad.app` with proper structure
24+
4. **Bundles Java runtime** - Embeds the minimal JRE so users don't need Java installed
25+
5. **Generates Info.plist** - Configures app metadata and file associations
26+
6. **Creates launcher script** - Native macOS launcher that uses bundled Java
27+
7. **Converts icon** - Converts ICO to ICNS format (if ImageMagick available)
28+
8. **Packages DMG** - Creates distributable DMG with Applications symlink
29+
30+
## Output
31+
32+
The build creates:
33+
- `build/macos/SmallTextPad.app` - Native macOS application bundle with embedded JRE
34+
- `build/macos/SmallTextPad-1.5.1-macOS-arm64-bundled.dmg` - Self-contained distributable DMG file (~34MB)
35+
36+
## Installation
37+
38+
1. Open the generated DMG file
39+
2. Drag `SmallTextPad.app` to the Applications folder
40+
3. Launch from Applications, Launchpad, or Spotlight
41+
42+
## Features
43+
44+
- **Self-contained** - No Java installation required by end users
45+
- **Minimal JRE** - Custom runtime with only necessary modules (~46MB)
46+
- **Native macOS app bundle** structure
47+
- **Proper file associations** for .txt files
48+
- **High-resolution display** support
49+
- **Applications folder symlink** for easy installation
50+
- **Fallback Java detection** - Uses system Java if bundled JRE fails
51+
52+
## Customization
53+
54+
Edit the script variables at the top to customize:
55+
- `APP_VERSION` - Application version number
56+
- `BUNDLE_ID` - macOS bundle identifier
57+
- Icon and metadata in Info.plist

0 commit comments

Comments
 (0)