fix(installer): 대용량 NSIS 크래시 해소 — Ollama GPU 런타임 가지치기 + oneClick 전환
- 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) 회피.
This commit is contained in:
parent
8e31b36337
commit
72144a4c2e
2 changed files with 18 additions and 6 deletions
|
|
@ -104,15 +104,15 @@ extraResources:
|
||||||
- "**/*"
|
- "**/*"
|
||||||
|
|
||||||
nsis:
|
nsis:
|
||||||
oneClick: false
|
# oneClick=false + perMachine=false 조합이 System.dll 0xc0000005 크래시 사례(#7921).
|
||||||
|
# 사내 테스트 단계에선 oneClick=true로 전환하여 크래시 경로 회피.
|
||||||
|
oneClick: true
|
||||||
perMachine: false
|
perMachine: false
|
||||||
allowToChangeInstallationDirectory: true
|
allowToChangeInstallationDirectory: false
|
||||||
createDesktopShortcut: true
|
createDesktopShortcut: true
|
||||||
createStartMenuShortcut: true
|
createStartMenuShortcut: true
|
||||||
shortcutName: D3RO Voice
|
shortcutName: D3RO Voice
|
||||||
deleteAppDataOnUninstall: false
|
deleteAppDataOnUninstall: false
|
||||||
# include: build/installer.nsh
|
# installer.nsh 비활성화 유지 (System.dll 크래시 방지)
|
||||||
# NOTE: customInstall/customUnInstall 매크로가 NSIS System.dll 크래시를 유발한 사례 있어
|
|
||||||
# v0.1.0-alpha 단계에선 기본 electron-builder installer 사용. 안정화 후 재활성.
|
|
||||||
|
|
||||||
npmRebuild: true
|
npmRebuild: true
|
||||||
|
|
|
||||||
|
|
@ -56,12 +56,24 @@ Expand-Archive -Path $TEMP_ZIP -DestinationPath $TEMP_DIR -Force
|
||||||
|
|
||||||
New-Item -ItemType Directory -Force -Path $DEST_DIR | Out-Null
|
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 {
|
Get-ChildItem -Path $TEMP_DIR -Force | ForEach-Object {
|
||||||
Copy-Item $_.FullName -Destination $DEST_DIR -Recurse -Force
|
Copy-Item $_.FullName -Destination $DEST_DIR -Recurse -Force
|
||||||
Write-Host (" copied: {0}" -f $_.Name) -ForegroundColor Green
|
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 -Recurse -Force $TEMP_DIR -ErrorAction SilentlyContinue
|
||||||
Remove-Item -Force $TEMP_ZIP -ErrorAction SilentlyContinue
|
Remove-Item -Force $TEMP_ZIP -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue