Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into skin_selector
This commit is contained in:
commit
75fbdc2df5
2
.github/workflows/backport.yml
vendored
2
.github/workflows/backport.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Create backport PRs
|
||||
uses: korthout/backport-action@v2.5.0
|
||||
uses: korthout/backport-action@v3.0.2
|
||||
with:
|
||||
# Config README: https://github.com/korthout/backport-action#backport-action
|
||||
pull_description: |-
|
||||
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -611,7 +611,7 @@ jobs:
|
||||
flatpak:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: bilelmoussaoui/flatpak-github-actions:kde-5.15-23.08
|
||||
image: bilelmoussaoui/flatpak-github-actions:kde-6.7
|
||||
options: --privileged
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
2
.github/workflows/update-flake.yml
vendored
2
.github/workflows/update-flake.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
|
||||
- uses: cachix/install-nix-action@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b # v27
|
||||
|
||||
- uses: DeterminateSystems/update-flake-lock@v21
|
||||
with:
|
||||
|
52
flake.lock
generated
52
flake.lock
generated
@ -23,11 +23,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714641030,
|
||||
"narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=",
|
||||
"lastModified": 1715865404,
|
||||
"narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e",
|
||||
"rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -36,24 +36,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@ -93,11 +75,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1715413075,
|
||||
"narHash": "sha256-FCi3R1MeS5bVp0M0xTheveP6hhcCYfW/aghSTPebYL4=",
|
||||
"lastModified": 1716619601,
|
||||
"narHash": "sha256-9dUxZf8MOqJH3vjbhrz7LH4qTcnRsPSBU1Q50T7q/X8=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e4e7a43a9db7e22613accfeb1005cca1b2b1ee0d",
|
||||
"rev": "47e03a624662ce399e55c45a5f6da698fc72c797",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -112,7 +94,6 @@
|
||||
"flake-compat": [
|
||||
"flake-compat"
|
||||
],
|
||||
"flake-utils": "flake-utils",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
@ -122,11 +103,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714478972,
|
||||
"narHash": "sha256-q//cgb52vv81uOuwz1LaXElp3XAe1TqrABXODAEF6Sk=",
|
||||
"lastModified": 1716213921,
|
||||
"narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "2849da033884f54822af194400f8dff435ada242",
|
||||
"rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -143,21 +124,6 @@
|
||||
"nixpkgs": "nixpkgs",
|
||||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
@ -1,6 +1,6 @@
|
||||
id: org.prismlauncher.PrismLauncher
|
||||
runtime: org.kde.Platform
|
||||
runtime-version: 5.15-23.08
|
||||
runtime-version: 6.7
|
||||
sdk: org.kde.Sdk
|
||||
sdk-extensions:
|
||||
- org.freedesktop.Sdk.Extension.openjdk21
|
||||
@ -38,7 +38,6 @@ modules:
|
||||
config-opts:
|
||||
- -DLauncher_BUILD_PLATFORM=flatpak
|
||||
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
- -DLauncher_QT_VERSION_MAJOR=5
|
||||
build-options:
|
||||
env:
|
||||
JAVA_HOME: /usr/lib/sdk/openjdk17/jvm/openjdk-17
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "tasks/ConcurrentTask.h"
|
||||
#if defined(LAUNCHER_APPLICATION)
|
||||
#include "Application.h"
|
||||
#include "ui/dialogs/CustomMessageBox.h"
|
||||
#endif
|
||||
|
||||
NetJob::NetJob(QString job_name, shared_qobject_ptr<QNetworkAccessManager> network, int max_concurrent)
|
||||
@ -67,8 +68,11 @@ void NetJob::executeNextSubTask()
|
||||
// We're finished, check for failures and retry if we can (up to 3 times)
|
||||
if (isRunning() && m_queue.isEmpty() && m_doing.isEmpty() && !m_failed.isEmpty() && m_try < 3) {
|
||||
m_try += 1;
|
||||
while (!m_failed.isEmpty())
|
||||
m_queue.enqueue(m_failed.take(*m_failed.keyBegin()));
|
||||
while (!m_failed.isEmpty()) {
|
||||
auto task = m_failed.take(*m_failed.keyBegin());
|
||||
m_done.remove(task.get());
|
||||
m_queue.enqueue(task);
|
||||
}
|
||||
}
|
||||
ConcurrentTask::executeNextSubTask();
|
||||
}
|
||||
@ -140,3 +144,25 @@ void NetJob::updateState()
|
||||
setStatus(tr("Executing %1 task(s) (%2 out of %3 are done)")
|
||||
.arg(QString::number(m_doing.count()), QString::number(m_done.count()), QString::number(totalSize())));
|
||||
}
|
||||
|
||||
void NetJob::emitFailed(QString reason)
|
||||
{
|
||||
#if defined(LAUNCHER_APPLICATION)
|
||||
auto response = CustomMessageBox::selectable(nullptr, "Confirm retry",
|
||||
"The tasks failed\n"
|
||||
"Failed urls\n" +
|
||||
getFailedFiles().join("\n\t") +
|
||||
"\n"
|
||||
"If this continues to happen please check the logs of the application"
|
||||
"Do you want to retry?",
|
||||
QMessageBox::Warning, QMessageBox::Yes | QMessageBox::No, QMessageBox::No)
|
||||
->exec();
|
||||
|
||||
if (response == QMessageBox::Yes) {
|
||||
m_try = 0;
|
||||
executeNextSubTask();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
ConcurrentTask::emitFailed(reason);
|
||||
}
|
@ -66,6 +66,7 @@ class NetJob : public ConcurrentTask {
|
||||
public slots:
|
||||
// Qt can't handle auto at the start for some reason?
|
||||
bool abort() override;
|
||||
void emitFailed(QString reason) override;
|
||||
|
||||
protected slots:
|
||||
void executeNextSubTask() override;
|
||||
|
@ -18,7 +18,7 @@
|
||||
jdk21,
|
||||
gamemode,
|
||||
flite,
|
||||
mesa-demos,
|
||||
glxinfo,
|
||||
udev,
|
||||
libusb1,
|
||||
msaClientID ? null,
|
||||
@ -81,7 +81,7 @@ in
|
||||
runtimePrograms =
|
||||
[
|
||||
xorg.xrandr
|
||||
mesa-demos # need glxinfo
|
||||
glxinfo
|
||||
]
|
||||
++ additionalPrograms;
|
||||
in
|
||||
|
Loading…
Reference in New Issue
Block a user