mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
@@ -78,31 +78,9 @@ jobs:
|
|||||||
flutter-version-file: pubspec.yaml
|
flutter-version-file: pubspec.yaml
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
- name: revert new overscrollindicator
|
- name: Apply Patch
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
shell: pwsh
|
||||||
# https://github.com/flutter/flutter/issues/182281
|
run: lib/scripts/patch.ps1 android
|
||||||
run: |
|
|
||||||
git config --global user.name "ci"
|
|
||||||
git config --global user.email "example@example.com"
|
|
||||||
git stash || true
|
|
||||||
git revert 362b1de29974ffc1ed6faa826e1df870d7bec75f --no-edit
|
|
||||||
git reset --soft HEAD~1
|
|
||||||
git stash pop || true
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: apply bottom sheet patch
|
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
|
||||||
run: git apply $GITHUB_WORKSPACE/lib/scripts/bottom_sheet_patch.diff || true
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: apply modal barrier patch
|
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
|
||||||
run: git apply $GITHUB_WORKSPACE/lib/scripts/modal_barrier_patch.diff || true
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: apply mouse cursor patch
|
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
|
||||||
run: git apply $GITHUB_WORKSPACE/lib/scripts/mouse_cursor_patch.diff || true
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Write key
|
- name: Write key
|
||||||
@@ -120,10 +98,10 @@ jobs:
|
|||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: lib/scripts/build.ps1 android
|
run: lib/scripts/build.ps1 android
|
||||||
|
|
||||||
- name: flutter build apk
|
- name: Flutter Build Apk
|
||||||
run: flutter build apk --release --split-per-abi --dart-define-from-file=pili_release.json --pub
|
run: flutter build apk --release --split-per-abi --dart-define-from-file=pili_release.json --pub
|
||||||
|
|
||||||
- name: rename
|
- name: Rename
|
||||||
run: |
|
run: |
|
||||||
for file in build/app/outputs/flutter-apk/app-*-release.apk; do
|
for file in build/app/outputs/flutter-apk/app-*-release.apk; do
|
||||||
abi=$(echo "$file" | sed -E 's|.*app-(.*)-release\.apk|\1|')
|
abi=$(echo "$file" | sed -E 's|.*app-(.*)-release\.apk|\1|')
|
||||||
|
|||||||
11
.github/workflows/ios.yml
vendored
11
.github/workflows/ios.yml
vendored
@@ -30,14 +30,9 @@ jobs:
|
|||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: lib/scripts/build.ps1
|
run: lib/scripts/build.ps1
|
||||||
|
|
||||||
- name: apply modal barrier patch
|
- name: Apply Patch
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
shell: pwsh
|
||||||
run: git apply $GITHUB_WORKSPACE/lib/scripts/modal_barrier_patch.diff || true
|
run: lib/scripts/patch.ps1 iOS
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: apply mouse cursor patch
|
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
|
||||||
run: git apply $GITHUB_WORKSPACE/lib/scripts/mouse_cursor_patch.diff || true
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Build iOS
|
- name: Build iOS
|
||||||
|
|||||||
22
.github/workflows/linux_x64.yml
vendored
22
.github/workflows/linux_x64.yml
vendored
@@ -51,25 +51,9 @@ jobs:
|
|||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: lib/scripts/build.ps1
|
run: lib/scripts/build.ps1
|
||||||
|
|
||||||
- name: pick tooltip fix
|
- name: Apply Patch
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
shell: pwsh
|
||||||
run: |
|
run: lib/scripts/patch.ps1 Linux
|
||||||
git config --global user.name "ci"
|
|
||||||
git config --global user.email "example@example.com"
|
|
||||||
git stash || true
|
|
||||||
git cherry-pick 56956c33ef102ac0b5fc46b62bd2dd9f50a86616 --no-edit
|
|
||||||
git reset --soft HEAD~1
|
|
||||||
git stash pop || true
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: apply modal barrier patch
|
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
|
||||||
run: git apply $GITHUB_WORKSPACE/lib/scripts/modal_barrier_patch.diff || true
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: apply mouse cursor patch
|
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
|
||||||
run: git apply $GITHUB_WORKSPACE/lib/scripts/mouse_cursor_patch.diff || true
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
#TODO: deb and rpm packages need to be build
|
#TODO: deb and rpm packages need to be build
|
||||||
|
|||||||
22
.github/workflows/mac.yml
vendored
22
.github/workflows/mac.yml
vendored
@@ -30,25 +30,9 @@ jobs:
|
|||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: lib/scripts/build.ps1
|
run: lib/scripts/build.ps1
|
||||||
|
|
||||||
- name: pick tooltip fix
|
- name: Apply Patch
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
shell: pwsh
|
||||||
run: |
|
run: lib/scripts/patch.ps1 macOS
|
||||||
git config --global user.name "ci"
|
|
||||||
git config --global user.email "example@example.com"
|
|
||||||
git stash || true
|
|
||||||
git cherry-pick 56956c33ef102ac0b5fc46b62bd2dd9f50a86616 --no-edit
|
|
||||||
git reset --soft HEAD~1
|
|
||||||
git stash pop || true
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: apply modal barrier patch
|
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
|
||||||
run: git apply $GITHUB_WORKSPACE/lib/scripts/modal_barrier_patch.diff || true
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: apply mouse cursor patch
|
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
|
||||||
run: git apply $GITHUB_WORKSPACE/lib/scripts/mouse_cursor_patch.diff || true
|
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Build Mac
|
- name: Build Mac
|
||||||
|
|||||||
22
.github/workflows/win_x64.yml
vendored
22
.github/workflows/win_x64.yml
vendored
@@ -26,27 +26,9 @@ jobs:
|
|||||||
channel: stable
|
channel: stable
|
||||||
flutter-version-file: pubspec.yaml
|
flutter-version-file: pubspec.yaml
|
||||||
|
|
||||||
- name: pick tooltip fix
|
- name: Apply Patch
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
|
||||||
run: |
|
|
||||||
git config --global user.name "ci"
|
|
||||||
git config --global user.email "example@example.com"
|
|
||||||
git stash || true
|
|
||||||
git cherry-pick 56956c33ef102ac0b5fc46b62bd2dd9f50a86616 --no-edit
|
|
||||||
git reset --soft HEAD~1
|
|
||||||
git stash pop || true
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: apply modal barrier patch
|
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
|
||||||
run: git apply $env:GITHUB_WORKSPACE\lib\scripts\modal_barrier_patch.diff || true
|
|
||||||
shell: pwsh
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
- name: apply mouse cursor patch
|
|
||||||
working-directory: ${{ env.FLUTTER_ROOT }}
|
|
||||||
run: git apply $env:GITHUB_WORKSPACE\lib\scripts\mouse_cursor_patch.diff || true
|
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
run: lib/scripts/patch.ps1 windows
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Add fastforge and Inno Setup
|
- name: Add fastforge and Inno Setup
|
||||||
|
|||||||
@@ -95,6 +95,9 @@ class RenderLoadingIndicator extends RenderBox {
|
|||||||
final radius = size.width / 2 - strokeWidth;
|
final radius = size.width / 2 - strokeWidth;
|
||||||
final center = size.center(.zero);
|
final center = size.center(.zero);
|
||||||
|
|
||||||
|
// TODO: remove
|
||||||
|
// https://github.com/flutter/flutter/issues/182708
|
||||||
|
// https://github.com/flutter/flutter/issues/183083
|
||||||
if (Platform.isIOS) {
|
if (Platform.isIOS) {
|
||||||
context.canvas
|
context.canvas
|
||||||
..drawCircle(
|
..drawCircle(
|
||||||
|
|||||||
73
lib/scripts/patch.ps1
Normal file
73
lib/scripts/patch.ps1
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
param(
|
||||||
|
[string]$platform = ""
|
||||||
|
)
|
||||||
|
|
||||||
|
# TODO: remove
|
||||||
|
# https://github.com/flutter/flutter/issues/182468
|
||||||
|
$ToolTipFix = "56956c33ef102ac0b5fc46b62bd2dd9f50a86616";
|
||||||
|
|
||||||
|
# TODO: remove
|
||||||
|
# https://github.com/flutter/flutter/issues/182281
|
||||||
|
$NewOverScrollIndicator = "362b1de29974ffc1ed6faa826e1df870d7bec75f";
|
||||||
|
|
||||||
|
$BottomSheetPatch = "lib/scripts/bottom_sheet.patch"
|
||||||
|
# TODO: remove
|
||||||
|
# https://github.com/flutter/flutter/issues/90223
|
||||||
|
$ModalBarrierPatch = "lib/scripts/modal_barrier.patch"
|
||||||
|
# TODO: remove
|
||||||
|
# https://github.com/flutter/flutter/issues/182466
|
||||||
|
$MouseCursorPatch = "lib/scripts/mouse_cursor.patch"
|
||||||
|
|
||||||
|
Set-Location $env:FLUTTER_ROOT
|
||||||
|
|
||||||
|
$picks = @()
|
||||||
|
$reverts = @()
|
||||||
|
$patches = @($ModalBarrierPatch, $MouseCursorPatch)
|
||||||
|
|
||||||
|
switch ($platform.ToLower()) {
|
||||||
|
"android" {
|
||||||
|
$reverts += $NewOverScrollIndicator
|
||||||
|
$patches += $BottomSheetPatch
|
||||||
|
}
|
||||||
|
"ios" {}
|
||||||
|
"linux" {
|
||||||
|
$picks += $ToolTipFix
|
||||||
|
}
|
||||||
|
"macos" {
|
||||||
|
$picks += $ToolTipFix
|
||||||
|
}
|
||||||
|
"windows" {
|
||||||
|
$picks += $ToolTipFix
|
||||||
|
}
|
||||||
|
default {}
|
||||||
|
}
|
||||||
|
|
||||||
|
git config --global user.name "ci"
|
||||||
|
git config --global user.email "example@example.com"
|
||||||
|
|
||||||
|
foreach ($pick in $picks) {
|
||||||
|
git stash
|
||||||
|
git cherry-pick $pick --no-edit
|
||||||
|
if ($LASTEXITCODE -eq 0) {
|
||||||
|
git reset --soft HEAD~1
|
||||||
|
Write-Host "$pick picked"
|
||||||
|
}
|
||||||
|
git stash pop
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($revert in $reverts) {
|
||||||
|
git stash
|
||||||
|
git revert $revert --no-edit
|
||||||
|
if ($LASTEXITCODE -eq 0) {
|
||||||
|
git reset --soft HEAD~1
|
||||||
|
Write-Host "$revert reverted"
|
||||||
|
}
|
||||||
|
git stash pop
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($patch in $patches) {
|
||||||
|
git apply "$env:GITHUB_WORKSPACE/$patch"
|
||||||
|
if ($LASTEXITCODE -eq 0) {
|
||||||
|
Write-Host "$patch applied"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user