diff --git a/Installer/linux/build_deb.sh b/Installer/linux/build_deb.sh index e0b29ba..d3f98bb 100755 --- a/Installer/linux/build_deb.sh +++ b/Installer/linux/build_deb.sh @@ -1,97 +1,97 @@ -#!/bin/bash -# Build Linux .deb package for Wavetable - -set -e - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)" -VERSION="${VERSION:-1.0.0}" -PLUGIN_NAME="Wavetable" -PACKAGE_NAME="wavetable" -ARCH="amd64" - -# Paths -BIN_DIR="$ROOT_DIR/ci/bin" -DEB_ROOT="$SCRIPT_DIR/deb_root" -OUTPUT_DIR="$SCRIPT_DIR/output" - -echo "Building Wavetable $VERSION .deb package..." - -# Clean and create directories -rm -rf "$DEB_ROOT" "$OUTPUT_DIR" -mkdir -p "$DEB_ROOT" -mkdir -p "$OUTPUT_DIR" - -# Create package structure -mkdir -p "$DEB_ROOT/DEBIAN" -mkdir -p "$DEB_ROOT/usr/lib/vst" -mkdir -p "$DEB_ROOT/usr/lib/vst3" -mkdir -p "$DEB_ROOT/usr/lib/lv2" -mkdir -p "$DEB_ROOT/usr/share/SocaLabs/Wavetable/Wavetables" -mkdir -p "$DEB_ROOT/usr/share/SocaLabs/Wavetable/Presets" - -# Copy plugins -if [ -f "$BIN_DIR/vst/$PLUGIN_NAME.so" ]; then - cp "$BIN_DIR/vst/$PLUGIN_NAME.so" "$DEB_ROOT/usr/lib/vst/" -fi - -if [ -d "$BIN_DIR/vst3/$PLUGIN_NAME.vst3" ]; then - cp -R "$BIN_DIR/vst3/$PLUGIN_NAME.vst3" "$DEB_ROOT/usr/lib/vst3/" -fi - -if [ -d "$BIN_DIR/lv2/$PLUGIN_NAME.lv2" ]; then - cp -R "$BIN_DIR/lv2/$PLUGIN_NAME.lv2" "$DEB_ROOT/usr/lib/lv2/" -fi - -# Copy wavetables and presets -cp -R "$ROOT_DIR/plugin/Resources/WavetablesFLAC/"* "$DEB_ROOT/usr/share/SocaLabs/Wavetable/Wavetables/" -cp -R "$ROOT_DIR/plugin/Resources/Presets/"* "$DEB_ROOT/usr/share/SocaLabs/Wavetable/Presets/" - -# Calculate installed size (in KB) -INSTALLED_SIZE=$(du -sk "$DEB_ROOT" | cut -f1) - -# Create control file -cat > "$DEB_ROOT/DEBIAN/control" << EOF -Package: $PACKAGE_NAME -Version: $VERSION -Section: sound -Priority: optional -Architecture: $ARCH -Installed-Size: $INSTALLED_SIZE -Maintainer: SocaLabs -Homepage: https://socalabs.com -Description: Wavetable Synthesizer Plugin - Wavetable is a powerful wavetable synthesizer available as - VST2, VST3, and LV2 plugins for Linux. - . - Features: - - Dual wavetable oscillators - - Multiple filter types - - Extensive modulation matrix - - Built-in effects -EOF - -# Create postinst script -cat > "$DEB_ROOT/DEBIAN/postinst" << 'EOF' -#!/bin/bash -# Update plugin caches if available -if command -v update-mime-database &> /dev/null; then - update-mime-database /usr/share/mime || true -fi -exit 0 -EOF -chmod 755 "$DEB_ROOT/DEBIAN/postinst" - -# Set permissions -find "$DEB_ROOT" -type d -exec chmod 755 {} \; -find "$DEB_ROOT/usr" -type f -exec chmod 644 {} \; -find "$DEB_ROOT/usr/lib" -name "*.so" -exec chmod 755 {} \; - -# Build the package -DEB_FILE="$OUTPUT_DIR/${PACKAGE_NAME}_${VERSION}_${ARCH}.deb" -dpkg-deb --build "$DEB_ROOT" "$DEB_FILE" - -# Cleanup -rm -rf "$DEB_ROOT" - -echo "Done! Package created: $DEB_FILE" +#!/bin/bash +# Build Linux .deb package for Wavetable + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)" +VERSION="${VERSION:-1.0.0}" +PLUGIN_NAME="Wavetable" +PACKAGE_NAME="wavetable" +ARCH="amd64" + +# Paths +BIN_DIR="$ROOT_DIR/ci/bin" +DEB_ROOT="$SCRIPT_DIR/deb_root" +OUTPUT_DIR="$SCRIPT_DIR/output" + +echo "Building Wavetable $VERSION .deb package..." + +# Clean and create directories +rm -rf "$DEB_ROOT" "$OUTPUT_DIR" +mkdir -p "$DEB_ROOT" +mkdir -p "$OUTPUT_DIR" + +# Create package structure +mkdir -p "$DEB_ROOT/DEBIAN" +mkdir -p "$DEB_ROOT/usr/lib/vst" +mkdir -p "$DEB_ROOT/usr/lib/vst3" +mkdir -p "$DEB_ROOT/usr/lib/lv2" +mkdir -p "$DEB_ROOT/usr/share/SocaLabs/Wavetable/Wavetables" +mkdir -p "$DEB_ROOT/usr/share/SocaLabs/Wavetable/Presets" + +# Copy plugins +if [ -f "$BIN_DIR/vst/$PLUGIN_NAME.so" ]; then + cp "$BIN_DIR/vst/$PLUGIN_NAME.so" "$DEB_ROOT/usr/lib/vst/" +fi + +if [ -d "$BIN_DIR/vst3/$PLUGIN_NAME.vst3" ]; then + cp -R "$BIN_DIR/vst3/$PLUGIN_NAME.vst3" "$DEB_ROOT/usr/lib/vst3/" +fi + +if [ -d "$BIN_DIR/lv2/$PLUGIN_NAME.lv2" ]; then + cp -R "$BIN_DIR/lv2/$PLUGIN_NAME.lv2" "$DEB_ROOT/usr/lib/lv2/" +fi + +# Copy wavetables and presets +cp -R "$ROOT_DIR/plugin/Resources/WavetablesFLAC/"* "$DEB_ROOT/usr/share/SocaLabs/Wavetable/Wavetables/" +cp -R "$ROOT_DIR/plugin/Resources/Presets/"* "$DEB_ROOT/usr/share/SocaLabs/Wavetable/Presets/" + +# Calculate installed size (in KB) +INSTALLED_SIZE=$(du -sk "$DEB_ROOT" | cut -f1) + +# Create control file +cat > "$DEB_ROOT/DEBIAN/control" << EOF +Package: $PACKAGE_NAME +Version: $VERSION +Section: sound +Priority: optional +Architecture: $ARCH +Installed-Size: $INSTALLED_SIZE +Maintainer: SocaLabs +Homepage: https://socalabs.com +Description: Wavetable Synthesizer Plugin + Wavetable is a powerful wavetable synthesizer available as + VST2, VST3, and LV2 plugins for Linux. + . + Features: + - Dual wavetable oscillators + - Multiple filter types + - Extensive modulation matrix + - Built-in effects +EOF + +# Create postinst script +cat > "$DEB_ROOT/DEBIAN/postinst" << 'EOF' +#!/bin/bash +# Update plugin caches if available +if command -v update-mime-database &> /dev/null; then + update-mime-database /usr/share/mime || true +fi +exit 0 +EOF +chmod 755 "$DEB_ROOT/DEBIAN/postinst" + +# Set permissions +find "$DEB_ROOT" -type d -exec chmod 755 {} \; +find "$DEB_ROOT/usr" -type f -exec chmod 644 {} \; +find "$DEB_ROOT/usr/lib" -name "*.so" -exec chmod 755 {} \; + +# Build the package +DEB_FILE="$OUTPUT_DIR/${PACKAGE_NAME}_${VERSION}_${ARCH}.deb" +dpkg-deb --build "$DEB_ROOT" "$DEB_FILE" + +# Cleanup +rm -rf "$DEB_ROOT" + +echo "Done! Package created: $DEB_FILE" diff --git a/Installer/macOS/build_pkg.sh b/Installer/macOS/build_pkg.sh index e966640..d58731c 100755 --- a/Installer/macOS/build_pkg.sh +++ b/Installer/macOS/build_pkg.sh @@ -1,124 +1,124 @@ -#!/bin/bash -# Build macOS installer package for Wavetable - -set -e - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)" -VERSION="${VERSION:-1.0.0}" -PLUGIN_NAME="Wavetable" - -# Paths -BIN_DIR="$ROOT_DIR/ci/bin" -PKG_ROOT="$SCRIPT_DIR/pkg_root" -OUTPUT_DIR="$SCRIPT_DIR/output" - -# Signing identities (set via environment or leave empty for unsigned) -DEV_APP_ID="${DEV_APP_ID:-}" -DEV_INST_ID="${DEV_INST_ID:-}" - -echo "Building Wavetable $VERSION installer..." - -# Clean and create directories -rm -rf "$PKG_ROOT" "$OUTPUT_DIR" -mkdir -p "$PKG_ROOT" -mkdir -p "$OUTPUT_DIR" - -# Create package root structure -mkdir -p "$PKG_ROOT/Library/Audio/Plug-Ins/VST" -mkdir -p "$PKG_ROOT/Library/Audio/Plug-Ins/VST3" -mkdir -p "$PKG_ROOT/Library/Audio/Plug-Ins/Components" -mkdir -p "$PKG_ROOT/Library/Application Support/SocaLabs/Wavetable/Wavetables" -mkdir -p "$PKG_ROOT/Library/Application Support/SocaLabs/Wavetable/Presets" - -# Copy plugins -if [ -d "$BIN_DIR/vst/$PLUGIN_NAME.vst" ]; then - cp -R "$BIN_DIR/vst/$PLUGIN_NAME.vst" "$PKG_ROOT/Library/Audio/Plug-Ins/VST/" -fi - -if [ -d "$BIN_DIR/vst3/$PLUGIN_NAME.vst3" ]; then - cp -R "$BIN_DIR/vst3/$PLUGIN_NAME.vst3" "$PKG_ROOT/Library/Audio/Plug-Ins/VST3/" -fi - -if [ -d "$BIN_DIR/au/$PLUGIN_NAME.component" ]; then - cp -R "$BIN_DIR/au/$PLUGIN_NAME.component" "$PKG_ROOT/Library/Audio/Plug-Ins/Components/" -fi - -# Copy wavetables and presets -cp -R "$ROOT_DIR/plugin/Resources/WavetablesFLAC/"* "$PKG_ROOT/Library/Application Support/SocaLabs/Wavetable/Wavetables/" -cp -R "$ROOT_DIR/plugin/Resources/Presets/"* "$PKG_ROOT/Library/Application Support/SocaLabs/Wavetable/Presets/" - -# Set permissions -chmod -R 755 "$PKG_ROOT/Library/Audio" -chmod -R 755 "$PKG_ROOT/Library/Application Support" - -# Build component package -pkgbuild --root "$PKG_ROOT" \ - --identifier "com.socalabs.wavetable.pkg" \ - --version "$VERSION" \ - --install-location "/" \ - "$OUTPUT_DIR/Wavetable-component.pkg" - -# Create distribution.xml -cat > "$OUTPUT_DIR/distribution.xml" << EOF - - - Wavetable $VERSION - com.socalabs - - - - - - - - - - - - - Wavetable-component.pkg - -EOF - -# Create welcome text -cat > "$OUTPUT_DIR/welcome.txt" << EOF -Welcome to the Wavetable $VERSION installer. - -This will install: -- Wavetable VST2 plugin -- Wavetable VST3 plugin -- Wavetable AU plugin -- Factory wavetables -- Factory presets - -Click Continue to proceed with the installation. -EOF - -# Build product archive -UNSIGNED_PKG="$OUTPUT_DIR/${PLUGIN_NAME}_${VERSION}_Mac_unsigned.pkg" -SIGNED_PKG="$OUTPUT_DIR/${PLUGIN_NAME}_${VERSION}_Mac.pkg" - -productbuild --distribution "$OUTPUT_DIR/distribution.xml" \ - --package-path "$OUTPUT_DIR" \ - --resources "$OUTPUT_DIR" \ - "$UNSIGNED_PKG" - -# Sign if identity is available -if [ -n "$DEV_INST_ID" ]; then - echo "Signing installer..." - productsign --sign "$DEV_INST_ID" "$UNSIGNED_PKG" "$SIGNED_PKG" - rm "$UNSIGNED_PKG" - echo "Signed installer: $SIGNED_PKG" -else - mv "$UNSIGNED_PKG" "$SIGNED_PKG" - echo "Unsigned installer: $SIGNED_PKG" -fi - -# Cleanup -rm -rf "$PKG_ROOT" -rm -f "$OUTPUT_DIR/Wavetable-component.pkg" -rm -f "$OUTPUT_DIR/distribution.xml" -rm -f "$OUTPUT_DIR/welcome.txt" - -echo "Done! Installer created: $SIGNED_PKG" +#!/bin/bash +# Build macOS installer package for Wavetable + +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)" +VERSION="${VERSION:-1.0.0}" +PLUGIN_NAME="Wavetable" + +# Paths +BIN_DIR="$ROOT_DIR/ci/bin" +PKG_ROOT="$SCRIPT_DIR/pkg_root" +OUTPUT_DIR="$SCRIPT_DIR/output" + +# Signing identities (set via environment or leave empty for unsigned) +DEV_APP_ID="${DEV_APP_ID:-}" +DEV_INST_ID="${DEV_INST_ID:-}" + +echo "Building Wavetable $VERSION installer..." + +# Clean and create directories +rm -rf "$PKG_ROOT" "$OUTPUT_DIR" +mkdir -p "$PKG_ROOT" +mkdir -p "$OUTPUT_DIR" + +# Create package root structure +mkdir -p "$PKG_ROOT/Library/Audio/Plug-Ins/VST" +mkdir -p "$PKG_ROOT/Library/Audio/Plug-Ins/VST3" +mkdir -p "$PKG_ROOT/Library/Audio/Plug-Ins/Components" +mkdir -p "$PKG_ROOT/Library/Application Support/SocaLabs/Wavetable/Wavetables" +mkdir -p "$PKG_ROOT/Library/Application Support/SocaLabs/Wavetable/Presets" + +# Copy plugins +if [ -d "$BIN_DIR/vst/$PLUGIN_NAME.vst" ]; then + cp -R "$BIN_DIR/vst/$PLUGIN_NAME.vst" "$PKG_ROOT/Library/Audio/Plug-Ins/VST/" +fi + +if [ -d "$BIN_DIR/vst3/$PLUGIN_NAME.vst3" ]; then + cp -R "$BIN_DIR/vst3/$PLUGIN_NAME.vst3" "$PKG_ROOT/Library/Audio/Plug-Ins/VST3/" +fi + +if [ -d "$BIN_DIR/au/$PLUGIN_NAME.component" ]; then + cp -R "$BIN_DIR/au/$PLUGIN_NAME.component" "$PKG_ROOT/Library/Audio/Plug-Ins/Components/" +fi + +# Copy wavetables and presets +cp -R "$ROOT_DIR/plugin/Resources/WavetablesFLAC/"* "$PKG_ROOT/Library/Application Support/SocaLabs/Wavetable/Wavetables/" +cp -R "$ROOT_DIR/plugin/Resources/Presets/"* "$PKG_ROOT/Library/Application Support/SocaLabs/Wavetable/Presets/" + +# Set permissions +chmod -R 755 "$PKG_ROOT/Library/Audio" +chmod -R 755 "$PKG_ROOT/Library/Application Support" + +# Build component package +pkgbuild --root "$PKG_ROOT" \ + --identifier "com.socalabs.wavetable.pkg" \ + --version "$VERSION" \ + --install-location "/" \ + "$OUTPUT_DIR/Wavetable-component.pkg" + +# Create distribution.xml +cat > "$OUTPUT_DIR/distribution.xml" << EOF + + + Wavetable $VERSION + com.socalabs + + + + + + + + + + + + + Wavetable-component.pkg + +EOF + +# Create welcome text +cat > "$OUTPUT_DIR/welcome.txt" << EOF +Welcome to the Wavetable $VERSION installer. + +This will install: +- Wavetable VST2 plugin +- Wavetable VST3 plugin +- Wavetable AU plugin +- Factory wavetables +- Factory presets + +Click Continue to proceed with the installation. +EOF + +# Build product archive +UNSIGNED_PKG="$OUTPUT_DIR/${PLUGIN_NAME}_${VERSION}_Mac_unsigned.pkg" +SIGNED_PKG="$OUTPUT_DIR/${PLUGIN_NAME}_${VERSION}_Mac.pkg" + +productbuild --distribution "$OUTPUT_DIR/distribution.xml" \ + --package-path "$OUTPUT_DIR" \ + --resources "$OUTPUT_DIR" \ + "$UNSIGNED_PKG" + +# Sign if identity is available +if [ -n "$DEV_INST_ID" ]; then + echo "Signing installer..." + productsign --sign "$DEV_INST_ID" "$UNSIGNED_PKG" "$SIGNED_PKG" + rm "$UNSIGNED_PKG" + echo "Signed installer: $SIGNED_PKG" +else + mv "$UNSIGNED_PKG" "$SIGNED_PKG" + echo "Unsigned installer: $SIGNED_PKG" +fi + +# Cleanup +rm -rf "$PKG_ROOT" +rm -f "$OUTPUT_DIR/Wavetable-component.pkg" +rm -f "$OUTPUT_DIR/distribution.xml" +rm -f "$OUTPUT_DIR/welcome.txt" + +echo "Done! Installer created: $SIGNED_PKG"