# What Build Tools Are Used in vorssaint‑utils? A Deep Dive Into the macOS Utility's Toolchain

> Explore the build tools in vorssaint-utils. Discover how Swift Package Manager and custom Zsh scripts streamline compilation, code signing, and packaging for this macOS utility.

- Repository: [vorssaint/vorssaint-utils](https://github.com/vorssaint/vorssaint-utils)
- Tags: deep-dive
- Published: 2026-09-05

---

**The vorssaint‑utils project uses Swift Package Manager as its core build system, supplemented by a suite of custom Zsh scripts that handle compilation, code signing, asset generation, and DMG packaging.**

This macOS utility's build pipeline demonstrates how modern Swift projects can extend beyond SPM with purpose-built automation. According to the **vorssaint‑utils** source code, the maintainers have constructed a hybrid toolchain that balances standard dependency management with sophisticated release engineering requirements like hardened runtime signing and professional installer creation.

## Swift Package Manager: The Foundation

The **Swift Package Manager (SPM)** serves as the canonical build system, defined in [`Package.swift`](https://github.com/vorssaint/vorssaint-utils/blob/main/Package.swift) using Swift 5.9 syntax.

```swift
// Package.swift defines the executable target and two system-library targets
// SPM resolves dependencies and drives the Swift compiler

```

This manifest specifies platform requirements, target dependencies, and linking against system frameworks. SPM handles the baseline compilation workflow, but the project quickly layers custom tooling on top for macOS-specific concerns.

## The Custom Build Orchestrator: build.sh

At [`build.sh`](https://github.com/vorssaint/vorssaint-utils/blob/main/build.sh) in the repository root, a **Zsh script** wraps `swiftc` invocations and manages the full compile-sign-bundle pipeline.

The script performs several responsibilities:

- **SDK selection** — Chooses the appropriate macOS SDK path
- **Compiler flag injection** — Passes optimization levels and debug settings
- **Incremental vs. release builds** — Toggles between fast developer iterations and shipping binaries
- **Code signing invocation** — Applies the signing identity to the resulting bundle

### Standard Build Invocation

```bash

# Build the release variant (optimized) and assemble the signed app bundle

./build.sh

```

### Developer Build Mode

```bash

# Adds a developer suffix to the bundle identifier and disables optimization

./build.sh --dev

```

## Asset Generation: MakeIcon.swift

Before the main build completes, [`Tools/MakeIcon.swift`](https://github.com/vorssaint/vorssaint-utils/blob/main/Tools/MakeIcon.swift) generates all visual assets. This **Swift program** creates the complete app-icon asset set and menu-bar glyphs used throughout the application.

```bash

# Re-generate all app-icon assets and menu-bar glyphs (rarely needed manually)

swift Tools/MakeIcon.swift build/AppIcon.iconset

```

The tool outputs properly sized icon variants and ensures the menu-bar extras render crisply at all supported display scales.

## Distribution Packaging: make-dmg.sh

Once the signed bundle exists, [`Tools/make-dmg.sh`](https://github.com/vorssaint/vorssaint-utils/blob/main/Tools/make-dmg.sh) assembles a **styled DMG installer image**. This script leverages native macOS utilities:

- `hdiutil` — Creates and manipulates disk images
- `osascript` — Positions installer window elements via AppleScript
- `xattr` — Strips or applies extended attributes for distribution

```bash

# After ./build.sh succeeds, package the app into a styled DMG

./Tools/make-dmg.sh

```

The result is a professional installer with custom background, positioned app icon, and Applications folder alias.

## Code Signing and Notarization Automation

Several auxiliary scripts in `Tools/` handle Apple's security requirements:

| Script | Purpose |
|--------|---------|
| [`setup-signing.sh`](https://github.com/vorssaint/vorssaint-utils/blob/main/setup-signing.sh) | Creates stable **local signing identity** for ad-hoc builds |
| [`notarize.sh`](https://github.com/vorssaint/vorssaint-utils/blob/main/notarize.sh) | Submits the bundle to **Apple notarization** |
| [`ui-smoke.sh`](https://github.com/vorssaint/vorssaint-utils/blob/main/ui-smoke.sh) | Executes **minimal UI validation** after signing finishes |

These integrate with the `codesign` utility and Apple Developer tools to enforce **hardened runtime** requirements for distribution outside the Mac App Store.

## Command-Line Tool Dependencies

The build system invokes these macOS utilities directly:

- `swiftc` — Compiles Swift source files
- `actool` — Compiles asset catalogs when Xcode is present
- `codesign`, `hdiutil`, `xattr` — Signing and packaging operations
- `pgrep`, `pkill` — Process management during builds
- `PlistBuddy` — Modifies Info.plist values dynamically

## Summary

- **Swift Package Manager** provides dependency resolution and baseline compilation through [`Package.swift`](https://github.com/vorssaint/vorssaint-utils/blob/main/Package.swift)
- **build.sh** orchestrates the full pipeline: compile, sign, and bundle
- **MakeIcon.swift** generates all required image assets
- **make-dmg.sh** creates distributable installer images with native macOS tools
- **Signing scripts** automate ad-hoc identity setup, notarization, and UI validation
- The toolchain prioritizes **automation** and **professional distribution quality** over minimal builds

## Frequently Asked Questions

### Does vorssaint‑utils use Xcode for building?

No. The project uses Swift Package Manager and command-line tools exclusively. While `actool` from Xcode may process asset catalogs if present, no `.xcodeproj` or workspace files drive the build. The [`build.sh`](https://github.com/vorssaint/vorssaint-utils/blob/main/build.sh) script handles all compilation directly through `swiftc`.

### Can I build vorssaint‑utils without a paid Apple Developer account?

Yes. The [`setup-signing.sh`](https://github.com/vorssaint/vorssaint-utils/blob/main/setup-signing.sh) script creates a **local ad-hoc signing identity** sufficient for personal builds. However, notarization and distribution to other Macs require a paid Developer Program membership and valid signing certificate.

### What triggers a release versus debug build?

The [`build.sh`](https://github.com/vorssaint/vorssaint-utils/blob/main/build.sh) script checks command-line arguments. Running [`./build.sh`](https://github.com/vorssaint/vorssaint-utils/blob/main/./build.sh) alone produces an **optimized release build**. Passing `--dev` disables optimization, appends a developer suffix to the bundle identifier, and enables faster iteration cycles.

### How does the build handle incremental compilation?

The [`build.sh`](https://github.com/vorssaint/vorssaint-utils/blob/main/build.sh) script tracks modification timestamps and intermediate artifacts to skip unchanged compilation units. For true **clean builds**, delete the `.build` directory or any cached swiftmodules before invoking the script.