From bc7c409296f70fd56705e9500d1b7b36747895e6 Mon Sep 17 00:00:00 2001 From: Joe Bain Date: Fri, 9 Dec 2022 15:20:30 +0000 Subject: [PATCH 1/2] Added setup instructions for mac --- book/src/SUMMARY.md | 2 +- book/src/setup/mac.md | 52 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 book/src/setup/mac.md diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 41b154d2..ffc5412a 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -6,7 +6,7 @@ - [Environment setup](./setup/setup.md) - [Linux setup](./setup/linux.md) - [Windows setup]() - - [Mac OS setup]() + - [Mac OS setup](./setup/mac.md) - [Building the template](./setup/building.md) - [Learn agb part I - pong](./pong/01_introduction.md) - [The Gba struct](./pong/02_the_gba_struct.md) diff --git a/book/src/setup/mac.md b/book/src/setup/mac.md new file mode 100644 index 00000000..20127fef --- /dev/null +++ b/book/src/setup/mac.md @@ -0,0 +1,52 @@ +# Mac setup + +This guide has been tested on MacOS 13.0.1 on an M1 chip. + +# 1. Install a recent version of rust + +agb unfortunately relies on a few nightly rust features, so you need to ensure you have that installed. +Firstly, ensure that you have **rustup** installed which you can do by following the instructions on the [rust website](https://www.rust-lang.org/tools/install) + +You can update rustup with `rustup update` if you have already installed it. + +# 2. arm-none-eabi + +We need this installed in order to be able to assemble the small amount of assembly in agb, and to do the final linking. + +## From ARM + +Download the toolchain from ARM here: https://developer.arm.com/downloads/-/gnu-rm + * Run the .pkg to install + * Add `/Applications/ARM/bin` to your `/etc/paths` file + +## From Homebrew + +Or you can try installing with homebrew from the (Arm Mbed repo)[https://github.com/ARMmbed/homebrew-formulae]: + +``` +brew tap ArmMbed/homebrew-formulae +brew install arm-none-eabi-gcc +``` + +# 3. git + +The source code for the game is hosted on github, so you will need git installed. Follow the instructions at (git-scm.com)[https://git-scm.com/] + +# 4. mGBA + +We recommend using the mGBA emulator which you can download for Mac (here)[https://mgba.io/downloads.html]. + +After installing to your `/Applications` folder you can add the binary to your path and create an alias for the agb run command to use. + +* Add `/Applications/mGBA.app/Contents/MacOS` to `/etc/paths` +* Inside the `/Applications/mGBA.app/Contents/MacOS` directory (in a terminal) run: `ln -s mGBA mgba-qt` + +# 4. gbafix + +In order to be able to play on real hardware or on some emulators, you may need to install 'gbafix'. +The rust implementation can be installed very easily using `cargo install gbafix`. + +Make sure that the Cargo bin directory is in your `PATH` as we'll need to use it later. + +That is all you need to get started. +You can now move on to 'building the game'. \ No newline at end of file From 95b7fd736dd813a5585c82c252f58227396b7e71 Mon Sep 17 00:00:00 2001 From: Joe Bain Date: Fri, 9 Dec 2022 15:29:21 +0000 Subject: [PATCH 2/2] Fix links in mac setup doc --- book/src/setup/mac.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/book/src/setup/mac.md b/book/src/setup/mac.md index 20127fef..ad8bcf3f 100644 --- a/book/src/setup/mac.md +++ b/book/src/setup/mac.md @@ -9,39 +9,39 @@ Firstly, ensure that you have **rustup** installed which you can do by following You can update rustup with `rustup update` if you have already installed it. -# 2. arm-none-eabi +# 2. Install arm-none-eabi We need this installed in order to be able to assemble the small amount of assembly in agb, and to do the final linking. -## From ARM +## Install from ARM -Download the toolchain from ARM here: https://developer.arm.com/downloads/-/gnu-rm +Download the toolchain from [ARM here](https://developer.arm.com/downloads/-/gnu-rm) * Run the .pkg to install * Add `/Applications/ARM/bin` to your `/etc/paths` file -## From Homebrew +## Install from Homebrew -Or you can try installing with homebrew from the (Arm Mbed repo)[https://github.com/ARMmbed/homebrew-formulae]: +Or you can try installing with homebrew from the [Arm Mbed repo](https://github.com/ARMmbed/homebrew-formulae): ``` brew tap ArmMbed/homebrew-formulae brew install arm-none-eabi-gcc ``` -# 3. git +# 3. Get git -The source code for the game is hosted on github, so you will need git installed. Follow the instructions at (git-scm.com)[https://git-scm.com/] +The source code for the game is hosted on github, so you will need git installed. Follow the instructions at [git-scm.com](https://git-scm.com/) -# 4. mGBA +# 4. GBA Emulator - mGBA -We recommend using the mGBA emulator which you can download for Mac (here)[https://mgba.io/downloads.html]. +We recommend using the mGBA emulator which you can download for Mac [here](https://mgba.io/downloads.html). After installing to your `/Applications` folder you can add the binary to your path and create an alias for the agb run command to use. * Add `/Applications/mGBA.app/Contents/MacOS` to `/etc/paths` * Inside the `/Applications/mGBA.app/Contents/MacOS` directory (in a terminal) run: `ln -s mGBA mgba-qt` -# 4. gbafix +# 5. Real hardware - gbafix In order to be able to play on real hardware or on some emulators, you may need to install 'gbafix'. The rust implementation can be installed very easily using `cargo install gbafix`.