You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overhaul MSYS2 compilation instruction and make the Switch instruction work. (#27)
### Description
People seemed to be having issues compiling the game on MSYS2 so this PR
fixes all of it.
And I also overhauled the instruction to make it look prettier.
This also updates the Switch compiling instructions to make it work.
### Will this Pull Request break anything?
No.
### Suggested Testing Steps
See if it compiles.
Copy file name to clipboardExpand all lines: BUILDING.md
+26-19Lines changed: 26 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
# Requirements
2
2
* A Super Metroid rom (Make sure to rename it to `sm.smc`)
3
3
* libsdl2-dev
4
+
* Super Metroid repo `git clone --recursive https://github.com/snesrev/sm`
4
5
5
6
For Linux/MacOS you must install these for your desired OS:
6
7
* Ubuntu/Debian: `sudo apt install libsdl2-dev`
@@ -14,18 +15,26 @@
14
15
15
16
Dependencies and requirements:
16
17
17
-
Note: *Make sure you're using MINGW64, otherwise it won't work.*
18
18
* The `libsdl2-dev` library
19
19
*[MSYS2](https://www.msys2.org)
20
+
21
+
Note: *Make sure you're using MINGW64 and you're in `sm` folder in the terminal.*
20
22
21
23
1. Install MSYS2 on your machine.
22
-
2. Clone the SM repository. `git clone https://github.com/snesrev/sm`
23
-
3. Place the copy of your rom in the main directory.
24
-
4. Install `libsdl2-dev` with `sdl2-config --cflags`
25
-
5. After that it outputs `-IC:/msys64/mingw64/include/SDL2 -Dmain=SDL_main`, type `sdl2-config --libs`, it should output `-LC:/msys64/mingw64/lib -lmingw32 -mwindows -lSDL2main -lSDL2`
26
-
6. Now install Make and GCC, type `pacman -S make && pacman -S mingw-w64-x86_64-gcc`
24
+
2. Place the copy of your rom in the main directory.
25
+
3. Install the necessary dependencies by inputting this command in the terminal.
Note: *You must have MINGW64 open and affirm you're in the `sm` root folder.*
78
-
79
-
1. Make sure you've installed DevKitPro and Atmosphere.
80
-
2. Type `(dkp-)pacman -S git switch-dev switch-sdl2 switch-tools` to install the Switch SDL2 deps.
81
-
3. Now go to the `switch` folder inside MSYS2`cd platform/switch/`
82
-
4. Type`make` to build the game.
83
-
5. Copy the `.ini`, `nro` and the `smc` file and put them in your Switch.
85
+
1. Make sure you've installed Atmosphere on your Switch.
86
+
2. Please download the DevKitPro version of MSYS2 through their installer, as the default MSYS2 causes issues with windows compiling.
87
+
3. Now that you've installed DevKitPro, open up the location you've installed DevKitPro to, then find `mingw64.exe` inside `msys2` located in `devkitPro` folder.
88
+
4. Type `pacman -S git switch-dev switch-sdl2 switch-tools`in the terminal to install the `switch-sdl2` library.
89
+
5. CD to `switch` folder by typing`cd src/platfrom/switch` in the terminal on the `sm` root folder.
90
+
6. type`make` to compile the Switch Port.
91
+
7. Transfer the `.ini`, `nro`, `ncap`and your rom file to the Switch.
84
92
85
-
**OPTIONAL STEPS**
93
+
**OPTIONAL STEP**
86
94
87
95
```sh
88
96
make -j$(nproc)# To build using all cores
89
-
nxlink -s zelda3.nro # To test the build directly onto the Switch
0 commit comments