mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-25 23:12:37 +01:00
Merge branch 'braid/windows-olm' into 'main'
feat: include olm to Windows builds See merge request famedly/fluffychat!1007
This commit is contained in:
commit
30b17beaa7
1
.gitignore
vendored
1
.gitignore
vendored
@ -62,3 +62,4 @@ ios/Podfile.lock
|
|||||||
/linux/out
|
/linux/out
|
||||||
/macos/out
|
/macos/out
|
||||||
.vs
|
.vs
|
||||||
|
olm
|
||||||
|
@ -124,16 +124,42 @@ build_web:
|
|||||||
- docker
|
- docker
|
||||||
- famedly
|
- famedly
|
||||||
|
|
||||||
|
# yes, we *do* build a Windows DLL on Linux. More reliable.
|
||||||
|
build_olm_windows:
|
||||||
|
image: archlinux:latest
|
||||||
|
stage: test
|
||||||
|
before_script:
|
||||||
|
- pacman-key --init
|
||||||
|
- pacman --noconfirm -Sy mingw-w64 cmake git base-devel
|
||||||
|
script:
|
||||||
|
- ./scripts/build-olm-windows.sh
|
||||||
|
- mv olm/build/libolm.dll .
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- libolm.dll
|
||||||
|
only:
|
||||||
|
- main
|
||||||
|
- tags
|
||||||
|
|
||||||
build_windows:
|
build_windows:
|
||||||
extends:
|
extends:
|
||||||
- .shared_windows_runners
|
- .shared_windows_runners
|
||||||
stage: build
|
stage: test
|
||||||
before_script: [./scripts/prepare-windows.ps1]
|
before_script:
|
||||||
script: [./scripts/build-windows.ps1]
|
- ./scripts/prepare-windows.ps1
|
||||||
|
# workarounding artifacts download being broken
|
||||||
|
- $response = Invoke-WebRequest -Uri "$CI_API_V4_URL/projects/$CI_PROJECT_ID/pipelines/$CI_PIPELINE_ID/jobs" -UseBasicParsing
|
||||||
|
- $jobs = $response | ConvertFrom-Json
|
||||||
|
- $job = $jobs | where { $_.name -eq "build_olm_windows" }
|
||||||
|
- $jobId = $job.id
|
||||||
|
- Invoke-WebRequest -Uri "$CI_API_V4_URL/projects/$CI_PROJECT_ID/jobs/$jobId/artifacts/libolm.dll" -UseBasicParsing -OutFile libolm.dll
|
||||||
|
script:
|
||||||
|
- ./scripts/build-windows.ps1
|
||||||
|
- Copy-Item -Path "libolm.dll" -Destination "build/windows/runner/Release"
|
||||||
|
- ./scripts/package-windows.ps1
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- build/windows/runner/Release
|
- build/windows/runner/Release
|
||||||
allow_failure: true
|
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
- tags
|
- tags
|
||||||
|
7
scripts/build-olm-windows.sh
Executable file
7
scripts/build-olm-windows.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
git clone https://gitlab.matrix.org/matrix-org/olm.git -b 3.2.12
|
||||||
|
cd olm
|
||||||
|
cmake . -Bbuild -DCMAKE_TOOLCHAIN_FILE=Windows64.cmake
|
||||||
|
cmake --build build
|
||||||
|
cd ..
|
@ -3,10 +3,5 @@ flutter config --enable-windows-desktop
|
|||||||
flutter clean
|
flutter clean
|
||||||
flutter pub get
|
flutter pub get
|
||||||
|
|
||||||
Write-Output "$WINDOWN_PFX"
|
|
||||||
Move-Item -Path $WINDOWS_PFX -Destination fluffychat.pem
|
|
||||||
certutil -decode fluffychat.pem fluffychat.pfx
|
|
||||||
|
|
||||||
flutter build windows --release -v
|
flutter build windows --release -v
|
||||||
|
|
||||||
flutter pub run msix:create -c fluffychat.pfx -p $WINDOWS_PFX_PASS --sign-msix true --install-certificate false
|
|
5
scripts/package-windows.ps1
Normal file
5
scripts/package-windows.ps1
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Write-Output "$WINDOWN_PFX"
|
||||||
|
Move-Item -Path $WINDOWS_PFX -Destination fluffychat.pem
|
||||||
|
certutil -decode fluffychat.pem fluffychat.pfx
|
||||||
|
|
||||||
|
flutter pub run msix:create -c fluffychat.pfx -p $WINDOWS_PFX_PASS --sign-msix true --install-certificate false
|
@ -1,4 +1,4 @@
|
|||||||
choco install flutter -y
|
choco install flutter cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
|
||||||
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
|
||||||
refreshenv
|
refreshenv
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user