Compare commits

...

10 Commits
v2.0 ... master

Author SHA1 Message Date
David Korth
12d6ec439f README.md: Add a badge for Crowdin. 2025-06-19 01:53:26 -04:00
David Korth
0ed8c449fa README.md: Put the Wii U unbricking advice in the nusresign block, not wadresign. 2025-06-17 21:33:02 -04:00
David Korth
e3723e3477 README.md: Mention two possible unbricking methods for Wii U. 2025-06-17 21:32:23 -04:00
David Korth
5effa63216 Version bump for development. (v2.0.1+) 2025-06-17 21:27:15 -04:00
David Korth
5b3286af4d rvthtool 2.0.1 2025-06-17 21:19:17 -04:00
David Korth
b27996b154 NEWS.md: Mention the Windows UI issues. 2025-06-17 20:22:07 -04:00
David Korth
2a5551b616 [qrvthtool] Fix UI issues on Windows 10.
- Always use the Oxygen icon theme. Qt6 has a built-in monochrome icon
  theme on Windows 10, but it's missing some icons.

- On Windows 10, set the style to fusion. Qt's "Windows Vista" style
  (now "Modern Windows") doesn't support Dark Mode, but fusion does.

- Manifest: Add Windows 8, 8.1, and 10 OS GUIDs.

- resource.rc: Use the CreateProcess manifest ID, not IsolationAware.
  IsolationAware is only for DLLs. Without the CreateProcess ID,
  on Windows 10, GetVersion() and the version helper functions will
  assume we're actually using Windows 8.
2025-06-17 20:18:47 -04:00
David Korth
43b9691078 [cmake] 64BitTimeSupportFcntl.cpp: This file was missing...
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)
2025-06-17 00:43:32 -04:00
David Korth
d0498b9e7d [debian] rules: Explicitly set QT_VERSION=5.
CMake failed to find Qt on the Launchpad build server for Ubuntu 18.04
for some reason. (...though it worked on 16.04?)

(cherry picked from commit 99988fb273)

Conflicts:
	debian/changelog
2025-06-17 00:43:18 -04:00
David Korth
c2ee653c2e Version bump for development. (v2.0+) 2025-06-17 00:42:36 -04:00
10 changed files with 204 additions and 25 deletions

View File

@ -10,7 +10,7 @@ CMAKE_POLICY(SET CMP0048 NEW)
# Introduced in CMake 3.3. # Introduced in CMake 3.3.
CMAKE_POLICY(SET CMP0063 NEW) CMAKE_POLICY(SET CMP0063 NEW)
SET(RVTHTOOL_VERSION 2.0.0.0) SET(RVTHTOOL_VERSION 2.0.1.1)
PROJECT(rvthtool-base VERSION ${RVTHTOOL_VERSION}) PROJECT(rvthtool-base VERSION ${RVTHTOOL_VERSION})
# CMAKE_PROJECT_VERSION was introduced in 3.12. # CMAKE_PROJECT_VERSION was introduced in 3.12.

View File

@ -1,5 +1,12 @@
# Changes # Changes
## v2.1 (released ????/??/??)
## v2.0.1 - Windows UI Bugfix (released 2025/06/17)
* Bug fixes:
* Fix Windows UI issues: missing icons, proper Dark Mode support.
## v2.0 - GUI Release (released 2025/06/16) ## v2.0 - GUI Release (released 2025/06/16)
* New features: * New features:

View File

@ -2,8 +2,9 @@
This is an open-source tool for managing RVT-H Reader consoles. This is an open-source tool for managing RVT-H Reader consoles.
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)<br> [![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/l83tx6d16gqr4ov2?svg=true)](https://ci.appveyor.com/project/GerbilSoft/rvthtool/branch/master) [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/l83tx6d16gqr4ov2?svg=true)](https://ci.appveyor.com/project/GerbilSoft/rvthtool/branch/master)<br>
[![Crowdin](https://badges.crowdin.net/rvthtool/localized.svg)](https://crowdin.com/project/rvthtool)
![RVT-H Reader, RVT-R Reader, Wii RVL-001, and Commodore 1541C](doc/RVT.jpg) ![RVT-H Reader, RVT-R Reader, Wii RVL-001, and Commodore 1541C](doc/RVT.jpg)
@ -92,7 +93,7 @@ $ ./rvthtool query
/dev/sdb /dev/sdb
- Manufacturer: Nintendo Co., Ltd. - Manufacturer: Nintendo Co., Ltd.
- Product Name: RVT-H READER - Product Name: RVT-H READER
- Serial Number: 2000xxxx - Serial Number: 2000xxxxx
- HDD Firmware: 01.0 - HDD Firmware: 01.0
- HDD Vendor: WDC - HDD Vendor: WDC
- HDD Model: WD800BEVE-00UYT0 - HDD Model: WD800BEVE-00UYT0
@ -141,4 +142,6 @@ any Wii U keyset. Conversion to Debug will be realsigned. Conversion to retail
will be unsigned. will be unsigned.
**WARNING:** Use with caution if converting a system title for installation **WARNING:** Use with caution if converting a system title for installation
on real hardware, since this may result in an unrecoverable brick. on real hardware, since this may result in a bricked system. Bricked Wii U
systems may be recoverable using [udpih + Recovery Menu](https://github.com/GaryOderNichts/udpih)
and/or [de_Fuse](https://github.com/StroopwafelCFW/wii_u_modchip).

View File

@ -1,5 +1,5 @@
# AppVeyor configuration file. # AppVeyor configuration file.
version: '2.0.0.{build}' version: '2.0.1.{build}'
# Build worker image (VM template) # Build worker image (VM template)
image: image:

View File

@ -0,0 +1,19 @@
/**
* 64-bit time_t test code, with fcntl.h.
* Reference: https://github.com/Benjamin-Dobell/Heimdall/blob/master/cmake/LargeFiles.c
*/
#include <stdint.h>
#include <time.h>
#include <fcntl.h>
/** static_assert() macro copied from c++11-compat.h **/
#define static_assert(expr, msg) switch (0) { case 0: case (expr): ; }
int main(int argc, char *argv[])
{
static_assert(sizeof(time_t) == sizeof(int64_t), "time_t is the wrong size");
int64_t tm64;
time_t tm = time(&tm64);
return 0;
}

3
debian/rules vendored
View File

@ -10,7 +10,8 @@ DESTDIR := $(CURDIR)/debian/rvthtool
CMAKE_OPTIONS := \ CMAKE_OPTIONS := \
-DCMAKE_BUILD_TYPE=Release \ -DCMAKE_BUILD_TYPE=Release \
-DSPLIT_DEBUG=OFF \ -DSPLIT_DEBUG=OFF \
-DENABLE_LTO=OFF -DENABLE_LTO=OFF \
-DQT_VERSION=5
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
CMAKE_OPTIONS += -DBUILD_TESTING=ON CMAKE_OPTIONS += -DBUILD_TESTING=ON
endif endif

View File

@ -33,6 +33,9 @@ UINT WM_TaskbarButtonCreated;
# define MSGFLT_ADD 1 # define MSGFLT_ADD 1
#endif #endif
// VersionHelpers
#include "rp_versionhelpers.h"
/** /**
* Register the TaskbarButtonCreated message. * Register the TaskbarButtonCreated message.
*/ */
@ -84,7 +87,16 @@ int main(int argc, char *argv[])
# endif /* QT_VERSION >= 0x050600 */ # endif /* QT_VERSION >= 0x050600 */
#endif /* QT_VERSION >= QT_VERSION_CHECK(5,0,0) && QT_VERSION < QT_VERSION_CHECK(6,0,0) */ #endif /* QT_VERSION >= QT_VERSION_CHECK(5,0,0) && QT_VERSION < QT_VERSION_CHECK(6,0,0) */
QApplication *app = new QApplication(argc, argv); #ifdef _WIN32
// Windows: Set the "fusion" theme if using Windows 10 or later.
// This is needed for proper Dark Mode support.
// NOTE: It's recommended to set the style *before* creating the QApplication.
if (IsWindows10OrGreater()) {
QApplication::setStyle(QLatin1String("fusion"));
}
#endif /* _WIN32 */
QApplication *const app = new QApplication(argc, argv);
app->setApplicationName(QStringLiteral("qrvthtool")); app->setApplicationName(QStringLiteral("qrvthtool"));
app->setOrganizationDomain(QStringLiteral("gerbilsoft.com")); app->setOrganizationDomain(QStringLiteral("gerbilsoft.com"));
app->setOrganizationName(QStringLiteral("GerbilSoft")); app->setOrganizationName(QStringLiteral("GerbilSoft"));
@ -127,13 +139,12 @@ int main(int argc, char *argv[])
#endif /* _WIN32 */ #endif /* _WIN32 */
#if defined(_WIN32) || defined(__APPLE__) #if defined(_WIN32) || defined(__APPLE__)
// Check if an icon theme is available. // Use the built-in Oxygen icon theme.
if (!QIcon::hasThemeIcon(QStringLiteral("application-exit"))) { // Reference: http://tkrotoff.blogspot.com/2010/02/qiconfromtheme-under-windows.html
// Icon theme is not available.
// Use the built-in Oxygen icon theme. // NOTE: On Windows 10, Qt6 has a built-in monochrome icon theme,
// Reference: http://tkrotoff.blogspot.com/2010/02/qiconfromtheme-under-windows.html // but it's missing some icons.
QIcon::setThemeName(QStringLiteral("oxygen")); QIcon::setThemeName(QStringLiteral("oxygen"));
}
#endif /* _WIN32 || __APPLE__ */ #endif /* _WIN32 || __APPLE__ */
// Initialize the QRvtHToolWindow. // Initialize the QRvtHToolWindow.

View File

@ -35,22 +35,28 @@
</security> </security>
</trustInfo> </trustInfo>
<!-- Mark this program as *not* DPI-aware on Windows Vista and later. --> <!-- Mark this program as DPI-aware on Windows Vista and later. -->
<!-- TODO: Windows 8 per-monitor DPI awareness. -->
<asmv3:application> <asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>false</dpiAware> <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">system</dpiAwareness>
</asmv3:windowsSettings> </asmv3:windowsSettings>
</asmv3:application> </asmv3:application>
<!-- Operating system compatibility. --> <!-- Operating system compatibility -->
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application> <application>
<!--The ID below indicates application support for Windows Vista --> <!-- Windows 10 and Windows 11 -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
<!-- Windows 8.1 -->
<!--The ID below indicates application support for Windows 7 --> <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!-- Enable long paths (>260 chars) on Windows 10 Anniversary Update. (1607) --> <!-- Enable long paths (>260 chars) on Windows 10 Anniversary Update. (1607) -->
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware> <longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</application> </application>

View File

@ -2,7 +2,7 @@
* RVT-H Tool (qrvthtool) * * RVT-H Tool (qrvthtool) *
* resource.rc: Win32 resource script. * * resource.rc: Win32 resource script. *
* * * *
* Copyright (c) 2016-2019 by David Korth. * * Copyright (c) 2016-2025 by David Korth. *
* SPDX-License-Identifier: GPL-2.0-or-later * * SPDX-License-Identifier: GPL-2.0-or-later *
***************************************************************************/ ***************************************************************************/
@ -13,7 +13,7 @@
#include "resource.h" #include "resource.h"
/** Manifest **/ /** Manifest **/
ISOLATIONAWARE_MANIFEST_RESOURCE_ID RT_MANIFEST "resources\\win32\\qrvthtool.exe.manifest" CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "resources\\win32\\qrvthtool.exe.manifest"
/** Icons **/ /** Icons **/
IDI_QRVTHTOOL ICON "resources\\win32\\qrvthtool.ico" IDI_QRVTHTOOL ICON "resources\\win32\\qrvthtool.ico"

View File

@ -0,0 +1,132 @@
/**
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER within this package.
*/
// rvthtool: adding this here because AppVeyor's MSVC 2015
// build system doesn't have versionhelpers.h for some reason.
// NOTE: Removing the WINAPI_FAMILY_PARTITION checks.
#pragma once
#include <windows.h>
#ifdef __cplusplus
# define VERSIONHELPERAPI inline bool
#else
# define VERSIONHELPERAPI FORCEINLINE BOOL
#endif
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
/* gcc complains about missing field initializers. */
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wmissing-field-initializers"
#endif
VERSIONHELPERAPI IsWindowsVersionOrGreater(WORD major, WORD minor, WORD servpack)
{
OSVERSIONINFOEXW vi = {sizeof(vi),major,minor,0,0,{0},servpack};
return VerifyVersionInfoW(&vi, VER_MAJORVERSION|VER_MINORVERSION|VER_SERVICEPACKMAJOR,
VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0,
VER_MAJORVERSION,VER_GREATER_EQUAL),
VER_MINORVERSION,VER_GREATER_EQUAL),
VER_SERVICEPACKMAJOR, VER_GREATER_EQUAL));
}
VERSIONHELPERAPI IsWindowsXPOrGreater(void) {
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 0);
}
VERSIONHELPERAPI IsWindowsXPSP1OrGreater(void) {
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 1);
}
VERSIONHELPERAPI IsWindowsXPSP2OrGreater(void) {
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 2);
}
VERSIONHELPERAPI IsWindowsXPSP3OrGreater(void) {
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 3);
}
VERSIONHELPERAPI IsWindowsVistaOrGreater(void) {
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 0);
}
VERSIONHELPERAPI IsWindowsVistaSP1OrGreater(void) {
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 1);
}
VERSIONHELPERAPI IsWindowsVistaSP2OrGreater(void) {
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 2);
}
VERSIONHELPERAPI IsWindows7OrGreater(void) {
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN7), LOBYTE(_WIN32_WINNT_WIN7), 0);
}
VERSIONHELPERAPI IsWindows7SP1OrGreater(void) {
return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN7), LOBYTE(_WIN32_WINNT_WIN7), 1);
}
VERSIONHELPERAPI IsWindows8OrGreater(void) {
// FIXME: _WIN32_WINNT_WIN8 is missing when building with the Windows 7 SDK.
// Defining it causes a lot of other things to break for some reason...
//return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN8), LOBYTE(_WIN32_WINNT_WIN8), 0);
return IsWindowsVersionOrGreater(HIBYTE(0x0602), LOBYTE(0x0602), 0);
}
VERSIONHELPERAPI IsWindows8Point1OrGreater(void) {
// FIXME: _WIN32_WINNT_WINBLUE is missing when building with the Windows 7 SDK.
// Defining it causes a lot of other things to break for some reason...
//return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINBLUE), LOBYTE(_WIN32_WINNT_WINBLUE), 0);
return IsWindowsVersionOrGreater(HIBYTE(0x0603), LOBYTE(0x0603), 0);
}
VERSIONHELPERAPI IsWindowsThresholdOrGreater(void) {
// FIXME: _WIN32_WINNT_WINTHRESHOLD is missing when building with MSVC 2022 for some reason.
//return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINTHRESHOLD), LOBYTE(_WIN32_WINNT_WINTHRESHOLD), 0);
return IsWindowsVersionOrGreater(HIBYTE(0x0A00), LOBYTE(0x0A00), 0);
}
VERSIONHELPERAPI IsWindows10OrGreater(void) {
return IsWindowsThresholdOrGreater();
}
VERSIONHELPERAPI IsWindowsVersionOrGreater_BuildNumberCheck(WORD major, WORD minor, DWORD buildnumber)
{
OSVERSIONINFOEXW vi = {sizeof(vi),major,minor,buildnumber,0,{0},0};
return VerifyVersionInfoW(&vi, VER_MAJORVERSION|VER_MINORVERSION|VER_BUILDNUMBER,
VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0,
VER_MAJORVERSION,VER_GREATER_EQUAL),
VER_MINORVERSION,VER_GREATER_EQUAL),
VER_BUILDNUMBER, VER_GREATER_EQUAL));
}
VERSIONHELPERAPI IsWindows11Build21262OrGreater(void) {
// Windows 11 pre-release Build 21262 on ARM added amd64 emulation.
// NOTE: Officially it was 21277, but 21262 was leaked and supports it too.
// https://blogs.windows.com/windows-insider/2020/12/10/introducing-x64-emulation-in-preview-for-windows-10-on-arm-pcs-to-the-windows-insider-program/
return IsWindowsVersionOrGreater_BuildNumberCheck(HIBYTE(0x0A00), LOBYTE(0x0A00), 21262);
}
VERSIONHELPERAPI IsWindows11OrGreater(void) {
// Windows 11 shows up as "Windows 10 build 22000".
return IsWindowsVersionOrGreater_BuildNumberCheck(HIBYTE(0x0A00), LOBYTE(0x0A00), 22000);
}
VERSIONHELPERAPI IsWindows11Build25905OrGreater(void) {
// Windows 11 Build 25905 dropped support for 32-bit ARM applications.
// https://blogs.windows.com/windows-insider/2023/07/12/announcing-windows-11-insider-preview-build-25905/
return IsWindowsVersionOrGreater_BuildNumberCheck(HIBYTE(0x0A00), LOBYTE(0x0A00), 25905);
}
VERSIONHELPERAPI IsWindowsServer(void) {
OSVERSIONINFOEXW vi = {sizeof(vi),0,0,0,0,{0},0,0,0,VER_NT_WORKSTATION};
return !VerifyVersionInfoW(&vi, VER_PRODUCT_TYPE, VerSetConditionMask(0, VER_PRODUCT_TYPE, VER_EQUAL));
}
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
/* gcc complains about missing field initializers. */
# pragma GCC diagnostic pop
#endif