diff --git a/account/Makefile b/account/Makefile index 62b45e7..0603dc8 100644 --- a/account/Makefile +++ b/account/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/app_controldata/Makefile b/app_controldata/Makefile index 62b45e7..0603dc8 100644 --- a/app_controldata/Makefile +++ b/app_controldata/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/audio/echo/Makefile b/audio/echo/Makefile index 71b6878..c24ded8 100644 --- a/audio/echo/Makefile +++ b/audio/echo/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/audio/playtone/Makefile b/audio/playtone/Makefile index 71b6878..c24ded8 100644 --- a/audio/playtone/Makefile +++ b/audio/playtone/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/fs/romfs/Makefile b/fs/romfs/Makefile index da8cfb6..9cb1b76 100644 --- a/fs/romfs/Makefile +++ b/fs/romfs/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -132,7 +133,7 @@ ifneq ($(APP_TITLEID),) endif ifneq ($(ROMFS),) - export NROFLAGS += --romfs=$(CURDIR)/$(ROMFS) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) endif .PHONY: $(BUILD) clean all diff --git a/fs/romfs/romfs b/fs/romfs/romfs deleted file mode 100644 index e69de29..0000000 diff --git a/fs/romfs/romfs/folder/file.txt b/fs/romfs/romfs/folder/file.txt new file mode 100644 index 0000000..7c81319 --- /dev/null +++ b/fs/romfs/romfs/folder/file.txt @@ -0,0 +1,6 @@ +Hello, this is the libnx romfs example. +This text is being read off a file in romfs. + + >>Switch Homebrew is Cool<< + +Signed off, fincs & WinterMute diff --git a/fs/romfs/romfs/フォルダ/ファイル.txt b/fs/romfs/romfs/フォルダ/ファイル.txt new file mode 100644 index 0000000..370c85b --- /dev/null +++ b/fs/romfs/romfs/フォルダ/ファイル.txt @@ -0,0 +1,2 @@ +The path to this file contains Unicode +characters that fall outside ASCII. diff --git a/fs/romfs/source/main.c b/fs/romfs/source/main.c index 3510a1f..b881995 100644 --- a/fs/romfs/source/main.c +++ b/fs/romfs/source/main.c @@ -1,5 +1,6 @@ #include #include +#include #include @@ -22,6 +23,8 @@ void printfile(const char* path) } printf(">>EOF<<\n"); fclose(f); + } else { + printf("errno is %d, %s\n", errno, strerror(errno)); } } diff --git a/fs/save/Makefile b/fs/save/Makefile index 62b45e7..0603dc8 100644 --- a/fs/save/Makefile +++ b/fs/save/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/fs/sdmc/Makefile b/fs/sdmc/Makefile index 62b45e7..0603dc8 100644 --- a/fs/sdmc/Makefile +++ b/fs/sdmc/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/graphics/printing/hello-world/Makefile b/graphics/printing/hello-world/Makefile index 62b45e7..0603dc8 100644 --- a/graphics/printing/hello-world/Makefile +++ b/graphics/printing/hello-world/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/graphics/printing/vt52-demo/Makefile b/graphics/printing/vt52-demo/Makefile index 62b45e7..0603dc8 100644 --- a/graphics/printing/vt52-demo/Makefile +++ b/graphics/printing/vt52-demo/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/graphics/simplegfx/Makefile b/graphics/simplegfx/Makefile index 62b45e7..0603dc8 100644 --- a/graphics/simplegfx/Makefile +++ b/graphics/simplegfx/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/hid/irsensor/Makefile b/hid/irsensor/Makefile index 62b45e7..0603dc8 100644 --- a/hid/irsensor/Makefile +++ b/hid/irsensor/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/hid/read-controls/Makefile b/hid/read-controls/Makefile index 62b45e7..0603dc8 100644 --- a/hid/read-controls/Makefile +++ b/hid/read-controls/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/hid/touch-screen/Makefile b/hid/touch-screen/Makefile index 62b45e7..0603dc8 100644 --- a/hid/touch-screen/Makefile +++ b/hid/touch-screen/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/hid/vibration/Makefile b/hid/vibration/Makefile index 62b45e7..0603dc8 100644 --- a/hid/vibration/Makefile +++ b/hid/vibration/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/settings/get_system_language/Makefile b/settings/get_system_language/Makefile index 62b45e7..0603dc8 100644 --- a/settings/get_system_language/Makefile +++ b/settings/get_system_language/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/templates/application/Makefile b/templates/application/Makefile index 62b45e7..0603dc8 100644 --- a/templates/application/Makefile +++ b/templates/application/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/time/Makefile b/time/Makefile index 62b45e7..0603dc8 100644 --- a/time/Makefile +++ b/time/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #--------------------------------------------------------------------------------- diff --git a/usb/usbds/Makefile b/usb/usbds/Makefile index 62b45e7..0603dc8 100644 --- a/usb/usbds/Makefile +++ b/usb/usbds/Makefile @@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files # EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". +# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. # NO_NACP: if set to anything, no .nacp file is generated. @@ -35,6 +36,7 @@ SOURCES := source DATA := data INCLUDES := include EXEFS_SRC := exefs_src +#ROMFS := romfs #--------------------------------------------------------------------------------- # options for code generation @@ -130,6 +132,10 @@ ifneq ($(APP_TITLEID),) export NACPFLAGS += --titleid=$(APP_TITLEID) endif +ifneq ($(ROMFS),) + export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS) +endif + .PHONY: $(BUILD) clean all #---------------------------------------------------------------------------------