From 00fc8667f2794a4a2003f9ec6b12c80556bd24a7 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Thu, 16 Mar 2023 17:03:16 +0100 Subject: [PATCH] Update 'CLI Reference' --- CLI-Reference.md | 76 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 57 insertions(+), 19 deletions(-) diff --git a/CLI-Reference.md b/CLI-Reference.md index 479dced..2945d08 100644 --- a/CLI-Reference.md +++ b/CLI-Reference.md @@ -11,14 +11,15 @@ Commands: dictionary Manipulate a hash dictionary file. murmur Perform various operations on Murmur hashes. new Create a new project - watch Re-build the given directory on file changes. + package Package compiled bundles for distribution + watch Watch for file system changes and re-build the mod archive. help Print this message or the help of the given subcommand(s) Options: --dict Path to a dictionary file CSV format used to look up pre-computed murmur hashes. Will default to `dictionary.csv` in the current directory. [default: dictionary.csv] - -h, --help Print help information - -V, --version Print version information + -h, --help Print help + -V, --version Print version ``` **Tip:** @@ -38,7 +39,26 @@ Whenever a subcommand is expected, `help` can be given to produce the same outpu Builds the given mod project. -> Not yet implemented. +``` +$ dtmt build --help +Usage: dtmt build [OPTIONS] [directory] + +Arguments: + [directory] The path to the project to build. If omitted, dtmt will search from the current working directory upward. + +Options: + --dict Path to a dictionary file CSV format used to look up pre-computed murmur hashes. + Will default to `dictionary.csv` in the current directory. [default: dictionary.csv] + --oodle The oodle library to load. This may either be: + - A library name that will be searched for in the system's default paths. + - A file path relative to the current working directory. + - An absolute file path. + -o, --out The directory to write output files to. [default: out] + -d, --deploy If the path to the game (without the trailing '/bundle') is specified, deploy the newly built bundles. This will not adjust the bundle database or package files, so if files are added or removed, you will have to import into DTMM and re-deploy there. + -h, --help Print help +``` + +See [Building your first mod](Building-your-first-mod) for a guide on how to use this. ### Bundle @@ -60,10 +80,6 @@ Commands: Options: --dict Path to a dictionary file CSV format used to look up pre-computed murmur hashes. Will default to `dictionary.csv` in the current directory. [default: dictionary.csv] - --oodle The oodle library to load. This may either be: - - A library name that will be searched for in the system's default paths. - - A file path relative to the current working directory. - - An absolute file path. [default: liboo2corelinux64.so] -h, --help Print help information ``` @@ -80,15 +96,6 @@ Therefore, the content of all of the game's bundles can be listed at once, using dtmt bundle list "\bundle" ``` -#### Oodle Library - -The commands in this group require the Oodle compression library to work. A version compiled for Windows is shipped with the game (`binaries/oo2core_8_win64.dll`). For usage on Linux, see [Obtaining the Oodle library on Linux](Obtaining-the-Oodle-library-on-Linux). - -By default, DTMT will check the current working directory for the library compiled for the current operating system. However, you can use the `--oodle` flag to specify a custom name or path. - -- Specifying just a name (e.g. `--oodle different_lib.dll`) will search for that library in the system's default paths -- Specifying a relative or absolute file path will attempt to load that file as the library - #### Bundle Decompress @@ -227,10 +234,41 @@ Creates a Murmur hash from the given string. Creates a new mod project from the internal template. -> Not yet implemented. +``` +$ dtmt new --help +Usage: dtmt new [OPTIONS] [root] + +Arguments: + [root] The directory where to initialize the new project. This directory must be empty or must not exist. If omitted or `.` is given, the current directory will be used. + +Options: + --dict Path to a dictionary file CSV format used to look up pre-computed murmur hashes. + Will default to `dictionary.csv` in the current directory. [default: dictionary.csv] + --name The display name of the new mod. + -h, --help Print help +``` + +See [Building your first mod](Building-your-first-mod) for a guide on how to use this. ### Watch Watches the given mod project for file changes and re-builds it. -> Not yet implemented. \ No newline at end of file +``` +Usage: dtmt watch [OPTIONS] [debounce] [directory] + +Arguments: + [debounce] The delay to debounce events by. This avoids continously rebuilding on rapid file changes, such as version control checkouts. [default: 150] + [directory] The path to the project to build. If omitted, the current working directory is used. + +Options: + --dict Path to a dictionary file CSV format used to look up pre-computed murmur hashes. + Will default to `dictionary.csv` in the current directory. [default: dictionary.csv] + -o, --out The directory to write output files to. [default: out] + -d, --deploy If the path to the game (without the trailing '/bundle') is specified, deploy the newly built bundles. This will not adjust the bundle database or package files, so if files are added or removed, you will have to import into DTMM and re-deploy there. + -a, --archive The path to write the packaged file to. Will default to a file in the current working directory + -i, --ignore A directory or file path to ignore. May be specified multiple times. The values of 'out' and 'archive' are ignored automatically. + -h, --help Print help +``` + +See [Building your first mod](Building-your-first-mod) for a guide on how to use this. \ No newline at end of file