osci-render/ci/setup-env.sh

48 wiersze
1.2 KiB
Bash
Czysty Zwykły widok Historia

2024-02-10 12:05:19 +00:00
#!/bin/bash -e
2024-02-10 12:32:48 +00:00
ls -R
2024-02-10 12:05:19 +00:00
# linux specific stiff
if [ $OS = "linux" ]; then
sudo apt-get update
sudo apt-get install clang git ladspa-sdk freeglut3-dev g++ libasound2-dev libcurl4-openssl-dev libfreetype6-dev libjack-jackd2-dev libx11-dev libxcomposite-dev libxcursor-dev libxinerama-dev libxrandr-dev mesa-common-dev webkit2gtk-4.0 juce-tools xvfb
fi
2024-02-10 12:20:33 +00:00
ROOT=$(pwd)
2024-02-10 12:05:19 +00:00
echo "$ROOT"
rm -Rf bin
mkdir bin
BRANCH=${GITHUB_REF##*/}
echo "$BRANCH"
cd "$ROOT/ci"
rm -Rf bin
mkdir bin
# Get the Projucer
cd "$ROOT/ci/bin"
PROJUCER_OS=$OS
if [ "$OS" = "win" ]; then
PROJUCER_OS="windows"
elif [ "$OS" = "mac" ]; then
PROJUCER_OS="osx"
fi
curl -s -S -L "https://api.juce.com/api/v1/download/juce/latest/$PROJUCER_OS" -o Projucer.zip
unzip Projucer.zip
# Set Projucer path based on OS
if [ "$OS" = "mac" ]; then
PROJUCER_PATH="$ROOT/ci/bin/JUCE/Projucer.app/Contents/MacOS/Projucer"
elif [ "$OS" = "linux" ]; then
PROJUCER_PATH="$ROOT/ci/bin/JUCE/Projucer"
else
PROJUCER_PATH="$ROOT/ci/bin/JUCE/Projucer.exe"
fi
# Set global path
GLOBAL_PATH_COMMAND="$PROJUCER_PATH --set-global-search-path $PROJUCER_OS 'defaultJuceModulePath' '$ROOT/ci/bin/JUCE/modules'"
eval "$GLOBAL_PATH_COMMAND"
2024-02-10 12:21:59 +00:00
cd "$ROOT"