From 72144a4c2e7548f1dca46e18067f2a425d657550 Mon Sep 17 00:00:00 2001 From: yunchan8804 Date: Wed, 15 Apr 2026 22:57:39 +0900 Subject: [PATCH] =?UTF-8?q?fix(installer):=20=EB=8C=80=EC=9A=A9=EB=9F=89?= =?UTF-8?q?=20NSIS=20=ED=81=AC=EB=9E=98=EC=8B=9C=20=ED=95=B4=EC=86=8C=20?= =?UTF-8?q?=E2=80=94=20Ollama=20GPU=20=EB=9F=B0=ED=83=80=EC=9E=84=20?= =?UTF-8?q?=EA=B0=80=EC=A7=80=EC=B9=98=EA=B8=B0=20+=20oneClick=20=EC=A0=84?= =?UTF-8?q?=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - download-ollama.ps1: cuda_v11, cuda_v12, rocm_avx 런타임 삭제 (~1GB 절감) 첫 실행 시 gemma4:e4b는 CPU로 충분. GPU 가속 필요 시 별도 Ollama 설치 또는 차기 빌드. - electron-builder.yml nsis: oneClick=true로 전환 — oneClick=false+perMachine=false가 System.dll 0xc0000005 유발하는 electron-builder 알려진 이슈(#7921) 회피. --- apps/desktop/electron-builder.yml | 10 +++++----- apps/desktop/scripts/download-ollama.ps1 | 14 +++++++++++++- 2 files changed, 18 insertions(+), 6 deletions(-) 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