Skip to content

Commit

Permalink
Update decomp build guides
Browse files Browse the repository at this point in the history
  • Loading branch information
MegAmi24 committed Oct 31, 2024
1 parent 2d733c9 commit 64dec54
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 93 deletions.
56 changes: 28 additions & 28 deletions docs/Guides/RSDKv3/Decompilation/Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,25 @@

The RSDKv3 Decompilation uses [CMake](https://cmake.org/), a versatile building system that supports many different compilers and platforms.

!!! note
This guide requires basic knowledge of how to use the appropriate terminal for your OS, such as Command Prompt for Windows. If you aren't familiar with opening terminals in specific directories, look up a tutorial online.
## Read before proceeding

This guide requires basic knowledge of how to use the appropriate terminal for your OS, such as Command Prompt for Windows. If you aren't familiar with doing basic actions with terminals, such as opening one in specific directories, look up a tutorial online.

In addition, refer to these warnings depending on the platform you are compiling for:

=== "Windows"

!!! warning
Make sure to use Command Prompt when typing commands instead of PowerShell, as PowerShell is known to cause issues.

=== "Linux"

!!! warning "Notice for Steam Deck users"
Due to how SteamOS handles packages, building the decompilation on the Steam Deck is highly difficult and not recommended. Instead, consider building it on another Arch Linux device and using that build on the Steam Deck.

=== "Android"

TODO

## Get the source code
In order to clone the repository, you need to install Git, which you can get [here](https://git-scm.com/downloads).
Expand Down Expand Up @@ -34,7 +51,7 @@ git submodule update --remote --init --recursive
!!! tip
It's recommended to clone vcpkg into a short path such as `C:/src` to keep future commands from getting too long.

Run the following command in the vcpkg repository in Command Prompt:
Run the following command in the vcpkg repository:
=== "64-bit"

```
Expand All @@ -47,10 +64,13 @@ git submodule update --remote --init --recursive
vcpkg.exe install glew sdl2 libogg libtheora libvorbis --triplet=x86-windows-static
```

=== "Linux"
Then, add vcpkg to your environment variables by running the following commands in the vcpkg repository:
```
set VCPKG="%CD%"
setx VCPKG %VCPKG%
```

!!! warning "Notice for Steam Deck users"
Due to how SteamOS handles packages, building the decompilation on the Steam Deck is highly difficult and not recommended. Instead, consider building it on another Arch Linux device and using that build on the Steam Deck.
=== "Linux"

Run the following command in the terminal:

Expand Down Expand Up @@ -95,37 +115,17 @@ git submodule update --remote --init --recursive
=== "64-bit"

```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PREFIX_PATH=[vcpkg root]/installed/x64-windows-static/
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="%VCPKG%/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PREFIX_PATH="%VCPKG%/installed/x64-windows-static/"
cmake --build build --config release
```

!!! warning "Important!"
Both instances of `[vcpkg root]` should be replaced with the path to the vcpkg repository. For example, if the repository is located in `C:/src/vcpkg`, the first command to enter would be:
```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PREFIX_PATH=C:/src/vcpkg/installed/x64-windows-static/
```
If the path to the repository includes spaces in it, you will need to put quotation marks around the entire path. For example, if the repository is located in `C:/github repos/vcpkg`, the first command to enter would be:
```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="C:/github repos/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PREFIX_PATH="C:/github repos/vcpkg/installed/x64-windows-static/"
```

=== "32-bit"

```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-windows-static -DCMAKE_PREFIX_PATH=[vcpkg root]/installed/x86-windows-static/ -A Win32
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="%VCPKG%/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x86-windows-static -DCMAKE_PREFIX_PATH="%VCPKG%/installed/x86-windows-static/" -A Win32
cmake --build build --config release
```

!!! warning "Important!"
Both instances of `[vcpkg root]` should be replaced with the path to the vcpkg repository. For example, if the repository is located in `C:/src/vcpkg`, the first command to enter would be:
```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-windows-static -DCMAKE_PREFIX_PATH=C:/src/vcpkg/installed/x86-windows-static/ -A Win32
```
If the path to the repository includes spaces in it, you will need to put quotation marks around the entire path. For example, if the repository is located in `C:/github repos/vcpkg`, the first command to enter would be:
```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="C:/github repos/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x86-windows-static -DCMAKE_PREFIX_PATH="C:/github repos/vcpkg/installed/x86-windows-static/" -A Win32
```

The resulting build will be located somewhere in `build/` depending on your system.

You can set [build flags](#build-flags) by adding `-D[flag-name]=[value]` to the end of the first command. For example, to build with `RETRO_DISABLE_PLUS` set to on, add `-DRETRO_DISABLE_PLUS=on` to the command.
Expand Down
56 changes: 28 additions & 28 deletions docs/Guides/RSDKv4/Decompilation/Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,25 @@

The RSDKv4 Decompilation uses [CMake](https://cmake.org/), a versatile building system that supports many different compilers and platforms.

!!! note
This guide requires basic knowledge of how to use the appropriate terminal for your OS, such as Command Prompt for Windows. If you aren't familiar with opening terminals in specific directories, look up a tutorial online.
## Read before proceeding

This guide requires basic knowledge of how to use the appropriate terminal for your OS, such as Command Prompt for Windows. If you aren't familiar with doing basic actions with terminals, such as opening one in specific directories, look up a tutorial online.

In addition, refer to these warnings depending on the platform you are compiling for:

=== "Windows"

!!! warning
Make sure to use Command Prompt when typing commands instead of PowerShell, as PowerShell is known to cause issues.

=== "Linux"

!!! warning "Notice for Steam Deck users"
Due to how SteamOS handles packages, building the decompilation on the Steam Deck is highly difficult and not recommended. Instead, consider building it on another Arch Linux device and using that build on the Steam Deck.

=== "Android"

TODO

## Get the source code
In order to clone the repository, you need to install Git, which you can get [here](https://git-scm.com/downloads).
Expand Down Expand Up @@ -34,7 +51,7 @@ git submodule update --remote --init --recursive
!!! tip
It's recommended to clone vcpkg into a short path such as `C:/src` to keep future commands from getting too long.

Run the following command in the vcpkg repository in Command Prompt:
Run the following command in the vcpkg repository:
=== "64-bit"

```
Expand All @@ -47,10 +64,13 @@ git submodule update --remote --init --recursive
vcpkg.exe install glew sdl2 libogg libvorbis --triplet=x86-windows-static
```

=== "Linux"
Then, add vcpkg to your environment variables by running the following commands in the vcpkg repository:
```
set VCPKG="%CD%"
setx VCPKG %VCPKG%
```

!!! warning "Notice for Steam Deck users"
Due to how SteamOS handles packages, building the decompilation on the Steam Deck is highly difficult and not recommended. Instead, consider building it on another Arch Linux device and using that build on the Steam Deck.
=== "Linux"

Run the following command in the terminal:

Expand Down Expand Up @@ -95,37 +115,17 @@ git submodule update --remote --init --recursive
=== "64-bit"

```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PREFIX_PATH=[vcpkg root]/installed/x64-windows-static/
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="%VCPKG%/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PREFIX_PATH="%VCPKG%/installed/x64-windows-static/"
cmake --build build --config release
```

!!! warning "Important!"
Both instances of `[vcpkg root]` should be replaced with the path to the vcpkg repository. For example, if the repository is located in `C:/src/vcpkg`, the first command to enter would be:
```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PREFIX_PATH=C:/src/vcpkg/installed/x64-windows-static/
```
If the path to the repository includes spaces in it, you will need to put quotation marks around the entire path. For example, if the repository is located in `C:/github repos/vcpkg`, the first command to enter would be:
```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="C:/github repos/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_PREFIX_PATH="C:/github repos/vcpkg/installed/x64-windows-static/"
```

=== "32-bit"

```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-windows-static -DCMAKE_PREFIX_PATH=[vcpkg root]/installed/x86-windows-static/ -A Win32
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="%VCPKG%/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x86-windows-static -DCMAKE_PREFIX_PATH="%VCPKG%/installed/x86-windows-static/" -A Win32
cmake --build build --config release
```

!!! warning "Important!"
Both instances of `[vcpkg root]` should be replaced with the path to the vcpkg repository. For example, if the repository is located in `C:/src/vcpkg`, the first command to enter would be:
```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-windows-static -DCMAKE_PREFIX_PATH=C:/src/vcpkg/installed/x86-windows-static/ -A Win32
```
If the path to the repository includes spaces in it, you will need to put quotation marks around the entire path. For example, if the repository is located in `C:/github repos/vcpkg`, the first command to enter would be:
```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="C:/github repos/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x86-windows-static -DCMAKE_PREFIX_PATH="C:/github repos/vcpkg/installed/x86-windows-static/" -A Win32
```

The resulting build will be located somewhere in `build/` depending on your system.

You can set [build flags](#build-flags) by adding `-D[flag-name]=[value]` to the end of the first command. For example, to build with `RETRO_DISABLE_PLUS` set to on, add `-DRETRO_DISABLE_PLUS=on` to the command.
Expand Down
64 changes: 34 additions & 30 deletions docs/Guides/RSDKv5/Decompilation/Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,29 @@

The RSDKv5 and Sonic Mania decompilations use [CMake](https://cmake.org/), a versatile building system that supports many different compilers and platforms.

!!! note
This guide requires basic knowledge of how to use the appropriate terminal for your OS, such as Command Prompt for Windows. If you aren't familiar with opening terminals in specific directories, look up a tutorial online.
## Read before proceeding

This guide requires basic knowledge of how to use the appropriate terminal for your OS, such as Command Prompt for Windows. If you aren't familiar with doing basic actions with terminals, such as opening one in specific directories, look up a tutorial online.

In addition, refer to these warnings depending on the platform you are compiling for:

=== "Windows"

!!! warning
Make sure to use Command Prompt when typing commands instead of PowerShell, as PowerShell is known to cause issues.

=== "Linux"

!!! warning "Notice for Steam Deck users"
Due to how SteamOS handles packages, building the decompilation on the Steam Deck is highly difficult and not recommended. Instead, consider building it on another Arch Linux device and using that build on the Steam Deck.

=== "Nintendo Switch"

TODO

=== "Android"

TODO

## Get the source code
In order to clone the repository, you need to install Git, which you can get [here](https://git-scm.com/downloads).
Expand Down Expand Up @@ -42,7 +63,7 @@ git submodule update --remote --init --recursive
!!! tip
It's recommended to clone vcpkg into a short path such as `C:/src` to keep future commands from getting too long.

Run the following command in the vcpkg repository in Command Prompt:
Run the following command in the vcpkg repository:
=== "64-bit"

```
Expand All @@ -55,10 +76,13 @@ git submodule update --remote --init --recursive
vcpkg.exe install libtheora libogg glew sdl2 --triplet=x86-windows-static
```

=== "Linux"
Then, add vcpkg to your environment variables by running the following commands in the vcpkg repository:
```
set VCPKG="%CD%"
setx VCPKG %VCPKG%
```

!!! warning "Notice for Steam Deck users"
Due to how SteamOS handles packages, building the decompilation on the Steam Deck is highly difficult and not recommended. Instead, consider building it on another Arch Linux device and using that build on the Steam Deck.
=== "Linux"

Run the following command in the terminal:

Expand Down Expand Up @@ -110,38 +134,18 @@ git submodule update --remote --init --recursive
=== "64-bit"

```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="%VCPKG%/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static
cmake --build build --config release
```

!!! warning "Important!"
`[vcpkg root]` should be replaced with the path to the vcpkg repository. For example, if the repository is located in `C:/src/vcpkg`, the first command to enter would be:
```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static
```
If the path to the repository includes spaces in it, you will need to put quotation marks around the entire path. For example, if the repository is located in `C:/github repos/vcpkg`, the first command to enter would be:
```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="C:/github repos/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows-static
```

=== "32-bit"

```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-windows-static -A Win32
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="%VCPKG%/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x86-windows-static -A Win32
cmake --build build --config release
```

!!! warning "Important!"
`[vcpkg root]` should be replaced with the path to the vcpkg repository. For example, if the repository is located in `C:/src/vcpkg`, the first command to enter would be:
```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-windows-static -A Win32
```
If the path to the repository includes spaces in it, you will need to put quotation marks around the entire path. For example, if the repository is located in `C:/github repos/vcpkg`, the first command to enter would be:
```
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="C:/github repos/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x86-windows-static -A Win32
```

The resulting build(s) will be located somewhere in `build/` depending on your system.
The resulting build(s) will be located somewhere in `build/` depending on your system. If you built RSDKv5 and Sonic Mania together, Sonic Mania (`Game.dll`) will be found in `build` while RSDKv5 (`RSDKv5(U).exe`) will be found in `build/dependencies/RSDKv5`.

You can set [build flags](#build-flags) by adding `-D[flag-name]=[value]` to the end of the first command. For example, to build with `RETRO_DISABLE_PLUS` set to on, add `-DRETRO_DISABLE_PLUS=on` to the command.

Expand All @@ -153,7 +157,7 @@ git submodule update --remote --init --recursive
cmake --build build --config release
```

The resulting build(s) will be located somewhere in `build/` depending on your system.
The resulting build(s) will be located somewhere in `build/` depending on your system. If you built RSDKv5 and Sonic Mania together, Sonic Mania (`libGame.so`) will be found in `build` while RSDKv5 (`RSDKv5(U)`) will be found in `build/dependencies/RSDKv5`.

You can set [build flags](#build-flags) by adding `-D[flag-name]=[value]` to the end of the first command. For example, to build with `RETRO_DISABLE_PLUS` set to on, add `-DRETRO_DISABLE_PLUS=on` to the command.

Expand Down
2 changes: 1 addition & 1 deletion docs/Guides/RetroED/Editors/SceneEditor.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RetroED Scene Editor
# Scene Editor

## Tools
=== "Pre-v5"
Expand Down
2 changes: 1 addition & 1 deletion docs/RSDKv3/Functions/Drawing/RotatePalette.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Rotates all colors in `PalBank` from `StartIndex` to `EndIndex`, moving left or

`RotRight`

: Rotates right if `false`; otherwise, rotates left.
: Rotates right if `true`; otherwise, rotates left.

## Return Value
None.
Expand Down
2 changes: 1 addition & 1 deletion docs/RSDKv4/Functions/Drawing/RotatePalette.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Rotates all colors in `palBank` from `startIndex` to `endIndex`, moving left or

`rotRight`

: Rotates right if `false`; otherwise, rotates left.
: Rotates right if `true`; otherwise, rotates left.

## Return Value
None.
Expand Down
2 changes: 1 addition & 1 deletion docs/RSDKv5/Functions/Editor/RSDK_ACTIVE_VAR.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# RSDK_ACTIVE_VAR

## Description
Sets a variable to be the "active variable" when using [RSDK_ENUM_VAR](RSDK_ENUM_VAR.md).
Sets a variable to be the "active variable" when using [RSDK_ENUM_VAR()](RSDK_ENUM_VAR.md).

## Parameters
`sVars`
Expand Down
2 changes: 1 addition & 1 deletion docs/RSDKv5/Functions/Graphics/GetStringWidth.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# GetStringWidth

## Description
Retrieves the width of a string in pixels when displayed with [DrawText](TODO).
Retrieves the width of a string in pixels when displayed with [DrawText()](TODO).

## Parameters
`aniFrames`
Expand Down
Loading

0 comments on commit 64dec54

Please sign in to comment.