Commit Graph
20 Commits
Author SHA1 Message Date
Joshua Vandaële c7f2cca6e5 DolphinTool: Show choices as metavars, and don't lie about defaults
The previous `%choices` string no longer works since cpp-optparse got updated. In a confusing turn of events, I believe cpp-optparse got renamed to cpp-argparse at some point in history, and a new cpp-optparse repository was made in its place as a fork of argparse before `%choices` was added to it, and picked up development without ever adding `%choices`. This lead to the breaking change not being documented anywhere in the commit history.

Showing it as a metavar matches the style of many GNU tools, this is how it renders:

```
$ ./Binaries/dolphin-tool verify -h
Usage: verify [options]...

Options:
  -h, --help            show this help message and exit
  -u USER, --user=USER  User folder path, required for temporary processing
                        files. Will be automatically created if this option is
                        not set.
  -i FILE, --input=FILE
                        Path to input file.
  -a crc32|md5|sha1|rchash, --algorithm=crc32|md5|sha1|rchash
                        Optional. Compute and print the digest using the
                        selected algorithm, then exit.
```

Also we were lying about RVZ being a default value in the convert command.
2026-02-07 16:02:53 +01:00
Martino Fontana a14c88ba67 Remove unused imports
Yellow squiggly lines begone!
Done automatically on .cpp files through `run-clang-tidy`, with manual corrections to the mistakes.
If an import is directly used, but is technically unnecessary since it's recursively imported by something else, it is *not* removed.
The tool doesn't touch .h files, so I did some of them by hand while fixing errors due to old recursive imports.
Not everything is removed, but the cleanup should be substantial enough.
Because this done on Linux, code that isn't used on it is mostly untouched.
(Hopefully no open PR is depending on these imports...)
2026-01-25 16:12:15 +01:00
Dr. Dystopia 03a6fdcd85 DolphinTool: Make variables constant 2025-04-23 20:24:50 +02:00
Tillmann Karras 214756dd18 Small wording changes for dump conversions 2024-08-16 18:39:23 +01:00
Dentomologist a1d6a54eaa DolphinTool: Fix parsing of command line bzip2 flag
Use "bzip2" instead of "bzip" in optparse's compression choices for the
convert command. This is both more accurate and matches what the
ParseCompressionTypeString function expects.

The mismatch between the two parsing functions prevented compression
using bzip2 because either ParseCompressionTypeString or optparse would
generate an error when using "bzip" or "bzip2" respectively.

Fixes https://bugs.dolphin-emu.org/issues/13427
2024-02-13 12:44:03 -08:00
Admiral H. Curtiss 79d5850e6a Merge pull request #11960 from Minty-Meeo/dolphin-tool-code-review-4
DolphinTool: Use {fmt} library
2023-06-17 14:18:21 +02:00
get e67c196d2a DolphinTool: Less string copies 2023-06-16 21:51:06 -05:00
get 410c4ffe75 DolphinTool: Use {fmt} library 2023-06-16 21:45:59 -05:00
get 969eeb4b52 DolphinTool: Use EXIT_SUCCESS and EXIT_FAILURE 2023-06-16 21:00:10 -05:00
get 25c020cbe2 DolphinTool: Ditch OOP design 2023-06-16 20:39:16 -05:00
get 31e78c40a1 DolphinTool: Sensible changes 2023-06-16 18:28:03 -05:00
JosJuice a87dffe52d DiscIO: Replace IsDataSizeAccurate with GetDataSizeType
Previously, we had WBFS and CISO which both returned an upper bound
of the size, and other formats which returned an accurate size. But
now we also have NFS, which returns a lower bound of the size. To
allow VolumeVerifier to make better informed decisions for NFS, let's
use an enum instead of a bool for the type of data size a blob has.
2022-08-04 22:00:59 +02:00
Tillmann Karras 4b66ce6c4d DolphinTool: add missing spaces in help text 2022-05-02 12:19:01 +01:00
Admiral H. Curtiss 1a5a52c00c Merge pull request #10507 from JosJuice/convertcommand-non-gc-wii
DolphinTool: Allow converting non-GC/Wii files
2022-03-23 22:47:41 +01:00
JosJuice d0d27028a0 DolphinTool: Allow converting non-GC/Wii files
This was requested by a forum user, and I thought why not.
It's a simple change to make since DiscIO already supports it,
and I assume command-line users know roughly what they're doing.
2022-03-22 18:59:01 +01:00
Admiral H. Curtiss 7b0d5f2df3 Merge pull request #10491 from Minty-Meeo/dolphin-tool-more-stuff
More dolphin-tool features and options
2022-03-20 05:43:53 +01:00
Minty-Meeo deba9ce256 Added a way to check Block Size, Compression Method, and Compression Level flags to dolphin-tool
New dolphin-tool command: "header"
-b / --block_size
-c / --compression
-l / --compression_level

Informative RVZ/WIA header2 value "compression_level" is now a s32 instead of a u32, because negative compression is a thing.

Speaking of, it is now possible to use negative compression levels in dolphin-tool's convert command (not the GUI, though).
2022-03-19 17:13:28 -05:00
Jordan Woyak f711b8dbae DolphinTool: Kill an unnecessary unique_ptr. 2022-03-08 02:00:26 -06:00
ssdsnake 4d125064fe DolphinTool: initialize user directories (fix unintential deletion of Wii files) 2022-01-02 12:34:24 -06:00
ssdsnake 1aa8a4d46f DolphinTool: CLI utility interface and disc image tools 2021-12-03 15:40:19 -06:00