Trying to build KDE apps on Windows 10 - build script used by CI fails because GitLab repo list is not public

Hi! I’m new here. I’ve been trying to build KDE apps on Windows, and specifically Dolphin. I would like to make a change to the source to fix something that is preventing me from using Dolphin on Windows, and potentially start contributing. I already use Dolphin as my file explorer of choice on Linux, and I’m interested in using it on Windows 10 as well.

Unfortunately I’m running into some issues trying to do this. I haven’t found build instructions for KDE apps anywhere that are specific to Windows. I tried the obvious thing, running cmake in a clone of the Dolphin repository, but this fails due to unsatisfied dependencies. And there is no automatic way that I could identify to grab Dolphin’s quite many dependencies… Except by using the KDE ci-utilities Python script run-ci-build.py.

By all accounts, this looks like it ought to do the job. (At least, since I modified some open calls in components/Dependencies.py to read YAML as utf-8 encoded text files instead of as binary files.) But I get a 403 error at the point that the script tries to list packages on invent.kde.org, which it needs to do in order to resolve those aforementioned dependencies. Even though I have registered an account and created a GitLab API token (with read-only access) that I have provided to the script, the Python script still fails with this traceback:

Traceback (most recent call last):
  File "e:\kde\src\ci-utilities\run-ci-build.py", line 99, in <module>
    packageRegistry = Package.Registry( localCachePath, gitlabInstance, gitlabToken, packageProject )
  File "e:\kde\src\ci-utilities\components\Package.py", line 51, in __init__
    for package in self.remoteRegistry.packages.list( as_list=False ):
  File "C:\Python\python-3.10.2\lib\site-packages\gitlab\exceptions.py", line 338, in wrapped_f
    raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabListError: 403: 403 Forbidden

Here’s what I have been doing to try to run this script:

set KDECI_CACHE_PATH=kdeci_cache
set KDECI_GITLAB_SERVER=https://invent.kde.org
set KDECI_PACKAGE_PROJECT=system/dolphin
set KDECI_GITLAB_TOKEN=[personal_access_token]
python -u ci-utilities/run-ci-build.py --project dolphin --branch master --platform Windows/Wt5/Shared

I suppose my next step will be to try grabbing all of Dolphin’s dependencies manually, though I expect this will be a very time-consuming process. I’m hoping I can get some direction here before I try that? Why is it not possible to list the repositories available on GitLab without privileged access?

Thanks!

1 Like

Hello the ci build scripts should not be used to build applications. It’s only helpful in the context of the ci.

On windows (and android and mac), you want instead to use craft Craft - KDE Community Wiki

1 Like

If you only want to use Dolphin, you can download a pre-built binary from here Dolphin_Release_win64 [Jenkins]

I’ll take a look at Craft, thank you for the link.

I did find the pre-built binaries, but found that there was no way to change the default light UI theme of the Windows build without recompiling, apparently due to a difference in how Qt works between Windows and Linux. I strongly prefer to use Dolphin with a dark UI theme.

I tracked down a patch here that I want to try using as a starting point:

But in order to do that, I need to build from source myself.

Of course, running the same script the CI uses to produce the pre-built binaries seemed like a reasonable way to go. Though I was very surprised to find that I didn’t have permission to read KDE’s GitLab repositories.

1 Like

The pre-build binaries are not build by the (GitLab) CI. The CI is only to check the build and run tests. Instead the binaries are build by a CD on KDE’s Jenkins instanstance based on Craft. Hence using Craft locally too makes sense.

If you need help with Craft there is a Matrix room: https://go.kde.org/matrix/#/#kde-craft:kde.org