diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e88b29..a7b85a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/upload-artifact@master with: name: binary - path: "*.rpx" + path: "*.wuhb" deploy-binary: needs: build-binary runs-on: ubuntu-18.04 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 8e28a5f..d987c9b 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -21,4 +21,4 @@ jobs: - uses: actions/upload-artifact@master with: name: binary - path: "*.rpx" \ No newline at end of file + path: "*.wuhb" \ No newline at end of file diff --git a/.gitignore b/.gitignore index d1cd803..5d4d980 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ build/ *.rpx *.elf CMakeLists.txt +*.wuhb diff --git a/Dockerfile b/Dockerfile index 8bd4fe3..6851869 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM wiiuenv/devkitppc:20210101 +FROM wiiuenv/devkitppc:20210917 COPY --from=wiiuenv/libiosuhax:20210109 /artifacts $DEVKITPRO -COPY --from=devkitpro/devkitarm:20200730 $DEVKITPRO/devkitARM $DEVKITPRO/devkitARM +COPY --from=wiiuenv/devkitarm:20210917 $DEVKITPRO/devkitARM $DEVKITPRO/devkitARM ENV DEVKITARM=/opt/devkitpro/devkitARM diff --git a/Makefile b/Makefile index 1f8d2b4..842661b 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,15 @@ endif TOPDIR ?= $(CURDIR) +#------------------------------------------------------------------------------- +# APP_NAME sets the long name of the application +# APP_SHORTNAME sets the short name of the application +# APP_AUTHOR sets the author of the application +#------------------------------------------------------------------------------- +APP_NAME := Aroma Installer +APP_SHORTNAME := Aroma Installer +APP_AUTHOR := Maschell, rw, GaryOderNichts + include $(DEVKITPRO)/wut/share/wut_rules #------------------------------------------------------------------------------- @@ -16,6 +25,10 @@ include $(DEVKITPRO)/wut/share/wut_rules # SOURCES is a list of directories containing source code # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files +# CONTENT is the path to the bundled folder that will be mounted as /vol/content/ +# ICON is the game icon, leave blank to use default rule +# TV_SPLASH is the image displayed during bootup on the TV, leave blank to use default rule +# DRC_SPLASH is the image displayed during bootup on the DRC, leave blank to use default rule #------------------------------------------------------------------------------- TARGET := AromaInstaller BUILD := build @@ -23,8 +36,11 @@ SOURCES := source \ source/common \ source/utils \ source/fs -DATA := data INCLUDES := include source +CONTENT := meta +ICON := meta/icon.jpg +TV_SPLASH := meta/icon.jpg +DRC_SPLASH := meta/icon.jpg #------------------------------------------------------------------------------- # options for code generation @@ -66,7 +82,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))) -BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) #------------------------------------------------------------------------------- # use CXX for linking C++ projects, CC for standard C @@ -93,6 +108,34 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) +ifneq (,$(strip $(CONTENT))) + export APP_CONTENT := $(TOPDIR)/$(CONTENT) +endif + +ifneq (,$(strip $(ICON))) + export APP_ICON := $(TOPDIR)/$(ICON) +else ifneq (,$(wildcard $(TOPDIR)/$(TARGET).png)) + export APP_ICON := $(TOPDIR)/$(TARGET).png +else ifneq (,$(wildcard $(TOPDIR)/icon.png)) + export APP_ICON := $(TOPDIR)/icon.png +endif + +ifneq (,$(strip $(TV_SPLASH))) + export APP_TV_SPLASH := $(TOPDIR)/$(TV_SPLASH) +else ifneq (,$(wildcard $(TOPDIR)/tv-splash.png)) + export APP_TV_SPLASH := $(TOPDIR)/tv-splash.png +else ifneq (,$(wildcard $(TOPDIR)/splash.png)) + export APP_TV_SPLASH := $(TOPDIR)/splash.png +endif + +ifneq (,$(strip $(DRC_SPLASH))) + export APP_DRC_SPLASH := $(TOPDIR)/$(DRC_SPLASH) +else ifneq (,$(wildcard $(TOPDIR)/drc-splash.png)) + export APP_DRC_SPLASH := $(TOPDIR)/drc-splash.png +else ifneq (,$(wildcard $(TOPDIR)/splash.png)) + export APP_DRC_SPLASH := $(TOPDIR)/splash.png +endif + .PHONY: $(BUILD) clean all #------------------------------------------------------------------------------- @@ -107,7 +150,7 @@ $(BUILD): clean: @echo clean ... make clean -C payload - @rm -fr $(BUILD) $(TARGET).rpx $(TARGET).elf + @rm -fr $(BUILD) $(TARGET).wuhb $(TARGET).rpx $(TARGET).elf #------------------------------------------------------------------------------- else @@ -124,11 +167,12 @@ DEPENDS := $(OFILES:.o=.d) safe_payload := ../payload/root.rpx -all : $(OUTPUT).rpx +all : $(OUTPUT).wuhb $(safe_payload): make -C ../payload +$(OUTPUT).wuhb : $(OUTPUT).rpx $(OUTPUT).rpx : $(OUTPUT).elf $(OUTPUT).elf : $(OFILES) $(OFILES) : safe_payload.h @@ -148,14 +192,6 @@ safe_payload.h: $(safe_payload) @sha1sum $(<) | cut -f1 -d' ' | tr -d '\n' >> $@ @printf '"' >> $@ -#------------------------------------------------------------------------------- -%.bin.o %_bin.h : %.bin -#------------------------------------------------------------------------------- - @echo $(notdir $<) - @$(bin2o) - --include $(DEPENDS) - #------------------------------------------------------------------------------- endif #------------------------------------------------------------------------------- diff --git a/meta/icon.jpg b/meta/icon.jpg new file mode 100644 index 0000000..1c13eef Binary files /dev/null and b/meta/icon.jpg differ diff --git a/payload b/payload index a69ec19..235642b 160000 --- a/payload +++ b/payload @@ -1 +1 @@ -Subproject commit a69ec191844f7dadbe43d9d81fc49fb0ff535b83 +Subproject commit 235642bab3466ff9c9785a1813aff89b2182c12d diff --git a/source/main.cpp b/source/main.cpp index fc3c750..47c8546 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -18,7 +18,7 @@ constexpr bool strings_equal(char const *a, char const *b) { return std::string_view(a) == b; } -static_assert(strings_equal(RPX_HASH, "97a13139ac1ddc266b1d1e4d6bb78438360b8d01"), "Built with an untested root.rpx! Remove this check if you really know what you're doing."); +static_assert(strings_equal(RPX_HASH, "cd4c1459d793a600d12afa33425f43be0cc5dfa3"), "Built with an untested root.rpx! Remove this check if you really know what you're doing."); void initIOSUHax();