From b793a3e30e50419b9ef934336c9adc810513f419 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Wed, 22 Nov 2023 13:43:48 +0000 Subject: [PATCH 1/6] flatpak: update gstreamer to 1.22.7 * Remove -Dqt6 from gstreamer itself, since qmlgl is only part of gst-plugins-good * Add necessary flags to gst-plugins-good --- im.nheko.Nheko.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/im.nheko.Nheko.yaml b/im.nheko.Nheko.yaml index 2b315692..f8da2a22 100644 --- a/im.nheko.Nheko.yaml +++ b/im.nheko.Nheko.yaml @@ -178,15 +178,17 @@ modules: - buildsystem: meson name: gstreamer sources: - - commit: ecd471f5ea4645102b206a43d863f0f0fe7d04ec - tag: 1.22.3 + - commit: 4d13eddc8b6d3f42ba44682ba42048acf170547f + tag: 1.22.7 type: git url: https://gitlab.freedesktop.org/gstreamer/gstreamer.git config-opts: - --auto-features=disabled - -Dgood=enabled - -Dgst-plugins-good:qt6=enabled - #- -Dqt6=enabled <- not available on 1.22 + - -Dgst-plugins-good:qt-egl=enabled + - -Dgst-plugins-good:qt-wayland=enabled + - -Dgst-plugins-good:qt-x11=enabled - -Dbase=enabled - -Dgst-plugins-base:gl=enabled - -Dgst-plugins-base:gl_platform=glx,egl From 8d7175b702e773800cae013195ce6a746a6dbc55 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 19 Dec 2023 00:49:41 +0100 Subject: [PATCH 2/6] Fix backslashes escapes (And shrug losing arms in replies) --- src/timeline/InputBar.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp index bcb30aa0..d37e403f 100644 --- a/src/timeline/InputBar.cpp +++ b/src/timeline/InputBar.cpp @@ -461,11 +461,11 @@ InputBar::message(const QString &msg, MarkdownOverride useMarkdown, bool rainbow text.body = replaceMatrixToMarkdownLink(msg.trimmed()).toStdString(); // Don't send formatted_body, when we don't need to - // Specifically, if it includes no html tag and no newlines (which behave differently in - // formatted bodies). Probably we forgot something, so this might need to expand at some - // point. + // Specifically, if it includes no html tag and no newlines or + // backslashes (which behave differently in formatted bodies). Probably + // we forgot something, so this might need to expand at some point. if (text.formatted_body.find('<') == std::string::npos && - text.body.find('\n') == std::string::npos) + text.body.find('\n') == std::string::npos && text.body.find('\\') == std::string::npos) text.formatted_body = ""; else text.format = "org.matrix.custom.html"; @@ -880,7 +880,7 @@ InputBar::command(const QString &command, QString args) err->matrix_error.error); }); } else if (command == QLatin1String("shrug")) { - message("¯\\_(ツ)_/¯" + (args.isEmpty() ? QLatin1String("") : " " + args)); + message("¯\\\\\\_(ツ)\\_/¯" + (args.isEmpty() ? QLatin1String("") : " " + args)); } else if (command == QLatin1String("fliptable")) { message(QStringLiteral("(╯°□°)╯︵ ┻━┻")); } else if (command == QLatin1String("unfliptable")) { From 6bfde51ddd2c4e6d7c8bdca817c098c425a4c7e7 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 19 Dec 2023 03:23:50 +0100 Subject: [PATCH 3/6] Fix apple silicon pipeline --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 19ce069f..ef51f685 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,7 +45,9 @@ codesign-windows: stage: sign image: win10-base tags: [libvirt,powershell] - resource_group: windows_signingA + rules: + - if : '$CI_PIPELINE_TRIGGERED == null' + resource_group: windows_signing environment: name: windows_signing #variables: From 6ec91b6efc00c9b11a4aa57592347bc7134b3b20 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 20 Dec 2023 00:23:32 +0100 Subject: [PATCH 4/6] Upload windows nightlies --- .gitlab-ci.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ef51f685..732e2faf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,7 +46,7 @@ codesign-windows: image: win10-base tags: [libvirt,powershell] rules: - - if : '$CI_PIPELINE_TRIGGERED == null' + - if : '$CI_PIPELINE_TRIGGERED == null && $CI_COMMIT_REF_PROTECTED == "true"' resource_group: windows_signing environment: name: windows_signing @@ -55,16 +55,32 @@ codesign-windows: script: - Get-ChildItem -Path Cert:CurrentUser\My - ./.ci/windows/sign.bat + - mkdir -p artifacts + - mv nheko.msix artifacts/nheko.msix needs: - job: build-windows - rules: - - if : '$CI_COMMIT_REF_PROTECTED == "true"' artifacts: paths: - - nheko.msix + - artifacts/nheko.msix name: nheko-${CI_COMMIT_SHORT_SHA}-windows expose_as: 'windows-app' +upload-windows: + stage: deploy + image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest + tags: [docker] + rules: + - if : '$CI_PIPELINE_TRIGGERED == null && $CI_COMMIT_REF_PROTECTED == "true"' + variables: + GIT_STRATEGY: none + before_script: + - apk add curl unzip + script: + - export VERSION=$(unzip -p artifacts/nheko.msix AppxManifest.xml | sed -n 's/.* Version="\([0-9.]*\)".*/\1/p') + - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file artifacts/nheko.msix "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/windows-nightly/${VERSION}/nheko.msix"' + needs: + - job: codesign-windows + build-clazy: stage: build image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest @@ -377,6 +393,7 @@ github-release: #- appimage-amd64 <- disabled because of missing packages - build-flatpak - codesign-macos + - codesign-windows before_script: - apk update && apk add jq curl perl script: From faaeef134fa42392f21d28e31964957930e02a6f Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 20 Dec 2023 01:07:53 +0100 Subject: [PATCH 5/6] Add appinstaller for windows nightlies --- .gitlab-ci.yml | 30 +++++++++++++++++++++++++++-- resources/NhekoNightly.appinstaller | 10 ++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 resources/NhekoNightly.appinstaller diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 732e2faf..501976dc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -70,17 +70,43 @@ upload-windows: image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest tags: [docker] rules: - - if : '$CI_PIPELINE_TRIGGERED == null && $CI_COMMIT_REF_PROTECTED == "true"' + - if: '$CI_PIPELINE_TRIGGERED == null && $CI_COMMIT_REF_PROTECTED == "true" && $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/' + variables: + PACKAGE_NAME: "windows" + - if: '$CI_PIPELINE_TRIGGERED == null && $CI_COMMIT_REF_PROTECTED == "true"' variables: GIT_STRATEGY: none + PACKAGE_NAME: "windows-nightly" before_script: - apk add curl unzip script: - export VERSION=$(unzip -p artifacts/nheko.msix AppxManifest.xml | sed -n 's/.* Version="\([0-9.]*\)".*/\1/p') - - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file artifacts/nheko.msix "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/windows-nightly/${VERSION}/nheko.msix"' + - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file artifacts/nheko.msix "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/${VERSION}/nheko.msix"' needs: - job: codesign-windows +pages: + stage: deploy + image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest + tags: [docker] + rules: + - if: '$CI_PIPELINE_TRIGGERED == null && $CI_COMMIT_REF_PROTECTED == "true"' + interruptible: true + before_script: + - apk add curl jq + script: + - export LATEST_WINDOWS_NIGHTLY=$(curl "https://nheko.im/api/v4/projects/2/packages?package_name=windows-nightly&order_by=version&sort=desc" | jq -r '.[0].version') + - sed "s/0.11.3.4/${LATEST_WINDOWS_NIGHTLY}/g" -i resources/NhekoNightly.appinstaller + - mkdir public + - mv resources/NhekoNightly.appinstaller public + needs: + - job: upload-windows + optional: true + artifacts: false + artifacts: + paths: + - public + build-clazy: stage: build image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest diff --git a/resources/NhekoNightly.appinstaller b/resources/NhekoNightly.appinstaller new file mode 100644 index 00000000..bd94f5d9 --- /dev/null +++ b/resources/NhekoNightly.appinstaller @@ -0,0 +1,10 @@ + + + + + + + true + + + From 4b685030dcafe6ff35fa1e7e4ff17437893e6948 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 20 Dec 2023 05:38:30 +0100 Subject: [PATCH 6/6] Bump minimum Windows version to possibly fix msix --- resources/AppxManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/AppxManifest.xml b/resources/AppxManifest.xml index 417d0229..978fda8c 100644 --- a/resources/AppxManifest.xml +++ b/resources/AppxManifest.xml @@ -16,7 +16,7 @@ - +