summary refs log tree commit diff
diff options
context:
space:
mode:
authorNep Nep <nepnep91@protonmail.com>2023-12-20 20:31:48 -0300
committerGitHub <noreply@github.com>2023-12-20 20:31:48 -0300
commita691f5de3cec1da57c03a9626a7a55914ef5b3bb (patch)
tree2f6c9a18d1aac0edee9a16ad28ffcc39943f1a4a
parentFix memory leak and invite filtering (diff)
parentBump minimum Windows version to possibly fix msix (diff)
downloadnheko-a691f5de3cec1da57c03a9626a7a55914ef5b3bb.tar.xz
Merge branch 'Nheko-Reborn:master' into ignore-command
-rw-r--r--.gitlab-ci.yml53
-rw-r--r--im.nheko.Nheko.yaml8
-rw-r--r--resources/AppxManifest.xml2
-rw-r--r--resources/NhekoNightly.appinstaller10
-rw-r--r--src/timeline/InputBar.cpp10
5 files changed, 70 insertions, 13 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 19ce069f..501976dc 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 && $CI_COMMIT_REF_PROTECTED == "true"'
+  resource_group: windows_signing
   environment: 
     name: windows_signing
   #variables:
@@ -53,16 +55,58 @@ 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" && $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/${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
@@ -375,6 +419,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:
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
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 @@
     <Resource Language="de-de" />
   </Resources>
   <Dependencies>
-    <TargetDeviceFamily Name="Windows.Desktop"  MinVersion="10.0.14316.0" MaxVersionTested="10.0.15063.0"  />
+    <TargetDeviceFamily Name="Windows.Desktop"  MinVersion="10.0.19044.0" MaxVersionTested="10.0.19045.0"  />
   </Dependencies>
   <Capabilities>
     <rescap:Capability Name="runFullTrust"/>
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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AppInstaller Uri="https://nheko-reborn.pages.nheko.im/nheko/NhekoNightly.appinstaller" Version="0.0.0.1" xmlns="http://schemas.microsoft.com/appx/appinstaller/2018">
+  <MainPackage Name="im.nheko.Nheko" Version="0.11.3.4" Publisher="CN=Nicolas Werner, O=Nicolas Werner, L=Munich, S=Bavaria, C=DE" Uri="https://nheko.im/api/v4/projects/2/packages/generic/windows-nightly/0.11.3.4/nheko.msix" ProcessorArchitecture="x64" />
+  <UpdateSettings>
+    <!-- We can't set this to check only once a month, so just check once a week. If the user doesn't want that ping, they should install the msix directly. -->
+    <OnLaunch HoursBetweenUpdateChecks="168" ShowPrompt="true" />
+    <ForceUpdateFromAnyVersion>true</ForceUpdateFromAnyVersion>
+  </UpdateSettings>
+</AppInstaller>
+
diff --git a/src/timeline/InputBar.cpp b/src/timeline/InputBar.cpp
index ba1d7880..7d5e8ba3 100644
--- a/src/timeline/InputBar.cpp
+++ b/src/timeline/InputBar.cpp
@@ -464,11 +464,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";
@@ -883,7 +883,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")) {