On KDE, with no icon set, it automatically uses the main window icon.
On Windows, it uses a generic icon instead.
Explicitly set the window icon to the RVT-H Reader icon.
- Set the default to "AUTO".
- For "AUTO", check for Qt6 first, then Qt5.
- Instead of linking to ${QT_NS}::WinMain, which doesn't exist on Qt6,
just don't set QtX_NO_LINK_QTMAIN. (This works for Qt5, too.)
- NOTE: Qt6 has QtEntryPoint instead.
The AppVeyor MSVC 2013 failed with this error:
src\qrvthtool\RvtHModel.cpp(162): error C2057: expected constant expression
This doesn't happen locally or with newer MSVC.
[static_assert() with an array::size(), which is constexpr.]
- Use std::array<> in some places.
- Use std::unique_ptr<> instead of manual memory management in some places.
- Use static_cast<> instead of C casting.
- Use nullptr instead of NULL.
- Use constexpr instead of macros in some places.
- Reduce the scope of some variables.
NETTLE_FOUND may be used to determine if libnettle should be
linked to other libraries and/or executables.
This fixes a regression from commit 03ce73c612.
([cmake] CheckNettle2or3.cmake: Convert the macro to a function.)
Otherwise, encryption will be disabled, even if Nettle is available.
This fixes a regression from commit 03ce73c612.
([cmake] CheckNettle2or3.cmake: Convert the macro to a function.)
Also, remove the ENABLE_DECRYPTION section. That's a leftover from
rom-properties, and rvthtool *requires* support for decryption.
Not sure how I didn't notice this before... (probably because
I don't regularly test the 32-bit i386 version, and Ubuntu
didn't ship glibc-2.34 in any LTS releases.)
(copied over from rom-properties)
EXECUTE_PROCESS() has been around since at least 3.0, and EXEC_PROGRAM()
is deprecated as of 3.28:
CMake Warning (dev) at cmake/cmake_uninstall.cmake:12 (EXEC_PROGRAM):
Policy CMP0153 is not set: The exec_program command should not be called.
Run "cmake --help-policy CMP0153" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Use execute_process() instead.
(copied over from rom-properties)
Found using clang-tidy from clang-17.0.1:
src/librvth/extract.cpp:513:11: warning: Potential leak of memory pointed to by 'sdk_header' [clang-analyzer-unix.Malloc]
513 | ret = -errno;
| ^
Found using clang-tidy from clang-17.0.1.:
src/libwiicrypto/cert.c:533:4: warning: Value stored to 'hash_size' is never read [clang-analyzer-deadcode.DeadStores]
533 | hash_size = SHA1_DIGEST_SIZE;
| ^
src/libwiicrypto/cert.c:533:4: note: Value stored to 'hash_size' is never read
src/libwiicrypto/cert.c:537:4: warning: Value stored to 'hash_size' is never read [clang-analyzer-deadcode.DeadStores]
537 | hash_size = SHA256_DIGEST_SIZE;
| ^
src/libwiicrypto/cert.c:537:4: note: Value stored to 'hash_size' is never read
Combining the removal of .gnu_debuglink into the objcopy command had the
effect of losing `strip`'s usual stripping functionality. Add the
`--strip-all` parameter to restore it.
Copied over from rom-properties.
This fixes a regression from commit 43372103cb.
(Port over CMake changes from rom-properties.)
- Set KF_NS == KF5 or KF6.
- Increase the minimum version for ECM for KF6.
- Link to the correct KF WidgetsAddons library.
- Use HAVE_KF_WidgetsAddons instead of HAVE_KF5WIDGETSADDONS.
- Use HAVE_QtDBus instead of HAVE_Qt5DBus.
Ubuntu 16.04 has CMake 3.5, so we can target that as the minimum
version. Also, recent CMake versions (3.27+) have started printing
warnings if the minimum is less than 3.5.
CMake Deprecation Warning at CMakeLists.txt:2 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
Also, remove CMAKE_MINIMUM_REQUIRED() from all subdirectories.