Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 78 additions & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ on:
workflow_dispatch:
inputs:
tag:
description: "Tag/version to release (e.g. v2.2.0). Optional; if empty, a draft release for the current SHA is produced."
description: "Tag/version for a draft release (e.g. v2.2.0). Leave empty to build workflow artifacts only."
required: false

permissions:
contents: write

jobs:
macos:
name: macOS DMG
name: macOS arm64 packages
runs-on: macos-14
steps:
- uses: actions/checkout@v5

- name: Install dependencies
run: |
brew update
brew install cmake ninja libsndfile
brew install cmake ninja libsndfile dylibbundler

- name: Install Qt 6.8
uses: jurplel/install-qt-action@v4
Expand All @@ -47,20 +47,19 @@ jobs:
- name: Package (DMG)
run: cmake --build build --target package

- name: Locate artifact
id: artifact
run: |
dmg=$(ls build/DISSCO-*-Darwin.dmg | head -n1)
echo "path=${dmg}" >> "$GITHUB_OUTPUT"
echo "name=$(basename "${dmg}")" >> "$GITHUB_OUTPUT"
- name: Package standalone CMOD
run: cmake --build build --target cmod-package

- uses: actions/upload-artifact@v5
with:
name: ${{ steps.artifact.outputs.name }}
path: ${{ steps.artifact.outputs.path }}
name: macos-packages
if-no-files-found: error
path: |
build/DISSCO-*-Darwin.dmg
build/CMOD-*-Darwin-*.tar.gz

linux:
name: Linux AppImage
name: Linux x86_64 packages
# Pinned to 22.04 for older glibc: AppImages built here run on more
# downstream distros than ones built on 24.04+.
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -107,21 +106,19 @@ jobs:
QMAKE: ${{ env.QT_ROOT_DIR }}/bin/qmake
run: cmake --build build --target appimage

- name: Locate artifact
id: artifact
run: |
img=$(ls build/DISSCO-*.AppImage | head -n1)
echo "path=${img}" >> "$GITHUB_OUTPUT"
echo "name=$(basename "${img}")" >> "$GITHUB_OUTPUT"
- name: Package standalone CMOD
run: cmake --build build --target cmod-package

- uses: actions/upload-artifact@v5
with:
name: ${{ steps.artifact.outputs.name }}
path: ${{ steps.artifact.outputs.path }}
name: linux-packages
if-no-files-found: error
path: |
build/DISSCO-*-Linux-*.AppImage
build/CMOD-*-Linux-*.AppImage

windows:
name: Windows installer
if: false
name: Windows x64 packages
runs-on: windows-2022
defaults:
run:
Expand All @@ -135,6 +132,9 @@ jobs:
with:
arch: x64

- name: Install NSIS
run: choco install nsis --yes --no-progress

- name: Install Qt 6.8
uses: jurplel/install-qt-action@v4
with:
Expand Down Expand Up @@ -162,31 +162,77 @@ jobs:
- name: Package (NSIS installer)
run: cmake --build build --target package

- name: Locate artifact
id: artifact
run: |
$exe = Get-ChildItem build/DISSCO-*-Windows.exe | Select-Object -First 1
"path=$($exe.FullName)" | Out-File -Append -Encoding utf8 $env:GITHUB_OUTPUT
"name=$($exe.Name)" | Out-File -Append -Encoding utf8 $env:GITHUB_OUTPUT
- name: Package standalone CMOD
run: cmake --build build --target cmod-package

- uses: actions/upload-artifact@v5
with:
name: ${{ steps.artifact.outputs.name }}
path: ${{ steps.artifact.outputs.path }}
name: windows-packages
if-no-files-found: error
path: |
build/DISSCO-*-Windows.exe
build/CMOD-*-Windows-x64.zip

release:
name: Publish GitHub release
needs: [macos, linux, windows]
if: startsWith(github.ref, 'refs/tags/v')
if: >-
startsWith(github.ref, 'refs/tags/v') ||
(github.event_name == 'workflow_dispatch' && inputs.tag != '')
runs-on: ubuntu-22.04
env:
RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0

- uses: actions/download-artifact@v5
with:
path: dist
merge-multiple: true

- name: Validate release tag and assets
run: |
major=$(sed -n 's/set(DISSCO_VER_MAJOR \([0-9][0-9]*\))/\1/p' DISSCOVersions.txt)
minor=$(sed -n 's/set(DISSCO_VER_MINOR \([0-9][0-9]*\))/\1/p' DISSCOVersions.txt)
patch=$(sed -n 's/set(DISSCO_VER_PATCH \([0-9][0-9]*\))/\1/p' DISSCOVersions.txt)
expected="v${major}.${minor}.${patch}"
if [[ "${RELEASE_TAG}" != "${expected}" ]]; then
echo "Release tag ${RELEASE_TAG} must match ${expected}." >&2
exit 1
fi

if git show-ref --verify --quiet "refs/tags/${RELEASE_TAG}"; then
tag_commit=$(git rev-list -n 1 "refs/tags/${RELEASE_TAG}")
if [[ "${tag_commit}" != "${GITHUB_SHA}" ]]; then
echo "Existing tag ${RELEASE_TAG} must match the current commit ${GITHUB_SHA}." >&2
exit 1
fi
fi

cd dist
for pattern in \
'DISSCO-*-Darwin.dmg' \
'DISSCO-*-Linux-*.AppImage' \
'DISSCO-*-Windows.exe' \
'CMOD-*-Darwin-*.tar.gz' \
'CMOD-*-Linux-*.AppImage' \
'CMOD-*-Windows-x64.zip'; do
compgen -G "${pattern}" > /dev/null || {
echo "Missing release asset: ${pattern}" >&2
exit 1
}
done

- name: Generate SHA-256 checksums
working-directory: dist
run: sha256sum * > SHA256SUMS

- uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.RELEASE_TAG }}
target_commitish: ${{ github.sha }}
files: dist/*
draft: true
draft: ${{ github.event_name == 'workflow_dispatch' }}
generate_release_notes: true
18 changes: 13 additions & 5 deletions BUILDING_LINUX.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Building on Linux
=================

Looking for a released application instead of a source build? See [DOWNLOAD.md](DOWNLOAD.md).

Preliminary Requirements
--------------------------

The following are *necessary* to compile anything:

- git
- A C++17-supporting compiler (g++, clang),
- A C++20-supporting compiler (g++, clang),
- A C compiler (gcc ...), and
- cmake >= 3.25

Expand Down Expand Up @@ -48,11 +50,11 @@ Since we precompile headers for LASSIE and CMOD, we suggest `export CCACHE_SLOPP

<!-- TODO: RHEL, maybe -->

Installing DISSCO
-----------------
Just `git clone` this repo; explicitly:
Getting the source
------------------
Clone this repository:

git clone https://github.com/cmp-illinois/DISSCO-2.2.0.git
git clone https://github.com/cmp-illinois/DISSCO.git

Building
--------
Expand Down Expand Up @@ -89,3 +91,9 @@ From the project root:
This produces `build/DISSCO-<version>-Linux-<arch>.AppImage` — a self-contained executable with Qt, libsndfile, and the `cmod` executable bundled in. Its desktop launcher runs `lassie`, and the AppImage works on most modern Linux distros without further installation.

The first invocation downloads `linuxdeploy` and `linuxdeploy-plugin-qt` into `build/.linuxdeploy/`. The icon (`packaging/linux/LASSIE.png`) is a placeholder; replace it with real artwork before cutting a release.

To build the standalone CMOD AppImage instead:

cmake --build build --target cmod-package

This produces `build/CMOD-<version>-Linux-<architecture>.AppImage`. It contains CMOD and its audio-library dependencies, but not LASSIE, Qt, or LilyPond.
22 changes: 17 additions & 5 deletions BUILDING_MACOS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Building on macOS
=================

Looking for a released application instead of a source build? See [DOWNLOAD.md](DOWNLOAD.md).

Preliminary Requirements
--------------------------

The following are *necessary* to compile anything:

- git
- A C++17-supporting compiler (g++, clang),
- A C++20-supporting compiler (g++, clang),
- A C compiler (gcc ...), and
- cmake >= 3.25

Expand Down Expand Up @@ -58,11 +60,11 @@ MacPorts will install it in `/opt/local/include/[your includes here]` and `/opt/
Since we precompile headers for LASSIE and CMOD, we suggest `export CCACHE_SLOPPINESS=pch_defines,time_macros`. Please review the `ccache` man page for more.


Installing DISSCO
-----------------
Just `git clone` this repo; explicitly:
Getting the source
------------------
Clone this repository:

git clone https://github.com/cmp-illinois/DISSCO-2.2.0.git
git clone https://github.com/cmp-illinois/DISSCO.git

Building
--------
Expand All @@ -86,6 +88,10 @@ From `build`, you can clean `build` using `cmake --build . --target clean`. Alte

Building a release DMG
----------------------
The release packages also require `dylibbundler`:

brew install dylibbundler

From the project root:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
Expand All @@ -98,3 +104,9 @@ This produces `build/DISSCO-<version>-Darwin.dmg`. The DMG contains `lassie.app`
The build's icon (`packaging/macos/LASSIE.icns`) is a placeholder; regenerate it from updated artwork via `packaging/macos/make-icns.sh`.

**Note on Gatekeeper**: without an Apple Developer ID signature + notarization, users opening the DMG will see a "cannot be verified" dialog and must right-click → Open. Code-signing and notarization can be added to the GitHub Actions release workflow once Apple Developer credentials are available.

To build the standalone CMOD archive, run:

cmake --build build --target cmod-package

This produces `build/CMOD-<version>-Darwin-<architecture>.tar.gz`. It contains CMOD and its audio-library dependencies, but not LASSIE, Qt, or LilyPond.
12 changes: 11 additions & 1 deletion BUILDING_WINDOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Building on Windows

This guide explains how to build and run DISSCO on Windows using MSVC, CMake, Ninja, Qt, vcpkg, Git for Windows, and LilyPond.

Looking for a released application instead of a source build? See [DOWNLOAD.md](DOWNLOAD.md).

DISSCO contains three main parts:

- **LASS**: sound synthesis library
Expand Down Expand Up @@ -203,7 +205,7 @@ Choose where to put the source code. This guide assumes `C:\dev\DISSCO-2.2.0`:

```cmd
cd /d C:\dev
git clone https://github.com/cmp-illinois/DISSCO-2.2.0.git
git clone https://github.com/cmp-illinois/DISSCO.git
cd DISSCO-2.2.0
```

Expand Down Expand Up @@ -387,3 +389,11 @@ For non-default paths or automation, run the PowerShell entry point directly:
```

Use `Get-Help .\Make-Portable-for-Windows.ps1 -Detailed` to view the accepted switches.

To create only the standalone CMOD package from an existing Release build:

```cmd
cmake --build build --target cmod-package
```

This produces `build\CMOD-<version>-Windows-x64.zip`. It includes CMOD, the Microsoft Visual C++ runtime, and CMOD's audio-library DLLs, but not LASSIE, Qt, or LilyPond.
5 changes: 3 additions & 2 deletions CMOD/src/Utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Piece.h"
#include "Patter.h"
#include "ProbabilityEnvelope.h" // consider moving this into LASS.h
#include <filesystem>
#include <memory>
#include <sstream>
#include <string>
Expand Down Expand Up @@ -74,8 +75,8 @@ Utilities::Utilities(pugi::xml_node root,

envelopeLibrary = new EnvelopeLibrary();
envelopeLibrary->loadLibraryNewFormat((char*)fileString.c_str());
string deleteCommand = "rm " + fileString;
system(deleteCommand.c_str());
std::error_code removalError;
std::filesystem::remove(fileString, removalError);

// Construct Markov Model Library
pugi::xml_node markovModelLibraryElement = GNES(envelopeLibraryElement);
Expand Down
Loading
Loading