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...
since you mentioned wanting to add in a command for repairing a
NHCD Bank Table, I figured a command to inspect your current NHCD
Bank Table would also be useful.
even in the absence of a repair command, it still would be useful
to see the bank table status. I was particularly curious if my RVT-H
had it's bank fully zero'd or if only a few values were unexpected.
this only adds the command to the CLI, as displaying raw bytes in a
QT window didn't feel like the best way to print that information.
If you want it to be there a UI before merging I understand, and can try
playing around with QT to get something decent.
[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.
Otherwise, if qrvthtool's "Select Device" dialog is opened and closed,
and then an RVT-H Reader is connected or disconnected, the program will
crash, since it tries sending a message to the now-deleted dialog.
windeployqt copies over QtSvg even though we're not using it:
Creating C:\projects\rvthtool\build\src\qrvthtool\windeployqt...
C:\projects\rvthtool\build\bin\Debug\qrvthtool.exe 32 bit, debug executable
Adding Qt5Svg for qsvgicond.dll
Skipping plugin qtvirtualkeyboardplugind.dll due to disabled dependencies.
Direct dependencies: Qt5Core Qt5Gui Qt5Widgets
All dependencies : Qt5Core Qt5Gui Qt5Widgets
To be deployed : Qt5Core Qt5Gui Qt5Svg Qt5Widgets
Explicitly disable QtSvg to prevent it from being copied over.
[libwiicrypto] config.libwiicrypto.h.in: Nettle version macros.
[cmake] CheckNettle2or3.cmake: Check if it's Nettle 3.x.
TODO: The Libraries tab needs to be RichText now.
This fixes a CMake warning:
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (Nettle)
does not match the name of the calling package (NETTLE). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/libs/FindNETTLE.cmake:22 (find_package_handle_standard_args)
src/CMakeLists.txt:74 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.
The .desktop fileanme was changed last week, but UnityLauncher.cpp wasn't
updated with the new filename, which broke the progress bar functionality.
This fixes a regression from commit 1a992e41ff.
([qrvthtool] CMakeLists.txt: Use macros for the XDG paths.)
This is needed for rom-properties, since we have to provide both
32-bit and 64-bit DLLs for proper shell integration, but rvthtool
is only packaged for a single architecture.
src\rvthtool\list-banks.cpp(387,12): warning C4477: 'wprintf' :
format string '%s' requires an argument of type 'wchar_t *',
but variadic argument 3 has type 'const char *'
Found using scan-build from clang-14.0.6:
src/qrvthtool/widgets/LanguageMenu.cpp:249:13: warning: equality comparison result unused [-Wunused-comparison]
d->locale == locale;
~~~~~~~~~~^~~~~~~~~
src/qrvthtool/widgets/LanguageMenu.cpp:249:13: note: use '=' to turn this equality comparison into an assignment
d->locale == locale;
^~
=
Found using scan-build from clang-14.0.6:
src/libwiicrypto/bin2h.c:93:3: warning: Potential leak of memory pointed to by 'p' [unix.Malloc]
fprintf(stderr, "*** ERROR creating destination file: %s\n", strerror(errno));
^~~~~~~
This lets us combine e.g. fputs() + _fputts() + fputs() into a single
_fputts(), which reduces overhead. It also makes it slightly faster on
Windows, since it won't have to do ANSI conversion for these strings.
Code size differences: (64-bit Gentoo Linux, gcc-12.1.0, release build, no LTO)
text data bss dec hex filename
108526 2980 80 111586 1b3e2 rvthtool [before]
108014 2980 80 111074 1b1e2 rvthtool [after]
-512 0 0 -512 -200 Difference
text data bss dec hex filename
57537 1992 80 59609 e8d9 wadresign [before]
57334 1984 80 59398 e806 wadresign [after]
-203 -8 0 -211 -d3 Difference
text data bss dec hex filename
53384 1976 80 55440 d890 nusresign [before]
53464 1976 80 55520 d8e0 nusresign [after]
+80 0 0 +80 +50 Difference
Interestingly, nusresign only had one change, and it caused the code size
to go up by a bit.