-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_gui.sh
More file actions
28 lines (23 loc) · 785 Bytes
/
Copy pathbuild_gui.sh
File metadata and controls
28 lines (23 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
echo "Building GUI version..."
# Create build directories
mkdir -p build/obj
# Check if gcc is available
if ! command -v gcc &> /dev/null; then
echo "GCC not found! Please install GCC."
exit 1
fi
# Compile GUI source
echo "Compiling GUI source..."
gcc -Wall -Wextra -std=c99 -c src/gui_main.c -o build/obj/gui_main.o
# Link GUI executable
echo "Linking GUI executable..."
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then
# Windows environment
gcc build/obj/gui_main.o -o build/pizza_system_gui.exe -mwindows -luser32 -lgdi32
echo "GUI build complete! Run: ./build/pizza_system_gui.exe"
else
# Unix-like environment
gcc build/obj/gui_main.o -o build/pizza_system_gui
echo "GUI build complete! Run: ./build/pizza_system_gui"
fi