Commit graph

1252 commits

Author SHA1 Message Date
Dominik Riebeling
238cd13469 rbutil: Fix build info list handling with Qt6.
With Qt6 we need to check the type differently or we'd convert a
stringlist to a string.

Change-Id: I00a7a73535503b97f40edb51099a332902e881e0
2022-03-23 20:11:31 +01:00
Dominik Riebeling
f3b19de594 rbutil: Disable TTS test on Qt6.
Qt6 has QMultimedia, but QSound has been removed. It's only use for
playing a TTS test sample. Disable that for now.

Change-Id: Id3b5c834f9579a43e390c0c00a4c1a35b59182bd
2022-03-23 19:34:30 +01:00
Dominik Riebeling
00ec195c26 rbutil: Qt6 fixes.
Change-Id: Ied6bdf1c5269b53ccfedc1d80f3f3f0d6b4011da
2022-03-23 19:34:30 +01:00
Dominik Riebeling
948637c42c rbutil: Fix TalkGenerator string correction.
- Fix regexp case insensitive option being inverted.
- Pass more objects by reference.
- Some const-ness.

Change-Id: I1c77ad22ab1e505c8dce8c083d9c52e76a6860be
2022-03-23 19:34:30 +01:00
Dominik Riebeling
215ba4abf7 rbutil: Remove unnecessary Q_OBJECT.
PlayerBuildInfo uses no signals/slots, so we don't need Q_OBJECT.

Change-Id: If4e264b733d912ecda3659ea0e1abb9d2b56950e
2022-03-23 19:34:30 +01:00
Dominik Riebeling
1aea2d5b7e rbutil: Test for talkgenerator string correction.
Change-Id: I4c21dbbdae492938061883f1694f9c0f7b6b0fd9
2022-03-23 19:34:30 +01:00
Dominik Riebeling
c7c9a0f069 rbutil: Minor code cleanup.
Change-Id: Ia1b05747e64b2122cfe17ee0c2f7bf5477f3ba09
2022-03-20 20:14:21 +01:00
Dominik Riebeling
04e22d8719 rbutil: Replace use of QRegExp with QRegularExpression.
Change-Id: Ie89057a9857bc66612cb15fef81d3ca6c3e71b4c
2022-03-20 20:12:20 +01:00
Dominik Riebeling
ccdd9e6784 rbutil: Fix TTS "waiting for engine" appearing randomly.
QProgressDialog shows / hides itself automatically based on the progress
value set, so calling hide() directly doesn't prevent the dialog from
showing itself.

Change the logic to set a value instead. Fixes the progress dialog
sometimes appearing in situations where it wasn't used at all.

Change-Id: Ifef063f31b7f888bb74f180dea0679e81cc5c8fe
2022-03-20 10:00:25 +01:00
Dominik Riebeling
c21d10cb33 rbutil: Rework Festival TTS integration.
When communicating with Festival via socket don't assume readAll() would
read all data we expect. We can only read the data that has been sent by
the server so far, and this is not necessarily complete.

This notably improves the configuration dialog response and reliably.

Change-Id: I9a812f03df785fb3ad32783a8573a2c86dc317ed
2022-03-20 09:59:17 +01:00
Dominik Riebeling
e21f80f397 rbutil: Remove use of deprecated QSignalMapper.
With Qt5 we can now use lambdas instead.

Change-Id: I00fe9c355d72ef9987c61c7a36a810d6eca311bc
2022-03-19 22:04:09 +01:00
Dominik Riebeling
fcffe5fb81 rbutil: Change all download links to https.
Change-Id: I682c8e7cf4eb5d525aa64a4bbf864aa9eb7e73dc
2022-03-19 16:58:19 +01:00
Dominik Riebeling
7a2fdf3fd6 rbutil: Handle SSL certificate errors on first request.
Qt uses the systems certificate store. On old(er) systems the root
certificate might not be present, so checking the certificate from the
rockbox.org server might fail.

On startup we try to download the build-info file. If this fails with a
certificate error allow the user to temporarily accept the rockbox.org
certificate for all successive requests.

Change-Id: I459e12d53286aaedea4db659d90a5e057c56801f
2022-03-19 16:57:41 +01:00
Dominik Riebeling
a0459de4d5 rbutil: HttpGet: Return NetworkError in done signal.
Return the status value instead of simply a bool.

Change-Id: I2bffaac0087418656e80c74dc352011a4ea32ab1
2022-03-19 09:19:11 +01:00
Dominik Riebeling
430999e399 utils: Work around windeployqt bug.
For Qt versions less than 5.14 MinGW windeployqt requires passing
--release or --debug to pick the correct libs to deploy. For newer
version this must not be passed, or otherwise windeployqt errors out.

Use a conditional expression to only add the parameter for older Qt
versions.

Change-Id: I7afe2b77e9829e989adaeeb7c7499d5955926da2
2022-03-13 16:20:10 +01:00
Dominik Riebeling
22a6ae97a6 utils: Fix windeployqt step once more.
The path was actually correct before, the filename wasn't.

Change-Id: Ia7f1e5c171fbca22733bdbbcfd8844ade597f650
2022-03-12 23:32:19 +01:00
Dominik Riebeling
96f5b07d39 utils: Fix windeployqt call in cmake deploy step.
Change-Id: I295704796cf4dab32010844369b3a5492bf20e2a
2022-03-12 23:08:47 +01:00
Dominik Riebeling
403cb96f3a rbutil: Fix installing fonts / manual for development builds.
For development builds we provide a download URL, but use the daily
build files. Those require the version of the daily build to be set when
expanding the URL string.

Change-Id: Ie6dcf38f7e86527217edc01ee11a20758a178622
2022-03-12 22:46:07 +01:00
Dominik Riebeling
ce70e34476 rbutil: Fix ipodpatcher bootloader uninstall.
Fix mountpoint not passed and sectorbuf not initialized properly.

Change-Id: Ifa9d9e159767b20a51841ee422be59feca95c757
2022-03-12 22:46:07 +01:00
Dominik Riebeling
5c7b0e071f rbutil: Fix crash on sansapatcher access.
We now initialize sectorbuf explicitly, and there are situation where it
wasn't initialized explicitly.

Change-Id: I35516a1fa7326c0861885ffa058737de19285c2c
2022-03-12 22:46:07 +01:00
Dominik Riebeling
1ff11b627b rbutil: Fix bootloader uninstall availability.
The logic for disabling the uninstall button was wrong.

Change-Id: Icec4b70a7323bb6ae275e7b88fff414450ba4566
2022-03-12 22:46:07 +01:00
Dominik Riebeling
0de2d3a0b6 utils: rework cmake deploy function.
Use named arguments for function and allow passing additional executable
targets to be copied to the deploy tree.

Update current uses and add ipodpatcher and sansapatcher to Rockbox
Utility deployment.

This is in preparation for moving ipodpatcher / sansapatcher
functionality out of Rockbox Utility so we eventually can avoid
elevation / sudo of the whole installer. Currently this only results in
Rockbox Utility releases shipping ipodpatcher / sansapatcher
executables.

Change-Id: Ibb6601b7e437648135059c580e2ce2532574835a
2022-03-12 20:40:08 +01:00
Dominik Riebeling
7319356dfd rbutil: Update build instructions.
Change-Id: Iaf08b0c84997d77b034dc23f40021c2dd52fc454
2022-03-12 20:40:08 +01:00
Dominik Riebeling
748b00a7fc ipodpatcher: Split executable only parts out.
Allow building both as library and executable at the same time.

Change-Id: Idc40354fdedaeace727043936352fc17232bf16e
2022-03-12 20:40:08 +01:00
Dominik Riebeling
08afedf1f5 sansapatcher: Add cmake target to build executable.
Change-Id: Idff5674acb5347643c8a26ef64506f892445977e
2022-03-12 20:40:08 +01:00
Aidan MacDonald
cdee5284d4 jztool: support new binary header on x1000
Change-Id: If0d3fb3d5b03cf6ed87cbbb8a968ef48edb660f7
2022-03-11 11:15:56 -05:00
Dominik Riebeling
57cffae369 rbutil: Change MacOS bundle identifer to org.rockbox.
Change-Id: I06d0513a25197a942b222a59d04f44275edb7a5a
2022-03-09 19:02:01 +01:00
Dominik Riebeling
b1965b4197 rbutil: Fix setting bootloader "file" for Ipod bootloader.
On Ipods we use the bootloader "filename" to pass the mountpoint, which
is then used to determine the correct device to use.

Change-Id: I1dd2060ae9176bfdece9337160db08caf326e1f5
2022-03-08 22:42:34 +01:00
Dominik Riebeling
3cebc983a2 rbutil: Fix a crash for devices without bootloader file.
Don't try to get a bootloader filename from an empty list. This happens
if the device doesn't have a bootloader file on disk.

Change-Id: Idd4c265e7ae298913c5feefb3963120867a0e858
2022-03-08 22:32:13 +01:00
Dominik Riebeling
911b216aff rbutil: Properly initialize sansa / ipod bootloader buffer.
Fixes a crash on MacOS.

Change-Id: Ibb64a37266182c4ddfee32b2ac47b9d8f25a78e5
2022-03-08 22:32:13 +01:00
Dominik Riebeling
ae97d410c5 utils: Set cmake build type to default to Release.
Change-Id: Ie4e6aa326840cb1fbae0fe8d025e592e139d4508
2022-02-28 20:37:32 +01:00
Dominik Riebeling
8d462a1edd rbutil: Rework Logo display.
Replace QLabel with QSvgWidget so the widget draws the svg directly
instead of first creating a pixmap from it.

This also avoids an issue when building with mxe which causes the image
to not show due to a missing svg plugin (which doesn't happen for svg
icons.)

Change-Id: Ic4e265f0567984d1ffe7a3e1cc641df27755e90b
2022-02-28 20:37:32 +01:00
Dominik Riebeling
83e4078d9c cmake: Strip Release binaries when building with gcc.
Change-Id: Iaf87d6b65a38b6d0ecb66c5cb8bc7164741d7419
2022-02-28 20:37:32 +01:00
Dominik Riebeling
72904569e3 Remove outdated theme editor deploy script.
This doesn't work anymore since the switch to cmake.

Change-Id: I3a829cc58412f2e1415c6c9defeb552137757214
2022-02-28 20:37:32 +01:00
Dominik Riebeling
fa1e6cc5bf rbutil: Replace deploy with tarball script.
The old deployment script doesn't work anymore due to the change to
cmake, and since we build the distribution packages (zip / dmg /
AppImage) with cmake directly there's not much need left for the old
deployment.

Change-Id: Ide20887c5bc2e22aabbfb47374d70529609fbc3c
2022-02-28 20:37:23 +01:00
Aidan MacDonald
cbb57fe714 rbutil: allow checking bootloader installer capabilities
Instead of checking for certain hardcoded strings, fetch
the actual capability bitmask by instantiating an installer
and querying it.

Change-Id: I7883d9c1e90da37ee7c0189732ac626685adbfa1
2022-01-02 15:50:17 -05:00
Dominik Riebeling
bbd1056afb themeeditor: Fix dmg deploy steps.
- Fix binary name in Info.plist.
- Run dmgbuild as Python module, in some cases it isn't available directly.
- Add missing dmgbuild configuration for themeeditor.

Change-Id: I2db50959b88283f43e2203cf71b130cdb33103dd
2021-12-28 19:53:54 +01:00
Dominik Riebeling
3d983ad3a1 themeeditor: Create MacOS AppBundle / Win32 GUI application.
cmake needs to know about this, otherwise we'll only get an executable.

Change-Id: If40a2a5d021ca49df4afe6bb5bce538d2b466426
2021-12-28 18:34:08 +01:00
Dominik Riebeling
875fcc7daf themeeditor: Fix cmake Qt major version.
Use the correct variable.

Change-Id: I5c59664cb86b0e4d3731e7c9ad13a276a1720cbc
2021-12-28 18:16:28 +01:00
Dominik Riebeling
c055b5e933 rbutil: Add data tags to data driven unit tests.
Make tests implemented as data driven tests show a sensible test data
tag value, so test can get identified more easily.

Change-Id: Ifeb42ed11ce9a8efc6491b2c3b9fe31802a67d33
2021-12-28 17:57:04 +01:00
Dominik Riebeling
0c8f539182 rbutil: Auto-discover tests with cmake.
Change-Id: I2f6511ddc306ba1caecaa917667074cf51b61262
2021-12-28 17:57:04 +01:00
Dominik Riebeling
f37a917e9a cmake: Disable QtTest discovery when cross compiling.
Change-Id: I46e2ad16f592f3adc9f01347e9fcda451c0b3a26
2021-12-28 17:57:04 +01:00
Dominik Riebeling
c1ad915055 cmake: Add QtTest test discovery module.
Allow discivery of the QtTest based unit test.
Taken from https://github.com/ocroquette/cmake-qtest-discovery

Change-Id: I79a54568b2dbc216d35a463b6be36c197203c5b5
2021-12-28 17:57:04 +01:00
Dominik Riebeling
f53f1fbafa rbutil: Fix some more issues found by clazy.
Change-Id: I0a1a849ecea4b4666b08ccb050eb17918e90a258
2021-12-28 17:57:04 +01:00
Dominik Riebeling
b774699560 themeeditor: Remove qmake project files.
It is now part of building with cmake.

Change-Id: I6e6317f3070311c7921f93a3ec44eefdd4f55baf
2021-12-28 10:37:50 +01:00
Dominik Riebeling
3e2a7a56c0 rbutil: Remove qmake project files.
To build it configure with cmake from utils/ folder.

Change-Id: I43fab2df1768e1a055e46ec5712e3a45fefef5a9
2021-12-28 10:35:39 +01:00
Dominik Riebeling
1ddc5a202d themeeditor: Convert to cmake.
Change-Id: Ib46842c157121c64cd0091118aa9b7e43d83b8b3
2021-12-27 16:18:17 +01:00
Dominik Riebeling
36cb0d4050 themeeditor: Add svg application icon and desktop file.
Change-Id: I3213e60679330b5312bddd37669da2b18e7f9627
2021-12-27 16:17:30 +01:00
Dominik Riebeling
2ecbc18535 rbutil: cmake: Make linuxdeploy download a global target.
That way we won't get duplicated targets when the deploy function is
used for multiple targets.

Change-Id: Ie14fdd74fcc496647c3c041ae2fcf902a3cb15fa
2021-12-27 16:14:46 +01:00
Dominik Riebeling
67942629cf rbutil: Explicitly enable AppImage qt deploy plugin.
Change-Id: Id2cb21882b06f60541ecfe22b101d13c4f631131
2021-12-27 12:29:52 +01:00