Skip to content

Commit

Permalink
More tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jblang committed May 2, 2024
1 parent 90c2228 commit 3a2cafa
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
8 changes: 5 additions & 3 deletions docs/compiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ sudo make install
* Download the `msys-init.sh` script from this repo (making sure to download the raw version instead of the html from github).
* Start MSYS2 in UCRT64 mode (there is a separate icon for each mode in the start menu, but you can just search for UCRT64).
* Run the init script with bash: `bash msys-init.sh`. It will update MSYS2, and then install all the build dependencies for the emulator.
* MSYS2 will probably want to restart after it installs the updates. If so, then run `msys-init.sh` again afterwards.
* Run `cd fab-agon-emulator` and then `make` in the root of the project.
* Run `./fab-agon-emulator.exe` in the root of the project.
* MSYS2 will probably restart after it installs the updates. If so, then run `bash msys-init.sh` again afterwards.
* Change to the project root: `cd fab-agon-emulator`
* **First time only** initialization: `git submodule update --init`
* Build the project: `make`
* Run the executable: `./fab-agon-emulator.exe`

## Compiling for Mac

Expand Down
35 changes: 26 additions & 9 deletions msys-init.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,40 @@
#!/bin/sh
REPO=${REPO:-https://github.com/tomm/fab-agon-emulator.git}
set -euxo pipefail # bash strict mode: https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425
set -euo pipefail # bash strict mode: https://gist.github.com/mohanpedala/1e2ff5661761d3abd0385e8223e16425

echo "⚠️ MSYS2 may ask to restart after this update. If so, rerun this script afterwards."
echo "
⚠️ MSYS2 may ask to restart after this update. If so, rerun this script afterwards.
"
pacman --noconfirm -Syu
echo "👌 Installing build dependencies for fab-agon-emulator..."

echo "
⚙️ Installing build dependencies for fab-agon-emulator...
"
pacman --noconfirm -S \
vim \
git \
make \
ucrt64/mingw-w64-ucrt-x86_64-SDL2 \
ucrt64/mingw-w64-ucrt-x86_64-gcc \
ucrt64/mingw-w64-ucrt-x86_64-rust
echo "👋 Cloning ${REPO}"
git clone
cd fab-agon-emulator

echo "
⭐ MSYS2 initialization complete
⭐ Build dependencies for fab-egon-emulator installed
⭐ github repo ${REPO} cloned and submodules initialized
🪄 Enjoy!
"
👋 Cloning ${REPO}...
"
git clone "${REPO}"

echo "
⭐ github repo ${REPO} cloned
🤝 Please run the following commands:
cd fab-agon-emulator
git submodule update --init
make
./fab-agon-emulator.exe
🎉 Enjoy!
"

0 comments on commit 3a2cafa

Please sign in to comment.