mirror of
https://github.com/Ed94/VEFontCache-Odin.git
synced 2025-08-06 06:52:44 -07:00
Updated build_sokol_library.sh for mac support
This commit is contained in:
@@ -36,27 +36,46 @@ fi
|
|||||||
|
|
||||||
pushd "$path_sokol"
|
pushd "$path_sokol"
|
||||||
|
|
||||||
check_and_install() {
|
# Detect the operating system
|
||||||
if ! dpkg -s $1 &> /dev/null; then
|
OS=$(uname -s)
|
||||||
echo "$1 not found. Attempting to install..."
|
|
||||||
sudo apt update && sudo apt install -y $1
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Failed to install $1. Please install manually and try again."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check for OpenGL and X11 development libraries
|
case "$OS" in
|
||||||
# check_and_install libgl1-mesa-dev
|
Linux*)
|
||||||
# check_and_install libx11-dev
|
echo "Detected Linux operating system"
|
||||||
# check_and_install libxcursor-dev
|
# Check for OpenGL and X11 development libraries
|
||||||
# check_and_install libxrandr-dev
|
check_and_install() {
|
||||||
# check_and_install libxinerama-dev
|
if ! dpkg -s $1 &> /dev/null; then
|
||||||
# check_and_install libxi-dev
|
echo "$1 not found. Attempting to install..."
|
||||||
# check_and_install libasound2-dev # ALSA development library
|
sudo apt update && sudo apt install -y $1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Failed to install $1. Please install manually and try again."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
# Uncomment these lines if you need to install these dependencies
|
||||||
|
# check_and_install libgl1-mesa-dev
|
||||||
|
# check_and_install libx11-dev
|
||||||
|
# check_and_install libxcursor-dev
|
||||||
|
# check_and_install libxrandr-dev
|
||||||
|
# check_and_install libxinerama-dev
|
||||||
|
# check_and_install libxi-dev
|
||||||
|
# check_and_install libasound2-dev # ALSA development library
|
||||||
|
|
||||||
# Run the build script
|
echo "Running Linux build script..."
|
||||||
./build_clibs_linux.sh
|
./build_clibs_linux.sh
|
||||||
|
;;
|
||||||
|
Darwin*)
|
||||||
|
echo "Detected macOS operating system"
|
||||||
|
echo "Running macOS build script..."
|
||||||
|
./build_clibs_macos.sh
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unsupported operating system: $OS"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
echo "Build process completed."
|
||||||
|
Reference in New Issue
Block a user