# DLS Windows kurulum dosyasını üretir: flutter build -> VC++ runtime kopyala -> Inno Setup # Kullanım: powershell -ExecutionPolicy Bypass -File installer\build_installer.ps1 [-SkipBuild] param([switch]$SkipBuild) $ErrorActionPreference = 'Stop' $root = Split-Path -Parent $PSScriptRoot $release = Join-Path $root 'build\windows\x64\runner\Release' $iscc = 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe' Push-Location $root try { if (-not $SkipBuild) { flutter build windows --release if ($LASTEXITCODE -ne 0) { throw 'flutter build windows başarısız' } } # Temiz makinelerde "VCRUNTIME140.dll bulunamadı" hatasını önlemek için # Visual C++ runtime DLL'lerini uygulama klasörüne koy (app-local deployment). foreach ($dll in 'msvcp140.dll', 'vcruntime140.dll', 'vcruntime140_1.dll') { Copy-Item (Join-Path $env:WINDIR "System32\$dll") $release -Force } & $iscc (Join-Path $PSScriptRoot 'setup.iss') if ($LASTEXITCODE -ne 0) { throw 'ISCC başarısız' } } finally { Pop-Location }