diff --git a/Dockerfile b/Dockerfile index 0c0da5e..c5db12e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -FROM wiiuenv/devkitppc:20220806 +FROM wiiuenv/devkitppc:20221228 COPY --from=wiiuenv/librpxloader:20220903 /artifacts $DEVKITPRO COPY --from=wiiuenv/libfunctionpatcher:20220904 /artifacts $DEVKITPRO -COPY --from=wiiuenv/wiiumodulesystem:20220904 /artifacts $DEVKITPRO -COPY --from=wiiuenv/libwuhbutils:20220903 /artifacts $DEVKITPRO -COPY --from=wiiuenv/libcontentredirection:20220903 /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:20220903 /artifacts $DEVKITPRO +COPY --from=wiiuenv/libmocha:20220919 /artifacts $DEVKITPRO WORKDIR project diff --git a/Makefile b/Makefile index af7d12e..b1959c8 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__ CXXFLAGS := $(CFLAGS) -std=c++20 ASFLAGS := -g $(ARCH) -LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map) -T$(WUMS_ROOT)/share/libfunctionpatcher.ld -Tcontentredirection.ld -Twuhbutils.ld $(WUMSSPECS) +LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map) -T$(WUMS_ROOT)/share/libfunctionpatcher.ld $(WUMSSPECS) ifeq ($(DEBUG),1) CXXFLAGS += -DDEBUG -g @@ -77,7 +77,6 @@ export DEPSDIR := $(CURDIR)/$(BUILD) CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) -DEFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.def))) BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) #------------------------------------------------------------------------------- @@ -95,7 +94,7 @@ endif #------------------------------------------------------------------------------- export OFILES_BIN := $(addsuffix .o,$(BINFILES)) -export OFILES_SRC := $(DEFFILES:.def=.o) $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) +export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) export OFILES := $(OFILES_BIN) $(OFILES_SRC) export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES))) @@ -139,11 +138,7 @@ $(OFILES_SRC) : $(HFILES_BIN) #------------------------------------------------------------------------------- # you need a rule like this for each extension you use as binary data #------------------------------------------------------------------------------- -%.o: %.def - $(SILENTMSG) $(notdir $<) - $(SILENTCMD)rplimportgen $< $*.s $*.ld $(ERROR_FILTER) - $(SILENTCMD)$(CC) -x assembler-with-cpp $(ASFLAGS) -c $*.s -o $@ $(ERROR_FILTER) - + #--------------------------------------------------------------------------------- %_bin.h %.bin.o : %.bin #--------------------------------------------------------------------------------- diff --git a/src/contentredirection.def b/src/contentredirection.def deleted file mode 100644 index dfb89dc..0000000 --- a/src/contentredirection.def +++ /dev/null @@ -1,4 +0,0 @@ -:NAME homebrew_content_redirection - -:TEXT -CRGetVersion \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 612890c..ef77eb5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,8 +21,9 @@ WUMS_MODULE_EXPORT_NAME("homebrew_rpx_loader"); WUMS_USE_WUT_DEVOPTAB(); -extern "C" ContentRedirectionApiErrorType CRGetVersion(ContentRedirectionVersion *); -extern "C" WUHBUtilsApiErrorType WUU_GetVersion(WUHBUtilsVersion *); +WUMS_DEPENDS_ON(homebrew_content_redirection); +WUMS_DEPENDS_ON(homebrew_wuhb_utils); +WUMS_DEPENDS_ON(homebrew_functionpatcher); WUMS_INITIALIZE() { initLogging(); @@ -35,20 +36,12 @@ WUMS_INITIALIZE() { DEBUG_FUNCTION_LINE("Patch functions finished"); gReplacementInfo = {}; - // Call this function to make sure the Content Redirection will be loaded before this module is module. - CRGetVersion(nullptr); - - // Call this function to make sure the WUHBUtils will be loaded before this module is module. - WUU_GetVersion(nullptr); - - // But then use libcontentredirection instead. ContentRedirectionStatus error; if ((error = ContentRedirection_InitLibrary()) != CONTENT_REDIRECTION_RESULT_SUCCESS) { DEBUG_FUNCTION_LINE_ERR("Failed to init ContentRedirection. Error %d", error); OSFatal("Failed to init ContentRedirection."); } - // But then use libwuhbutils instead. WUHBUtilsStatus error2; if ((error2 = WUHBUtils_InitLibrary()) != WUHB_UTILS_RESULT_SUCCESS) { DEBUG_FUNCTION_LINE_ERR("Failed to init WUHBUtils. Error %d", error2); diff --git a/src/wuhbutils.def b/src/wuhbutils.def deleted file mode 100644 index 8b36e94..0000000 --- a/src/wuhbutils.def +++ /dev/null @@ -1,4 +0,0 @@ -:NAME homebrew_wuhb_utils - -:TEXT -WUU_GetVersion \ No newline at end of file