Skip to content

Commit

Permalink
build-linux.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
slajerek committed Feb 10, 2025
1 parent 170184c commit 000c146
Showing 1 changed file with 36 additions and 10 deletions.
46 changes: 36 additions & 10 deletions build-linux.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,42 @@
#!/bin/bash
# note this does not work due to changes in paths
CURRENT_DIR=`pwd`

mkdir -p build
cd build
mkdir -p MTEngineSDL
mkdir -p c64d
# MTEngineSDL
cd $CURRENT_DIR/../
if [ ! -d "MTEngineSDL" ]; then
echo -e "\e[94mCloning \e[31mMTEngineSDL \e[94mlibrary repository\e[0m"
git clone https://github.com/slajerek/MTEngineSDL.git
echo -e ""
fi

cd ../MTEngineSDL
cmake ../../MTEngineSDL/
echo -e "\e[94mCompiling \e[31mMTEngineSDL \e[94mlibrary\e[0m"
mkdir -p $CURRENT_DIR/../MTEngineSDL/build
cd $CURRENT_DIR/../MTEngineSDL/build
cmake ../
make -j$(nproc) MTEngineSDL

cd ../c64d
cmake ../../c64d/
make -j$(nproc) RetroDebugger
# uSockets
cd $CURRENT_DIR/../
if [ ! -d "uSockets" ]; then
echo -e "\n\e[94mCloning \e[31muSockets \e[94mlibrary repository\e[0m"
git clone https://github.com/uNetworking/uSockets.git
fi

echo -e "\n\e[94mCompiling \e[31muSockets \e[94mlibrary\e[0m"
cd uSockets
make -j$(nproc)
mkdir -p $CURRENT_DIR/../MTEngineSDL/platform/Linux/libs/
cp -f uSockets.a $CURRENT_DIR/../MTEngineSDL/platform/Linux/libs/

# RetroDebugger
echo -e "\n\e[94mCompiling \e[31mRetroDebugger\e[0m"
mkdir -p $CURRENT_DIR/build
cd $CURRENT_DIR/build
cmake ../
make -j$(nproc) retrodebugger

if [ -f "$CURRENT_DIR/build/retrodebugger" ]; then
echo -e "\n\e[1;92mRetroDebugger compiled successfully. Binary is in ./build folder.\e[0m"
else
echo -e "\n\e[1;91mFailed to build RetroDebugger.\e[0m"
fi

0 comments on commit 000c146

Please sign in to comment.