From 46e81cd8f88e964259fe89a5ab13bfe2dd0c8a6a Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Mon, 3 Mar 2025 10:03:01 +0000 Subject: [PATCH 01/14] Add ability to insert extra config for windows builds. --- .github/workflows/build_and_deploy.yaml | 8 ++++++++ .github/workflows/build_windows.yaml | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/build_and_deploy.yaml b/.github/workflows/build_and_deploy.yaml index 7c45433a..11d1d85e 100644 --- a/.github/workflows/build_and_deploy.yaml +++ b/.github/workflows/build_and_deploy.yaml @@ -63,10 +63,18 @@ jobs: strategy: matrix: arch: [ia32, x64, arm64] + include: + - arch: ia32 + extra_config: |- + "user_notice": { + "title": "Element will no longer be available for this platform soon", + "description": "Support for 32-bit Windows installations will be removed in the next release." + } uses: ./.github/workflows/build_windows.yaml secrets: inherit with: sign: true + extra_config: ${{ matrix.extra_config }} arch: ${{ matrix.arch }} version: ${{ needs.prepare.outputs.nightly-version }} diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index cb7c318a..c21b0bcf 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -22,6 +22,10 @@ on: type: string required: true description: "The architecture to build for, one of 'x64' | 'ia32' | 'arm64'" + extra_config: + type: string + required: false + description: "Additional configuration for config.json to be inserted for this build." version: type: string required: false @@ -105,6 +109,20 @@ jobs: - name: Install Deps run: "yarn install --frozen-lockfile" + - name: Insert config snippet + if: inputs.extra_config != '' + shell: bash + run: | + mkdir config-edit + yarn asar extract webapp.asar config-edit + cd config-edit + mv config.json old-config.json + echo ${{ inputs.extra_config }} | jq -s '.[0] * .[1]' old-config.json - > config.json + rm old-config.json + rm webapp.asar + cd .. + yarn asar pack config-edit/ webpack.asar + - name: Set up sqlcipher macros if: steps.cache.outputs.cache-hit != 'true' && contains(inputs.arch, 'arm') shell: pwsh From 7c17bdcafe2b95710ba63810b8e7aa7955425ec3 Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Mon, 3 Mar 2025 10:04:10 +0000 Subject: [PATCH 02/14] switch order --- .github/workflows/build_windows.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index c21b0bcf..6baf3478 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -119,8 +119,8 @@ jobs: mv config.json old-config.json echo ${{ inputs.extra_config }} | jq -s '.[0] * .[1]' old-config.json - > config.json rm old-config.json - rm webapp.asar cd .. + rm webapp.asar yarn asar pack config-edit/ webpack.asar - name: Set up sqlcipher macros From 782ba453cfb6f4260ca8222058722565f3ce5b30 Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Mon, 3 Mar 2025 10:08:20 +0000 Subject: [PATCH 03/14] drop build_and_deploy.yaml changes --- .github/workflows/build_and_deploy.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/build_and_deploy.yaml b/.github/workflows/build_and_deploy.yaml index 11d1d85e..7c45433a 100644 --- a/.github/workflows/build_and_deploy.yaml +++ b/.github/workflows/build_and_deploy.yaml @@ -63,18 +63,10 @@ jobs: strategy: matrix: arch: [ia32, x64, arm64] - include: - - arch: ia32 - extra_config: |- - "user_notice": { - "title": "Element will no longer be available for this platform soon", - "description": "Support for 32-bit Windows installations will be removed in the next release." - } uses: ./.github/workflows/build_windows.yaml secrets: inherit with: sign: true - extra_config: ${{ matrix.extra_config }} arch: ${{ matrix.arch }} version: ${{ needs.prepare.outputs.nightly-version }} From 3c4791f7ce76aebfa33aba00afc91ac7036a0467 Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Mon, 3 Mar 2025 10:08:22 +0000 Subject: [PATCH 04/14] use var mapper --- .github/workflows/build_windows.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 6baf3478..f44abca0 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -60,7 +60,11 @@ jobs: "ia32": { "target": "i686-pc-windows-msvc", "build-args": "--ia32", - "arch": "x86" + "arch": "x86", + "extra_config": { + "title": "Element will no longer be available for this platform soon", + "description": "Support for 32-bit Windows installations will be removed in the next release." + } } } @@ -110,14 +114,14 @@ jobs: run: "yarn install --frozen-lockfile" - name: Insert config snippet - if: inputs.extra_config != '' + if: steps.config.outputs.extra_config != '' shell: bash run: | mkdir config-edit yarn asar extract webapp.asar config-edit cd config-edit mv config.json old-config.json - echo ${{ inputs.extra_config }} | jq -s '.[0] * .[1]' old-config.json - > config.json + echo ${{ steps.config.outputs.extra_config }} | jq -s '.[0] * .[1]' old-config.json - > config.json rm old-config.json cd .. rm webapp.asar From 0bb7ccb0541a6782917375aea67f578f2b7d8647 Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Mon, 3 Mar 2025 10:09:19 +0000 Subject: [PATCH 05/14] that's actually a config now --- .github/workflows/build_windows.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index f44abca0..06ad34a9 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -22,10 +22,6 @@ on: type: string required: true description: "The architecture to build for, one of 'x64' | 'ia32' | 'arm64'" - extra_config: - type: string - required: false - description: "Additional configuration for config.json to be inserted for this build." version: type: string required: false @@ -62,8 +58,10 @@ jobs: "build-args": "--ia32", "arch": "x86", "extra_config": { - "title": "Element will no longer be available for this platform soon", - "description": "Support for 32-bit Windows installations will be removed in the next release." + "user_notice": { + "title": "Element will no longer be available for this platform soon", + "description": "Support for 32-bit Windows installations will be removed in the next release." + } } } } From 63f29006fc3fe8e443c72516d3eb4de3b0855f6a Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Mon, 3 Mar 2025 10:13:43 +0000 Subject: [PATCH 06/14] escaped --- .github/workflows/build_windows.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 06ad34a9..0468ab48 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -57,11 +57,11 @@ jobs: "target": "i686-pc-windows-msvc", "build-args": "--ia32", "arch": "x86", - "extra_config": { - "user_notice": { - "title": "Element will no longer be available for this platform soon", - "description": "Support for 32-bit Windows installations will be removed in the next release." - } + "extra_config": "{ + \"user_notice\": { + \"title\": \"Element will no longer be available for this platform soon\", + \"description\": \"Support for 32-bit Windows installations will be removed in the next release.\" + }" } } } From ae17facfe0b0b8cfd6358d018ab9660c2c07186d Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Mon, 3 Mar 2025 10:17:24 +0000 Subject: [PATCH 07/14] off by one brackets --- .github/workflows/build_windows.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 0468ab48..d9b291f3 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -58,9 +58,10 @@ jobs: "build-args": "--ia32", "arch": "x86", "extra_config": "{ - \"user_notice\": { - \"title\": \"Element will no longer be available for this platform soon\", - \"description\": \"Support for 32-bit Windows installations will be removed in the next release.\" + \"user_notice\": { + \"title\": \"Element will no longer be available for this platform soon\", + \"description\": \"Support for 32-bit Windows installations will be removed in the next release.\" + } }" } } From d61c284d8e14343a8fecd84c66d07566f83b2d1a Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Mon, 3 Mar 2025 10:20:13 +0000 Subject: [PATCH 08/14] drop newlines --- .github/workflows/build_windows.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index d9b291f3..a1aaa6a7 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -57,12 +57,7 @@ jobs: "target": "i686-pc-windows-msvc", "build-args": "--ia32", "arch": "x86", - "extra_config": "{ - \"user_notice\": { - \"title\": \"Element will no longer be available for this platform soon\", - \"description\": \"Support for 32-bit Windows installations will be removed in the next release.\" - } - }" + "extra_config": "{\"user_notice\": {\"title\": \"Element will no longer be available for this platform soon\",\"description\": \"Support for 32-bit Windows installations will be removed in the next release.\"}}" } } } From 50836358dcd622cfb9546d4b3e9a41ecb5ef452b Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Mon, 3 Mar 2025 10:22:26 +0000 Subject: [PATCH 09/14] another bracket -_- --- .github/workflows/build_windows.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index a1aaa6a7..014c8075 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -58,7 +58,6 @@ jobs: "build-args": "--ia32", "arch": "x86", "extra_config": "{\"user_notice\": {\"title\": \"Element will no longer be available for this platform soon\",\"description\": \"Support for 32-bit Windows installations will be removed in the next release.\"}}" - } } } From f2319fc1733fd6e9304b8d9cc874c9e427b7b207 Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Mon, 3 Mar 2025 10:29:19 +0000 Subject: [PATCH 10/14] quote --- .github/workflows/build_windows.yaml | 29 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 014c8075..10a36835 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -67,6 +67,21 @@ jobs: with: name: webapp + - name: Insert config snippet + if: steps.config.outputs.extra_config != '' + shell: bash + run: | + mkdir config-edit + yarn asar extract webapp.asar config-edit + cd config-edit + mv config.json old-config.json + echo '${{ steps.config.outputs.extra_config }}' | jq -s '.[0] * .[1]' old-config.json - > config.json + rm old-config.json + cd .. + rm webapp.asar + yarn asar pack config-edit/ webpack.asar + + - name: Cache .hak id: cache uses: actions/cache@v4 @@ -106,20 +121,6 @@ jobs: - name: Install Deps run: "yarn install --frozen-lockfile" - - name: Insert config snippet - if: steps.config.outputs.extra_config != '' - shell: bash - run: | - mkdir config-edit - yarn asar extract webapp.asar config-edit - cd config-edit - mv config.json old-config.json - echo ${{ steps.config.outputs.extra_config }} | jq -s '.[0] * .[1]' old-config.json - > config.json - rm old-config.json - cd .. - rm webapp.asar - yarn asar pack config-edit/ webpack.asar - - name: Set up sqlcipher macros if: steps.cache.outputs.cache-hit != 'true' && contains(inputs.arch, 'arm') shell: pwsh From 0fc37c929a4ad8bf3deb586d4e8721a199a34e9f Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Mon, 3 Mar 2025 10:31:42 +0000 Subject: [PATCH 11/14] wait til after deps install --- .github/workflows/build_windows.yaml | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 10a36835..7a25817d 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -67,21 +67,6 @@ jobs: with: name: webapp - - name: Insert config snippet - if: steps.config.outputs.extra_config != '' - shell: bash - run: | - mkdir config-edit - yarn asar extract webapp.asar config-edit - cd config-edit - mv config.json old-config.json - echo '${{ steps.config.outputs.extra_config }}' | jq -s '.[0] * .[1]' old-config.json - > config.json - rm old-config.json - cd .. - rm webapp.asar - yarn asar pack config-edit/ webpack.asar - - - name: Cache .hak id: cache uses: actions/cache@v4 @@ -121,6 +106,21 @@ jobs: - name: Install Deps run: "yarn install --frozen-lockfile" + - name: Insert config snippet + if: steps.config.outputs.extra_config != '' + shell: bash + run: | + mkdir config-edit + yarn asar extract webapp.asar config-edit + cd config-edit + mv config.json old-config.json + echo '${{ steps.config.outputs.extra_config }}' | jq -s '.[0] * .[1]' old-config.json - > config.json + rm old-config.json + cd .. + rm webapp.asar + yarn asar pack config-edit/ webpack.asar + + - name: Set up sqlcipher macros if: steps.cache.outputs.cache-hit != 'true' && contains(inputs.arch, 'arm') shell: pwsh From 783d0f15b88246e9eca27ea428bc2c04b83c28c6 Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Mon, 3 Mar 2025 10:32:27 +0000 Subject: [PATCH 12/14] lint --- .github/workflows/build_windows.yaml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 7a25817d..349daf56 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -110,16 +110,15 @@ jobs: if: steps.config.outputs.extra_config != '' shell: bash run: | - mkdir config-edit - yarn asar extract webapp.asar config-edit - cd config-edit - mv config.json old-config.json - echo '${{ steps.config.outputs.extra_config }}' | jq -s '.[0] * .[1]' old-config.json - > config.json - rm old-config.json - cd .. - rm webapp.asar - yarn asar pack config-edit/ webpack.asar - + mkdir config-edit + yarn asar extract webapp.asar config-edit + cd config-edit + mv config.json old-config.json + echo '${{ steps.config.outputs.extra_config }}' | jq -s '.[0] * .[1]' old-config.json - > config.json + rm old-config.json + cd .. + rm webapp.asar + yarn asar pack config-edit/ webpack.asar - name: Set up sqlcipher macros if: steps.cache.outputs.cache-hit != 'true' && contains(inputs.arch, 'arm') From 5b0ab727457aeb07c9f5ce045f92ecb6ae046bc6 Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Mon, 3 Mar 2025 11:00:48 +0000 Subject: [PATCH 13/14] s/webpack/webapp --- .github/workflows/build_windows.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 349daf56..2accbd5d 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -118,7 +118,7 @@ jobs: rm old-config.json cd .. rm webapp.asar - yarn asar pack config-edit/ webpack.asar + yarn asar pack config-edit/ webapp.asar - name: Set up sqlcipher macros if: steps.cache.outputs.cache-hit != 'true' && contains(inputs.arch, 'arm') From 2669b2adebab9d3d7476f615a07c280de26e542e Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Tue, 4 Mar 2025 09:57:29 +0000 Subject: [PATCH 14/14] Update notice --- .github/workflows/build_windows.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_windows.yaml b/.github/workflows/build_windows.yaml index 2accbd5d..be95f9b7 100644 --- a/.github/workflows/build_windows.yaml +++ b/.github/workflows/build_windows.yaml @@ -57,7 +57,7 @@ jobs: "target": "i686-pc-windows-msvc", "build-args": "--ia32", "arch": "x86", - "extra_config": "{\"user_notice\": {\"title\": \"Element will no longer be available for this platform soon\",\"description\": \"Support for 32-bit Windows installations will be removed in the next release.\"}}" + "extra_config": "{\"user_notice\": {\"title\": \"Your desktop support ends soon\",\"description\": \"Support for 32-bit Windows installations will end soon, this impacts you. Transition to the web or mobile app for continued access.\"}}" } }