From 181255933e66d3327d503ba3b662467cfcc4c5e5 Mon Sep 17 00:00:00 2001 From: rw-r-r-0644 Date: Tue, 19 Feb 2019 22:40:06 +0100 Subject: [PATCH] Update README and change suggested install path --- README.md | 33 ++++++++++++++++++++++++++++++++ README.txt | 55 ------------------------------------------------------ 2 files changed, 33 insertions(+), 55 deletions(-) create mode 100644 README.md delete mode 100644 README.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..0b9d47b --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +## libromfs-wiiu + +### Informations +This library implements an embedded filesystem mountpoint for usage with devkitPPC aimed at the Nintendo Wii U. The implementations works by statically linking the romfs directory compressed with ustar to the executable. + +### Usage +Include library's header: `#include ` +Call `romfsInit()` at the start of you app and `romfsExit()` before exiting + +To generate the romfs, define a ROMFS variable in you makefile containing the path of your romfs folder: + + ROMFS := romfs_example_folder +Then, include romfs's makefile and add romfs target to your linking targets along with the ld flags (chage the example according to your makefile): + + include $(DEVKITPRO)/portlibs/wiiu/share/romfs-wiiu.mk + OBJECTS += $(ROMFS_TARGET) + LDFLAGS += $(ROMFS_LDFLAGS) + +### Installing +A prebuild version is available at the wiiu-fling pacman repository. +Please reffer to [these](https://gitlab.com/QuarkTheAwesome/wiiu-fling) instructions to set up wiiu-fling. + +To manually install the library: + + $ git clone https://github.com/yawut/libromfs-wiiu.git + $ cd libromfs-wiiu + $ mkdir build && cd build + $ cmake .. -DCMAKE_INSTALL_PREFIX=$DEVKITPRO/portlibs/wiiu + $ make + $ sudo make install + + + diff --git a/README.txt b/README.txt deleted file mode 100644 index adbfe6f..0000000 --- a/README.txt +++ /dev/null @@ -1,55 +0,0 @@ ---------------------------------------------------------------------------------- - libromfs-wiiu ---------------------------------------------------------------------------------- - -**** Informations **** -This library provides a romfs partition implementation for the Nintendo Wii U. -It's a special filesystem where files needed by applications can be stored in a -read-only manner and embedded into the executable (removing the need for additional -files on the sdcard). -It provides provides low latency and access times since files, once the app has loaded, -are stored in memory instead of being loaded from the sdcard. -This library is made for use with WUT - - -**** API **** - is the main header - - int32_t romfsInit(void) - Mounts app's romfs. Returns 0 if succesfull or a negative - value if there was an error - - int32_t romfsExit(void) - Unmounts app's romfs. Returns 0 if succesfull or a negative - value if there was an error - -romfs can be accessed trough normal file functions, -at the mountpoint "romfs:/" - - -**** Usage **** -[Usage may vary over time] - - Create a romfs folder in the source tree - - Edit your Makefile and add: - 1. A ROMFS variable, specifying the relative path to the romfs folder - 2. An "include $(WUT_ROOT)/share/romfs-wiiu.mk" (make sure - it's included *after* exporting the ROMFS variable or it won't work) - 3. $(ROMFS_TARGET) to target's dependencies and linked objects - 4. $(ROMFS_LDFLAGS) to app's LDFLAGS - - Add calls to romfsInit() and romfsExit() in your application's code - - -**** Installation **** -The library can be installed by running "make install" in this repo's root. - -By default the library will be installed to $WUT_ROOT. The installation path -can be customized with the INSTALLDIR parameter. - -Make sure you exported the $DEVKITPRO and $WUT_ROOT envrivrioment variables and -that $WUT_ROOT is writable. - - -**** Implementation **** -The library is currently implemented by having a tar filesystem built from a romfs folder -at compile time and then stored as a variable in .data with a fixed name (this is not an optimal -solution, and may change in the future). No compression is currently used.