osci-render/ci/build.sh

56 wiersze
1.7 KiB
Bash

2023-12-30 11:20:33 +00:00
#!/bin/bash -e
2025-01-01 15:00:16 +00:00
PLUGIN="$1"
VERSION="$2"
OUTPUT_NAME="$PLUGIN-$VERSION"
# If we are on the free version, we need to disable the build flag SOSCI_FEATURES
if [ "$VERSION" = "free" ]; then
# Edit the jucer file to disable the SOSCI_FEATURES flag
2025-01-05 16:39:35 +00:00
if [ "$OS" = "mac" ]; then
sed -i '' 's/SOSCI_FEATURES=1/SOSCI_FEATURES=0/' "$ROOT/$PLUGIN.jucer"
else
sed -i 's/SOSCI_FEATURES=1/SOSCI_FEATURES=0/' "$ROOT/$PLUGIN.jucer"
fi
fi
2023-12-30 11:20:33 +00:00
2023-12-30 11:53:49 +00:00
# Resave jucer file
RESAVE_COMMAND="$PROJUCER_PATH --resave '$ROOT/$PLUGIN.jucer'"
eval "$RESAVE_COMMAND"
2023-12-30 11:20:33 +00:00
# Build mac version
if [ "$OS" = "mac" ]; then
2025-01-01 15:00:16 +00:00
cd "$ROOT/Builds/$PLUGIN/MacOSX"
2023-12-30 11:20:33 +00:00
xcodebuild -configuration Release || exit 1
fi
# Build linux version
if [ "$OS" = "linux" ]; then
2025-01-01 15:00:16 +00:00
cd "$ROOT/Builds/$PLUGIN/LinuxMakefile"
2023-12-30 11:20:33 +00:00
make CONFIG=Release
cp -r ./build/$PLUGIN.vst3 "$ROOT/ci/bin/$PLUGIN.vst3"
cp -r ./build/$PLUGIN "$ROOT/ci/bin/$PLUGIN"
2023-12-30 11:20:33 +00:00
cd "$ROOT/ci/bin"
zip -r ${OUTPUT_NAME}-linux-vst3.zip $PLUGIN.vst3
zip -r ${OUTPUT_NAME}-linux.zip $PLUGIN
cp ${OUTPUT_NAME}*.zip "$ROOT/bin"
2023-12-30 11:20:33 +00:00
fi
# Build Win version
if [ "$OS" = "win" ]; then
VS_WHERE="C:/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe"
MSBUILD_EXE=$("$VS_WHERE" -latest -requires Microsoft.Component.MSBuild -find "MSBuild\**\Bin\MSBuild.exe")
echo $MSBUILD_EXE
2025-01-01 15:00:16 +00:00
cd "$ROOT/Builds/$PLUGIN/VisualStudio2022"
2024-08-21 11:02:14 +00:00
"$MSBUILD_EXE" "$PLUGIN.sln" "//p:VisualStudioVersion=16.0" "//m" "//t:Build" "//p:Configuration=Release" "//p:Platform=x64" "//p:PreferredToolArchitecture=x64" "//restore" "//p:RestorePackagesConfig=true"
cp "$ROOT/Builds/$PLUGIN/VisualStudio2022/x64/Release/Standalone Plugin/$PLUGIN.pdb" "$ROOT/bin/$OUTPUT_NAME.pdb"
2023-12-30 11:20:33 +00:00
fi
2024-02-10 12:24:09 +00:00
cd "$ROOT"