Commit graph

73 commits

Author SHA1 Message Date
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
88a50ab104 rbutil: Change MacOS dmgbuild to use plistlib.
We're not dealing with binary plist files, to biplist is not the one we
want. Also, plistlib is part of Python.

Change-Id: I529516da0d6b04809a7c0d38b20c6f40900560f8
2021-12-26 21:59:19 +01:00
Dominik Riebeling
241d478ce9 rbutil: Replace QRegExp with QRegularExpression.
More updating for Qt6 compatibility.

Change-Id: I2f5bb943acc1f6bdd7bdab0e90e3c0ede596f43a
2021-12-26 20:13:05 +01:00
Dominik Riebeling
1ad4faa334 rbutil: Modernize connect() calls.
Auto fixed by clazy.

Change-Id: Iea16d892fd81c151f0081f7476acc5eda62afc25
2021-12-26 19:50:19 +01:00
Dominik Riebeling
80c0268c7a rbutil: Make test compile with Qt6.
Change-Id: I2e6520588c7a82482b2c605d0b295f8fc7e0a03b
2021-12-26 11:06:57 +01:00
Dominik Riebeling
35bc4590ae rbutil: Remove ProgressLogger interface class.
Since we're using signals to connect to the Logger we don't need an
interface class, and the only thing still used was the log level enum.
Put those values in a dedicated header instead.

Change-Id: Ic3aee14ba13b81e283b477d11b1c15a5c26ffeab
2021-12-26 11:05:25 +01:00
Dominik Riebeling
01e245417e rbutil: Fix various issues found by clazy.
Change-Id: I91ca2baed34f0f3b561602f95f66bbd4e17e74ab
2021-12-25 19:59:57 +01:00
Dominik Riebeling
0768705545 rbutil: Fix invalid access on error in test.
Change-Id: Ie9c65041bb4a1ba4215a2d0786bf984cfa6d023b
2021-12-25 17:47:14 +01:00
Dominik Riebeling
c753d31549 rbutil: Remove unused variable from test.
Change-Id: Iea57ffa319f50df8836c0c7c608ff37a394eb68d
2021-12-25 17:47:14 +01:00
Dominik Riebeling
6ff75b475c rbutil: Modernize connect() calls.
Auto fixed by clazy.

Change-Id: Ib7cce8c0a85f8f915263980bf5d2508a4b19bbe3
2021-12-25 17:47:14 +01:00
Dominik Riebeling
dce2ccdd96 rbutil: Remove unused mspack source to fix warning.
We don't need this file, and the implementations are stubs, causing a
compile warning. Remove it from the build.

Change-Id: I4ee2594c8fbc3ecf4661cc4144f8d9072bd6d983
2021-12-25 17:47:14 +01:00
Dominik Riebeling
eb8dc75d38 rbutil: Create git version information at build time.
Change-Id: Iaf701f4d64d6852423f6a28a753b27abc43477e2
2021-12-25 17:47:14 +01:00
Dominik Riebeling
e9ef7f0dd3 rbutil: Split out rbutilqt parts into separate cmake list.
Change-Id: I84ada20765b98620e1f06bc7116bbdaaae296fe9
2021-12-25 17:47:14 +01:00
Dominik Riebeling
c979717b80 rbutil: Fix logger segfault on application exit.
Getting the values from a QMultiMap() returns a list, but not the same
on consecutive calls. Thus calling it twice to get the iterators will
yield different lists, causing the iterator to fail.

Fixes a segfault when destructing the logger.

Change-Id: Ie8ea8d3a9acf6fbd3969fbb49cbc50a1c1fa2854
2021-12-25 17:47:14 +01:00
Dominik Riebeling
774b35cccf rbutil: Deploy support in cmake.
Add a "deploy" target that will create a distributable file.

- Linux: AppImage.
- Windows: zip file.
- MacOS: dmg.

Change-Id: Id8ae9c021bc5bbb1abf066205b57d943c3f3b327
2021-12-25 17:47:14 +01:00
Dominik Riebeling
4eb3f05042 rbutil: Increase test timeout value for HttpGet tests.
The test timeout is used to abort the tests if something goes wrong and
should not occur during normal test run. On some systems the current
value is too small, causing a timeout and thus test failure before
HttpGet responds.  Increasing the timeout fixes this.

Change-Id: Ib61dd97d9f866c03cca9d2f0d7cb151f7076410d
2021-12-25 17:47:14 +01:00
Dominik Riebeling
f2798c225a rbutil: Simplify reading rockbox-info.txt.
Simplify, and replace use of QRegExp with QRegularExpression for Qt6
compatibility.

Also fix the test running on Windows. RockboxInfo constructs the
filename from path and filename, so we cannot pass an empty path, since
that results in an invalid path. On Linux / MacOS this works only
because we use an absolute path.

Change-Id: Ieaf30a2df005291d3e997aabf42d64ee832381c2
2021-12-25 17:47:14 +01:00
Dominik Riebeling
dc677208d0 rbutil: Fix unit tests on Windows.
Change-Id: I124882eb26b01e1acfadfba55bc718ab330ab52a
2021-12-25 17:47:14 +01:00
Dominik Riebeling
f3a54a7c22 rbutil: Put translation qrc next to translations.
That way we don't need to put paths in the file, and will help with
cmake support later.

Change-Id: I0835674e0ea2e5ec5a1596798e26cfbfde29468d
2021-12-24 18:05:53 +01:00
Dominik Riebeling
2fdc056fee rbutil: Use https URLs in Changelog links.
Change-Id: I9a40163c9025550185104dc00356932bda16f782
2021-12-24 18:05:53 +01:00
Dominik Riebeling
9e28474e47 rbutil: Replace QRegExp with QRegularExpression.
The former is not part of Qt6 anymore, while the latter has been
introduced with Qt5. We don't support Qt4 anymore, so move to
QRegularExpression.

Change-Id: Icc15ef422790f3740660c5581294aa0536f46b1f
2021-12-24 18:05:53 +01:00
Dominik Riebeling
72071d108c rbutil: Remove unnecessary include from logger.
Change-Id: I860331880a45912ad73f02f049f869dd155eeb2d
2021-12-24 18:05:53 +01:00
Dominik Riebeling
c876d3bbef rbutil: Merge rbutil with utils folder.
rbutil uses several components from the utils folder, and can be
considered part of utils too. Having it in a separate folder is an
arbitrary split that doesn't help anymore these days, so merge them.

This also allows other utils to easily use libtools.make without the
need to navigate to a different folder.

Change-Id: I3fc2f4de19e3e776553efb5dea5f779dfec0dc21
2021-12-24 18:05:53 +01:00