Compare commits
5 Commits
cad78bc932
...
64787ea63d
Author | SHA1 | Date |
---|---|---|
Maschell | 64787ea63d | |
Maschell | 63b1bd02de | |
Maschell | 4653896ec8 | |
Maschell | b385dd013c | |
Maschell | 223bdc6c21 |
|
@ -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 ./source ./include
|
||||
|
@ -14,7 +14,7 @@ jobs:
|
|||
runs-on: ubuntu-22.04
|
||||
needs: clang-format
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: build lib
|
||||
run: |
|
||||
docker build . -f Dockerfile.buildlocal -t builder
|
||||
|
|
|
@ -3,29 +3,49 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
- '*-dev'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
clang-format-lib:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- 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 ./include ./source
|
||||
build-lib:
|
||||
runs-on: ubuntu-22.04
|
||||
needs: clang-format-lib
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: build binary
|
||||
run: |
|
||||
docker build . -f Dockerfile.buildlocal -t builder
|
||||
docker run --rm -v ${PWD}:/project builder make
|
||||
build-and-push-image:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-lib]
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value={{date 'YYYYMMDD'}}-{{sha}}
|
||||
type=raw,value={{date 'YYYYMMDD'}}
|
||||
type=raw,value=latest
|
||||
type=raw,value={{branch}}-{{date 'YYYYMMDD'}}-{{sha}},enable=${{ github.ref != format('refs/heads/{0}', 'main') }}
|
||||
type=raw,value={{date 'YYYYMMDD'}}-{{sha}},enable={{is_default_branch}}
|
||||
type=raw,value={{date 'YYYYMMDD'}},enable={{is_default_branch}}
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- name: Log into registry ${{ env.REGISTRY }}
|
||||
uses: docker/login-action@v2.1.0
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM ghcr.io/wiiu-env/devkitppc:20230621
|
||||
FROM ghcr.io/wiiu-env/devkitppc:20240423
|
||||
|
||||
WORKDIR tmp_build
|
||||
COPY . .
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
FROM ghcr.io/wiiu-env/devkitppc:20230621
|
||||
FROM ghcr.io/wiiu-env/devkitppc:20240423
|
||||
|
||||
WORKDIR project
|
2
Makefile
2
Makefile
|
@ -11,7 +11,7 @@ TOPDIR ?= $(CURDIR)
|
|||
include $(DEVKITPRO)/wut/share/wut_rules
|
||||
|
||||
export VER_MAJOR := 1
|
||||
export VER_MINOR := 2
|
||||
export VER_MINOR := 3
|
||||
export VER_PATCH := 0
|
||||
|
||||
VERSION := $(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)
|
||||
|
|
|
@ -148,7 +148,7 @@ RPXLoaderStatus RPXLoader_UnmountCurrentRunningBundle();
|
|||
*
|
||||
* @param outBuffer buffer where the result will be stored
|
||||
* @param outSize size of outBuffer
|
||||
* @return RPX_LOADER_RESULT_SUCCESS: The path of the currently running executable has been written to outBuffer
|
||||
* @return RPX_LOADER_RESULT_SUCCESS: The path of the currently running executable has been written to outBuffer. <br>
|
||||
* RPX_LOADER_RESULT_UNSUPPORTED_COMMAND: Command not supported by the currently loaded RPXLoaderModule version.<br>
|
||||
* RPX_LOADER_RESULT_INVALID_ARGUMENT: The given outBuffer was NULL or outSize was 0 <br>
|
||||
* RPX_LOADER_RESULT_LIB_UNINITIALIZED: "RPXLoader_Init()" was not called.<br>
|
||||
|
@ -156,6 +156,23 @@ RPXLoaderStatus RPXLoader_UnmountCurrentRunningBundle();
|
|||
*/
|
||||
RPXLoaderStatus RPXLoader_GetPathOfRunningExecutable(char *outBuffer, uint32_t outSize);
|
||||
|
||||
/**
|
||||
* Returns the path currently used for /vol/save redirection <br>
|
||||
* This function is not guaranteed to succeed, it only works if the executable is loaded via the RPXLoadingModule <br>
|
||||
* The returned path is relative to the root of the sd card. <br>
|
||||
* <br>
|
||||
* Requires API version 3 or higher. <br>
|
||||
*
|
||||
* @param outBuffer buffer where the result will be stored
|
||||
* @param outSize size of outBuffer
|
||||
* @return RPX_LOADER_RESULT_SUCCESS: The path of the /vol/save redirection has been written to outBuffer.<br>
|
||||
* RPX_LOADER_RESULT_UNSUPPORTED_COMMAND: Command not supported by the currently loaded RPXLoaderModule version.<br>
|
||||
* RPX_LOADER_RESULT_INVALID_ARGUMENT: The given outBuffer was NULL or outSize was 0 <br>
|
||||
* RPX_LOADER_RESULT_LIB_UNINITIALIZED: "RPXLoader_Init()" was not called.<br>
|
||||
* RPX_LOADER_RESULT_NOT_AVAILABLE: The path is not available.<br>
|
||||
*/
|
||||
RPXLoaderStatus RPXLoader_GetPathOfSaveRedirection(char *outBuffer, uint32_t outSize);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
|
@ -15,6 +15,7 @@ static RPXLoaderStatus (*sRLDisableContentRedirection)()
|
|||
static RPXLoaderStatus (*sRLEnableContentRedirection)() = nullptr;
|
||||
static RPXLoaderStatus (*sRLUnmountCurrentRunningBundle)() = nullptr;
|
||||
static RPXLoaderStatus (*sRL_GetPathOfRunningExecutable)(char *outBuffer, uint32_t outSize) = nullptr;
|
||||
static RPXLoaderStatus (*sRL_GetPathOfSaveRedirection)(char *outBuffer, uint32_t outSize) = nullptr;
|
||||
|
||||
const char *RPXLoader_GetStatusStr(RPXLoaderStatus status) {
|
||||
switch (status) {
|
||||
|
@ -93,6 +94,11 @@ RPXLoaderStatus RPXLoader_InitLibrary() {
|
|||
sRL_GetPathOfRunningExecutable = nullptr;
|
||||
}
|
||||
|
||||
if (OSDynLoad_FindExport(sModuleHandle, OS_DYNLOAD_EXPORT_FUNC, "RL_GetPathOfSaveRedirection", (void **) &sRL_GetPathOfSaveRedirection) != OS_DYNLOAD_OK) {
|
||||
DEBUG_FUNCTION_LINE_WARN("FindExport RL_GetPathOfSaveRedirection failed.");
|
||||
sRL_GetPathOfSaveRedirection = nullptr;
|
||||
}
|
||||
|
||||
return RPX_LOADER_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -193,4 +199,15 @@ RPXLoaderStatus RPXLoader_GetPathOfRunningExecutable(char *outBuffer, uint32_t o
|
|||
}
|
||||
|
||||
return reinterpret_cast<decltype(&RPXLoader_GetPathOfRunningExecutable)>(sRL_GetPathOfRunningExecutable)(outBuffer, outSize);
|
||||
}
|
||||
}
|
||||
|
||||
RPXLoaderStatus RPXLoader_GetPathOfSaveRedirection(char *outBuffer, uint32_t outSize) {
|
||||
if (rpxLoaderVersion == RPX_LOADER_MODULE_VERSION_ERROR) {
|
||||
return RPX_LOADER_RESULT_LIB_UNINITIALIZED;
|
||||
}
|
||||
if (sRL_GetPathOfSaveRedirection == nullptr || rpxLoaderVersion < 3) {
|
||||
return RPX_LOADER_RESULT_UNSUPPORTED_COMMAND;
|
||||
}
|
||||
|
||||
return reinterpret_cast<decltype(&RPXLoader_GetPathOfSaveRedirection)>(sRL_GetPathOfSaveRedirection)(outBuffer, outSize);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue