Skip to content

Commit 386a89c

Browse files
committed
Create installer
1 parent 26f572a commit 386a89c

File tree

11 files changed

+591
-36
lines changed

11 files changed

+591
-36
lines changed

.github/workflows/build.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
push:
44
branches:
55
- '**'
6-
6+
77
concurrency:
88
group: build-${{ github.ref || github.run_id }}
99

@@ -25,6 +25,11 @@ jobs:
2525
- uses: actions/checkout@v4
2626
with:
2727
submodules: recursive
28+
29+
- name: Install Inno Setup (Windows)
30+
if: runner.os == 'Windows'
31+
run: choco install innosetup -y
32+
2833
- name: "Run script"
2934
run: |
3035
./ci/build.sh
@@ -35,9 +40,14 @@ jobs:
3540
APPLE_PASS: ${{ secrets.APPLE_PASS }}
3641
APPLE_USER: ${{ secrets.APPLE_USER }}
3742
APIKEY: ${{ secrets.APIKEY }}
43+
3844
- name: Upload Artifact
3945
uses: actions/upload-artifact@v4
4046
with:
4147
name: Binaries ${{ matrix.name }}
42-
path: ci/bin/*.zip
43-
retention-days: 30
48+
path: |
49+
ci/bin/*.zip
50+
ci/bin/*.pkg
51+
ci/bin/*.deb
52+
ci/bin/*.exe
53+
retention-days: 30

.github/workflows/release.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ jobs:
2222
- uses: actions/checkout@v4
2323
with:
2424
submodules: recursive
25+
26+
- name: Install Inno Setup (Windows)
27+
if: runner.os == 'Windows'
28+
run: choco install innosetup -y
29+
2530
- name: "Build"
2631
run: |
2732
./ci/build.sh
@@ -32,6 +37,7 @@ jobs:
3237
APPLE_PASS: ${{ secrets.APPLE_PASS }}
3338
APPLE_USER: ${{ secrets.APPLE_USER }}
3439
APIKEY: ${{ secrets.APIKEY }}
40+
3541
- name: "Upload"
3642
run: |
3743
./ci/upload.sh
@@ -42,11 +48,16 @@ jobs:
4248
APPLE_PASS: ${{ secrets.APPLE_PASS }}
4349
APPLE_USER: ${{ secrets.APPLE_USER }}
4450
APIKEY: ${{ secrets.APIKEY }}
51+
4552
- name: Upload Artifact
4653
uses: actions/upload-artifact@v4
4754
with:
4855
name: Binaries ${{ matrix.name }}
49-
path: ci/bin/*.zip
56+
path: |
57+
ci/bin/*.zip
58+
ci/bin/*.pkg
59+
ci/bin/*.deb
60+
ci/bin/*.exe
5061
retention-days: 30
5162

5263
release:

CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,15 @@ endforeach()
9090
juce_add_module ("${CMAKE_CURRENT_LIST_DIR}/modules/melatonin_inspector")
9191
set_property (TARGET melatonin_inspector APPEND PROPERTY LABELS melatonin)
9292

93-
# Binary Data
93+
# Binary Data (only layout.json - wavetables and presets are loaded from disk)
9494

9595
set_property (DIRECTORY APPEND PROPERTY LABELS Assets)
9696

9797
file (GLOB_RECURSE binary_files CONFIGURE_DEPENDS
98-
"./plugin/Resources/layout.json"
99-
"./plugin/Resources/WavetablesFLAC/*.wt2048"
100-
"./plugin/Resources/Presets/*.xml")
98+
"./plugin/Resources/layout.json")
10199

102100
juce_add_binary_data (${PLUGIN_NAME}_Assets SOURCES ${binary_files})
103101

104-
set_target_properties(${PLUGIN_NAME}_Assets PROPERTIES UNITY_BUILD ON UNITY_BUILD_MODE BATCH UNITY_BUILD_BATCH_SIZE 10)
105-
106102
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
107103

108104
juce_set_vst2_sdk_path (${CMAKE_SOURCE_DIR}/modules/plugin_sdk/vstsdk2.4)

Installer/linux/build_deb.sh

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
#!/bin/bash
2+
# Build Linux .deb package for Wavetable
3+
4+
set -e
5+
6+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7+
ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
8+
VERSION="${VERSION:-1.0.0}"
9+
PLUGIN_NAME="Wavetable"
10+
PACKAGE_NAME="wavetable"
11+
ARCH="amd64"
12+
13+
# Paths
14+
BIN_DIR="$ROOT_DIR/ci/bin"
15+
DEB_ROOT="$SCRIPT_DIR/deb_root"
16+
OUTPUT_DIR="$SCRIPT_DIR/output"
17+
18+
echo "Building Wavetable $VERSION .deb package..."
19+
20+
# Clean and create directories
21+
rm -rf "$DEB_ROOT" "$OUTPUT_DIR"
22+
mkdir -p "$DEB_ROOT"
23+
mkdir -p "$OUTPUT_DIR"
24+
25+
# Create package structure
26+
mkdir -p "$DEB_ROOT/DEBIAN"
27+
mkdir -p "$DEB_ROOT/usr/lib/vst"
28+
mkdir -p "$DEB_ROOT/usr/lib/vst3"
29+
mkdir -p "$DEB_ROOT/usr/lib/lv2"
30+
mkdir -p "$DEB_ROOT/usr/share/SocaLabs/Wavetable/Wavetables"
31+
mkdir -p "$DEB_ROOT/usr/share/SocaLabs/Wavetable/Presets"
32+
33+
# Copy plugins
34+
if [ -f "$BIN_DIR/vst/$PLUGIN_NAME.so" ]; then
35+
cp "$BIN_DIR/vst/$PLUGIN_NAME.so" "$DEB_ROOT/usr/lib/vst/"
36+
fi
37+
38+
if [ -d "$BIN_DIR/vst3/$PLUGIN_NAME.vst3" ]; then
39+
cp -R "$BIN_DIR/vst3/$PLUGIN_NAME.vst3" "$DEB_ROOT/usr/lib/vst3/"
40+
fi
41+
42+
if [ -d "$BIN_DIR/lv2/$PLUGIN_NAME.lv2" ]; then
43+
cp -R "$BIN_DIR/lv2/$PLUGIN_NAME.lv2" "$DEB_ROOT/usr/lib/lv2/"
44+
fi
45+
46+
# Copy wavetables and presets
47+
cp -R "$ROOT_DIR/plugin/Resources/WavetablesFLAC/"* "$DEB_ROOT/usr/share/SocaLabs/Wavetable/Wavetables/"
48+
cp -R "$ROOT_DIR/plugin/Resources/Presets/"* "$DEB_ROOT/usr/share/SocaLabs/Wavetable/Presets/"
49+
50+
# Calculate installed size (in KB)
51+
INSTALLED_SIZE=$(du -sk "$DEB_ROOT" | cut -f1)
52+
53+
# Create control file
54+
cat > "$DEB_ROOT/DEBIAN/control" << EOF
55+
Package: $PACKAGE_NAME
56+
Version: $VERSION
57+
Section: sound
58+
Priority: optional
59+
Architecture: $ARCH
60+
Installed-Size: $INSTALLED_SIZE
61+
Maintainer: SocaLabs <support@socalabs.com>
62+
Homepage: https://socalabs.com
63+
Description: Wavetable Synthesizer Plugin
64+
Wavetable is a powerful wavetable synthesizer available as
65+
VST2, VST3, and LV2 plugins for Linux.
66+
.
67+
Features:
68+
- Dual wavetable oscillators
69+
- Multiple filter types
70+
- Extensive modulation matrix
71+
- Built-in effects
72+
EOF
73+
74+
# Create postinst script
75+
cat > "$DEB_ROOT/DEBIAN/postinst" << 'EOF'
76+
#!/bin/bash
77+
# Update plugin caches if available
78+
if command -v update-mime-database &> /dev/null; then
79+
update-mime-database /usr/share/mime || true
80+
fi
81+
exit 0
82+
EOF
83+
chmod 755 "$DEB_ROOT/DEBIAN/postinst"
84+
85+
# Set permissions
86+
find "$DEB_ROOT" -type d -exec chmod 755 {} \;
87+
find "$DEB_ROOT/usr" -type f -exec chmod 644 {} \;
88+
find "$DEB_ROOT/usr/lib" -name "*.so" -exec chmod 755 {} \;
89+
90+
# Build the package
91+
DEB_FILE="$OUTPUT_DIR/${PACKAGE_NAME}_${VERSION}_${ARCH}.deb"
92+
dpkg-deb --build "$DEB_ROOT" "$DEB_FILE"
93+
94+
# Cleanup
95+
rm -rf "$DEB_ROOT"
96+
97+
echo "Done! Package created: $DEB_FILE"

Installer/macOS/build_pkg.sh

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
#!/bin/bash
2+
# Build macOS installer package for Wavetable
3+
4+
set -e
5+
6+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7+
ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
8+
VERSION="${VERSION:-1.0.0}"
9+
PLUGIN_NAME="Wavetable"
10+
11+
# Paths
12+
BIN_DIR="$ROOT_DIR/ci/bin"
13+
PKG_ROOT="$SCRIPT_DIR/pkg_root"
14+
OUTPUT_DIR="$SCRIPT_DIR/output"
15+
16+
# Signing identities (set via environment or leave empty for unsigned)
17+
DEV_APP_ID="${DEV_APP_ID:-}"
18+
DEV_INST_ID="${DEV_INST_ID:-}"
19+
20+
echo "Building Wavetable $VERSION installer..."
21+
22+
# Clean and create directories
23+
rm -rf "$PKG_ROOT" "$OUTPUT_DIR"
24+
mkdir -p "$PKG_ROOT"
25+
mkdir -p "$OUTPUT_DIR"
26+
27+
# Create package root structure
28+
mkdir -p "$PKG_ROOT/Library/Audio/Plug-Ins/VST"
29+
mkdir -p "$PKG_ROOT/Library/Audio/Plug-Ins/VST3"
30+
mkdir -p "$PKG_ROOT/Library/Audio/Plug-Ins/Components"
31+
mkdir -p "$PKG_ROOT/Library/Application Support/SocaLabs/Wavetable/Wavetables"
32+
mkdir -p "$PKG_ROOT/Library/Application Support/SocaLabs/Wavetable/Presets"
33+
34+
# Copy plugins
35+
if [ -d "$BIN_DIR/vst/$PLUGIN_NAME.vst" ]; then
36+
cp -R "$BIN_DIR/vst/$PLUGIN_NAME.vst" "$PKG_ROOT/Library/Audio/Plug-Ins/VST/"
37+
fi
38+
39+
if [ -d "$BIN_DIR/vst3/$PLUGIN_NAME.vst3" ]; then
40+
cp -R "$BIN_DIR/vst3/$PLUGIN_NAME.vst3" "$PKG_ROOT/Library/Audio/Plug-Ins/VST3/"
41+
fi
42+
43+
if [ -d "$BIN_DIR/au/$PLUGIN_NAME.component" ]; then
44+
cp -R "$BIN_DIR/au/$PLUGIN_NAME.component" "$PKG_ROOT/Library/Audio/Plug-Ins/Components/"
45+
fi
46+
47+
# Copy wavetables and presets
48+
cp -R "$ROOT_DIR/plugin/Resources/WavetablesFLAC/"* "$PKG_ROOT/Library/Application Support/SocaLabs/Wavetable/Wavetables/"
49+
cp -R "$ROOT_DIR/plugin/Resources/Presets/"* "$PKG_ROOT/Library/Application Support/SocaLabs/Wavetable/Presets/"
50+
51+
# Set permissions
52+
chmod -R 755 "$PKG_ROOT/Library/Audio"
53+
chmod -R 755 "$PKG_ROOT/Library/Application Support"
54+
55+
# Build component package
56+
pkgbuild --root "$PKG_ROOT" \
57+
--identifier "com.socalabs.wavetable.pkg" \
58+
--version "$VERSION" \
59+
--install-location "/" \
60+
"$OUTPUT_DIR/Wavetable-component.pkg"
61+
62+
# Create distribution.xml
63+
cat > "$OUTPUT_DIR/distribution.xml" << EOF
64+
<?xml version="1.0" encoding="utf-8"?>
65+
<installer-gui-script minSpecVersion="1">
66+
<title>Wavetable $VERSION</title>
67+
<organization>com.socalabs</organization>
68+
<domains enable_localSystem="true"/>
69+
<options customize="never" require-scripts="true" rootVolumeOnly="true" />
70+
<welcome file="welcome.txt" mime-type="text/plain" />
71+
<choices-outline>
72+
<line choice="default">
73+
<line choice="com.socalabs.wavetable.pkg"/>
74+
</line>
75+
</choices-outline>
76+
<choice id="default"/>
77+
<choice id="com.socalabs.wavetable.pkg" visible="false">
78+
<pkg-ref id="com.socalabs.wavetable.pkg"/>
79+
</choice>
80+
<pkg-ref id="com.socalabs.wavetable.pkg" version="$VERSION" onConclusion="none">Wavetable-component.pkg</pkg-ref>
81+
</installer-gui-script>
82+
EOF
83+
84+
# Create welcome text
85+
cat > "$OUTPUT_DIR/welcome.txt" << EOF
86+
Welcome to the Wavetable $VERSION installer.
87+
88+
This will install:
89+
- Wavetable VST2 plugin
90+
- Wavetable VST3 plugin
91+
- Wavetable AU plugin
92+
- Factory wavetables
93+
- Factory presets
94+
95+
Click Continue to proceed with the installation.
96+
EOF
97+
98+
# Build product archive
99+
UNSIGNED_PKG="$OUTPUT_DIR/${PLUGIN_NAME}_${VERSION}_Mac_unsigned.pkg"
100+
SIGNED_PKG="$OUTPUT_DIR/${PLUGIN_NAME}_${VERSION}_Mac.pkg"
101+
102+
productbuild --distribution "$OUTPUT_DIR/distribution.xml" \
103+
--package-path "$OUTPUT_DIR" \
104+
--resources "$OUTPUT_DIR" \
105+
"$UNSIGNED_PKG"
106+
107+
# Sign if identity is available
108+
if [ -n "$DEV_INST_ID" ]; then
109+
echo "Signing installer..."
110+
productsign --sign "$DEV_INST_ID" "$UNSIGNED_PKG" "$SIGNED_PKG"
111+
rm "$UNSIGNED_PKG"
112+
echo "Signed installer: $SIGNED_PKG"
113+
else
114+
mv "$UNSIGNED_PKG" "$SIGNED_PKG"
115+
echo "Unsigned installer: $SIGNED_PKG"
116+
fi
117+
118+
# Cleanup
119+
rm -rf "$PKG_ROOT"
120+
rm -f "$OUTPUT_DIR/Wavetable-component.pkg"
121+
rm -f "$OUTPUT_DIR/distribution.xml"
122+
rm -f "$OUTPUT_DIR/welcome.txt"
123+
124+
echo "Done! Installer created: $SIGNED_PKG"

Installer/win/Wavetable.iss

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
; Wavetable Installer Script for Inno Setup
2+
3+
#define MyAppName "Wavetable"
4+
#define MyAppCompany "SocaLabs"
5+
#define MyAppPublisher "SocaLabs"
6+
#define MyAppURL "https://socalabs.com"
7+
#define MyAppVersion GetEnv('VERSION')
8+
#if MyAppVersion == ""
9+
#define MyAppVersion "1.0.0"
10+
#endif
11+
12+
[Setup]
13+
AppID={{B8F4E3A2-9C7D-4B5E-8A1F-6D2E3C4B5A6F}
14+
AppName={#MyAppCompany} {#MyAppName}
15+
AppVerName={#MyAppCompany} {#MyAppName} {#MyAppVersion}
16+
AppVersion={#MyAppVersion}
17+
AppPublisher={#MyAppPublisher}
18+
AppPublisherURL={#MyAppURL}
19+
AppSupportURL={#MyAppURL}
20+
AppUpdatesURL={#MyAppURL}
21+
DefaultDirName={commonpf64}\VstPlugins
22+
DisableProgramGroupPage=yes
23+
OutputDir=.\output
24+
OutputBaseFilename=Wavetable_{#MyAppVersion}_Win
25+
Compression=lzma/ultra
26+
SolidCompression=true
27+
ShowLanguageDialog=auto
28+
InternalCompressLevel=ultra
29+
MinVersion=6.1.7600
30+
FlatComponentsList=false
31+
AppendDefaultDirName=false
32+
AlwaysShowDirOnReadyPage=yes
33+
DirExistsWarning=no
34+
DisableDirPage=no
35+
DisableWelcomePage=False
36+
DisableReadyPage=no
37+
ArchitecturesAllowed=x64compatible
38+
ArchitecturesInstallIn64BitMode=x64compatible
39+
VersionInfoVersion={#MyAppVersion}
40+
VersionInfoCompany={#MyAppPublisher}
41+
VersionInfoProductName={#MyAppCompany} {#MyAppName}
42+
VersionInfoProductVersion={#MyAppVersion}
43+
UsePreviousGroup=False
44+
Uninstallable=yes
45+
UninstallDisplayName={#MyAppCompany} {#MyAppName}
46+
47+
[Languages]
48+
Name: english; MessagesFile: compiler:Default.isl
49+
50+
[Types]
51+
Name: "full"; Description: "Full installation"
52+
Name: "custom"; Description: "Custom installation"; Flags: iscustom
53+
54+
[Components]
55+
Name: "vst2"; Description: "VST2 Plugin"; Types: full
56+
Name: "vst3"; Description: "VST3 Plugin"; Types: full
57+
Name: "data"; Description: "Wavetables and Presets"; Types: full; Flags: fixed
58+
59+
[Files]
60+
; VST2 Plugin
61+
Source: "bin\vst\Wavetable.dll"; DestDir: "{app}"; Components: vst2; Flags: ignoreversion
62+
63+
; VST3 Plugin
64+
Source: "bin\vst3\Wavetable.vst3\*"; DestDir: "{commoncf64}\VST3\Wavetable.vst3"; Components: vst3; Flags: ignoreversion recursesubdirs
65+
66+
; Wavetables
67+
Source: "bin\Wavetables\*"; DestDir: "{commonappdata}\SocaLabs\Wavetable\Wavetables"; Components: data; Flags: ignoreversion recursesubdirs
68+
69+
; Presets
70+
Source: "bin\Presets\*"; DestDir: "{commonappdata}\SocaLabs\Wavetable\Presets"; Components: data; Flags: ignoreversion recursesubdirs
71+
72+
[InstallDelete]
73+
; Clean up old VST3 installation
74+
Type: filesandordirs; Name: "{commoncf64}\VST3\Wavetable.vst3"

0 commit comments

Comments
 (0)