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
This unifies the build system across platforms, including doing
development inside Visual Studio. No change to other code.
Some exceptions:
- Switch port is still a Makefile
- run_with_tcc.bat still exists
After you've done installing everything, cd to `sm` folder. Type `make`
40
-
In order to speed up the compilation, type `make -j16`
41
-
42
26
## Building with Visual Studio
43
27
44
28
Dependencies and requirements:
45
29
* The `libsdl2-dev` library, which is automatically installed with NuGet.
46
30
*[Visual Studio Community 2022](https://visualstudio.microsoft.com)
47
31
48
-
Download VS installer. On installer prompt, make sure you're on "Workloads" and check `Desktop Development with C++` this will install the necessary deps for compilation.
32
+
Download VS installer. On installer prompt, make sure you're on "Workloads"
33
+
and check **both**`Desktop Development with C++`**and**`C++ CMake Tools for Windows`.
34
+
This will install the necessary deps for compilation.
49
35
50
-
1. Open `sm.sln` solution.
51
-
2. Change the build target from `Debug` to `Release`
52
-
3. Build the solution.
36
+
Visual Studio should automatically detect the CMake project and let you configure and build it. If not,
37
+
follow the [general instructions](https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170)
38
+
from Microsoft.
53
39
54
40
## Building with Tiny C Compiler
55
41
@@ -64,34 +50,34 @@ Download VS installer. On installer prompt, make sure you're on "Workloads" and
64
50
65
51
CD to your SM root folder and open the terminal and type:
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.
66
+
First, follow the [installation instructions on devkitPro's website](https://devkitpro.org/wiki/Getting_Started).
92
67
93
-
**OPTIONAL STEP**
68
+
Second, once you have pacman set up and synced, do:
69
+
```shell
70
+
pacman -S switch-dev switch-tools switch-sdl2
71
+
```
94
72
95
-
```sh
96
-
make -j$(nproc)# To build using all cores
73
+
## Building
74
+
In the top level directory, you can use the cmake preset for running a build for the switch:
75
+
```shell
76
+
cmake --preset nintendo-switch
77
+
cmake --build build-switch --parallel
97
78
```
79
+
80
+
## Getting SM on to your Switch
81
+
First, make sure you've installed [Atmosphere](https://github.com/Atmosphere-NX/Atmosphere) on your Switch.
82
+
Next, go into the `build-switch` directory and copy `sm.ini`, `sm.nro`, and `sm.ncap` and the sm rom
0 commit comments