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.
We're still using MSVC 2013 in the AppVeyor build right now.
Also, the APLERR_SIMMEMSIZE_NOT_LE_PHYSMEMSIZE message was missing a space
after the first line. In the rvthtool CLI, a newline is used instead of a
space.
QStringLiteral encodes a QString struct directly into the executable.
This has some more overhead compared to a Latin-1 or UTF-8 string,
but it means nothing needs to be copied into RAM at runtime.
Related changes:
- Consolidate some string building into QStringLiteral().arg().
- Update copyrights for 2023 where applicable.
It's an argument for filename.startsWith(), not QLatin1String().
This seemingly didn't cause a problem with QLatin1String, since the
constructor takes an optional size parameter. It didn't *work*
correctly, though.
This *does* cause a problem when switching to QStringLiteral.
Qt6 complains:
QGuiApplication::setDesktopFileName: the specified desktop file name ends
with .desktop. For compatibility reasons, the .desktop suffix will be
removed. Please specify a desktop file name without .desktop suffix
It's crashing on Windows if a MessageWidget is visible when closing
the main window. Something is trying to use the std::set (and previously
the QSet) after it's destroyed...
- CPUInstructionSetFlags.cmake: Add more CPU architectures.
- DirInstallPaths.cmake: Set ${TARGET_CPU_ARCH} and add more
CPU architectures.
- FindNETTLE.cmake: Use ${TARGET_CPU_ARCH}.
- SplitDebugInformation.cmake: Add the `mold` workaround.
- options.cmake: Disable split debug by default on macOS.
- platform.cmake: Minor cleanups.
- gcc.cmake: Code coverage cleanup, check for "--no-undefined" and
"--no-allow-shlib-undefined" (but only allow them on Linux),
and check for "-ftree-vectorize".
- msvc.cmake:
- Add: /we4477 /MP /guard:cf /guard:ehcont /permissive-
- On i386 only: /SAFESEH
- Disable /Zc:externC /Zc:noexceptTypes on Clang.
- Disable thread-safe statics only on i386 and amd64.
- win32-gcc.cmake, win32-msvc.cmake:
- Various flag changes.
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winbase.h(8816,5): warning C5105: macro expansion producing 'defined' has undefined behavior
C:\Program Files (x86)\Windows Kits\8.1\Include\um\oaidl.h(473,17): warning C5103: pasting '/' and '/' does not result in a valid preprocessing token
C:\Program Files (x86)\Windows Kits\8.1\Include\shared\wtypes.h(742,1): message : in expansion of macro '_VARIANT_BOOL'
C:\Program Files (x86)\Windows Kits\8.1\Include\um\oaidl.h(473,17): error C2059: syntax error: '/'
Force C99 when compiling with MSVC for now.
CMake 3.1 added CMAKE_<LANG>_STANDARD, which allows CMake to determine
what flags are needed to select a particular language version.
Set it to C17 and C++17. Previously, we were using C11 and C++11,
though gcc11 switched the default C++ version to C++17. The custom
macro handled this by not adding flags for C++, but it still added
the C11 flag, which prevented use of C17.
Ported over from rom-properties.
verify.cpp(180,13): warning C4477: 'wprintf' : format string '%s' requires
an argument of type 'wchar_t *', but variadic argument 3 has type 'const char *'
verify.cpp(182,13): warning C4477: 'wprintf' : format string '%s' requires
an argument of type 'wchar_t *', but variadic argument 2 has type 'const char *'
Add the 64-bit versions of libhogweed.dll.a and libnettle.dll.a
to the repository.
NOTE: This was originally done on 2022/08/07 06:25 PM EDT, but I forgot
to commit the changes...
[librvth] RvtH::verifyWiiPartitions(): Accept a pointer to a 5-element
unsigned int array to get the total number of hash errors. This is for
both actual hash errors and hash table copy errors.