mirror of
https://github.com/wiiu-env/RPXLoadingModule.git
synced 2024-11-10 20:25:08 +01:00
Compare commits
No commits in common. "main" and "v0.3.3" have entirely different histories.
10
.github/dependabot.yml
vendored
10
.github/dependabot.yml
vendored
@ -1,10 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
||||
clang-format:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- name: clang-format
|
||||
run: |
|
||||
docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./src
|
||||
@ -17,7 +17,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: clang-format
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- name: create version.h
|
||||
run: |
|
||||
git_hash=$(git rev-parse --short "$GITHUB_SHA")
|
||||
@ -48,7 +48,7 @@ jobs:
|
||||
- name: zip artifact
|
||||
run: zip -r ${{ env.REPOSITORY_NAME }}_${{ env.DATETIME }}.zip *.wms
|
||||
- name: Create Release
|
||||
uses: "softprops/action-gh-release@v2"
|
||||
uses: "softprops/action-gh-release@v1"
|
||||
with:
|
||||
tag_name: ${{ env.REPOSITORY_NAME }}-${{ env.DATETIME }}
|
||||
draft: false
|
||||
|
6
.github/workflows/pr.yml
vendored
6
.github/workflows/pr.yml
vendored
@ -6,7 +6,7 @@ jobs:
|
||||
clang-format:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- name: clang-format
|
||||
run: |
|
||||
docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./src
|
||||
@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: clang-format
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- name: build binary with logging
|
||||
run: |
|
||||
docker build . -t builder
|
||||
@ -25,7 +25,7 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: clang-format
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- name: create version.h
|
||||
run: |
|
||||
git_hash=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,4 +8,3 @@ build/
|
||||
cmake-build-debug/
|
||||
CMakeLists.txt
|
||||
*.wms
|
||||
*.zip
|
||||
|
12
Dockerfile
12
Dockerfile
@ -1,11 +1,11 @@
|
||||
FROM ghcr.io/wiiu-env/devkitppc:20240505
|
||||
FROM ghcr.io/wiiu-env/devkitppc:20230621
|
||||
|
||||
COPY --from=ghcr.io/wiiu-env/librpxloader:20240425 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/librpxloader:20230621 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libfunctionpatcher:20230621 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20240424 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20230719 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libwuhbutils:20230621 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libcontentredirection:20240424 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libromfs_wiiu:20240505 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libmocha:20231127 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libcontentredirection:20230621 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libromfs_wiiu:20230621 /artifacts $DEVKITPRO
|
||||
COPY --from=ghcr.io/wiiu-env/libmocha:20230621 /artifacts $DEVKITPRO
|
||||
|
||||
WORKDIR project
|
||||
|
@ -382,7 +382,7 @@ RPXLoaderStatus RL_GetVersion(RPXLoaderVersion *outVersion) {
|
||||
if (!outVersion) {
|
||||
return RPX_LOADER_RESULT_INVALID_ARGUMENT;
|
||||
}
|
||||
*outVersion = 3;
|
||||
*outVersion = 2;
|
||||
return RPX_LOADER_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
@ -398,18 +398,6 @@ RPXLoaderStatus RL_GetPathOfRunningExecutable(char *outBuffer, uint32_t outSize)
|
||||
return RPX_LOADER_RESULT_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
RPXLoaderStatus RL_GetPathOfSaveRedirection(char *outBuffer, uint32_t outSize) {
|
||||
if (outBuffer == nullptr || outSize == 0) {
|
||||
return RPX_LOADER_RESULT_INVALID_ARGUMENT;
|
||||
}
|
||||
if (saveLayerHandle != 0 && !gActiveSaveRedirectionPath.empty()) {
|
||||
strncpy(outBuffer, gActiveSaveRedirectionPath.c_str(), outSize - 1);
|
||||
return RPX_LOADER_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
return RPX_LOADER_RESULT_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
WUMS_EXPORT_FUNCTION(RL_PrepareLaunchFromSD);
|
||||
WUMS_EXPORT_FUNCTION(RL_LaunchPreparedHomebrew);
|
||||
WUMS_EXPORT_FUNCTION(RL_LaunchHomebrew);
|
||||
@ -419,4 +407,3 @@ WUMS_EXPORT_FUNCTION(RL_EnableContentRedirection);
|
||||
WUMS_EXPORT_FUNCTION(RL_DisableContentRedirection);
|
||||
WUMS_EXPORT_FUNCTION(RL_UnmountCurrentRunningBundle);
|
||||
WUMS_EXPORT_FUNCTION(RL_GetPathOfRunningExecutable);
|
||||
WUMS_EXPORT_FUNCTION(RL_GetPathOfSaveRedirection);
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include "globals.h"
|
||||
|
||||
RPXLoader_ReplacementInformation gReplacementInfo = {};
|
||||
CRLayerHandle contentLayerHandle = 0;
|
||||
CRLayerHandle saveLayerHandle = 0;
|
||||
std::string gActiveSaveRedirectionPath;
|
||||
RPXLoader_ReplacementInformation gReplacementInfo __attribute__((section(".data")));
|
||||
CRLayerHandle contentLayerHandle __attribute__((section(".data"))) = 0;
|
||||
CRLayerHandle saveLayerHandle __attribute__((section(".data"))) = 0;
|
@ -54,4 +54,3 @@ extern RPXLoader_ReplacementInformation gReplacementInfo;
|
||||
|
||||
extern CRLayerHandle contentLayerHandle;
|
||||
extern CRLayerHandle saveLayerHandle;
|
||||
extern std::string gActiveSaveRedirectionPath;
|
11
src/main.cpp
11
src/main.cpp
@ -16,7 +16,7 @@
|
||||
#include <wuhb_utils/utils.h>
|
||||
#include <wums.h>
|
||||
|
||||
#define VERSION "v0.3.4"
|
||||
#define VERSION "v0.3.3"
|
||||
|
||||
WUMS_MODULE_EXPORT_NAME("homebrew_rpx_loader");
|
||||
WUMS_USE_WUT_DEVOPTAB();
|
||||
@ -91,8 +91,6 @@ WUMS_APPLICATION_STARTS() {
|
||||
gReplacementInfo.lastFileLoaded[0] = '\0';
|
||||
}
|
||||
|
||||
gActiveSaveRedirectionPath.clear();
|
||||
|
||||
if (_SYSGetSystemApplicationTitleId(SYSTEM_APP_ID_HEALTH_AND_SAFETY) == OSGetTitleID() &&
|
||||
strlen(gReplacementInfo.contentReplacementInfo.bundleMountInformation.toMountPath) > 0) {
|
||||
uint32_t currentHash = StringTools::hash(gReplacementInfo.contentReplacementInfo.bundleMountInformation.toMountPath);
|
||||
@ -102,11 +100,10 @@ WUMS_APPLICATION_STARTS() {
|
||||
nn::act::PersistentId persistentId = nn::act::GetPersistentId();
|
||||
nn::act::Finalize();
|
||||
|
||||
std::string relativePath = string_format("wiiu/apps/save/%08X", currentHash);
|
||||
std::string basePath = string_format("fs:/vol/external01/wiiu/apps/save/%08X", currentHash);
|
||||
if (!shortNameSanitized.empty()) {
|
||||
relativePath += string_format(" (%s)", shortNameSanitized.c_str());
|
||||
basePath += string_format(" (%s)", shortNameSanitized.c_str());
|
||||
}
|
||||
std::string basePath = "fs:/vol/external01/" + relativePath;
|
||||
|
||||
std::string common = basePath + "/common";
|
||||
std::string user = basePath + string_format("/%08X", 0x80000000 | persistentId);
|
||||
@ -148,8 +145,6 @@ WUMS_APPLICATION_STARTS() {
|
||||
gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted = true;
|
||||
gReplacementInfo.contentReplacementInfo.bundleMountInformation.toMountPath[0] = '\0';
|
||||
|
||||
gActiveSaveRedirectionPath = relativePath;
|
||||
|
||||
OSMemoryBarrier();
|
||||
return;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user