This commit is contained in:
Dave Murphy 2018-04-19 04:08:55 +00:00 committed by GitHub
commit 2e5f0f7e07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 1 deletions

View File

@ -16,6 +16,7 @@ include $(DEVKITPRO)/libnx/switch_rules
# DATA is a list of directories containing data files # DATA is a list of directories containing data files
# INCLUDES is a list of directories containing header 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". # 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_ICON: if set to anything, do not use icon.
# NO_NACP: if set to anything, no .nacp file is generated. # NO_NACP: if set to anything, no .nacp file is generated.
@ -132,7 +133,7 @@ ifneq ($(APP_TITLEID),)
endif endif
ifneq ($(ROMFS),) ifneq ($(ROMFS),)
export NROFLAGS += --romfs=$(CURDIR)/$(ROMFS) export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS)
endif endif
.PHONY: $(BUILD) clean all .PHONY: $(BUILD) clean all

View File

View File

@ -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

View File

@ -0,0 +1,2 @@
The path to this file contains Unicode
characters that fall outside ASCII.

View File

@ -1,5 +1,6 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h>
#include <switch.h> #include <switch.h>
@ -22,6 +23,8 @@ void printfile(const char* path)
} }
printf(">>EOF<<\n"); printf(">>EOF<<\n");
fclose(f); fclose(f);
} else {
printf("errno is %d, %s\n", errno, strerror(errno));
} }
} }