Skip to content

Commit 5ba4e92

Browse files
Port XEX patcher to XenonRecomp. (#433)
* Port XEX patcher to XenonRecomp. * Update XenonRecomp submodule.
1 parent f123ec7 commit 5ba4e92

18 files changed

Lines changed: 31 additions & 1193 deletions

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
[submodule "tools/XenosRecomp"]
88
path = tools/XenosRecomp
99
url = https://github.com/hedge-dev/XenosRecomp.git
10-
[submodule "thirdparty/libmspack"]
11-
path = thirdparty/libmspack
12-
url = https://github.com/kyz/libmspack
1310
[submodule "UnleashedRecompResources"]
1411
path = UnleashedRecompResources
1512
url = https://github.com/hedge-dev/UnleashedRecompResources.git
@@ -40,9 +37,6 @@
4037
[submodule "thirdparty/concurrentqueue"]
4138
path = thirdparty/concurrentqueue
4239
url = https://github.com/cameron314/concurrentqueue.git
43-
[submodule "thirdparty/tiny-AES-c"]
44-
path = thirdparty/tiny-AES-c
45-
url = https://github.com/kokke/tiny-AES-c.git
4640
[submodule "thirdparty/magic_enum"]
4741
path = thirdparty/magic_enum
4842
url = https://github.com/Neargye/magic_enum.git

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
```
55
git clone --recurse-submodules https://github.com/hedge-dev/UnleashedRecomp.git
66
```
7-
2. Decompress and decrypt `default.xex`, apply the title update patch (`default.xexp`), and place the resulting file in `./UnleashedRecompLib/private/`.
7+
2. Place `default.xex` and `default.xexp` in `./UnleashedRecompLib/private/`.
88
3. Decompress `shader.ar` and place the resulting file in `./UnleashedRecompLib/private/`.
99
4. Open the repository directory in Visual Studio 2022 and wait for CMake generation to complete. If you don't plan to debug, switch to the `x64-Clang-Release` configuration.
1010
5. Under Solution Explorer, right-click and choose "Switch to CMake Targets View".

UnleashedRecomp/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,8 @@ set(UNLEASHED_RECOMP_UI_CXX_SOURCES
165165
set(UNLEASHED_RECOMP_INSTALL_CXX_SOURCES
166166
"install/installer.cpp"
167167
"install/iso_file_system.cpp"
168-
"install/memory_mapped_file.cpp"
169168
"install/update_checker.cpp"
170169
"install/xcontent_file_system.cpp"
171-
"install/xex_patcher.cpp"
172170
"install/hashes/apotos_shamar.cpp"
173171
"install/hashes/chunnan.cpp"
174172
"install/hashes/empire_city_adabat.cpp"
@@ -201,8 +199,6 @@ set(UNLEASHED_RECOMP_THIRDPARTY_SOURCES
201199
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/implot/implot.cpp"
202200
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/implot/implot_demo.cpp"
203201
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/implot/implot_items.cpp"
204-
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/libmspack/libmspack/mspack/lzxd.c"
205-
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/tiny-AES-c/aes.c"
206202
"${UNLEASHED_RECOMP_TOOLS_ROOT}/XenosRecomp/thirdparty/smol-v/source/smolv.cpp"
207203
)
208204

@@ -212,11 +208,8 @@ set(UNLEASHED_RECOMP_THIRDPARTY_INCLUDES
212208
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/imgui"
213209
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/implot"
214210
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/json/include"
215-
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/libmspack/libmspack/mspack"
216211
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/magic_enum/include"
217212
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/stb"
218-
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/tiny-AES-c"
219-
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/TinySHA1"
220213
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/unordered_dense/include"
221214
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/volk"
222215
"${UNLEASHED_RECOMP_THIRDPARTY_ROOT}/Vulkan-Headers/include"

UnleashedRecomp/install/installer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,5 +598,5 @@ XexPatcher::Result Installer::checkGameUpdateCompatibility(const std::filesystem
598598
}
599599

600600
std::vector<uint8_t> patchedBytes;
601-
return XexPatcher::apply(xexBytes, patchBytes, patchedBytes, true);
601+
return XexPatcher::apply(xexBytes.data(), xexBytes.size(), patchBytes.data(), patchBytes.size(), patchedBytes, true);
602602
}

UnleashedRecomp/install/installer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <set>
55

66
#include "virtual_file_system.h"
7-
#include "xex_patcher.h"
7+
#include <xex_patcher.h>
88

99
enum class DLC {
1010
Unknown,

UnleashedRecomp/install/iso_file_system.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include "virtual_file_system.h"
1818

19-
#include "memory_mapped_file.h"
19+
#include <memory_mapped_file.h>
2020

2121
struct ISOFileSystem : VirtualFileSystem
2222
{

UnleashedRecomp/install/memory_mapped_file.cpp

Lines changed: 0 additions & 169 deletions
This file was deleted.

UnleashedRecomp/install/memory_mapped_file.h

Lines changed: 0 additions & 32 deletions
This file was deleted.

UnleashedRecomp/install/xcontent_file_system.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include "virtual_file_system.h"
1818

19-
#include "memory_mapped_file.h"
19+
#include <memory_mapped_file.h>
2020

2121
enum class XContentVolumeType
2222
{

0 commit comments

Comments
 (0)