# Deployment Scripts

This folder contains scripts to build release packages for different platforms.

## Prerequisites

- .NET 10.0 SDK installed
- For macOS builds: Run on macOS
- For Linux builds: Can be run on Linux or macOS
- For Windows builds: Run on Windows with PowerShell
- For Windows icon creation: Python 3 with Pillow (`pip3 install Pillow`)

## Usage

### macOS

```bash
./deploy/build-macos.sh
```

Creates a complete `.app` bundle with:
- Proper macOS application structure
- Application icon embedded
- Info.plist with metadata
- Ready for immediate distribution or installation to /Applications

Automatically detects your Mac architecture (Intel or Apple Silicon).

**Output:**
- Apple Silicon: `./bin/Release/osx-arm64/OrmentiaMarkus.app`
- Intel: `./bin/Release/osx-x64/OrmentiaMarkus.app`

### Windows

```powershell
.\deploy\build-windows.ps1
```

Creates a self-contained `.exe` file with:
- Embedded application icon
- All dependencies bundled
- Single-file executable ready for distribution

**Output:** `.\bin\Release\win-x64\OrmentiaMarkus.exe`

**Note:** Icon file (`Assets/AppIcon.ico`) must be created first. Run `bash deploy/create-windows-icon.sh` from macOS/Linux.

### Linux

```bash
./deploy/build-linux.sh
```

Creates a complete application package with:
- Executable binary
- .desktop file for menu integration
- Application icon
- Launcher script
- Installation README

**Output:** `./bin/Release/linux-x64/OrmentiaMarkus/` folder (ready to archive and distribute)

## Helper Scripts

### Create Windows Icon

```bash
./deploy/create-windows-icon.sh
```

Converts PNG icons to Windows .ico format. Requires Python 3 with Pillow library.

## Build Options

All scripts build with the following options:
- **Self-contained**: Includes the .NET runtime (no need to install .NET on target system)
- **Release configuration**: Optimized for production
- **Platform-specific packaging**: Proper application bundles for each OS

## What Gets Built

| Platform | Output Format | Icon | Ready to Distribute |
|----------|---------------|------|---------------------|
| macOS    | `.app` bundle | ✓    | ✓                   |
| Windows  | `.exe` file   | ✓    | ✓                   |
| Linux    | App folder    | ✓    | ✓ (archive it)      |

## Distribution

- **macOS**: Distribute the `.app` file (optionally create a DMG)
- **Windows**: Distribute the `.exe` file (optionally create an installer)
- **Linux**: Archive the folder as `.tar.gz` or create an AppImage

## Cross-Platform Building

Note: While you can use `dotnet publish` to cross-compile, the packaging scripts must run on their target OS to create proper platform-specific bundles.

