ci(windows): enable Developer Mode for pdfrx build
All checks were successful
CI / Windows build (push) Successful in 10m34s
All checks were successful
CI / Windows build (push) Successful in 10m34s
pdfrx requires Windows Developer Mode (its build uses symbolic links); set AllowDevelopmentWithoutDevLicense on the runner before building so flutter build windows does not fail the symlink/dev-mode check.
This commit is contained in:
@@ -94,6 +94,22 @@ jobs:
|
|||||||
- name: Flutter version
|
- name: Flutter version
|
||||||
run: flutter --version
|
run: flutter --version
|
||||||
|
|
||||||
|
# pdfrx REQUIRES Windows Developer Mode (its build creates symbolic links;
|
||||||
|
# without Dev Mode `flutter build windows` fails). Enable it on the runner
|
||||||
|
# by setting the AppModelUnlock registry key (idempotent — a no-op if it is
|
||||||
|
# already on). Requires the runner to be elevated; if it is not, this fails
|
||||||
|
# loudly here, which is correct since the build cannot proceed regardless.
|
||||||
|
- name: Enable Windows Developer Mode (pdfrx symlinks)
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$ErrorActionPreference = 'Stop'
|
||||||
|
$key = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock'
|
||||||
|
if (-not (Test-Path $key)) { New-Item -Path $key -Force | Out-Null }
|
||||||
|
New-ItemProperty -Path $key -Name 'AllowDevelopmentWithoutDevLicense' `
|
||||||
|
-Value 1 -PropertyType DWORD -Force | Out-Null
|
||||||
|
$v = (Get-ItemProperty -Path $key -Name 'AllowDevelopmentWithoutDevLicense').AllowDevelopmentWithoutDevLicense
|
||||||
|
Write-Host "AllowDevelopmentWithoutDevLicense = $v (1 = Developer Mode on)"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: flutter pub get
|
run: flutter pub get
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user