Updated build_sokol_library.sh for mac support

This commit is contained in:
2024-10-19 12:40:06 -04:00
parent a62e996943
commit 988aa5efee

View File

@@ -36,7 +36,14 @@ fi
pushd "$path_sokol" pushd "$path_sokol"
check_and_install() { # Detect the operating system
OS=$(uname -s)
case "$OS" in
Linux*)
echo "Detected Linux operating system"
# Check for OpenGL and X11 development libraries
check_and_install() {
if ! dpkg -s $1 &> /dev/null; then if ! dpkg -s $1 &> /dev/null; then
echo "$1 not found. Attempting to install..." echo "$1 not found. Attempting to install..."
sudo apt update && sudo apt install -y $1 sudo apt update && sudo apt install -y $1
@@ -45,18 +52,30 @@ check_and_install() {
exit 1 exit 1
fi fi
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
# Check for OpenGL and X11 development libraries echo "Running Linux build script..."
# check_and_install libgl1-mesa-dev ./build_clibs_linux.sh
# check_and_install libx11-dev ;;
# check_and_install libxcursor-dev Darwin*)
# check_and_install libxrandr-dev echo "Detected macOS operating system"
# check_and_install libxinerama-dev echo "Running macOS build script..."
# check_and_install libxi-dev ./build_clibs_macos.sh
# check_and_install libasound2-dev # ALSA development library ;;
*)
# Run the build script echo "Unsupported operating system: $OS"
./build_clibs_linux.sh exit 1
;;
esac
popd popd
echo "Build process completed."