Copied it from rom-properties.
This broke the Launchpad Ubuntu 20.04 armhf build. Not going to resubmit
it, because I don't think anyone will be using rvthtool on that OS and
platform...
(cherry picked from commit d9f4ec96f1)
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.
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).
- 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.
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)
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.)
- 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.
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.
[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.
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.
Rename the .desktop file to com.gerbilsoft.qrvthtool.desktop.
TODO: Maybe com.gerbilsoft.rvthtool.qrvthtool.desktop? Not that
I'd be making a GTK+ UI frontend anytime soon...
TODO:
- Toolbar icons aren't showing up.
- BankEntryView: Qt::DefaultLocaleShortDate was removed in Qt6,
so using QLocale instead. Cache the QLocale?
- viewOptions() is final in most widgets, so it's disabled in Qt6 builds.
See if we can reimplement this better.
- Qt6's moc doesn't like incomplete structs.
CMake was complaining about this:
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/modules/FindNettle.cmake:22 (find_package_handle_standard_args)
src/CMakeLists.txt:22 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.
- Changed several macros to functions, e.g. C/C++ language version checks.
- Improved CPU architecture detection.
- Improved LFS detection on some *BSD platforms.
- Preliminary support for Windows on ARM.
- Added toolchain files for i686 and x86_64 MinGW-w64.
Based on the same classes from mcrecover.
TODO:
- Add some translations.
- Persistent configuration. I don't think porting mcrecover's ConfigStore
is the right thing to do here.
This will allow us to reuse the encryption code for the new wadtool,
which will allow converting debug WADs to retail and vice-versa.
This also moves common.h, byteorder.h, byteswap.h, gcn_structs.h,
and win32/.
Moved nettle detection to src/CMakeLists.txt and a separate config file.
Otherwise, it won't find nettle_version_major.
NOTE: This symbol isn't actually used right now...
(It's used on rom-properties to display the version number in AboutTab.)
We need to check CMAKE_CL_64, not just ${CMAKE_SYSTEM_PROCESSOR}, since
that variable indicates the host system, which is always 64-bit
regardless of the target architecture.
Copied from rom-properties commit 7a6793922a5da7a404ecd9ddc128eeb7c7d69b46.