Build MacOS installer
This commit is contained in:
parent
00e334d56c
commit
f1fed9462e
4 changed files with 103 additions and 9 deletions
47
.github/workflows/build.yml
vendored
47
.github/workflows/build.yml
vendored
|
|
@ -104,22 +104,51 @@ jobs:
|
|||
- name: Set install name
|
||||
run: |
|
||||
echo "install_ref=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
||||
echo "install_name=sfizz-${GITHUB_REF##*/}-linux" >> "$GITHUB_ENV"
|
||||
echo "install_name=sfizz-${GITHUB_REF##*/}-macos" >> "$GITHUB_ENV"
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Build mac universal
|
||||
- name: Create Build Environment
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}
|
||||
run: cmake -E make_directory build
|
||||
- name: Configure CMake
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
cd ..
|
||||
cmake "$GITHUB_WORKSPACE" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DSFIZZ_AU=ON \
|
||||
-DSFIZZ_LV2=ON \
|
||||
-DSFIZZ_LV2_UI=ON \
|
||||
-DSFIZZ_VST=ON \
|
||||
-DSFIZZ_JACK=OFF \
|
||||
-DSFIZZ_TESTS=OFF \
|
||||
-DSFIZZ_SHARED=OFF \
|
||||
-DSFIZZ_STATIC_DEPENDENCIES=OFF
|
||||
- name: Build plugins
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: cmake --build . --config "Release" -j 2
|
||||
- name: Package OSX bundles
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}
|
||||
run: ./sfizz/scripts/package-osx-bundles.sh
|
||||
- name: Create OSX installer
|
||||
shell: bash
|
||||
working-directory: ${{runner.workspace}}/build
|
||||
run: |
|
||||
productbuild \
|
||||
--distribution $GITHUB_WORKSPACE/scripts/plugin.pkg/package.xml \
|
||||
--identifier "sfz.tools.sfizz" \
|
||||
--package-path "${{runner.workspace}}/build" \
|
||||
--version 0 \
|
||||
${{env.install_name}}.pkg
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: MacOS build
|
||||
name: MacOS installer
|
||||
path: |
|
||||
build/sfizz.*
|
||||
${{runner.workspace}}/build/${{env.install_name}}.pkg
|
||||
|
||||
build_for_mod:
|
||||
runs-on: ubuntu-18.04
|
||||
|
|
|
|||
40
scripts/package-osx-bundles.sh
Executable file
40
scripts/package-osx-bundles.sh
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
# Adapted from Distrho's package-osx-bundles.sh script
|
||||
|
||||
set -e
|
||||
|
||||
if [ -d build ]; then
|
||||
cd build
|
||||
else
|
||||
echo "Please run this script from the root folder"
|
||||
exit
|
||||
fi
|
||||
|
||||
rm -rf au
|
||||
rm -rf lv2
|
||||
rm -rf vst3
|
||||
|
||||
mkdir au lv2 vst3
|
||||
mv sfizz.component au/
|
||||
mv sfizz.lv2 lv2/
|
||||
mv sfizz.vst3 vst3/
|
||||
|
||||
pkgbuild \
|
||||
--identifier "sfz.tools.sfizz.au.bundle" \
|
||||
--install-location "/Library/Audio/Plug-Ins/Component/" \
|
||||
--root "${PWD}/au/" \
|
||||
sfz-tools-sfizz-au-bundle.pkg
|
||||
|
||||
pkgbuild \
|
||||
--identifier "sfz.tools.sfizz.lv2.bundle" \
|
||||
--install-location "/Library/Audio/Plug-Ins/LV2/" \
|
||||
--root "${PWD}/lv2/" \
|
||||
sfz-tools-sfizz-lv2-bundle.pkg
|
||||
|
||||
pkgbuild \
|
||||
--identifier "sfz.tools.sfizz.vst3.bundle" \
|
||||
--install-location "/Library/Audio/Plug-Ins/VST3/" \
|
||||
--root "${PWD}/vst3/" \
|
||||
sfz-tools-sfizz-vst3-bundle.pkg
|
||||
|
||||
cd ..
|
||||
22
scripts/plugin.pkg/package.xml
Normal file
22
scripts/plugin.pkg/package.xml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<installer-gui-script minSpecVersion="1">
|
||||
<title>sfizz</title>
|
||||
<domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/>
|
||||
<options customize="always" hostArchitectures="x86_64" require-scripts="false" rootVolumeOnly="true"/>
|
||||
<pkg-ref id="sfz.tools.sfizz"/>
|
||||
<welcome file="welcome.txt" mime-type="text/plain"/>
|
||||
<choice id="sfz.tools.sfizz.au" title="AU" description="Install AU plugin" visible="true">
|
||||
<pkg-ref id="sfz.tools.sfizz.au.bundle" version="0">sfz-tools-sfizz-au-bundle.pkg</pkg-ref>
|
||||
</choice>
|
||||
<choice id="sfz.tools.sfizz.lv2" title="LV2" description="Install LV2 plugins" visible="true">
|
||||
<pkg-ref id="sfz.tools.sfizz.lv2.bundle" version="0">sfz-tools-sfizz-lv2-bundle.pkg</pkg-ref>
|
||||
</choice>
|
||||
<choice id="sfz.tools.sfizz.vst3" title="VST3" description="Install VST3 plugins" visible="true">
|
||||
<pkg-ref id="sfz.tools.sfizz.vst3.bundle" version="0">sfz-tools-sfizz-vst3-bundle.pkg</pkg-ref>
|
||||
</choice>
|
||||
<choices-outline>
|
||||
<line choice="sfz.tools.sfizz.au"/>
|
||||
<line choice="sfz.tools.sfizz.lv2"/>
|
||||
<line choice="sfz.tools.sfizz.vst3"/>
|
||||
</choices-outline>
|
||||
</installer-gui-script>
|
||||
3
scripts/plugin.pkg/welcome.txt
Normal file
3
scripts/plugin.pkg/welcome.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
OSX installer for sfizz
|
||||
|
||||
sfizz is a sample-based musical synthesizer.
|
||||
Loading…
Add table
Reference in a new issue