diff --git a/.github/workflows/release-installers.yml b/.github/workflows/release-installers.yml new file mode 100644 index 0000000..190c56e --- /dev/null +++ b/.github/workflows/release-installers.yml @@ -0,0 +1,162 @@ +name: Build public installers +on: + pull_request: + paths: ['CMakeLists.txt', 'packaging/**', 'docs/INSTALL-PUBLIC.md', '.github/workflows/release-installers.yml'] + push: + branches: [main] + paths: ['CMakeLists.txt', 'packaging/**', 'docs/INSTALL-PUBLIC.md', '.github/workflows/release-installers.yml'] + workflow_dispatch: + inputs: + publish: + type: boolean + description: Publish checked installers to GitHub Releases + default: false + stable: + type: boolean + description: Stable requires ARSON_STABLE_APPROVED=yes repository variable + default: false +permissions: + contents: read +concurrency: + group: arsoncomp-packages-${{ github.ref }} + cancel-in-progress: true +env: + RELEASE_VERSION: 0.2.0 +jobs: + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/cache@v4 + with: + path: build/_deps/juce-src + key: arson-juce-8.0.12-windows + - name: Build and run all Windows tests + shell: pwsh + run: | + cmake -S . -B build -A x64 -DCMAKE_BUILD_TYPE=Release + cmake --build build --config Release --parallel 4 + ctest --test-dir build -C Release --output-on-failure + - name: Compile Inno installer + shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + $stage = Join-Path $pwd 'dist\stage' + $out = Join-Path $pwd 'dist\out' + New-Item -ItemType Directory -Force "$stage\VST3", "$stage\Standalone", $out | Out-Null + Copy-Item -Recurse 'build\ArSonComp_artefacts\Release\VST3\ArSonComp.vst3' "$stage\VST3\" + Copy-Item 'build\ArSonComp_artefacts\Release\Standalone\ArSonComp.exe' "$stage\Standalone\" + Copy-Item docs\INSTALL-PUBLIC.md "$stage\START-HERE.md" + Copy-Item LICENSE "$stage\LICENSE" + $iscc = Join-Path ([Environment]::GetFolderPath('ProgramFilesX86')) 'Inno Setup 6\ISCC.exe' + if (-not (Test-Path $iscc)) { choco install innosetup -y --no-progress } + if (-not (Test-Path $iscc)) { throw 'Inno Setup 6 was not found' } + & $iscc "/DStageDir=$stage" "/DAppVersion=$env:RELEASE_VERSION" "/O$out" "packaging\windows\ArSonComp.iss" + if ($LASTEXITCODE -ne 0) { throw "ISCC exit $LASTEXITCODE" } + if (@(Get-ChildItem "$out\*.exe").Count -ne 1) { throw 'Missing installer EXE' } + - uses: actions/upload-artifact@v4 + with: + name: ArSonComp-Windows-Installer + path: dist/out/*.exe + if-no-files-found: error + linux: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: Install JUCE prerequisites + run: | + sudo apt-get update -qq + sudo apt-get install -y --no-install-recommends \ + libasound2-dev libjack-jackd2-dev ladspa-sdk libfreetype-dev \ + libfontconfig1-dev libx11-dev libxcomposite-dev libxcursor-dev \ + libxext-dev libxinerama-dev libxrandr-dev libxrender-dev \ + libxi-dev libglu1-mesa-dev libgtk-3-dev xvfb + - uses: actions/cache@v4 + with: + path: build/_deps/juce-src + key: arson-juce-8.0.12-ubuntu24 + - name: Build, smoke-test and package Linux + run: | + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release + cmake --build build --parallel 2 + xvfb-run -a ctest --test-dir build --output-on-failure + bash packaging/linux/package.sh build dist/out "$RELEASE_VERSION" + dpkg-deb --info "dist/out/ArSonComp-$RELEASE_VERSION-Ubuntu-Debian-amd64.deb" + tar -tzf "dist/out/ArSonComp-$RELEASE_VERSION-Linux-x86_64-Portable.tar.gz" | grep -F install.sh + - uses: actions/upload-artifact@v4 + with: + name: ArSonComp-Linux-Installers + path: dist/out/* + if-no-files-found: error + macos: + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + - uses: actions/cache@v4 + with: + path: build/_deps/juce-src + key: arson-juce-8.0.12-macos + - name: Universal build, test and ad-hoc package + run: | + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \ + '-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64' + cmake --build build --parallel 3 + ctest --test-dir build --output-on-failure + bash packaging/macos/package.sh build dist/out "$RELEASE_VERSION" + test -s "dist/out/ArSonComp-$RELEASE_VERSION-macOS-Universal-AdHoc.pkg" + - uses: actions/upload-artifact@v4 + with: + name: ArSonComp-macOS-Installers + path: dist/out/* + if-no-files-found: error + publish: + needs: [windows, linux, macos] + if: >- + github.event_name == 'push' || + (github.event_name == 'workflow_dispatch' && inputs.publish) + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/download-artifact@v4 + with: + pattern: ArSonComp-*-Installer* + path: dist + merge-multiple: true + - name: Publish only after all OS gates pass + shell: bash + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + STABLE_APPROVAL: ${{ vars.ARSON_STABLE_APPROVED }} + STABLE_REQUEST: ${{ inputs.stable }} + run: | + set -euo pipefail + shopt -s nullglob + files=(dist/*.exe dist/*.deb dist/*.tar.gz dist/*.pkg dist/*.zip) + if (( ${#files[@]} < 5 )); then + echo "Missing one or more platform installers"; exit 7 + fi + ( cd dist && sha256sum ./* > SHA256SUMS.txt ) + tag="v${RELEASE_VERSION}-rc.1" + flag="--prerelease" + if [[ "$STABLE_REQUEST" == "true" ]]; then + if [[ "$STABLE_APPROVAL" != "yes" ]]; then + echo "Stable requires repository variable ARSON_STABLE_APPROVED=yes"; exit 8 + fi + tag="v${RELEASE_VERSION}" + flag="" + fi + if gh release view "$tag" >/dev/null 2>&1; then + echo "Release already exists: $tag. Refusing to overwrite artifacts."; exit 9 + fi + cat > notes.md < right click > Open or +System Settings > Privacy & Security > Open Anyway may allow it. +Do not disable Gatekeeper globally. A Developer ID certificate and Apple +notarization are needed for a truly frictionless public Mac installer. +A VST3-only universal ZIP is provided as a fallback for experienced users. + +## First use on any OS +Restart/rescan your VST3 host. Find ArSonComp under dynamics/compressor. +For Standalone, choose the actual audio input/output in Audio Settings. +Start at 48 kHz / 128 samples, low headphone volume, and use a +reasonable Clean vocal setting before lowering the buffer. +The plugin's zero *algorithmic* sample delay is not zero driver or +hardware-monitoring round-trip latency. + +## Reliability and distribution notes +Automated CI proves successful builds and in-process tests only, not +physical interface reliability, multi-host certification, or sonic +parity with commercial compressors. Use Windows START-HERE and the +M7 field-test checklist for the Maono PS22 / ASIO hardware gate. +For open-source distribution, keep AGPL source accessible and review +JUCE AGPL/commercial terms plus Steinberg ASIO SDK redistribution +requirements before labeling a distribution production-stable. + +Official VST3 standard installation locations: +https://steinbergmedia.github.io/vst3_dev_portal/pages/Technical%2BDocumentation/Locations%2BFormat/Plugin%2BLocations.html diff --git a/packaging/linux/install.sh b/packaging/linux/install.sh new file mode 100644 index 0000000..53b9144 --- /dev/null +++ b/packaging/linux/install.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Safe current-user installer. No sudo, no host-specific custom folder. +set -euo pipefail +ROOT="$(cd "$(dirname "$0")" && pwd)" +if [[ "$(uname -s)" != "Linux" ]]; then echo "Linux only" >&2; exit 2; fi +if [[ ! -d "$ROOT/VST3/ArSonComp.vst3" || ! -f "$ROOT/Standalone/ArSonComp" ]]; then + echo "Incomplete archive: missing VST3 or Standalone" >&2; exit 3 +fi +DEST="$HOME/.vst3/ArSonComp.vst3" +APPDIR="$HOME/.local/opt/arsoncomp" +BIN="$HOME/.local/bin/arsoncomp" +DESKTOP="$HOME/.local/share/applications/arsoncomp.desktop" +if [[ -L "$DEST" || -L "$APPDIR" ]]; then + echo "Refusing to overwrite a symlinked install path." >&2; exit 4 +fi +mkdir -p "$HOME/.vst3" "$APPDIR" "$(dirname "$BIN")" "$(dirname "$DESKTOP")" +if [[ -d "$DEST" ]]; then + mv "$DEST" "$DEST.backup.$(date +%s)" +fi +cp -a "$ROOT/VST3/ArSonComp.vst3" "$DEST" +install -m 755 "$ROOT/Standalone/ArSonComp" "$APPDIR/ArSonComp" +cat > "$BIN" <<'EOF' +#!/bin/sh +exec "$HOME/.local/opt/arsoncomp/ArSonComp" "$@" +EOF +chmod 755 "$BIN" +printf '[Desktop Entry]\nName=ArSonComp\nComment=Real-time dynamics compressor\nExec="%s"\nType=Application\nCategories=AudioVideo;Audio;\nTerminal=false\n' "$BIN" > "$DESKTOP" +echo "Installed VST3: $DEST" +echo "Installed Standalone: $APPDIR/ArSonComp" +echo "Launch via application menu or $BIN; rescan/restart your DAW." diff --git a/packaging/linux/package.sh b/packaging/linux/package.sh new file mode 100644 index 0000000..e8f5186 --- /dev/null +++ b/packaging/linux/package.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +set -euo pipefail +BUILD="$(cd "$1" && pwd)" +OUT="$(mkdir -p "$2" && cd "$2" && pwd)" +VER="$3" +VST="$BUILD/ArSonComp_artefacts/Release/VST3/ArSonComp.vst3" +APP="$BUILD/ArSonComp_artefacts/Release/Standalone/ArSonComp" +test -d "$VST" && test -f "$APP" +WORK="$(mktemp -d)" +trap 'rm -rf "$WORK"' EXIT +STAGE="$WORK/stage/ArSonComp" +mkdir -p "$STAGE/VST3" "$STAGE/Standalone" +cp -a "$VST" "$STAGE/VST3/" +install -m 755 "$APP" "$STAGE/Standalone/ArSonComp" +cp packaging/linux/install.sh packaging/linux/uninstall.sh "$STAGE/" +chmod 755 "$STAGE"/*.sh +cp LICENSE "$STAGE/LICENSE" +cp docs/INSTALL-PUBLIC.md "$STAGE/START-HERE.md" +tar -C "$WORK/stage" -czf "$OUT/ArSonComp-$VER-Linux-x86_64-Portable.tar.gz" ArSonComp +PKG="$WORK/deb" +mkdir -p "$PKG/DEBIAN" "$PKG/usr/lib/vst3" "$PKG/opt/arsoncomp" \ + "$PKG/usr/bin" "$PKG/usr/share/applications" "$PKG/usr/share/doc/arsoncomp" +cp -a "$VST" "$PKG/usr/lib/vst3/" +install -m 755 "$APP" "$PKG/opt/arsoncomp/ArSonComp" +cat > "$PKG/usr/bin/arsoncomp" <<'EOF' +#!/bin/sh +exec /opt/arsoncomp/ArSonComp "$@" +EOF +chmod 755 "$PKG/usr/bin/arsoncomp" +cat > "$PKG/usr/share/applications/arsoncomp.desktop" <<'EOF' +[Desktop Entry] +Name=ArSonComp +Comment=Real-time audio dynamics compressor +Exec=arsoncomp +Type=Application +Categories=AudioVideo;Audio; +Terminal=false +EOF +cp LICENSE "$PKG/usr/share/doc/arsoncomp/LICENSE" +cp docs/INSTALL-PUBLIC.md "$PKG/usr/share/doc/arsoncomp/START-HERE.md" +cat > "$PKG/DEBIAN/control" < +Description: ArSonComp real-time compressor VST3 and Standalone + Native x86_64 VST3 plug-in and desktop application. +EOF +dpkg-deb --root-owner-group --build "$PKG" "$OUT/ArSonComp-$VER-Ubuntu-Debian-amd64.deb" +echo "Linux packages ready: $OUT" diff --git a/packaging/linux/uninstall.sh b/packaging/linux/uninstall.sh new file mode 100644 index 0000000..aac36d6 --- /dev/null +++ b/packaging/linux/uninstall.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +set -euo pipefail +DEST="$HOME/.vst3/ArSonComp.vst3" +APPDIR="$HOME/.local/opt/arsoncomp" +if [[ -L "$DEST" || -L "$APPDIR" ]]; then + echo "Refusing to follow symlinks." >&2; exit 2 +fi +rm -rf -- "$DEST" "$APPDIR" +rm -f -- "$HOME/.local/bin/arsoncomp" "$HOME/.local/share/applications/arsoncomp.desktop" +echo "Removed ArSonComp for the current user. Presets and backups preserved." diff --git a/packaging/macos/package.sh b/packaging/macos/package.sh new file mode 100644 index 0000000..fa7a4aa --- /dev/null +++ b/packaging/macos/package.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +set -euo pipefail +BUILD="$(cd "$1" && pwd)" +OUT="$(mkdir -p "$2" && cd "$2" && pwd)" +VER="$3" +VST="$BUILD/ArSonComp_artefacts/Release/VST3/ArSonComp.vst3" +APP="$BUILD/ArSonComp_artefacts/Release/Standalone/ArSonComp.app" +test -d "$VST" && test -d "$APP" +WORK="$(mktemp -d)" +trap 'rm -rf "$WORK"' EXIT +ROOT="$WORK/pkgroot" +mkdir -p "$ROOT/Library/Audio/Plug-Ins/VST3" "$ROOT/Applications" +ditto "$VST" "$ROOT/Library/Audio/Plug-Ins/VST3/ArSonComp.vst3" +ditto "$APP" "$ROOT/Applications/ArSonComp.app" +# Ad-hoc sign top-level bundles individually; no deep signing. +# Not Developer ID / notarized: Gatekeeper can still block public installs. +for bundle in "$ROOT/Library/Audio/Plug-Ins/VST3/ArSonComp.vst3" \ + "$ROOT/Applications/ArSonComp.app"; do + codesign --force --sign - --timestamp=none "$bundle" + codesign --verify --verbose=2 "$bundle" +done +BIN="$ROOT/Applications/ArSonComp.app/Contents/MacOS/ArSonComp" +test -f "$BIN" +ARCHS="$(lipo -archs "$BIN")" +echo "Mac architectures: $ARCHS" +case "$ARCHS" in + *arm64*x86_64*|*x86_64*arm64*) ;; + *) echo "Expected universal arm64 + x86_64 binary" >&2; exit 7 ;; +esac +pkgbuild --root "$ROOT" --install-location / \ + --identifier com.arsonaudio.comp.installer --version "$VER" \ + "$OUT/ArSonComp-$VER-macOS-Universal-AdHoc.pkg" +ditto -c -k --sequesterRsrc --keepParent \ + "$ROOT/Library/Audio/Plug-Ins/VST3/ArSonComp.vst3" \ + "$OUT/ArSonComp-$VER-macOS-VST3-Universal.zip" +echo "Unsigned installer / ad-hoc signed plugin and Standalone are packaged." diff --git a/packaging/windows/ArSonComp.iss b/packaging/windows/ArSonComp.iss new file mode 100644 index 0000000..648f226 --- /dev/null +++ b/packaging/windows/ArSonComp.iss @@ -0,0 +1,79 @@ +; ArSonComp Windows x64 Inno Setup installer +; Build: ISCC.exe /DStageDir="C:\stage" /DAppVersion="0.2.0" packaging\windows\ArSonComp.iss +#ifndef StageDir + #error StageDir must point to the built stage (VST3, Standalone, LICENSE, START-HERE.md) +#endif +#ifndef AppVersion + #define AppVersion "0.2.0" +#endif +[Setup] +AppId=ArSonComp-ArSonAudio +AppName=ArSonComp +AppVersion={#AppVersion} +AppPublisher=ArSon Audio +AppPublisherURL=https://github.com/masarray/arson-comp +AppSupportURL=https://github.com/masarray/arson-comp/issues +AppUpdatesURL=https://github.com/masarray/arson-comp/releases +DefaultDirName={autopf}\ArSon Audio\ArSonComp +DefaultGroupName=ArSon Audio +OutputBaseFilename=ArSonComp-{#AppVersion}-Windows-x64-Setup +OutputDir=. +ArchitecturesAllowed=x64compatible +ArchitecturesInstallIn64BitMode=x64compatible +PrivilegesRequired=lowest +PrivilegesRequiredOverridesAllowed=dialog +UsePreviousPrivileges=yes +DisableDirPage=yes +DisableProgramGroupPage=yes +Compression=lzma2 +SolidCompression=yes +WizardStyle=modern +UninstallDisplayName=ArSonComp +CloseApplications=yes +RestartApplications=no +LicenseFile={#StageDir}\LICENSE +SetupLogging=yes +MinVersion=10.0 +[Types] +Name: "full"; Description: "Recommended: VST3 plug-in + Standalone" +Name: "plugin"; Description: "VST3 plug-in only" +Name: "custom"; Description: "Custom installation"; Flags: iscustom +[Components] +Name: "vst3"; Description: "VST3 plug-in for DAWs and mixers"; Types: full plugin custom +Name: "standalone"; Description: "Standalone audio application"; Types: full custom +[Tasks] +Name: "desktopicon"; Description: "Create desktop shortcut"; GroupDescription: "Shortcuts:"; Components: standalone; Flags: unchecked +[Files] +Source: "{#StageDir}\VST3\ArSonComp.vst3\*"; DestDir: "{code:GetPluginFolder}\ArSonComp.vst3"; Components: vst3; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "{#StageDir}\Standalone\ArSonComp.exe"; DestDir: "{app}"; Components: standalone; Flags: ignoreversion +Source: "{#StageDir}\START-HERE.md"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#StageDir}\LICENSE"; DestDir: "{app}"; Flags: ignoreversion +[Icons] +Name: "{autoprograms}\ArSonComp"; Filename: "{app}\ArSonComp.exe"; Components: standalone +Name: "{autodesktop}\ArSonComp"; Filename: "{app}\ArSonComp.exe"; Components: standalone; Tasks: desktopicon +[Run] +Filename: "{app}\ArSonComp.exe"; Description: "Launch ArSonComp"; Flags: postinstall nowait skipifsilent unchecked; Components: standalone +[Code] +function GetPluginFolder(Param: String): String; +begin + if IsAdminInstallMode then + Result := ExpandConstant('{commoncf}\VST3') + else + Result := ExpandConstant('{localappdata}\Programs\Common\VST3'); +end; +procedure CurStepChanged(CurStep: TSetupStep); +var + OtherPlugin: String; +begin + if (CurStep <> ssPostInstall) or not WizardIsComponentSelected('vst3') then + Exit; + if IsAdminInstallMode then + OtherPlugin := ExpandConstant('{localappdata}\Programs\Common\VST3\ArSonComp.vst3') + else + OtherPlugin := ExpandConstant('{commoncf}\VST3\ArSonComp.vst3'); + if DirExists(OtherPlugin) then + MsgBox('Another ArSonComp VST3 also exists in:' + #13#10 + OtherPlugin + + '' + #13#10#13#10 + 'Some DAWs may load that copy first. Remove the older copy.' + + '' + #13#10 + 'Restart or rescan your DAW after installing.', + mbInformation, MB_OK); +end; diff --git a/tests/PluginSmoke.cpp b/tests/PluginSmoke.cpp index 938e5a4..722b89b 100644 --- a/tests/PluginSmoke.cpp +++ b/tests/PluginSmoke.cpp @@ -734,7 +734,14 @@ static int runSmoke(int argc,char** argv) { if(!range->isVisible()||hp->isVisible()||!autoMode->isVisible()) return 32; } - editor->addToDesktop(0); editor->setVisible(true); + // Under Linux/Xvfb there may be no EWMH-compatible window manager. + // An X_ChangeProperty BadAtom can occur before the actual GUI smoke + // assertions. Paint/snapshot offscreen there; keep native window + // peer coverage on Windows and macOS. + #if !JUCE_LINUX + editor->addToDesktop(0); + #endif + editor->setVisible(true); for(int j=0;j<1500;++j) { for(int i=0;i<128;++i) { const float level=0.15f+0.6f*(0.5f+0.5f*std::sin(j*0.013f));