forked from N00byKing/APCpp
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinitialize.sh
More file actions
32 lines (28 loc) · 818 Bytes
/
Copy pathinitialize.sh
File metadata and controls
32 lines (28 loc) · 818 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
29
30
31
32
#!/bin/sh
# Move to script directory.
cd "$(dirname "$0")";
SRC_DIR=`pwd`;
# Create a nested folder and moves into it.
declare -a dirs=("build" "allegro5" "deps");
for dir in "${dirs[@]}"; do
dir=${dir/#/"./"}
if [ ! -d "$dir" ]; then
mkdir $dir;
fi
cd $dir;
done
# Check if NuGet is installed, then download and set up Allegro.
if ! command -v nuget &> /dev/null
then
echo "Please install the NuGet CLI to download dependencies."
exit 1
fi
echo "Checking for NuGet package 'AllegroDeps':";
nuget install AllegroDeps -Version 1.14.0 -OutputDirectory . -ExcludeVersion;
cp -rf ./AllegroDeps/build/native/include ./include;
cp -rf ./AllegroDeps/build/native/v143/x64/deps/lib ./lib;
# Start the build.
cd $SRC_DIR;
cd ./build;
echo "Running CMake:";
cmake ..;