forked from flyngmt/ACGC-PC-Port
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_pc.sh
More file actions
49 lines (41 loc) · 1.18 KB
/
build_pc.sh
File metadata and controls
49 lines (41 loc) · 1.18 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
# build_pc.sh - Build the Animal Crossing PC port
# Run from MSYS2 MINGW32 shell
#
# Prerequisites:
# pacman -S mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-SDL2
#
# Usage:
# 1. ./build_pc.sh
# 2. Place your disc image (.ciso/.iso/.gcm) in pc/build32/bin/rom/
# 3. pc/build32/bin/AnimalCrossing.exe
set -e
if [ "$MSYSTEM" != "MINGW32" ]; then
echo "Error: Must run from MSYS2 MINGW32 shell (not MINGW64 or MSYS)"
echo "Open 'MSYS2 MINGW32' from your Start menu, then run this script again."
exit 1
fi
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
BUILD_DIR="$SCRIPT_DIR/pc/build32"
BIN_DIR="$BUILD_DIR/bin"
# --- CMake configure ---
mkdir -p "$BUILD_DIR"
cd "$BUILD_DIR"
if [ ! -f Makefile ]; then
echo "=== Configuring CMake ==="
cmake .. -G "MinGW Makefiles"
fi
# --- Build ---
echo "=== Building PC port ==="
mingw32-make -j$(nproc)
# --- Create runtime directories ---
mkdir -p "$BIN_DIR/rom"
mkdir -p "$BIN_DIR/texture_pack"
mkdir -p "$BIN_DIR/save"
echo ""
echo "=== Build complete! ==="
echo ""
echo "Place your Animal Crossing disc image (.ciso/.iso/.gcm) in:"
echo " pc/build32/bin/rom/"
echo ""
echo "Run: pc/build32/bin/AnimalCrossing.exe"