Skip to content

14_00_build_pipeline

Purpose

Scripts automatizados para compilar release builds en Mac + Windows.

Week 12 Deliverables

Must Have

  • Build script: Mac (VST3 + AU)
  • Build script: Windows (VST3)
  • Version tagging automatizado
  • Release notes generation

File Structure

scripts/
  ├── build_release_mac.sh     # macOS build
  ├── build_release_win.bat    # Windows build
  └── tag_version.sh           # Git tag + changelog
config/
  ├── version.h                # Version number
  └── changelog.md             # Release notes
output/
  ├── TapeLooper-v1.0.0-Mac/
  └── TapeLooper-v1.0.0-Win/

Build Script (macOS)

#!/bin/bash
# build_release_mac.sh

VERSION="1.0.0"
BUILD_DIR="build_release"

# 1. Clean
rm -rf $BUILD_DIR

# 2. Configure
cmake -B $BUILD_DIR -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"  # Universal binary

# 3. Build
cmake --build $BUILD_DIR --config Release -j8

# 4. Sign (see 13_00_code_signing)
./sign_mac.sh $BUILD_DIR/TapeLooper.vst3
./sign_mac.sh $BUILD_DIR/TapeLooper.component

# 5. Package
mkdir -p output/TapeLooper-v$VERSION-Mac
cp -r $BUILD_DIR/*.vst3 output/TapeLooper-v$VERSION-Mac/
cp -r $BUILD_DIR/*.component output/TapeLooper-v$VERSION-Mac/
cp README.txt output/TapeLooper-v$VERSION-Mac/

# 6. Create DMG
hdiutil create -volname "Tape Looper $VERSION" \
  -srcfolder output/TapeLooper-v$VERSION-Mac \
  -ov output/TapeLooper-v$VERSION-Mac.dmg

Build Script (Windows)

@echo off
REM build_release_win.bat

set VERSION=1.0.0
set BUILD_DIR=build_release

REM 1. Clean
rmdir /s /q %BUILD_DIR%

REM 2. Configure
cmake -B %BUILD_DIR% -G "Visual Studio 17 2022" -A x64

REM 3. Build
cmake --build %BUILD_DIR% --config Release

REM 4. Package
mkdir output\TapeLooper-v%VERSION%-Win
copy %BUILD_DIR%\Release\TapeLooper.vst3 output\TapeLooper-v%VERSION%-Win\
copy README.txt output\TapeLooper-v%VERSION%-Win\

REM 5. Create ZIP
powershell Compress-Archive -Path output\TapeLooper-v%VERSION%-Win\* ^
  -DestinationPath output\TapeLooper-v%VERSION%-Win.zip

Version Management

// config/version.h
#define TAPE_LOOPER_VERSION_MAJOR 1
#define TAPE_LOOPER_VERSION_MINOR 0
#define TAPE_LOOPER_VERSION_PATCH 0
#define TAPE_LOOPER_VERSION_STRING "1.0.0"

Success Criteria

  • Single command builds release
  • Outputs: .dmg (Mac), .zip (Windows)
  • Builds are reproducible (same hash)

Notes

  • CI/CD (GitHub Actions) is future goal
  • Manual builds OK para MVP