rickomax / psxprev

PSXPREV - Playstation (PSX) Files Previewer/Extractor
BSD 2-Clause "Simplified" License
193 stars 10 forks source link

Revamp command line handling and add new options #61

Closed trigger-segfault closed 1 year ago

trigger-segfault commented 1 year ago

Short explanation

Command line arguments and command line help has been completely redone. Usage is now displayed in a more compact manner (<required> [optional]). A help message can now be displayed that shows the usage of all command line arguments. This same message has also been added to the README. DoScan now takes an argument of the class ScanOptions instead of all of its boolean arguments.

Added a few new command line options. The last three have also been added as checkboxes to the Launcher form. This implements issue #53.

Some issues have also been fixed:

The last change to handle threading with Application.Run would set the auto event before Application.Run was called, meaning the form may not have been ready, even if it was already assigned. This could cause issues where InvokeRequired would return false when it should have returned true. To fix this, the auto events are now set in a HandleCreated event. Unfortunately this will add a slight delay to the start of scanning, since it needs to wait for the Preview form to show. :(

Logger is now correctly assigned before Program attempts to use it when complaining that the path is not a file or directory.

Preview form's GetSelectedTexture would return null when passing a non-null index if the selected count was zero. Now it will only check the selected count if index is null.

*.user was mistakenly left commented out when .gitignore was added. This has been uncommented.

Preview of launcher window with new checkboxes ![image](https://github.com/rickomax/psxprev/assets/9752430/17be4b65-8792-4492-9291-ebce34acb7a1)

Detailed explanation

Program

Initialize

DoScan


LauncherForm


PreviewForm

GetSelectedTexture