mirror of
https://github.com/wiiu-env/RPXLoadingModule.git
synced 2024-10-31 23:45:13 +01:00
Compare commits
13 Commits
RPXLoading
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
5239704327 | ||
|
176b1c06c4 | ||
|
2fb721d6d5 | ||
|
a0913ed652 | ||
|
b6d28a891f | ||
|
9eed09d8bf | ||
|
bafc8b69bf | ||
|
a31646fbfe | ||
|
77c7db4ed9 | ||
|
626704d06f | ||
|
a3eb1a27a6 | ||
|
49c938e7c9 | ||
|
92df19d02e |
10
.github/dependabot.yml
vendored
Normal file
10
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
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:
|
clang-format:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: clang-format
|
- name: clang-format
|
||||||
run: |
|
run: |
|
||||||
docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./src
|
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
|
runs-on: ubuntu-22.04
|
||||||
needs: clang-format
|
needs: clang-format
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: create version.h
|
- name: create version.h
|
||||||
run: |
|
run: |
|
||||||
git_hash=$(git rev-parse --short "$GITHUB_SHA")
|
git_hash=$(git rev-parse --short "$GITHUB_SHA")
|
||||||
@ -48,7 +48,7 @@ jobs:
|
|||||||
- name: zip artifact
|
- name: zip artifact
|
||||||
run: zip -r ${{ env.REPOSITORY_NAME }}_${{ env.DATETIME }}.zip *.wms
|
run: zip -r ${{ env.REPOSITORY_NAME }}_${{ env.DATETIME }}.zip *.wms
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: "softprops/action-gh-release@v1"
|
uses: "softprops/action-gh-release@v2"
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.REPOSITORY_NAME }}-${{ env.DATETIME }}
|
tag_name: ${{ env.REPOSITORY_NAME }}-${{ env.DATETIME }}
|
||||||
draft: false
|
draft: false
|
||||||
|
6
.github/workflows/pr.yml
vendored
6
.github/workflows/pr.yml
vendored
@ -6,7 +6,7 @@ jobs:
|
|||||||
clang-format:
|
clang-format:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: clang-format
|
- name: clang-format
|
||||||
run: |
|
run: |
|
||||||
docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./src
|
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
|
runs-on: ubuntu-22.04
|
||||||
needs: clang-format
|
needs: clang-format
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: build binary with logging
|
- name: build binary with logging
|
||||||
run: |
|
run: |
|
||||||
docker build . -t builder
|
docker build . -t builder
|
||||||
@ -25,7 +25,7 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
needs: clang-format
|
needs: clang-format
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: create version.h
|
- name: create version.h
|
||||||
run: |
|
run: |
|
||||||
git_hash=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
|
git_hash=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ build/
|
|||||||
cmake-build-debug/
|
cmake-build-debug/
|
||||||
CMakeLists.txt
|
CMakeLists.txt
|
||||||
*.wms
|
*.wms
|
||||||
|
*.zip
|
||||||
|
12
Dockerfile
12
Dockerfile
@ -1,11 +1,11 @@
|
|||||||
FROM ghcr.io/wiiu-env/devkitppc:20230621
|
FROM ghcr.io/wiiu-env/devkitppc:20240505
|
||||||
|
|
||||||
COPY --from=ghcr.io/wiiu-env/librpxloader:20230621 /artifacts $DEVKITPRO
|
COPY --from=ghcr.io/wiiu-env/librpxloader:20240425 /artifacts $DEVKITPRO
|
||||||
COPY --from=ghcr.io/wiiu-env/libfunctionpatcher:20230621 /artifacts $DEVKITPRO
|
COPY --from=ghcr.io/wiiu-env/libfunctionpatcher:20230621 /artifacts $DEVKITPRO
|
||||||
COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20230622 /artifacts $DEVKITPRO
|
COPY --from=ghcr.io/wiiu-env/wiiumodulesystem:20240424 /artifacts $DEVKITPRO
|
||||||
COPY --from=ghcr.io/wiiu-env/libwuhbutils:20230621 /artifacts $DEVKITPRO
|
COPY --from=ghcr.io/wiiu-env/libwuhbutils:20230621 /artifacts $DEVKITPRO
|
||||||
COPY --from=ghcr.io/wiiu-env/libcontentredirection:20230621 /artifacts $DEVKITPRO
|
COPY --from=ghcr.io/wiiu-env/libcontentredirection:20240424 /artifacts $DEVKITPRO
|
||||||
COPY --from=ghcr.io/wiiu-env/libromfs_wiiu:20230621 /artifacts $DEVKITPRO
|
COPY --from=ghcr.io/wiiu-env/libromfs_wiiu:20240505 /artifacts $DEVKITPRO
|
||||||
COPY --from=ghcr.io/wiiu-env/libmocha:20230621 /artifacts $DEVKITPRO
|
COPY --from=ghcr.io/wiiu-env/libmocha:20231127 /artifacts $DEVKITPRO
|
||||||
|
|
||||||
WORKDIR project
|
WORKDIR project
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
1. Copy the file `RPXLoadingModule.wms` into `sd:/wiiu/environments/[ENVIRONMENT]/modules`.
|
1. Copy the file `RPXLoadingModule.wms` into `sd:/wiiu/environments/[ENVIRONMENT]/modules`.
|
||||||
2. Requires the [WUMSLoader](https://github.com/wiiu-env/WUMSLoader) in `sd:/wiiu/environments/[ENVIRONMENT]/modules/setup`.
|
2. Requires the [WUMSLoader](https://github.com/wiiu-env/WUMSLoader) in `sd:/wiiu/environments/[ENVIRONMENT]/modules/setup`.
|
||||||
3. Requires the [ContentRedirectionModule](https://github.com/wiiu-env/ContentRedirectionModule) in `sd:/wiiu/environments/[ENVIRONMENT]/modules/setup`.
|
3. Requires the [ContentRedirectionModule](https://github.com/wiiu-env/ContentRedirectionModule) in `sd:/wiiu/environments/[ENVIRONMENT]/modules`.
|
||||||
4. Requires the [WUHBUtilsModule](https://github.com/wiiu-env/WUHBUtilsModule) in `sd:/wiiu/environments/[ENVIRONMENT]/modules/setup`.
|
4. Requires the [WUHBUtilsModule](https://github.com/wiiu-env/WUHBUtilsModule) in `sd:/wiiu/environments/[ENVIRONMENT]/modules`.
|
||||||
5. Use [librpxloading](https://github.com/wiiu-env/librpxloader)
|
5. Use [librpxloading](https://github.com/wiiu-env/librpxloader)
|
||||||
|
|
||||||
## Buildflags
|
## Buildflags
|
||||||
|
@ -382,7 +382,7 @@ RPXLoaderStatus RL_GetVersion(RPXLoaderVersion *outVersion) {
|
|||||||
if (!outVersion) {
|
if (!outVersion) {
|
||||||
return RPX_LOADER_RESULT_INVALID_ARGUMENT;
|
return RPX_LOADER_RESULT_INVALID_ARGUMENT;
|
||||||
}
|
}
|
||||||
*outVersion = 2;
|
*outVersion = 3;
|
||||||
return RPX_LOADER_RESULT_SUCCESS;
|
return RPX_LOADER_RESULT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -398,6 +398,18 @@ RPXLoaderStatus RL_GetPathOfRunningExecutable(char *outBuffer, uint32_t outSize)
|
|||||||
return RPX_LOADER_RESULT_NOT_AVAILABLE;
|
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_PrepareLaunchFromSD);
|
||||||
WUMS_EXPORT_FUNCTION(RL_LaunchPreparedHomebrew);
|
WUMS_EXPORT_FUNCTION(RL_LaunchPreparedHomebrew);
|
||||||
WUMS_EXPORT_FUNCTION(RL_LaunchHomebrew);
|
WUMS_EXPORT_FUNCTION(RL_LaunchHomebrew);
|
||||||
@ -407,3 +419,4 @@ WUMS_EXPORT_FUNCTION(RL_EnableContentRedirection);
|
|||||||
WUMS_EXPORT_FUNCTION(RL_DisableContentRedirection);
|
WUMS_EXPORT_FUNCTION(RL_DisableContentRedirection);
|
||||||
WUMS_EXPORT_FUNCTION(RL_UnmountCurrentRunningBundle);
|
WUMS_EXPORT_FUNCTION(RL_UnmountCurrentRunningBundle);
|
||||||
WUMS_EXPORT_FUNCTION(RL_GetPathOfRunningExecutable);
|
WUMS_EXPORT_FUNCTION(RL_GetPathOfRunningExecutable);
|
||||||
|
WUMS_EXPORT_FUNCTION(RL_GetPathOfSaveRedirection);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
|
|
||||||
RPXLoader_ReplacementInformation gReplacementInfo __attribute__((section(".data")));
|
RPXLoader_ReplacementInformation gReplacementInfo = {};
|
||||||
CRLayerHandle contentLayerHandle __attribute__((section(".data"))) = 0;
|
CRLayerHandle contentLayerHandle = 0;
|
||||||
CRLayerHandle saveLayerHandle __attribute__((section(".data"))) = 0;
|
CRLayerHandle saveLayerHandle = 0;
|
||||||
|
std::string gActiveSaveRedirectionPath;
|
@ -53,4 +53,5 @@ typedef struct RPXLoader_ReplacementInformation_t {
|
|||||||
extern RPXLoader_ReplacementInformation gReplacementInfo;
|
extern RPXLoader_ReplacementInformation gReplacementInfo;
|
||||||
|
|
||||||
extern CRLayerHandle contentLayerHandle;
|
extern CRLayerHandle contentLayerHandle;
|
||||||
extern CRLayerHandle saveLayerHandle;
|
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 <wuhb_utils/utils.h>
|
||||||
#include <wums.h>
|
#include <wums.h>
|
||||||
|
|
||||||
#define VERSION "v0.3.2"
|
#define VERSION "v0.3.4"
|
||||||
|
|
||||||
WUMS_MODULE_EXPORT_NAME("homebrew_rpx_loader");
|
WUMS_MODULE_EXPORT_NAME("homebrew_rpx_loader");
|
||||||
WUMS_USE_WUT_DEVOPTAB();
|
WUMS_USE_WUT_DEVOPTAB();
|
||||||
@ -91,6 +91,8 @@ WUMS_APPLICATION_STARTS() {
|
|||||||
gReplacementInfo.lastFileLoaded[0] = '\0';
|
gReplacementInfo.lastFileLoaded[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gActiveSaveRedirectionPath.clear();
|
||||||
|
|
||||||
if (_SYSGetSystemApplicationTitleId(SYSTEM_APP_ID_HEALTH_AND_SAFETY) == OSGetTitleID() &&
|
if (_SYSGetSystemApplicationTitleId(SYSTEM_APP_ID_HEALTH_AND_SAFETY) == OSGetTitleID() &&
|
||||||
strlen(gReplacementInfo.contentReplacementInfo.bundleMountInformation.toMountPath) > 0) {
|
strlen(gReplacementInfo.contentReplacementInfo.bundleMountInformation.toMountPath) > 0) {
|
||||||
uint32_t currentHash = StringTools::hash(gReplacementInfo.contentReplacementInfo.bundleMountInformation.toMountPath);
|
uint32_t currentHash = StringTools::hash(gReplacementInfo.contentReplacementInfo.bundleMountInformation.toMountPath);
|
||||||
@ -100,10 +102,11 @@ WUMS_APPLICATION_STARTS() {
|
|||||||
nn::act::PersistentId persistentId = nn::act::GetPersistentId();
|
nn::act::PersistentId persistentId = nn::act::GetPersistentId();
|
||||||
nn::act::Finalize();
|
nn::act::Finalize();
|
||||||
|
|
||||||
std::string basePath = string_format("fs:/vol/external01/wiiu/apps/save/%08X", currentHash);
|
std::string relativePath = string_format("wiiu/apps/save/%08X", currentHash);
|
||||||
if (!shortNameSanitized.empty()) {
|
if (!shortNameSanitized.empty()) {
|
||||||
basePath += string_format(" (%s)", shortNameSanitized.c_str());
|
relativePath += string_format(" (%s)", shortNameSanitized.c_str());
|
||||||
}
|
}
|
||||||
|
std::string basePath = "fs:/vol/external01/" + relativePath;
|
||||||
|
|
||||||
std::string common = basePath + "/common";
|
std::string common = basePath + "/common";
|
||||||
std::string user = basePath + string_format("/%08X", 0x80000000 | persistentId);
|
std::string user = basePath + string_format("/%08X", 0x80000000 | persistentId);
|
||||||
@ -145,6 +148,8 @@ WUMS_APPLICATION_STARTS() {
|
|||||||
gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted = true;
|
gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted = true;
|
||||||
gReplacementInfo.contentReplacementInfo.bundleMountInformation.toMountPath[0] = '\0';
|
gReplacementInfo.contentReplacementInfo.bundleMountInformation.toMountPath[0] = '\0';
|
||||||
|
|
||||||
|
gActiveSaveRedirectionPath = relativePath;
|
||||||
|
|
||||||
OSMemoryBarrier();
|
OSMemoryBarrier();
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user