Fix updating the Aroma Updater when running the Aroma Updater

This commit is contained in:
Maschell 2023-01-26 20:21:58 +01:00
parent 9a1cf20366
commit a668be2920
4 changed files with 14 additions and 1 deletions

View File

@ -1,5 +1,6 @@
FROM wiiuenv/devkitppc:20221228 FROM wiiuenv/devkitppc:20221228
COPY --from=wiiuenv/libmocha:20220919 /artifacts $DEVKITPRO COPY --from=wiiuenv/libmocha:20220919 /artifacts $DEVKITPRO
COPY --from=wiiuenv/librpxloader:20220903 /artifacts $DEVKITPRO
WORKDIR /project WORKDIR /project

View File

@ -63,7 +63,7 @@ CXXFLAGS += -DDEBUG -DVERBOSE_DEBUG -g
CFLAGS += -DDEBUG -DVERBOSE_DEBUG -g CFLAGS += -DDEBUG -DVERBOSE_DEBUG -g
endif endif
LIBS :=-lcurl -lmbedtls -lmbedx509 -lmbedcrypto -lz -lmocha -lwut LIBS :=-lcurl -lmbedtls -lmbedx509 -lmbedcrypto -lz -lmocha -lrpxloader -lwut
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level # list of directories containing libraries, this must be the top level

View File

@ -96,6 +96,7 @@ bool RenameCurrentToOld(const std::vector<VersionCheck::RepositoryFile> &filesTo
// rename file to ".temp.old" // rename file to ".temp.old"
DEBUG_FUNCTION_LINE("Rename %s to %s", pathOnSDCard.c_str(), pathOnSDCardOld.c_str()); DEBUG_FUNCTION_LINE("Rename %s to %s", pathOnSDCard.c_str(), pathOnSDCardOld.c_str());
if (rename(pathOnSDCard.c_str(), pathOnSDCardOld.c_str()) < 0) { if (rename(pathOnSDCard.c_str(), pathOnSDCardOld.c_str()) < 0) {
DEBUG_FUNCTION_LINE_ERR("Failed to rename %s to %s", pathOnSDCard.c_str(), pathOnSDCardOld.c_str());
allSuccessful = false; allSuccessful = false;
break; break;
} }

View File

@ -8,6 +8,7 @@
#include <coreinit/energysaver.h> #include <coreinit/energysaver.h>
#include <filesystem> #include <filesystem>
#include <mocha/mocha.h> #include <mocha/mocha.h>
#include <rpxloader/rpxloader.h>
#include <sndcore2/core.h> #include <sndcore2/core.h>
#include <whb/proc.h> #include <whb/proc.h>
@ -59,6 +60,16 @@ int main() {
DEBUG_FUNCTION_LINE_ERR("Mocha_InitLibrary() failed %d", mochaInitResult); DEBUG_FUNCTION_LINE_ERR("Mocha_InitLibrary() failed %d", mochaInitResult);
} }
RPXLoaderStatus resRPX;
if ((resRPX = RPXLoader_InitLibrary()) == RPX_LOADER_RESULT_SUCCESS) {
if ((resRPX = RPXLoader_UnmountCurrentRunningBundle()) != RPX_LOADER_RESULT_SUCCESS) {
DEBUG_FUNCTION_LINE_ERR("RPXLoader_UnmountCurrentRunningBundle failed: %d, %s", resRPX, RPXLoader_GetStatusStr(resRPX));
}
RPXLoader_DeInitLibrary();
} else {
DEBUG_FUNCTION_LINE_ERR("RPXLoader_InitLibrary failed %d %s", resRPX, RPXLoader_GetStatusStr(resRPX));
}
uint32_t isAPDEnabled; uint32_t isAPDEnabled;
IMIsAPDEnabled(&isAPDEnabled); IMIsAPDEnabled(&isAPDEnabled);