diff --git a/docs/compiling.md b/docs/compiling.md index 4562c93..e7e3aa8 100644 --- a/docs/compiling.md +++ b/docs/compiling.md @@ -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 diff --git a/msys-init.sh b/msys-init.sh index 45db9e7..1fb9264 100644 --- a/msys-init.sh +++ b/msys-init.sh @@ -1,10 +1,15 @@ #!/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 \ @@ -12,12 +17,24 @@ pacman --noconfirm -S \ 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! -" \ No newline at end of file + +👋 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! +"