mirror of
https://github.com/wiiu-env/RPXLoadingModule.git
synced 2024-10-31 23:45:13 +01:00
Compare commits
16 Commits
RPXLoading
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
5239704327 | ||
|
176b1c06c4 | ||
|
2fb721d6d5 | ||
|
a0913ed652 | ||
|
b6d28a891f | ||
|
9eed09d8bf | ||
|
bafc8b69bf | ||
|
a31646fbfe | ||
|
77c7db4ed9 | ||
|
626704d06f | ||
|
a3eb1a27a6 | ||
|
49c938e7c9 | ||
|
92df19d02e | ||
|
6850128812 | ||
|
4e8c32aaf4 | ||
|
a387ba9f1e |
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"
|
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@ -9,15 +9,15 @@ jobs:
|
||||
clang-format:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: clang-format
|
||||
run: |
|
||||
docker run --rm -v ${PWD}:/src wiiuenv/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
|
||||
build-binary:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: clang-format
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- 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@v1"
|
||||
uses: "softprops/action-gh-release@v2"
|
||||
with:
|
||||
tag_name: ${{ env.REPOSITORY_NAME }}-${{ env.DATETIME }}
|
||||
draft: false
|
||||
|
8
.github/workflows/pr.yml
vendored
8
.github/workflows/pr.yml
vendored
@ -6,15 +6,15 @@ jobs:
|
||||
clang-format:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: clang-format
|
||||
run: |
|
||||
docker run --rm -v ${PWD}:/src wiiuenv/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
|
||||
check-build-with-logging:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: clang-format
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- 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@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: create version.h
|
||||
run: |
|
||||
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/
|
||||
CMakeLists.txt
|
||||
*.wms
|
||||
*.zip
|
||||
|
16
Dockerfile
16
Dockerfile
@ -1,11 +1,11 @@
|
||||
FROM wiiuenv/devkitppc:20221228
|
||||
FROM ghcr.io/wiiu-env/devkitppc:20240505
|
||||
|
||||
COPY --from=wiiuenv/librpxloader:20230218 /artifacts $DEVKITPRO
|
||||
COPY --from=wiiuenv/libfunctionpatcher:20230108 /artifacts $DEVKITPRO
|
||||
COPY --from=wiiuenv/wiiumodulesystem:20230106 /artifacts $DEVKITPRO
|
||||
COPY --from=wiiuenv/libwuhbutils:20220904 /artifacts $DEVKITPRO
|
||||
COPY --from=wiiuenv/libcontentredirection:20221010 /artifacts $DEVKITPRO
|
||||
COPY --from=wiiuenv/libromfs_wiiu:20220904 /artifacts $DEVKITPRO
|
||||
COPY --from=wiiuenv/libmocha:20220919 /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/wiiumodulesystem:20240424 /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
|
||||
|
||||
WORKDIR project
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
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`.
|
||||
3. Requires the [ContentRedirectionModule](https://github.com/wiiu-env/ContentRedirectionModule) in `sd:/wiiu/environments/[ENVIRONMENT]/modules/setup`.
|
||||
4. Requires the [WUHBUtilsModule](https://github.com/wiiu-env/WUHBUtilsModule) 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`.
|
||||
5. Use [librpxloading](https://github.com/wiiu-env/librpxloader)
|
||||
|
||||
## Buildflags
|
||||
@ -37,4 +37,4 @@ docker run -it --rm -v ${PWD}:/project rpxloadingmodule-builder make clean
|
||||
|
||||
## Format the code via docker
|
||||
|
||||
`docker run --rm -v ${PWD}:/src wiiuenv/clang-format:13.0.0-2 -r ./src -i`
|
||||
`docker run --rm -v ${PWD}:/src ghcr.io/wiiu-env/clang-format:13.0.0-2 -r ./src -i`
|
||||
|
@ -38,8 +38,9 @@ DECL_FUNCTION(int32_t, HBM_NN_ACP_ACPGetTitleMetaXmlByDevice, uint32_t titleid_u
|
||||
snprintf(metaxml->shortname_en, sizeof(metaxml->shortname_en), "%s", gReplacementInfo.rpxReplacementInfo.metaInformation.shortname);
|
||||
snprintf(metaxml->publisher_en, sizeof(metaxml->publisher_en), "%s", gReplacementInfo.rpxReplacementInfo.metaInformation.author);
|
||||
|
||||
// Disbale the emanual
|
||||
metaxml->e_manual = 0;
|
||||
// Disable the emanual
|
||||
metaxml->e_manual = 0;
|
||||
metaxml->closing_msg = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -381,7 +382,7 @@ RPXLoaderStatus RL_GetVersion(RPXLoaderVersion *outVersion) {
|
||||
if (!outVersion) {
|
||||
return RPX_LOADER_RESULT_INVALID_ARGUMENT;
|
||||
}
|
||||
*outVersion = 2;
|
||||
*outVersion = 3;
|
||||
return RPX_LOADER_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
@ -397,6 +398,18 @@ 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);
|
||||
@ -406,3 +419,4 @@ 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,5 +1,6 @@
|
||||
#include "globals.h"
|
||||
|
||||
RPXLoader_ReplacementInformation gReplacementInfo __attribute__((section(".data")));
|
||||
CRLayerHandle contentLayerHandle __attribute__((section(".data"))) = 0;
|
||||
CRLayerHandle saveLayerHandle __attribute__((section(".data"))) = 0;
|
||||
RPXLoader_ReplacementInformation gReplacementInfo = {};
|
||||
CRLayerHandle contentLayerHandle = 0;
|
||||
CRLayerHandle saveLayerHandle = 0;
|
||||
std::string gActiveSaveRedirectionPath;
|
@ -54,3 +54,4 @@ 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.2"
|
||||
#define VERSION "v0.3.4"
|
||||
|
||||
WUMS_MODULE_EXPORT_NAME("homebrew_rpx_loader");
|
||||
WUMS_USE_WUT_DEVOPTAB();
|
||||
@ -91,6 +91,8 @@ 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);
|
||||
@ -100,10 +102,11 @@ WUMS_APPLICATION_STARTS() {
|
||||
nn::act::PersistentId persistentId = nn::act::GetPersistentId();
|
||||
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()) {
|
||||
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 user = basePath + string_format("/%08X", 0x80000000 | persistentId);
|
||||
@ -145,6 +148,8 @@ 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