Commit Graph

25 Commits

Author SHA1 Message Date
David Korth
5b3286af4d rvthtool 2.0.1 2025-06-17 21:19:17 -04:00
David Korth
c2ee653c2e Version bump for development. (v2.0+) 2025-06-17 00:42:36 -04:00
David Korth
b0bdcdfa22 rvthtool 2.0 2025-06-16 23:33:16 -04:00
David Korth
c96e470e1b Move NETWORK.md installation from CMakeLists.txt to doc/CMakeLists.txt. 2025-06-16 23:30:30 -04:00
David Korth
7a831a342c CMakeLists.txt: CMake 3.5.1 on Ubuntu 16.04 doesn't have VERSION_GREATER_EQUAL. 2025-06-16 21:44:11 -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
7f7f903d02 CMakeLists.txt: Change CMAKE_MINIMUM_REQUIRED() from 3.5 to 3.5..3.10.
CMake 4.0 requires a minimum of 3.5, and shows warnings for anything
less than 3.10.
2025-05-21 18:30:00 -04:00
David Korth
66c8afb410 Increase minimum CMake version to 3.5; move CMP0048/CMP0063 settings to the top-level CMakeLists.txt file.
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.
2024-02-20 19:23:06 -05:00
David Korth
6b49dfaa0f CMakeLists.txt: FIXME: Windows SDK prior to 10.0.18362.0 has issues when compiling as either C11 or C17.
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.
2023-11-25 09:44:46 -05:00
David Korth
af560c4ee9 Use CMAKE_<LANG>_STANDARD instead of custom macros.
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.
2023-11-25 09:43:53 -05:00
David Korth
31ee8efcfb [cmake] Renamed 'modules' to 'libs'. 2022-08-07 19:13:14 -04:00
David Korth
af1c0d389a CMakeLists.txt: Check for the existence of the CMAKE_PROJECT variables instead of the CMake version. 2020-06-25 23:04:01 -04:00
David Korth
4302058aee CMakeLists.txt: CMAKE_PROJECT_VERSION was introduced in 3.12.
Set the variables manually for older versions.
2020-06-25 23:01:05 -04:00
David Korth
556ced2327 [rvthtool] Copied the VERSION changes from rom-properties.
The CMake minimum version in the base project was set to 3.1, so I'm
keeping that instead of reducing it to 3.0. Not sure why I used 3.1,
though...
2020-06-20 13:48:38 -04:00
David Korth
56929bf421 [locale] Added localization files.
Based on similar files from mcrecover.

[qrvthtool] TranslationManager: Search for rvthtool_*.qm,
not mcrecover_*.qm.
2018-09-30 21:48:58 -04:00
David Korth
ed9be9ddbf CMakeLists.txt: Added a dummy git_version target if sh could not be found. 2018-09-30 20:44:54 -04:00
David Korth
cdae234916 CMakeLists.txt, NEWS.md: Updated version and NEWS from the v1.1 branch.
Updated with v1.1 and v1.1.1.
2018-09-18 22:11:23 -04:00
David Korth
710d00d7c9 Version bump for development. (v1.0+) 2018-06-07 00:44:01 -04:00
David Korth
94f901f390 rvthtool v1.0 2018-06-07 00:22:46 -04:00
David Korth
99354c0761 rvthtool v0.9 2018-04-26 00:05:59 -04:00
David Korth
cb0cbbc692 Install documentation; remove architecture from Windows install paths.
The architecture was needed for rom-properties, but we're only going to
distribute single-arch ZIPs for rvthtool.
2018-04-25 23:23:13 -04:00
David Korth
e627339856 [cmake] options.cmake: Make UDEV optional.
Added a bunch of other build options from rom-properties.

Fixed compilation with UDEV disabled. In particular, HAVE_QUERY is set
if querying is available at all, and if it isn't available, rvthtool's
help will show a note, and attempting to run the query command will show
an error message.
2018-03-10 18:11:49 -05:00
David Korth
389e26b13b [librvth/tests] CertVerifyTest: Certificate verification tests.
Added Google Test v1.8.0 from rom-properties.

Reworked cert_verify() to support both RSA-4096 and RSA-2048 signatures
and public keys. The function now requires all certificates to use
big-endian, so cert_store.c now uses BE32_CONST() to store the values
as big-endian.

BE32_CONST() is a macro that uses shifting for MSVC and intrinsics for
gcc. This is needed because MSVC 2010 doesn't realize that its byteswap
intrinsics result in constant values. (Later versions might...)

cert.c: New function cert_get_size() that returns the full size of a
built-in certificate.

CertVerifyTest currently tests the retail ticket and TMD certificates.
Both tests pass with all of these changes.
2018-01-20 03:02:32 -05:00
David Korth
f5d11e4130 [librvth] cert.c: Initial certificate verification code.
cert_verify() takes a ticket or TMD (or anything that starts with a
compatible RSA-2048 signature), decrypts the signature, then verifies
the SHA-1 hash. The SHA-1 hash is calculated based on the rest of the
specified data structure, including the signature issuer field.

Both the signature and SHA-1 hash are checked for validity. If the
calculated hash starts with 0x00 but the signature is invalid, this
usually means it's fakesigned.

On Linux, the certification verification code uses gmp to decrypt the
RSA signature and nettle to calculate the SHA-1 hash. This is currently
not implemented for Windows, so on Windows it will return -ENOSYS.

Note that the Linux build now requires gmp and nettle.

TODO: Verify that it works with nettle-2.x.
2018-01-19 23:20:35 -05:00
David Korth
f321fe5e65 Initial import of RVT-H Tool.
This program will allow for managing Nintendo RVT-H Reader devkits,
including dumping existing images and installing new images.

The current version doesn't actually do anything. It's mostly a copy
of the infrastructure from rom-properties, with some changes. In
particular, we're using CMake's TARGET_COMPILE_FEATURES() instead of
manually detecting C99 support.
2018-01-15 06:58:54 -05:00