Browse Source

macOS CI and installer package (#2)

* Activate osx CI

Signed-off-by: falkTX <falktx@falktx.com>

* Fix typo

Signed-off-by: falkTX <falktx@falktx.com>

* CI: do not install debs on macos native

Signed-off-by: falkTX <falktx@falktx.com>

* Install cmake and jq with homebrew

Signed-off-by: falkTX <falktx@falktx.com>

* Generate macOS package

Signed-off-by: falkTX <falktx@falktx.com>

* Do not use sudo with brew

Signed-off-by: falkTX <falktx@falktx.com>

* Add patch to fix artyfx under macos

* Fix macos deploy

* Final tweaks for macos packages

* Remove unused script

* Ignore brew exit signal
tags/v1.0
Filipe Coelho GitHub 2 years ago
parent
commit
a2574c809c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 347 additions and 5 deletions
  1. +8
    -0
      .travis.yml
  2. +5
    -0
      .travis/before_install.sh
  3. +6
    -0
      .travis/install.sh
  4. +50
    -5
      pack-plugins.sh
  5. +262
    -0
      patches/artyfx/macos/01_use-dylib-in-ttl.patch
  6. +12
    -0
      setup/macos/package.xml.in
  7. +4
    -0
      setup/macos/welcome.txt

+ 8
- 0
.travis.yml View File

@@ -43,6 +43,13 @@ jobs:
services:
- xvfb

# macOS native build
- os: osx
compiler: gcc
env:
- TARGET="macos"
- PLUGINS="abgate artyfx blop caps fomp mda"

before_install:
- bash ${TRAVIS_BUILD_DIR}/.travis/before_install.sh

@@ -62,6 +69,7 @@ deploy:
secure: "xKXvMWEvj92IsFINpGlYEJeidLRoTeLIwrWVO06UrNNVCPiWC9z64Xthx/0xqQEv+2PA5GLkh9lnTm7aqQKbMNiVj4sQCcg3sVXEhkGkr27KNjHuQiFao+IeotU6bVTObzGhNR+US3LkRK9RSSvnmDBSUQB16+YgG6PZyXH7mQfoLycQQ8z24hLc4P2gGXbgd23viqZVxBh15HBm8jSm0q5Y5JZ2D/ETQWIijv+Cd7f3Q4j989Q4ZULiDyPs6gMR6Klr85Z8iNXEZRCw/dJ800IrWV9tetJFZFVOG2nWATPSFD9L1DLlJtD0tPJjk/n7DpUEivdrrLgm2C1MaTfDWQU7OOktkcNv6oUB++hWqD/d9bj1teSu9lrUkAS4QPWGWgsMQH/eWquoS6vQOE7ERAHTDgbsS1aPxnuWyG2lyefbSEJCXBOpbcWLAfAr3cdkS+QhFHZzKvZLwJZFkKR0FEKKPkt+CViLmtSbeM7uFRhX3B4uA9EByZonlvupgKfyt/WKoqpsb1hF16tVrZOmTFf2/btLOw8PUD1opAx0aXjH+XcWH6y93wsP41E3VMO/gc8jc7npa+JsMDXaHFf/DMQvj9rVF8deHoshx8Sl3n0RpEhMyV+lXKKfewryqnfWNGak7wNQQhFr4Xqv6mleBFAX1Miy12KkzYxltfwi53o="
file_glob: true
file: setup/inno/PawPaw-*.exe
file: setup/macos/PawPaw-*.pkg
skip_cleanup: true
on:
tags: true


+ 5
- 0
.travis/before_install.sh View File

@@ -2,6 +2,11 @@

set -e

# nothing to do for macOS native
if [ "${TARGET}" = "macos" ]; then
exit 0
fi

sudo add-apt-repository -y ppa:kxstudio-debian/kxstudio
sudo add-apt-repository -y ppa:kxstudio-debian/toolchain



+ 6
- 0
.travis/install.sh View File

@@ -2,6 +2,12 @@

set -e

# Special macOS native handling
if [ "${TARGET}" = "macos" ]; then
brew install cmake jq || true
exit 0
fi

# Special handling for caching deb archives
if [ "$(ls ${HOME}/PawPawBuilds/debs | wc -l)" -ne 0 ]; then
sudo cp ${HOME}/PawPawBuilds/debs/*.deb /var/cache/apt/archives/


+ 50
- 5
pack-plugins.sh View File

@@ -16,6 +16,8 @@ fi

shift

VERSION=$(cat VERSION)

# ---------------------------------------------------------------------------------------------------------------------

source setup/check_target.sh
@@ -45,19 +47,25 @@ function create_innosetup_exe {
local pkgdir="${PAWPAW_BUILDDIR}/innosetup-6.0.5"
local iscc="${pkgdir}/drive_c/InnoSeup/ISCC.exe"

echo "#define VERSION \"$(cat VERSION)\"" > /tmp/pawpaw/version.iss
echo "#define VERSION \"${VERSION}\"" > /tmp/pawpaw/version.iss
env WINEARCH="${PAWPAW_TARGET}" WINEPREFIX="${pkgdir}" wine "${iscc}" "setup/inno/${PAWPAW_TARGET}.iss"
}

# ---------------------------------------------------------------------------------------------------------------------

rm -rf /tmp/pawpaw
mkdir /tmp/pawpaw

if [ "${WIN32}" -eq 1 ]; then
download_and_install_innosetup
rm -rf /tmp/pawpaw
mkdir /tmp/pawpaw
touch /tmp/pawpaw/components.iss
touch /tmp/pawpaw/lv2bundles.iss
PAWPAW_WINE_LV2DIR="Z:$(echo ${PAWPAW_PREFIX} | tr -t '/' '\\')\\lib\\lv2\\"

elif [ "${MACOS}" -eq 1 ] && [ "${MACOS_OLD}" -eq 0 ]; then
touch /tmp/pawpaw/choices.xml
touch /tmp/pawpaw/outlines.xml

fi

# ---------------------------------------------------------------------------------------------------------------------
@@ -71,23 +79,60 @@ for plugin in ${@}; do
fi

name=$(jq -crM .name ${pfile})
sname=$(echo ${name} | tr -t '-' '_')
sname=$(echo ${name} | tr -ds '-' '_')
lv2bundles=($(jq -crM .lv2bundles[] ${pfile}))

if [ "${WIN32}" -eq 1 ]; then
echo "Name: ${sname}; Description: \"${name}\"; Types: full;" >> /tmp/pawpaw/components.iss

elif [ "${MACOS}" -eq 1 ] && [ "${MACOS_OLD}" -eq 0 ]; then
echo " <choice id=\"studio.kx.distrho.pawpaw.${sname}\" title=\"${name}\" visible=\"true\">" >> /tmp/pawpaw/choices.xml
echo " <line choice=\"studio.kx.distrho.pawpaw.${sname}\"/>" >> /tmp/pawpaw/outlines.xml
fi

for lv2bundle in ${lv2bundles[@]}; do
if [ "${WIN32}" -eq 1 ]; then
echo "Source: \"${PAWPAW_WINE_LV2DIR}${lv2bundle}\\*\"; DestDir: \"{commoncf}\\LV2\\${lv2bundle}\"; Components: ${sname}; Flags: recursesubdirs" >> /tmp/pawpaw/lv2bundles.iss

elif [ "${MACOS}" -eq 1 ] && [ "${MACOS_OLD}" -eq 0 ]; then
bundleref="pawpaw-bundle-${sname}-${lv2bundle}.pkg"
echo " <pkg-ref id=\"studio.kx.distrho.pawpaw.${sname}_${lv2bundle}\" version=\"0\">${bundleref}</pkg-ref>" >> /tmp/pawpaw/choices.xml
pkgbuild \
--identifier "studio.kx.distrho.pawpaw.${sname}_${lv2bundle}" \
--install-location "/Library/Audio/Plug-Ins/LV2/${lv2bundle}/" \
--root "${PAWPAW_PREFIX}/lib/lv2/${lv2bundle}/" \
"setup/macos/${bundleref}"
fi
done

if [ "${MACOS}" -eq 1 ] && [ "${MACOS_OLD}" -eq 0 ]; then
echo " </choice>" >> /tmp/pawpaw/choices.xml
fi
done

if [ "${WIN32}" -eq 1 ]; then
create_innosetup_exe
rm -rf /tmp/pawpaw

elif [ "${MACOS}" -eq 1 ] && [ "${MACOS_OLD}" -eq 0 ]; then
pushd setup/macos
python -c "
with open('package.xml.in', 'r') as fh:
packagexml = fh.read()
with open('/tmp/pawpaw/choices.xml', 'r') as fh:
choicesxml = fh.read().strip()
with open('/tmp/pawpaw/outlines.xml', 'r') as fh:
outlinesxml = fh.read().strip()
print(packagexml.replace('@CURDIR@','${PWD}').replace('@CHOICES@',choicesxml).replace('@OUTLINES@',outlinesxml))" > package.xml
productbuild \
--distribution package.xml \
--identifier studio.kx.distrho.pawpaw \
--package-path "${PWD}" \
--version ${VERSION} \
PawPaw-macOS-v${VERSION}.pkg
rm package.xml pawpaw-bundle-*
popd
fi

rm -rf /tmp/pawpaw

# ---------------------------------------------------------------------------------------------------------------------

+ 262
- 0
patches/artyfx/macos/01_use-dylib-in-ttl.patch View File

@@ -0,0 +1,262 @@
diff --git a/artyfx.lv2/bitta.ttl b/artyfx.lv2/bitta.ttl
index 8bb0109..e1f5ef4 100644
--- a/artyfx.lv2/bitta.ttl
+++ b/artyfx.lv2/bitta.ttl
@@ -28,7 +28,7 @@
<http://www.openavproductions.com/artyfx#bitta/gui>
a ui:X11UI;
- ui:binary <artyfx_ui.so>;
+ ui:binary <artyfx_ui.dylib>;
lv2:optionalFeature ui:noUserResize ;
lv2:extensionData ui:idleInterface .
diff --git a/artyfx.lv2/capta.ttl b/artyfx.lv2/capta.ttl
index 891ce5d..681d716 100644
--- a/artyfx.lv2/capta.ttl
+++ b/artyfx.lv2/capta.ttl
@@ -27,7 +27,7 @@
<http://www.openavproductions.com/artyfx#capta/gui>
a ui:X11UI;
- ui:binary <artyfx_ui.so>;
+ ui:binary <artyfx_ui.dylib>;
lv2:optionalFeature ui:noUserResize ;
lv2:extensionData ui:idleInterface .
diff --git a/artyfx.lv2/della.ttl b/artyfx.lv2/della.ttl
index 333d341..e4b6105 100644
--- a/artyfx.lv2/della.ttl
+++ b/artyfx.lv2/della.ttl
@@ -29,7 +29,7 @@
<http://www.openavproductions.com/artyfx#della/gui>
a ui:X11UI;
- ui:binary <artyfx_ui.so>;
+ ui:binary <artyfx_ui.dylib>;
lv2:optionalFeature ui:noUserResize ;
lv2:extensionData ui:idleInterface ;
lv2:extensionData ui:idleInterface .
diff --git a/artyfx.lv2/driva.ttl b/artyfx.lv2/driva.ttl
index 9eaced1..111c792 100644
--- a/artyfx.lv2/driva.ttl
+++ b/artyfx.lv2/driva.ttl
@@ -30,7 +30,7 @@
<http://www.openavproductions.com/artyfx#driva/gui>
a ui:X11UI;
- ui:binary <artyfx_ui.so>;
+ ui:binary <artyfx_ui.dylib>;
lv2:optionalFeature ui:noUserResize ;
lv2:extensionData ui:idleInterface .
diff --git a/artyfx.lv2/ducka.ttl b/artyfx.lv2/ducka.ttl
index bde2763..fdfe9cd 100644
--- a/artyfx.lv2/ducka.ttl
+++ b/artyfx.lv2/ducka.ttl
@@ -25,7 +25,7 @@
<http://www.openavproductions.com/artyfx#ducka/gui>
a ui:X11UI;
- ui:binary <artyfx_ui.so>;
+ ui:binary <artyfx_ui.dylib>;
lv2:optionalFeature ui:noUserResize ;
lv2:extensionData ui:idleInterface .
diff --git a/artyfx.lv2/filta.ttl b/artyfx.lv2/filta.ttl
index 5acf869..327f4ff 100644
--- a/artyfx.lv2/filta.ttl
+++ b/artyfx.lv2/filta.ttl
@@ -25,7 +25,7 @@
<http://www.openavproductions.com/artyfx#filta/gui>
a ui:X11UI;
- ui:binary <artyfx_ui.so>;
+ ui:binary <artyfx_ui.dylib>;
lv2:optionalFeature ui:noUserResize ;
lv2:extensionData ui:idleInterface .
diff --git a/artyfx.lv2/friza.ttl b/artyfx.lv2/friza.ttl
index 263e031..c4ff0e5 100644
--- a/artyfx.lv2/friza.ttl
+++ b/artyfx.lv2/friza.ttl
@@ -24,7 +24,7 @@
<http://www.openavproductions.com/artyfx#friza/gui>
a ui:X11UI;
- ui:binary <artyfx.so>;
+ ui:binary <artyfx.dylib>;
lv2:optionalFeature ui:noUserResize ;
lv2:extensionData ui:idleInterface .
diff --git a/artyfx.lv2/kuiza.ttl b/artyfx.lv2/kuiza.ttl
index 99e5dab..d3439cd 100644
--- a/artyfx.lv2/kuiza.ttl
+++ b/artyfx.lv2/kuiza.ttl
@@ -24,7 +24,7 @@
<http://www.openavproductions.com/artyfx#kuiza/gui>
a ui:X11UI;
- ui:binary <artyfx_ui.so>;
+ ui:binary <artyfx_ui.dylib>;
lv2:optionalFeature ui:noUserResize ;
lv2:extensionData ui:idleInterface .
diff --git a/artyfx.lv2/manifest.ttl b/artyfx.lv2/manifest.ttl
index 6a76ea1..0b3b8b1 100644
--- a/artyfx.lv2/manifest.ttl
+++ b/artyfx.lv2/manifest.ttl
@@ -5,61 +5,61 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://www.openavproductions.com/artyfx#bitta> a lv2:Plugin ;
- lv2:binary <artyfx.so> ;
+ lv2:binary <artyfx.dylib> ;
rdfs:seeAlso <bitta.ttl> .
# Not tested to standard yet - do not package
#<http://www.openavproductions.com/artyfx#capta> a lv2:Plugin ;
-# lv2:binary <artyfx.so> ;
+# lv2:binary <artyfx.dylib> ;
# rdfs:seeAlso <capta.ttl> .
<http://www.openavproductions.com/artyfx#della> a lv2:Plugin ;
- lv2:binary <artyfx.so> ;
+ lv2:binary <artyfx.dylib> ;
rdfs:seeAlso <della.ttl> .
# Unfinished for this release - NOT ready for testing / usage.
#<http://www.openavproductions.com/artyfx#driva> a lv2:Plugin ;
-# lv2:binary <artyfx.so> ;
+# lv2:binary <artyfx.dylib> ;
# rdfs:seeAlso <driva.ttl> .
<http://www.openavproductions.com/artyfx#ducka> a lv2:Plugin ;
- lv2:binary <artyfx.so> ;
+ lv2:binary <artyfx.dylib> ;
rdfs:seeAlso <ducka.ttl> .
<http://www.openavproductions.com/artyfx#filta> a lv2:Plugin ;
- lv2:binary <artyfx.so> ;
+ lv2:binary <artyfx.dylib> ;
rdfs:seeAlso <filta.ttl> .
# Unfinished for this release - NOT ready for testing / usage.
#<http://www.openavproductions.com/artyfx#friza> a lv2:Plugin ;
-# lv2:binary <artyfx.so> ;
+# lv2:binary <artyfx.dylib> ;
# rdfs:seeAlso <friza.ttl> .
<http://www.openavproductions.com/artyfx#kuiza> a lv2:Plugin ;
- lv2:binary <artyfx.so> ;
+ lv2:binary <artyfx.dylib> ;
rdfs:seeAlso <kuiza.ttl> .
<http://www.openavproductions.com/artyfx#masha> a lv2:Plugin ;
- lv2:binary <artyfx.so> ;
+ lv2:binary <artyfx.dylib> ;
rdfs:seeAlso <masha.ttl> .
<http://www.openavproductions.com/artyfx#panda> a lv2:Plugin ;
- lv2:binary <artyfx.so> ;
+ lv2:binary <artyfx.dylib> ;
rdfs:seeAlso <panda.ttl> .
<http://www.openavproductions.com/artyfx#roomy> a lv2:Plugin ;
- lv2:binary <artyfx.so> ;
+ lv2:binary <artyfx.dylib> ;
rdfs:seeAlso <roomy.ttl> .
<http://www.openavproductions.com/artyfx#satma> a lv2:Plugin ;
- lv2:binary <artyfx.so> ;
+ lv2:binary <artyfx.dylib> ;
rdfs:seeAlso <satma.ttl> .
<http://www.openavproductions.com/artyfx#vihda> a lv2:Plugin ;
- lv2:binary <artyfx.so> ;
+ lv2:binary <artyfx.dylib> ;
rdfs:seeAlso <vihda.ttl> .
<http://www.openavproductions.com/artyfx#whaaa> a lv2:Plugin ;
- lv2:binary <artyfx.so> ;
+ lv2:binary <artyfx.dylib> ;
rdfs:seeAlso <whaaa.ttl> .
diff --git a/artyfx.lv2/masha.ttl b/artyfx.lv2/masha.ttl
index 95fdb29..0d683c7 100644
--- a/artyfx.lv2/masha.ttl
+++ b/artyfx.lv2/masha.ttl
@@ -26,7 +26,7 @@
<http://www.openavproductions.com/artyfx#masha/gui>
a ui:X11UI;
- ui:binary <artyfx_ui.so>;
+ ui:binary <artyfx_ui.dylib>;
lv2:optionalFeature ui:noUserResize ;
lv2:extensionData ui:idleInterface .
diff --git a/artyfx.lv2/panda.ttl b/artyfx.lv2/panda.ttl
index 4d76bcf..8b3b3ba 100644
--- a/artyfx.lv2/panda.ttl
+++ b/artyfx.lv2/panda.ttl
@@ -27,7 +27,7 @@
<http://www.openavproductions.com/artyfx#panda/gui>
a ui:X11UI;
- ui:binary <artyfx_ui.so>;
+ ui:binary <artyfx_ui.dylib>;
lv2:optionalFeature ui:noUserResize ;
lv2:extensionData ui:idleInterface .
diff --git a/artyfx.lv2/roomy.ttl b/artyfx.lv2/roomy.ttl
index 155b484..9160a34 100644
--- a/artyfx.lv2/roomy.ttl
+++ b/artyfx.lv2/roomy.ttl
@@ -23,7 +23,7 @@
<http://www.openavproductions.com/artyfx#roomy/gui>
a ui:X11UI;
- ui:binary <artyfx_ui.so>;
+ ui:binary <artyfx_ui.dylib>;
lv2:optionalFeature ui:noUserResize ;
lv2:extensionData ui:idleInterface .
diff --git a/artyfx.lv2/satma.ttl b/artyfx.lv2/satma.ttl
index c07cb79..01d8410 100644
--- a/artyfx.lv2/satma.ttl
+++ b/artyfx.lv2/satma.ttl
@@ -24,7 +24,7 @@
<http://www.openavproductions.com/artyfx#satma/gui>
a ui:X11UI;
- ui:binary <artyfx_ui.so>;
+ ui:binary <artyfx_ui.dylib>;
lv2:optionalFeature ui:noUserResize ;
lv2:extensionData ui:idleInterface .
diff --git a/artyfx.lv2/vihda.ttl b/artyfx.lv2/vihda.ttl
index f162bdc..3fd3489 100644
--- a/artyfx.lv2/vihda.ttl
+++ b/artyfx.lv2/vihda.ttl
@@ -27,7 +27,7 @@
<http://www.openavproductions.com/artyfx#vihda/gui>
a ui:X11UI;
- ui:binary <artyfx_ui.so>;
+ ui:binary <artyfx_ui.dylib>;
lv2:optionalFeature ui:noUserResize ;
lv2:extensionData ui:idleInterface .
diff --git a/artyfx.lv2/whaaa.ttl b/artyfx.lv2/whaaa.ttl
index 1251072..8981b0b 100644
--- a/artyfx.lv2/whaaa.ttl
+++ b/artyfx.lv2/whaaa.ttl
@@ -27,7 +27,7 @@
<http://www.openavproductions.com/artyfx#whaaa/gui>
a ui:X11UI;
- ui:binary <artyfx_ui.so>;
+ ui:binary <artyfx_ui.dylib>;
lv2:optionalFeature ui:noUserResize ;
lv2:extensionData ui:idleInterface .

+ 12
- 0
setup/macos/package.xml.in View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<installer-gui-script minSpecVersion="1">
<title>PawPaw LV2 plugins</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="studio.kx.distrho.pawpaw" />
<welcome file="@CURDIR@/welcome.txt" mime-type="text/plain" />
@CHOICES@
<choices-outline>
@OUTLINES@
</choices-outline>
</installer-gui-script>

+ 4
- 0
setup/macos/welcome.txt View File

@@ -0,0 +1,4 @@
PawPaw LV2 plugins

This package installs open-source LV2 plugins, pre-compiled for macOS.
All plugins are 100% free and open-source.

Loading…
Cancel
Save