Commit graph

1458 commits

Author SHA1 Message Date
Solomon Peachy
eded05f0cb FS13980: Updated rbutil Italian Translation (Alessio Lenzi)
Change-Id: Ic996de7db4a197858a7115627136d10a2f72be24
2026-08-13 12:36:50 -04:00
Solomon Peachy
612453da48 FS#13979 - rbutil: fix Talk file exclusion options and initial focus (Alessio Lenzi)
1. The "Ignore files" checkbox was saved in the settings but not
   consulted when starting generation. Patterns from the text field were
   therefore applied even when the checkbox was unchecked. The pattern list
   is now passed to TalkFileCreator only when the option is enabled.

2. Ignore patterns were converted to regular expressions by replacing only
   '*' and '?'. Other regular-expression characters were left unescaped and
   matches were not properly bounded. The patch uses Qt's
   wildcardToRegularExpression() conversion instead.

3. The Talk generation dialog initially focused "Strip Extensions" because of
   widget creation order. It now explicitly focuses the folder tree, matching
   the task flow and making keyboard and screen-reader use more predictable.

4. The handling of talkclips.ignore is also corrected so that files below a
   marked directory are skipped recursively. Previously Rockbox Utility could
   generate talkclips.ignore.talk and clips for files below .rockbox even though
   .rockbox/talkclips.ignore was present.

Change-Id: I1f9f14ed7fc057bc254f62148a7ef8ffb69425ed
2026-08-10 11:05:44 -04:00
Solomon Peachy
0726ec9351 FS#13978 - rbutil: Improve GUI responsiveness during voice/talk file generation (Alessio Lenzi)
Voice file and Talk clip generation currently run synchronously in the
GUI thread. During long TTS operations this prevents the progress window
from processing input and accessibility events. On Windows this makes
the progress list unavailable to screen readers such as NVDA and can
make Rockbox Utility appear to be hung.

The attached patch moves VoiceFileCreator and TalkFileCreator to
low-priority QThreads while keeping ProgressLoggerGui in the GUI thread.
Progress and log signals are delivered through queued Qt connections.

Cancellation remains available while a synchronous TTS request is
running. The abort flags used across threads are atomic and the abort
signal is sent through a direct connection. Worker objects and threads
are deleted through the standard finished / deleteLater lifecycle.

Talk generation now passes all selected folders to one worker and
processes them sequentially, emitting the final done signal only once.
This preserves multiple-folder selection without starting work in the
GUI thread.

Change-Id: I58aa66333d43e1be249c84e0cf46c17c119a8360
2026-08-09 15:54:58 -04:00
Solomon Peachy
21e95258f2 FS#13977 - rbutil: fix SAPI5 TTS test output and playback (Alessio Lenzi)
After the SAPI5 error handling added for FS#13972, the Test TTS button
can fail with SAPI error 5 even though the engine and voice are
configured correctly. The test also destroys its QSoundEffect and
temporary file before asynchronous playback can complete.

Config::testTts() used a QTemporaryFile with no .wav extension.
TTSSapi::voice() removes the requested output before synthesis so that a
stale file cannot be mistaken for successful output. SAPI SpFileStream
was therefore asked to create an extensionless output file and returned
error 5 (invalid procedure call or argument).

After successful synthesis, QSoundEffect was allocated on the stack, its
loop count was set to zero, and the temporary file was removed when
testTts() returned. This does not allow asynchronous playback to
complete reliably.

 * create a temporary directory and requests an initially
   nonexistent tts-test.wav inside it;
 * keep the directory and generated wave file alive for playback;
 * keep QSoundEffect alive until playback finishes or fails;
 * request one playback and clean up all temporary data afterward.

Change-Id: I8e482ab846e6445889118e121025ec48d3776d6b
2026-08-09 08:00:50 -04:00
Solomon Peachy
a467bfc55f FS#13972 - Improve rbutil SAPI5 stability (Alessio Lenzi)
The existing code treated any ready-read notification from cscript as
proof that synthesis had completed. The SAPI script can emit other
output, so the Utility could check for the wave file before the explicit
SYNC reply and report that the output file did not exist.

The script also used global "On Error Resume Next" without reporting
errors from SpFileStream.Open(), SpVoice.Speak(), or
SpFileStream.Close(). Several waits had no timeout, allowing the GUI
thread to remain blocked indefinitely.

The changes:

 * reports SAPI COM errors to Rockbox Utility;
 * verifies that SAPI actually created the requested wave file;
 * waits for the explicit SYNC reply instead of any process output;
 * applies finite timeouts to vendor queries, synthesis, and shutdown;
 * terminates a stuck private cscript process safely;
 * restarts cscript and retries the current string up to three times when a
   third-party SAPI engine stops responding during a long generation run.

Change-Id: I2cf2aefb704353c648bef0c4312f35282ac4e25d
2026-08-04 17:03:50 -04:00
Solomon Peachy
1b6767a7d7 FS#13972 - Fix crash creating voice files under Windows (Alessio Lenzi)
VoiceFileCreator::createVoiceFile() stored corrFile as the address of a
local QTemporaryFile (or a local QFile used as fallback). Both objects
were destroyed before VoiceFileCreator::create() called
TalkGenerator::setLang(), leaving a dangling pointer.

On Windows this produced an access violation in RockboxUtility.exe
immediately after the voice strings had been read. Windows reported
exception 0xc0000005.

The change gives the corrections file QObject lifetime under
VoiceFileCreator, uses the built-in corrections file as a persistent
default, and replaces it with a persistent extracted QTemporaryFile when
extraction succeeds.

Change-Id: I29a371d2431021833676dec2b875186a3c021b13
2026-08-04 17:03:50 -04:00
Solomon Peachy
00bf7f97ba rbutil: Support building with QT 6.6
Without this we'd need 6.7 or newer, which isn't that big of a deal except
we want to support producing RHEL9-based AppImages.

Change-Id: I931be94400d0d19af7fba498f46f174f51a4cd8b
2026-08-01 13:07:44 -04:00
Vencislav Atanasov
d42dcdcba2 rbutilqt/themeeditor: Allow specifying the Apple code signing ID using an environment variable
Co-authored-by: ChatGPT-5.5
Change-Id: Idd4624c7851f7fa37afac4de59f319e0087d0bc6
2026-07-29 22:55:40 +03:00
Solomon Peachy
58d4d2b221 desktop: Drop the 'version' fields
They refer to the *desktop file specification* not the application version

Change-Id: Ib35f460c73aae40961255826f0c767a22cb5b518
2026-07-29 10:27:35 -04:00
Aidan MacDonald
0ca801dffa themeeditor: only add -Wsfinae-incomplete if compiler supports it
This flag was added in GCC 16; older versions of GCC don't
accept it and don't produce the warning, so they don't need
any special handling.

Change-Id: I13fcba07cafe0b4133de8b03ede681d2454249e4
2026-07-19 11:17:05 +01:00
Solomon Peachy
c35271a3f0 themeeditor: Silence a build warning
The warning comes from code generated by QT's MOC, so there isn't
anything to be done until QT addresses this properly.

Change-Id: Ia88ac9af91acbab783b683a6f0b4f4a304aa9e4d
2026-07-16 08:30:26 -04:00
Solomon Peachy
91d49adce2 rbutil: Silence the final build warnings when building with Clang
Change-Id: I65bb37993ef0ef6a0f373711ea16a417d0839cc5
2026-07-15 23:04:26 -04:00
Solomon Peachy
b4a0dc7274 rbutil: Ignore the deprecated warnings for macos builds
A replacement is in progress, so let's ignore those warnings in the mean time

Change-Id: Ic3123d2b37a21c6c0570619c387de0f1141c70f1
2026-07-15 21:16:56 -04:00
Solomon Peachy
2b6a8ffba2 rbutil: Get rid of all remnants of SAPI4 TTS support
Change-Id: I89cc53e2ebea273752c119e8c63f7eb36b1f22e0
2026-07-10 22:12:11 -04:00
Solomon Peachy
931fbb6734 rbutilqt: QtTTS: Pick a sane TTS engine/backend by default
* Ignore 'mock' tts engine
 * Must support synthesizing to a file (ie not just "speaking")
 * Don't claim 'speak' capabilities if the chosen engine does not

Change-Id: Id5fd224466ed62df5af837256fa66a340672d167
2026-07-10 08:08:39 -04:00
Solomon Peachy
8157759b7e rbutil: Rephrase optional component "not found" messages
Prevents builder from falsely failing builds and their builders.

Change-Id: I44df41416ef41401248132114ee586abde05d93e
2026-07-09 22:40:44 -04:00
Solomon Peachy
814979d49b rbutil: Enforce requirement of QT 6.6 or newer
Change-Id: I96064633c00ca2e13cfd9308a7f5d71cba7933cb
2026-07-09 20:32:34 -04:00
Solomon Peachy
d33d2f0840 rbutil: ttsqt: Bail if TTS engine doesn't support saving to file
Change-Id: Iaac0f77836727e5d8853d32a0b47c5d8d62b3365
2026-07-09 20:32:19 -04:00
Vencislav Atanasov
acba3fcb07 rbutilqt: Add the Qt TextToSpeech module as a new optional TTS engine
Co-authored-by: Qwen3.7-Plus
Change-Id: Ib6ddce52eee30139952e6597504ab96517dc15bd
2026-07-09 15:56:49 -04:00
Solomon Peachy
390d17893f rbutil: Rework TTS classes to use a stringlist for arguments
Instead of passing the entire cmdline as a single string that was
treated as the exectuable name on some platforms

Change-Id: Ic4f043a3a48e1b1bfab82bbfa8983c2d224606ec
2026-07-09 15:00:20 -04:00
Solomon Peachy
a9a4b3316f rbutil: Delete the long-disabled and very obsolete SAPI4 TTS code
Change-Id: I24f69cbe646d5c5ddb488a8a1912d028ec017acf
2026-07-09 14:58:37 -04:00
Vencislav Atanasov
3967180c62 rbutilqt: Simplify Utils::mountpoints() using QStorageInfo
Co-authored-by: Qwen3.7-Plus
Change-Id: I5832963d1a176754315dc28ffab75fa0a06f0334
2026-07-08 03:16:28 +03:00
Vencislav Atanasov
db1ca7c5c1 rbutilqt: Remove Utils::filesystemSize()
Implement the available/total functions using QStorageInfo. Unfortunately, QStorageInfo does not provide cluster size, so there's still some platform-specific code left extracted to Utils::filesystemClusterSize().

Co-authored-by: Qwen3.7-Plus
Change-Id: Iacec829b7d12afb65a966fe15e319d305c7384fd
2026-07-08 03:16:28 +03:00
Vencislav Atanasov
d06fa10485 rbutilqt: Simplify Utils::filesystemType() using QStorageInfo
Co-authored-by: Qwen3.7-Plus
Change-Id: Ia3b51be02d6848199ab573399f566eed7a2df085
2026-07-07 23:38:00 +03:00
Vencislav Atanasov
f62e29f311 rbutilqt: Simplify Utils::findExecutable() using QStandardPaths
Co-authored-by: Qwen3.7-Plus
Change-Id: I8f6f4003ebc7b9a4a8139f5dd4dfca3ae6cff273
2026-07-07 23:35:43 +03:00
Vencislav Atanasov
f9504df7bd rbutilqt: Simplify Utils::recursiveFolderSize() using QDirIterator
Co-authored-by: Qwen3.7-Plus
Change-Id: I73ee0f25c0b06d120364e245f8adf66e9fa09bbf
2026-07-07 23:33:30 +03:00
Solomon Peachy
7437f7b214 rbutil: Fix up the last of the windows-specific compile warnings.
The remaining ones apply to all targets

Change-Id: Iadb33dfe12349c6fd8329dbba68e762e7bc2095b
2026-07-05 09:59:48 -04:00
Solomon Peachy
04a7a60f8b lubucl: Update from upstream v1.01 to v1.03
Should hopefully address the small pile of windows build warnings

Change-Id: I0bc493ce5c76591eb2e663894702d003933fe14b
2026-07-05 08:06:53 -04:00
Solomon Peachy
f69d40564d rbutil: Add file missing from mspack update
Change-Id: Ie764ed422c328da10e0a6c4144bf3abd30b98d68
2026-07-05 07:59:42 -04:00
Solomon Peachy
a82396b0be rbutil: Update embedded 'mspack' library from 0.10.1alpha to 0.11alpha
Change-Id: I37210d1dc2c5cecdf8256f9e0294dcbd8516e8c8
2026-07-04 21:42:33 -04:00
Solomon Peachy
b54b10dc6d sansapatcher: Correct use of FormatMessageA() for windows builds
Change-Id: I3e026400fa0440221b4fd6d8c96f515737e36433
2026-07-04 13:04:05 -04:00
Solomon Peachy
aa4ea8e279 ipodpatcher: Correct use of FormatMessageA() for windows builds
When called with FORMAT_MESSAGE_ALLOCATE_BUFFER you need to pass in
a pointer to an LPSTR, not the LPSTR itself.

Change-Id: Iecc6d79edceb2142d61034d61364262126957b46
2026-07-04 12:36:38 -04:00
Solomon Peachy
96f1b19149 rbutil: define USE_LIBUSBAPI for Linux builds
Resolves "DFU not working at all" under rbutil on Linux

And fix some related warnings

Change-Id: Ie44ebc960cfc0c5d0121e8ceb24576ed427746a8
2026-07-04 11:51:49 -04:00
Solomon Peachy
9e6135ecd2 rbutil: Update version in the '.desktop' file
Change-Id: Ifa4a852f8bbc01e9662fae9e5b9ee2140a54116c
2026-07-04 11:13:56 -04:00
Solomon Peachy
9a31255ff8 rbutil: Fix some compile warnings under Windows
Change-Id: I8abfbd61066c17297962de1432144692604cf245
2026-07-04 11:13:56 -04:00
Solomon Peachy
a3be8d1a12 rbutil: Documentation updates
Change-Id: I4782c034593e011d51ec213af1db3a82e6f832f3
2026-07-04 09:39:09 -04:00
Solomon Peachy
55d15b17b7 rbutil: Use 'English' as the default voice in the selection box
Instead of the first one on the (alphabetically sorted) list, currently
Bulgarian.

Ideally we'd try to discern this from the current system/UI language

Change-Id: I82a14716afb484fbaea22f78fe4dd7f00c24252e
2026-07-04 09:35:46 -04:00
Solomon Peachy
6351b64fff rbutil: Change phrasing of message when system quazip is not found
It's not a fatal error (as we build in-tree instead) but the
builder infrastruture was treating it as one.

Change-Id: I7c0d00e36184f8d15642bce4a3bbbd5542943ed6
2026-07-03 16:01:33 -04:00
Solomon Peachy
412a78dd5f mks5lboot/rbutil: When building for Windows, link with 'setupapi'
Change-Id: I92b1be12f7512eb58c3136349cb1f21b552a6477
2026-07-02 17:22:21 -04:00
Vencislav Atanasov
1ded71b751 mks5lboot: Mark uint8_t[] struct members that are initialized from a character array as not containing a null terminator
Co-authored-by: ChatGPT (GPT-5.3 Mini) <chatgpt@openai.com>
Change-Id: I77c3d4b907b175447fef522378d6e61d65f4d2cf
2026-07-01 21:03:49 -04:00
Vencislav Atanasov
c7d5603c63 mkimxboot: Fix potentially unaligned pointer access of a packed structure
Co-authored-by: ChatGPT (GPT-5.3 Mini) <chatgpt@openai.com>
Change-Id: I437ae173a8f1304a33082e62b86110c9bc4488ba
2026-07-01 17:27:49 +03:00
Vencislav Atanasov
3d3df07c45 bspatch: Fix compile warnings on Apple Clang 21
- signed/unsigned comparisons
- unambiguous fclose() result code handling

Co-authored-by: ChatGPT (GPT-5.3 Mini) <chatgpt@openai.com>
Change-Id: I6c4184ddef39281610de01b5c6ab402450d9a3ec
2026-06-29 23:11:33 -04:00
Vencislav Atanasov
9e3b38c863 rbutilqt: Remove unused macOS includes from utils
Co-authored-by: ChatGPT (GPT-5.3 Mini) <chatgpt@openai.com>
Change-Id: I603e327acbad48bb1dd2ff8be8a2953c7155f5b9
2026-06-29 21:18:23 -04:00
Vencislav Atanasov
379c056299 rbutilqt: Replace Utils::ejectDevice() on macOS with a diskutil process invocation
Co-authored-by: ChatGPT (GPT-5.3 Mini) <chatgpt@openai.com>
Change-Id: Icedf758af6f1f0843c58e7ea5bb3efb2e7177b4a
2026-06-29 21:16:30 -04:00
Vencislav Atanasov
1039eb305a rbutilqt: Add error handling to TTSCarbon::generateSettings()
Co-authored-by: ChatGPT (GPT-5.3 Mini) <chatgpt@openai.com>
Change-Id: Iad04028853e930b508e72c2c9c3e9ebd9504d4bb
2026-06-29 21:16:19 -04:00
Vencislav Atanasov
92d62cf6ac cmake: Make sure pip is upgraded before using it to install dmgbuild
Co-authored-by: ChatGPT (GPT-5.3 Mini) <chatgpt@openai.com>
Change-Id: I4221aab7dd031bd79548a94b30ce5978d81e282b
2026-06-29 20:13:50 -04:00
Vencislav Atanasov
174a2330e9 rbutilqt/themeeditor: Fix compiler warnings
- match sign in integer comparison
- remove unused RBViewport member

Co-authored-by: ChatGPT (GPT-5.3 Mini) <chatgpt@openai.com>
Change-Id: I9a59d701593a4290523bf4b837ab0794bea2ebaa
2026-06-29 20:13:29 -04:00
Vencislav Atanasov
6aa8d80ba2 rbutilqt: Replace Utils::findRunningProcess() on macOS with a libproc implementation
GetNextProcess, GetProcessPID and GetProcessInformation are replaced by proc_listallpids() and proc_pidpath()

Co-authored-by: ChatGPT (GPT-5.3 Mini) <chatgpt@openai.com>
Change-Id: Ic4fe13c405e11b658b1a9540e49741d4e69069f3
2026-06-29 20:13:09 -04:00
Vencislav Atanasov
45bd7c4400 rbutilqt: Simplify Utils::filesystemName()
Co-authored-by: ChatGPT (GPT-5.3 Mini) <chatgpt@openai.com>
Change-Id: Ib8851f27c473afa0d656ea3885e4d65342d10ab5
2026-06-29 20:12:48 -04:00
Vencislav Atanasov
204684f3e2 themeeditor: Fix class member initialization by calling the getter
Co-authored-by: ChatGPT (GPT-5.3 Mini) <chatgpt@openai.com>
Change-Id: I5137c7c5094200809f79880bc425b0f31fee02cc
2026-06-29 20:12:32 -04:00