Skip to content
csound-pluginsPublic

About

Installer scripts for csound and plugins

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

28 Commits

Folders and files

Repository files navigation

Csound 7 Installer

A small bootstrapping script that downloads the Csound 7 release for the current platform and installs it:

  • On Linux it downloads the portable release from the csound-plugins/csound-plugins GitHub repository, verifies its SHA-256 checksum, and installs it directly (system-wide or user-local, optionally with risset).
  • On macOS it downloads the official .pkg installer built by the csound_builds workflow of the csound/csound repository (branch develop, which corresponds to Csound 7) and installs it with the system installer.
  • On Windows 11 or later (x86_64 only) it downloads the official .exe installer built by the same csound_builds workflow and runs it, using the curl.exe bundled with Windows. Windows on ARM64 is not supported yet.

The shell script is uploaded to the csound-plugins site as csound-plugins.github.io/getcsound.sh; the PowerShell script as csound-plugins.github.io/getcsound.ps1.

Quick install

Linux

curl -fsSL https://csound-plugins.github.io/getcsound.sh | bash

macOS

The .pkg is installed with sudo, so run this from a terminal to let sudo prompt for your password:

curl -fsSL https://csound-plugins.github.io/getcsound.sh | bash

When sudo is configured to run without a password (passwordless sudo, as on GitHub-hosted runners), no terminal is needed and the installer runs non-interactively, which makes it usable from a CI job.

The installer detects the os and architecture and downloads the corresponding distribution and prints the exact archive URL before downloading it.

To show the checksum-file URL and the expected and calculated SHA-256 checksums:

curl -fsSL https://csound-plugins.github.io/getcsound.sh | bash -s -- --verbose

Use --help to display the available options, including the Linux installation options, without downloading anything:

curl -fsSL https://csound-plugins.github.io/getcsound.sh | bash -s -- --help

Windows

Windows 11 or later is required (the installer uses the curl.exe bundled with Windows); Windows on ARM64 is not supported yet and the installer exits with an error there.

The .exe is a machine-wide Inno Setup installer, so it needs Administrator rights. Run this from a PowerShell session (a UAC prompt will appear unless the session is already elevated):

irm https://csound-plugins.github.io/getcsound.ps1 | iex

To show the download URLs and other diagnostics:

& ([scriptblock]::Create((irm https://csound-plugins.github.io/getcsound.ps1))) --verbose

--verbose belongs to the bootstrap script. To pass extra flags to the Inno Setup installer instead, separate them with --:

& ([scriptblock]::Create((irm https://csound-plugins.github.io/getcsound.ps1))) -- /SILENT

Choosing what to install

Use --help to display the available options without downloading anything. --no-risset skips the risset package manager: by default you are asked interactively, or it is installed non-interactively with -y. --quiet prints only essential information; on Linux, --user / --system choose the installation mode.

By default macOS and Windows install the latest successful csound_builds workflow artifact. Pass --release to install the installer published with the latest GitHub release instead:

curl -fsSL https://csound-plugins.github.io/getcsound.sh | bash -s -- --release
& ([scriptblock]::Create((irm https://csound-plugins.github.io/getcsound.ps1))) --release

Linux always installs from the latest build, so --release has no effect there. Set CSOUND7_RELEASE_TAG to pin a specific release tag instead of latest.

What the script does

Linux

  1. Detects the operating system and CPU architecture.
  2. Downloads the release asset.
  3. Downloads the matching SHA-256 checksum file.
  4. Verifies the archive's checksum before extracting it.
  5. Installs the extracted distribution, either system-wide (/usr/local, requires sudo) or user-local (~/.local), and updates the shell PATH for user-local installs.
  6. Optionally installs risset.

macOS

  1. Looks up the latest successful csound_builds workflow run of csound/csound on the develop branch.
  2. Selects the artifact matching csound-7.*-macos*.
  3. Downloads it through the anonymous nightly.link mirror (GitHub Actions artifacts require authentication otherwise).
  4. Extracts the .pkg and installs it with sudo installer -pkg ... -target /.
  5. Optionally installs risset.

With --release, steps 1-3 are replaced by downloading csound-macos-<tag>.zip from the latest csound/csound release.

Because the macOS install runs under sudo, you normally need an interactive terminal session so that sudo can prompt for the password. If sudo is configured to run without a password (passwordless sudo, as on GitHub-hosted runners), no terminal is required and the installer runs non-interactively.

Windows

  1. Detects the CPU architecture and refuses to install on ARM64.
  2. Looks up the latest successful csound_builds workflow run of csound/csound on the develop branch.
  3. Selects the artifact matching Csound_x64-*-windows-installer.
  4. Downloads it through the anonymous nightly.link mirror (GitHub Actions artifacts require authentication otherwise).
  5. Extracts the .exe and runs it elevated, silently, adding Csound to PATH.
  6. Optionally installs risset.

With --release, steps 2-4 are replaced by downloading csound-windows-<tag>.zip from the latest csound/csound release.

Environment variables

Variable Default Description
CSOUND7_TAG latest GitHub release tag to install (Linux).
CSOUND7_ASSET Depends on platform Name of the release asset to download (Linux).
CSOUND7_REPO Depends on platform owner/repo providing the installer: csound-plugins/csound-plugins on Linux, csound/csound on macOS and Windows.
CSOUND7_WORKFLOW csound_builds.yml Workflow whose artifacts are used (macOS, Windows).
CSOUND7_MACOS_BRANCH develop Branch of the workflow runs to use (macOS).
CSOUND7_MACOS_ASSET csound-7.*-macos* Glob of the artifact name to install (macOS).
CSOUND7_MACOS_RUN_ID (latest successful run) Pin a specific workflow run (macOS).
CSOUND7_MACOS_ARTIFACT (first match of the glob) Pin a specific artifact name (macOS).
CSOUND7_WINDOWS_BRANCH develop Branch of the workflow runs to use (Windows).
CSOUND7_WINDOWS_ASSET Csound_x64-*-windows-installer Glob of the artifact name to install (Windows).
CSOUND7_WINDOWS_RUN_ID (latest successful run) Pin a specific workflow run (Windows).
CSOUND7_WINDOWS_ARTIFACT (first match of the glob) Pin a specific artifact name (Windows).
CSOUND7_WINDOWS_EXE Csound7-windows_x86_64-*.exe Glob of the installer executable (Windows).
CSOUND7_RELEASE_TAG latest Release tag installed with --release (macOS, Windows); latest uses the newest release.
CSOUND7_GH_TOKEN (anonymous) GitHub token used to authenticate the API queries when set (also honors GH_TOKEN / GITHUB_TOKEN). Recommended on CI, where anonymous API calls are rate-limited. When none of these is set and the GitHub CLI is installed, gh auth token is used as a fallback.

Options

The shell and the PowerShell scripts accept the same bootstrap options:

Option Description
--help Show the available options without downloading anything.
--release Install the latest GitHub release instead of the latest successful csound_builds workflow run (macOS and Windows; no effect on Linux).
--verbose Print the download URLs and other diagnostic information (checksums on Linux).

Both scripts also accept these installation options, which behave identically on Linux, macOS and Windows:

Option Description
--no-risset Do not install risset and do not ask about it.
-y Non-interactive: do not prompt; install Csound and risset. On Linux this also selects a system-wide installation. Pass --no-risset to skip risset.
--quiet Only print essential information (warnings, errors, and a final completion message).

The shell script additionally accepts the following Linux installation options (they are ignored, with a warning, on macOS):

Option Description
--user Install for the current user only (~/.local).
--system Install system-wide (/usr/local, requires sudo).

Requirements

Linux

  • curl
  • unzip
  • mktemp
  • sha256sum or shasum
  • patchelf and sudo (or root) for a system-wide installation

An interactive terminal session is required for the interactive prompts. Pass -y to run non-interactively (no terminal needed).

macOS

Only tools that ship with macOS are used (curl, mktemp, ditto, installer), plus sudo. An interactive terminal session is required so that sudo can prompt for the password, unless passwordless sudo is configured.

Windows

  • Windows 11 or later (x86_64).
  • Windows PowerShell 5.1 or later (works with PowerShell 7 as well).
  • curl.exe, which is bundled with Windows 11 and later.
  • Administrator rights, since the installer writes to %ProgramFiles% and machine-wide environment variables. A UAC prompt is shown when needed.

About

Installer scripts for csound and plugins

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages