diff --git a/apps/desktop/electron-builder.yml b/apps/desktop/electron-builder.yml index c47282c..b4e439f 100644 --- a/apps/desktop/electron-builder.yml +++ b/apps/desktop/electron-builder.yml @@ -104,15 +104,15 @@ extraResources: - "**/*" nsis: - oneClick: false + # oneClick=false + perMachine=false 조합이 System.dll 0xc0000005 크래시 사례(#7921). + # 사내 테스트 단계에선 oneClick=true로 전환하여 크래시 경로 회피. + oneClick: true perMachine: false - allowToChangeInstallationDirectory: true + allowToChangeInstallationDirectory: false createDesktopShortcut: true createStartMenuShortcut: true shortcutName: D3RO Voice deleteAppDataOnUninstall: false - # include: build/installer.nsh - # NOTE: customInstall/customUnInstall 매크로가 NSIS System.dll 크래시를 유발한 사례 있어 - # v0.1.0-alpha 단계에선 기본 electron-builder installer 사용. 안정화 후 재활성. + # installer.nsh 비활성화 유지 (System.dll 크래시 방지) npmRebuild: true diff --git a/apps/desktop/scripts/download-ollama.ps1 b/apps/desktop/scripts/download-ollama.ps1 index 2544665..58e63a6 100644 --- a/apps/desktop/scripts/download-ollama.ps1 +++ b/apps/desktop/scripts/download-ollama.ps1 @@ -56,12 +56,24 @@ Expand-Archive -Path $TEMP_ZIP -DestinationPath $TEMP_DIR -Force New-Item -ItemType Directory -Force -Path $DEST_DIR | Out-Null -# zip layout: ollama.exe + lib/ (DLLs). Copy everything. +# zip layout: ollama.exe + lib/ (runners + DLLs). +# Prune GPU runners (CUDA v11/v12, ROCm) to keep installer under NSIS 2GB limit. +# CPU runners (cpu_avx2, cpu_avx) are sufficient for initial bundle; users needing GPU +# can install Ollama separately or via future builds. Get-ChildItem -Path $TEMP_DIR -Force | ForEach-Object { Copy-Item $_.FullName -Destination $DEST_DIR -Recurse -Force Write-Host (" copied: {0}" -f $_.Name) -ForegroundColor Green } +# Remove heavy GPU runners to stay below NSIS size limits +$runnersDir = Join-Path $DEST_DIR "lib\ollama\runners" +if (Test-Path $runnersDir) { + Get-ChildItem $runnersDir -Directory | Where-Object { $_.Name -like "cuda*" -or $_.Name -like "rocm*" } | ForEach-Object { + Remove-Item -Recurse -Force $_.FullName + Write-Host (" pruned GPU runner: {0}" -f $_.Name) -ForegroundColor Yellow + } +} + Remove-Item -Recurse -Force $TEMP_DIR -ErrorAction SilentlyContinue Remove-Item -Force $TEMP_ZIP -ErrorAction SilentlyContinue