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)); } }