Commit Graph

904 Commits

Author SHA1 Message Date
David Korth
af94beb75e [debian] *.docs: Add NETWORK.md. 2025-06-16 21:39:55 -04:00
David Korth
690f4f99ba [qrvthtool] QRvtHToolWindow::closeRvtH(): Clear the status bar. 2025-06-16 21:38:37 -04:00
David Korth
1c9fadf673 [extlib] Add qtbase-6.8.3-win7.patch .
This is a diff between qtbase-6.8.3 upstream and the version from:
https://github.com/crystalidea/qt6windows7
2025-06-16 21:34:27 -04:00
David Korth
b2b4421515 NEWS.md: Cleaned up formatting; added more Qt information. 2025-06-16 21:33:05 -04:00
David Korth
266431070f [qrvthtool] qrvthtool.ico: Add 16-color versions of 48x48, 32x32, and 16x16.
These were created by tracing over the full-color versions.

These are mostly for testing icon directory display in rom-properties,
and likely won't actually be used.
2025-06-13 21:51:01 -04:00
David Korth
fb9d9f5a2e [qrvthtool] qrvthtool.ico: Optimize the PNG-format 256x256 image within the icon.
Had to do this manually via hex editor...

Size reduction: 23,520 -> 20,770 (-2,750)
2025-06-08 13:41:10 -04:00
David Korth
603243205e [qrvthtool] Set KAboutData.
TODO:
- Use KCrash, but it shows bugs.kde.org as the bug reporting address...
- KIO writes to qrvthtoolrc in ~/.config/, and it doesn't seem like
  there's any way to easily fix this, since KIO uses the default
  path (QStandardPaths::GenericConfigLocation) for KSharedConfig.
2025-06-07 11:21:33 -04:00
David Korth
a823d358d6 NETWORK.md: Add a file to indicate what network access is performed.
rvthtool (and other programs included with rvthtool) does not access the
network directly, but may access the network if you attempt to open files
located on network shares.

Install NETWORK.md in the documents directory.

[cmake] options.cmake: Add OPTION(INSTALL_DOC).
2025-06-01 13:11:52 -04:00
David Korth
6d70248b7d [qrvthtool] TranslationManager::enumerate(): MSVC 2015 doesn't like constexpr on QDir::Filters.
...though interestingly, *only* the 64-bit builds failed. 32-bit seemed
to handle it just fine.

src\qrvthtool\TranslationManager.cpp(231): error C2127: 'filters': illegal initialization of 'constexpr' entity with a non-constant expression
  c:\qt\5.13\msvc2015_64\include\qtcore\qdir.h(83): note: failure was because type 'QFlags<QDir::Filter>' is not a literal type (compiling source file src\qrvthtool\TranslationManager.cpp)
2025-05-30 21:47:45 -04:00
David Korth
a6cc86d6da appveyor.cmd: Switch to MSVC 2015 and Qt 5.13.
MSVC 2013 doesn't like the updated Google Test:

extlib\googletest\googletest\include\gtest/internal/gtest-port.h(2102):
	error C3409: empty attribute block is not allowed

Also, Qt 5.8 isn't present on AppVeyor anymore. Use Qt 5.13, which is
available for MSVC 2015.
2025-05-30 21:01:53 -04:00
David Korth
ef4532d1b6 [googletest] Update from 1.8.0 to 1.12.1.
Using changes from rom-properties, which includes building gtest as a
DLL on Windows.

This update fixes a bunch of -Wsuggest-override warnings, e.g.:

In file included from extlib/googletest/googletest/include/gtest/gtest-death-test.h:41,
                 from extlib/googletest/googletest/include/gtest/gtest.h:60,
                 from src/libwiicrypto/tests/CertVerifyTest.cpp:10:
extlib/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h:150:16: warning: ‘virtual bool testing::internal::DefaultDeathTestFactory::Create(const char*, const testing::internal::RE*, const char*, int, testing::internal::DeathTest**)’ can be marked override [-Wsuggest-override]
  150 |   virtual bool Create(const char* statement, const RE* regex,
      |                ^~~~~~
2025-05-30 20:19:21 -04:00
David Korth
c215903bde [librvth] rvth_error.c: Remove the '.' from the RVTH_ERROR_NDEV_GCN_NOT_SUPPORTED message.
FIXME: rvth_error.h's message comments don't all match rvth_error.c.

[locale] Update for these changes.
2025-05-30 19:47:38 -04:00
David Korth
5e7233cb89 [qrvthtool] TranslationManager::setTranslation(): Remove a stray ')' in the Qt5 build path.
lupdate noticed this:

src/qrvthtool/TranslationManager.cpp:155: Excess closing parenthesis in
C++ code (or abuse of the C++ preprocessor)

This fixes a regression from commit 4e0f741910.
([qrvthtool] TranslationManager: Made some adjustments, including removing translators before updating them.)
2025-05-30 19:43:49 -04:00
David Korth
84d2fae156 [qrvthtool] TranslationManager: Some more fiddling.
- Get the translation file info directly from d->prgTranslator, before
  installing it into the QCoreApplication.

- If tsLocale is empty, or is "1337", set it to "C".
2025-05-30 19:41:32 -04:00
David Korth
11cfd9cd62 [qrvthtool] TranslationManager: Set LANG and LC_ALL.
This helps a bit with KDE's Open dialog, but the "Cancel" button isn't
getting translated for some reason. Similarly, SelectDeviceDialog's
"OK" button isn't getting translated, and "Cancel" uses whatever the
LC_ALL value was on startup.
2025-05-30 19:25:08 -04:00
David Korth
4e0f741910 [qrvthtool] TranslationManager: Made some adjustments, including removing translators before updating them.
FIXME: qt_* and qtbase_* don't seem to be reloading properly when
changing the language at runtime, at least on Linux. Setting LC_ALL
seems to be the only way to get Qt's translations to switch.
2025-05-30 19:19:45 -04:00
David Korth
b8c7cc7c09 [qrvthtool] Add a cropped version of the 128x128 rvth.png image for AboutDialog.
This reduces wasted space in the dialog.

NOTE: This file is *not* installed as part of the icon theme. It's only
compiled into the executable as part of hw.qrc.
2025-05-30 19:07:01 -04:00
David Korth
afa93e5950 [librvth] RvtH::verifyWiiPartitions(): Use a struct for the hash error count.
Essentially the same as an array, but more explicit.
2025-05-30 18:52:40 -04:00
David Korth
76746231ca Use std::array<> in more places.
This lets us get rid of a few NULL terminators, too.
2025-05-30 18:47:47 -04:00
David Korth
cb09464faa [qrvthtool] Switch from foreach() to range-based for loops. 2025-05-30 18:39:19 -04:00
David Korth
35505dc1ed [qrvthtool] TranslationManager: Also load qtbase_*.qm.
qtbase_*.qm has some POSIX error codes, which still need to be handled
properly in qrvthtool.
2025-05-30 18:36:18 -04:00
David Korth
8d34c3e3dd [librvth] rvth_error.c: Mark RVT-H error strings for Qt localization.
[locale] Update for these changes.

[qrvthtool] Update for localized RVT-H error strings:

- WorkerObject: Don't include the error code in the message when
  emitting finished().

- QRvtHWindow: Handle RVT-H error codes better:
  - If -ECANCELED is returned, show the message as-is, since the operation
    was cancelled.
  - If it's an RVT-H error, use QCoreApplication::translate() with the
    "RvtH|Error" context and rvth_error(err) string.
  - If it's a POSIX error, use rvth_error() anyway for now.

FIXME: Need to properly translate POSIX errors.
2025-05-30 18:35:04 -04:00
David Korth
3a0c7f6632 [qrvthtool] WorkerObject: Consolidate various error messages.
Use a '%1' placeholder for "doExtract" and "doImport", since the messages
are all the same except for the function name.

[locale] Update localizations for this change.
2025-05-30 00:02:34 -04:00
David Korth
039d225794 [locale] rvthtool_de.ts: Initial German translation.
German translation provided by crediar and Moddimation.

[qrvthtool] AboutDialog.cpp: Add German translation credits.
2025-05-29 23:36:26 -04:00
David Korth
4e769ef07c [qrvthtool] Update Oxygen icons to v6.1.0.
Includes icon optimization using optipng, advdef, and oxipng.
2025-05-29 23:23:28 -04:00
David Korth
ccb22bc8e1 [qrvthtool] FormatSize: Consolidate the size formatting code into a single file.
This consolidates the code and translations from BankEntryView and
SelectDeviceDialog,

[locale] Update localizations for this change.
2025-05-29 23:18:54 -04:00
David Korth
fafc331c26 [qrvthtool] Use process-stop for the "Cancel" button icon.
dialog-close is black in the KDE Breeze theme.
process-stop is red.

Add process-stop from KDE Oxygen.

Un-indent some stuff and add more braces.

Fix "~/." for the home directory, similar to "./." for the
application directory.
2025-05-29 23:01:34 -04:00
David Korth
e36c938ced [qrvthtool] QRvtHToolWindowPrivate::updateGrpBankListTitle(): Remove the TODO about adding an option to hide the serial number. 2025-05-26 20:26:55 -04:00
David Korth
c78ecdfa21 [qrvthtool] QRvtHToolWindow.cpp: Restore a few changes that were actually useful. 2025-05-26 19:48:22 -04:00
David Korth
be390d9258 Revert "[qrvthtool] QRvtHToolWindow.cpp: Forgot to commit this file in the maskDeviceSerialNumbers commit."
I *did* commit this file, but something screwed up when I reverted some
changes locally but didn't commit them...

This reverts commit da6fee3603.
2025-05-26 19:47:21 -04:00
David Korth
44886ecc95 [locale] Updated the translation files using lupdate.sh. 2025-05-26 19:46:21 -04:00
David Korth
da6fee3603 [qrvthtool] QRvtHToolWindow.cpp: Forgot to commit this file in the maskDeviceSerialNumbers commit.
See commit: a976decd6c
([qrvthtool] Add an option to mask the last 5 digits of the RVT-H Reader serial number.)
2025-05-26 19:45:24 -04:00
David Korth
59f5ecf497 [qrvthtool] QRvtHToolWindow.ui: Remove splitterInfo.
Leftover from mcrecover.
2025-05-26 15:32:59 -04:00
David Korth
9f3f9b3bf7 [qrvthtool] QRvtHToolWindow.ui: Shorten the toolTip/statusTip for actionMaskDeviceSerialNumbers.
TODO: Add statusTip for other menu actions?
2025-05-26 15:21:43 -04:00
David Korth
82af365205 [qrvthtool] ConfigStore::set(): Also prevent deadlocks here. 2025-05-26 15:13:37 -04:00
David Korth
a976decd6c [qrvthtool] Add an option to mask the last 5 digits of the RVT-H Reader serial number.
Useful for screenshots.

The digits are replaced with 'x'.
2025-05-26 15:13:10 -04:00
David Korth
fd77b7a024 [qrvthtool] Show the window before attempting to open the RVT-H Reader.
This noticeably reduces lag when starting qrvthtool with a device name
specified on the command line.
2025-05-26 14:55:43 -04:00
David Korth
93b442a8ed [qrvthtool] UnityLauncher::update(): FIXME: Broken on Qt6 for some reason...
It's crashing in QtDBus when built with Qt6. Not sure why.
2025-05-26 14:54:16 -04:00
David Korth
fd4a4ad0a9 [qrvthtool] ConfigStore::notifyAll(): Fix a deadlock if the config file has an invalid language tag.
The language tag is initially loaded by ConfigStore, but when notifyAll()
is called, LanguageMenu realizes it's invalid and calls ConfigStore::set()
with an empty tag, which causes a deadlock due to d->mtxSignalMaps being
locked.

To fix this, populate a single vector of methods to invoke, then unlock
the mutex and invoke the methods.
2025-05-26 14:51:27 -04:00
David Korth
8d8925ed0b [qrvthtool] QRvtHToolWindow: Make use of 'lastPath' from ConfigStore.
PathFuncs::makeRelative(): WORKAROUND: Convert "./." to ".".

QRvtHToolWindow: Handle "." as the application directory.
2025-05-26 13:59:23 -04:00
David Korth
1cf87bc6fa [qrvthtool] ConfigDefaults: Make ValidationType a uint8_t.
This doesn't reduce any struct sizes, yet...
2025-05-26 13:48:10 -04:00
David Korth
5c45800816 [qrvthtool] ConfigDefaults: Move stuff to a private class.
Add an accessor to get all setting names, which is needed by ConfigStore.

ConfigStore: Use ConfigDefaults::getAllSettingNames().
2025-05-26 13:46:01 -04:00
David Korth
3f48d275b9 [qrvthtool] ConfigStorePrivate::Validate(): Use QVariant::canConvert(QMetaType::Type) on Qt6. 2025-05-26 13:19:34 -04:00
David Korth
5e6c8b6078 [qrvthtool] ConfigStore: Convert settingsMap to std::map<>. 2025-05-26 13:16:21 -04:00
David Korth
7cb1e7f4f0 [qrvthtool] ConfigStore: Convert signalMaps to C++ STL classes.
Also make use of references instead of pointers to reduce malloc() and
dereferencing overhead.
2025-05-26 13:07:42 -04:00
David Korth
b29fb9f0b1 [qrvthtool] Initial port of ConfigStore and ConfigDefaults from mcrecover.
Currently only handles the language code. lastPath is present, but isn't
set up yet.

LanguageMenu: Skip languages with an empty name. These are placeholder
translations that don't have any actual data yet.
2025-05-26 12:44:01 -04:00
David Korth
fa966aef95 [qrvthtool] CMakeLists.txt: Enable CMAKE_AUTOMOC.
This eliminates the need to explicitly use QT_WRAP_CPP().
2025-05-26 12:16:00 -04:00
David Korth
a884372d37 appveyor.yml: Switch the Linux image from 'Ubuntu' (18.04) to 'Ubuntu2204'.
The Linux builds have been failing for a while due to an image
configuration issue, and seemingly no one at AppVeyor has noticed:

W: GPG error: https://dl.google.com/linux/chrome/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 32EE5355A6BC6E42
E: The repository 'https://dl.google.com/linux/chrome/deb stable InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
2025-05-24 15:09:33 -04:00
David Korth
589856cd94 [rvthtool] mainc.: Move 'show-table' to below 'verify'.
It's a debugging command that likely won't be used often, so it shouldn't
be the second command in the list.
2025-05-22 23:55:01 -04:00
David Korth
96627e10bd [rvthtool] show-table.cpp, print_table(): Show a raw view of the entire header sector.
Not just header->unk[].

Also, print the offset at the beginning of the line and print
16 bytes per line instead of 12.
2025-05-22 23:46:03 -04:00