v
This commit is contained in:
@@ -11,30 +11,33 @@ jobs:
|
|||||||
- name: Checkout del codice
|
- name: Checkout del codice
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# 1. Facciamo una build finta. Genererà i symlinks e poi fallirà per il bug,
|
||||||
|
# ma il 'continue-on-error' dirà a Gitea di ignorare l'errore e andare avanti.
|
||||||
|
- name: Pre-build per generare l'ambiente (Fallirà apposta)
|
||||||
|
continue-on-error: true
|
||||||
|
run: flutter build windows --release
|
||||||
|
|
||||||
|
# 2. Ora la cartella ephemeral esiste! Applichiamo il fix.
|
||||||
- name: Fix bug CMake di pdfx
|
- name: Fix bug CMake di pdfx
|
||||||
run: |
|
run: |
|
||||||
# Scarica i pacchetti e genera la cartella symlinks
|
|
||||||
flutter pub get
|
|
||||||
|
|
||||||
# Percorso del file incriminato
|
|
||||||
$cmakeFile = "windows\flutter\ephemeral\.plugin_symlinks\pdfx\windows\DownloadProject.cmake"
|
$cmakeFile = "windows\flutter\ephemeral\.plugin_symlinks\pdfx\windows\DownloadProject.cmake"
|
||||||
|
|
||||||
# Sostituisce la versione vecchia con la 3.5 al volo
|
|
||||||
if (Test-Path $cmakeFile) {
|
if (Test-Path $cmakeFile) {
|
||||||
(Get-Content $cmakeFile) -replace 'VERSION 2.8.2', 'VERSION 3.5' | Set-Content $cmakeFile
|
(Get-Content $cmakeFile) -replace 'VERSION 2.8.2', 'VERSION 3.5' | Set-Content $cmakeFile
|
||||||
Write-Host "File CMake patchato con successo!"
|
Write-Host "Il cerotto CMake è stato applicato con successo!"
|
||||||
|
} else {
|
||||||
|
Write-Error "File non trovato. La pre-build non ha generato i symlink."
|
||||||
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Presuppone che Flutter e InnoSetup siano già nel PATH del PC Windows
|
# 3. Ora che il file è corretto, la build vera arriverà fino in fondo
|
||||||
- name: Build Flutter
|
- name: Build Flutter Definitiva
|
||||||
env:
|
env:
|
||||||
# Limita la compilazione a soli 2 processi paralleli
|
|
||||||
CMAKE_BUILD_PARALLEL_LEVEL: 2
|
CMAKE_BUILD_PARALLEL_LEVEL: 2
|
||||||
run: flutter build windows --release
|
run: flutter build windows --release
|
||||||
|
|
||||||
- name: Compila Installer Inno Setup
|
- name: Compila Installer Inno Setup
|
||||||
run: |
|
run: |
|
||||||
# Recupera il nome del tag (es. "v1.0.5") ed elimina la prima lettera "v"
|
|
||||||
$TagVersion = "${{ gitea.ref_name }}".Substring(1)
|
$TagVersion = "${{ gitea.ref_name }}".Substring(1)
|
||||||
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DMyAppVersion=$TagVersion "win_installer.iss"
|
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DMyAppVersion=$TagVersion "win_installer.iss"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user