mirror of
https://github.com/wiiu-env/wiiload_plugin.git
synced 2024-11-22 10:39:16 +01:00
Directly use librpxloader
This commit is contained in:
parent
ed127ca84d
commit
c9ece3040d
@ -1,6 +1,7 @@
|
|||||||
FROM wiiuenv/devkitppc:20210101
|
FROM wiiuenv/devkitppc:20210101
|
||||||
|
|
||||||
COPY --from=wiiuenv/libwupsbackend:202101101720554d1bfe /artifacts $DEVKITPRO
|
COPY --from=wiiuenv/libwupsbackend:202101101720554d1bfe /artifacts $DEVKITPRO
|
||||||
|
COPY --from=wiiuenv/librpxloader:20210116 /artifacts $DEVKITPRO
|
||||||
COPY --from=wiiuenv/wiiupluginsystem:20210109 /artifacts $DEVKITPRO
|
COPY --from=wiiuenv/wiiupluginsystem:20210109 /artifacts $DEVKITPRO
|
||||||
|
|
||||||
WORKDIR project
|
WORKDIR project
|
7
Makefile
7
Makefile
@ -11,6 +11,7 @@ TOPDIR ?= $(CURDIR)
|
|||||||
include $(DEVKITPRO)/wups/share/wups_rules
|
include $(DEVKITPRO)/wups/share/wups_rules
|
||||||
|
|
||||||
WUT_ROOT := $(DEVKITPRO)/wut
|
WUT_ROOT := $(DEVKITPRO)/wut
|
||||||
|
WUMS_ROOT := $(DEVKITPRO)/wums
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# TARGET is the name of the output
|
# TARGET is the name of the output
|
||||||
@ -38,15 +39,15 @@ CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__ -D__WUPS__
|
|||||||
CXXFLAGS := $(CFLAGS) -std=gnu++17
|
CXXFLAGS := $(CFLAGS) -std=gnu++17
|
||||||
|
|
||||||
ASFLAGS := -g $(ARCH)
|
ASFLAGS := -g $(ARCH)
|
||||||
LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map) -T$(WUPS_ROOT)/share/libwupsbackend.ld $(WUPSSPECS)
|
LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map) -T$(WUPS_ROOT)/share/libwupsbackend.ld -T$(WUMS_ROOT)/share/librpxloader.ld $(WUPSSPECS)
|
||||||
|
|
||||||
LIBS := -lwups -lwut -lwupsbackend -lz
|
LIBS := -lwups -lwut -lwupsbackend -lz -lrpxloader
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# list of directories containing libraries, this must be the top level
|
# list of directories containing libraries, this must be the top level
|
||||||
# containing include and lib
|
# containing include and lib
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
LIBDIRS := $(PORTLIBS) $(WUPS_ROOT) $(WUT_ROOT)
|
LIBDIRS := $(PORTLIBS) $(WUPS_ROOT) $(WUT_ROOT) $(WUMS_ROOT)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# no real need to edit anything past this point unless you need to add additional
|
# no real need to edit anything past this point unless you need to add additional
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
Requires the [RPXLoadingModule](https://github.com/wiiu-env/RPXLoadingModule) to be loaded.
|
||||||
|
|
||||||
## Building using the Dockerfile
|
## Building using the Dockerfile
|
||||||
|
|
||||||
It's possible to use a docker image for building. This way you don't need anything installed on your host system.
|
It's possible to use a docker image for building. This way you don't need anything installed on your host system.
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <wups_backend/PluginUtils.h>
|
#include <wups_backend/PluginUtils.h>
|
||||||
#include <coreinit/debug.h>
|
#include <coreinit/debug.h>
|
||||||
#include <coreinit/cache.h>
|
#include <coreinit/cache.h>
|
||||||
|
#include <rpxloader.h>
|
||||||
|
|
||||||
#define RPX_TEMP_PATH "fs:/vol/external01/wiiu/apps/"
|
#define RPX_TEMP_PATH "fs:/vol/external01/wiiu/apps/"
|
||||||
#define RPX_TEMP_FILE "fs:/vol/external01/wiiu/apps/temp.rpx"
|
#define RPX_TEMP_FILE "fs:/vol/external01/wiiu/apps/temp.rpx"
|
||||||
@ -314,21 +315,8 @@ int32_t TcpReceiver::loadToMemory(int32_t clientSocket, uint32_t ipAddress) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (loadedRPX) {
|
if (loadedRPX) {
|
||||||
DEBUG_FUNCTION_LINE("Starting a homebrew title");
|
DEBUG_FUNCTION_LINE("Starting a homebrew title!");
|
||||||
OSDynLoad_Module module;
|
RL_LoadFromSDOnNextLaunch(file_path);
|
||||||
|
|
||||||
OSDynLoad_Error dyn_res = OSDynLoad_Acquire("homebrew_rpx_loader", &module);
|
|
||||||
if (dyn_res != OS_DYNLOAD_OK) {
|
|
||||||
OSFatal("Missing RPXLoader module");
|
|
||||||
}
|
|
||||||
|
|
||||||
bool (*loadRPXFromSDOnNextLaunch)(const std::string &path);
|
|
||||||
dyn_res = OSDynLoad_FindExport(module, false, "loadRPXFromSDOnNextLaunch", reinterpret_cast<void **>(&loadRPXFromSDOnNextLaunch));
|
|
||||||
if (dyn_res != OS_DYNLOAD_OK) {
|
|
||||||
OSFatal("Failed to find export loadRPXFromSDOnNextLaunch");
|
|
||||||
}
|
|
||||||
|
|
||||||
loadRPXFromSDOnNextLaunch(file_path);
|
|
||||||
|
|
||||||
uint64_t titleID = _SYSGetSystemApplicationTitleId(8);
|
uint64_t titleID = _SYSGetSystemApplicationTitleId(8);
|
||||||
_SYSLaunchTitleWithStdArgsInNoSplash(titleID, 0);
|
_SYSLaunchTitleWithStdArgsInNoSplash(titleID, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user