Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert xwbtool to use GNU-style long options #499

Merged
merged 2 commits into from
Oct 28, 2024
Merged

Conversation

walbourn
Copy link
Member

Embraces the -so vs. --long-option GNU-like pattern for the command-line tool.

This also adds -o=value which is the GNU standard and the tool already supported -o:value or -o value.

This is a hybrid of the Windows style and GNU-like pattern. For example, you can't combine single-characters together such as -yl with this tool like you can with GNU-style argument syntax. Not all multi-character options use -- which would be the GNU standard.

The tool already supports the -- escape so you can start filenames with / or -

@walbourn walbourn self-assigned this Oct 28, 2024
@walbourn walbourn added the tools Applies to MakeSpriteFont, xwbtool label Oct 28, 2024
@walbourn
Copy link
Member Author

The help output for meshconvert now reads:

Microsoft (R) XACT-style Wave Bank Tool [DirectXTK] Version 000 (library)
Copyright (C) Microsoft Corp.
*** Debug build ***

Usage: xwbtool <options> [--] <wav-files>

   -r                  wildcard filename search is recursive
   -flist <filename>, --file-list <filename>
                       use text file with a list of input files (one per line)

   -s, --streaming          creates a streaming wave bank,
                            otherwise an in-memory bank is created
   -af, --advanced-format   for streaming, use 4K instead of 2K alignment
                            (required for advanced format drives without 512e)

   -o <filename>            output filename
   -h <h-filename>          output C/C++ header
   -l, --to-lowercase       force output filename to lower case
   -y, --overwrite          overwrite existing output file (if any)

   -c, --compact            force creation of compact wavebank
   -nc, --no-compact        force creation of non-compact wavebank
   -f, --friendly-names     include entry friendly names
   -nologo                  suppress copyright message

   '-- ' is needed if any input filepath starts with the '-' or '/' character

@walbourn
Copy link
Member Author

@walbourn walbourn merged commit fabe5a1 into main Oct 28, 2024
55 checks passed
@walbourn walbourn deleted the gnucommandline branch October 28, 2024 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Applies to MakeSpriteFont, xwbtool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants