Compare commits

...

13 Commits

Author SHA1 Message Date
Maschell
5239704327 Update Dockerfile 2024-05-05 16:36:17 +02:00
Maschell
176b1c06c4 Bump version 2024-04-25 16:58:07 +02:00
Maschell
2fb721d6d5 Update github actions 2024-04-25 16:58:07 +02:00
Maschell
a0913ed652 Update Dockerfile 2024-04-25 16:58:07 +02:00
dependabot[bot]
b6d28a891f Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-25 16:58:07 +02:00
Maschell
9eed09d8bf Update libromfs version in Dockerfile 2024-04-25 16:58:07 +02:00
Maschell
bafc8b69bf Update .gitignore to ignore zip files 2024-04-25 16:58:07 +02:00
Maschell
a31646fbfe Implement RL_GetPathOfSaveRedirection 2024-04-25 16:58:07 +02:00
Maschell
77c7db4ed9 Stop stroring global variables in data section 2024-04-25 16:58:07 +02:00
Maschell
626704d06f Create dependabot.yml 2023-07-23 10:26:17 +02:00
Maschell
a3eb1a27a6 Bump version 2023-07-19 18:24:03 +02:00
Maschell
49c938e7c9 Update Dockerfile 2023-07-19 16:27:29 +02:00
Maschell
92df19d02e Update README.md 2023-07-06 10:54:37 +02:00
10 changed files with 55 additions and 24 deletions

10
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

View File

@ -9,7 +9,7 @@ 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 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@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

View File

@ -6,7 +6,7 @@ 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 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@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
View File

@ -8,3 +8,4 @@ build/
cmake-build-debug/
CMakeLists.txt
*.wms
*.zip

View File

@ -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/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/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
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

View File

@ -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

View File

@ -382,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;
}
@ -398,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);
@ -407,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);

View File

@ -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;
#include "globals.h"
RPXLoader_ReplacementInformation gReplacementInfo = {};
CRLayerHandle contentLayerHandle = 0;
CRLayerHandle saveLayerHandle = 0;
std::string gActiveSaveRedirectionPath;

View File

@ -53,4 +53,5 @@ typedef struct RPXLoader_ReplacementInformation_t {
extern RPXLoader_ReplacementInformation gReplacementInfo;
extern CRLayerHandle contentLayerHandle;
extern CRLayerHandle saveLayerHandle;
extern CRLayerHandle saveLayerHandle;
extern std::string gActiveSaveRedirectionPath;

View File

@ -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 {