Skip to content

Commit 3319d1e

Browse files
committed
feat: add GPU-aware smart installer with auto-detection and update system
1 parent f95087f commit 3319d1e

File tree

3 files changed

+32
-14
lines changed

3 files changed

+32
-14
lines changed

scripts/release-windows.ps1

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,15 @@ $originalConfig = Get-Content "src-tauri\tauri.conf.json" -Raw
4848

4949
# Create output directory
5050
if (-not (Test-Path $OutputDir)) {
51-
New-Item -ItemType Directory -Path $OutputDir | Out-Null
51+
Write-Info "Creating output directory: $OutputDir"
52+
New-Item -ItemType Directory -Path $OutputDir -Force | Out-Null
53+
if (-not (Test-Path $OutputDir)) {
54+
Write-Error "Failed to create output directory: $OutputDir"
55+
exit 1
56+
}
57+
Write-Success "Output directory created"
58+
} else {
59+
Write-Info "Output directory already exists: $OutputDir"
5260
}
5361

5462
# Build single smart installer
@@ -91,9 +99,28 @@ if (-not $SkipBuild) {
9199

92100
# Copy installer
93101
$installer = Get-ChildItem "src-tauri\target\release\bundle\nsis\*.exe" | Select-Object -First 1
102+
if (-not $installer) {
103+
Write-Error "No installer found in src-tauri\target\release\bundle\nsis\"
104+
exit 1
105+
}
106+
Write-Info "Found installer: $($installer.FullName)"
107+
108+
# Ensure output directory exists before copying
109+
if (-not (Test-Path $OutputDir)) {
110+
Write-Info "Re-creating output directory: $OutputDir"
111+
New-Item -ItemType Directory -Path $OutputDir -Force | Out-Null
112+
}
113+
94114
$installerPath = "$OutputDir\VoiceTypr_${Version}_x64-setup.exe"
115+
Write-Info "Copying to: $installerPath"
95116
Copy-Item $installer.FullName $installerPath -Force
96-
Write-Success "Smart installer built successfully!"
117+
118+
if (Test-Path $installerPath) {
119+
Write-Success "Smart installer built successfully!"
120+
} else {
121+
Write-Error "Failed to copy installer to output directory"
122+
exit 1
123+
}
97124

98125
# Create update artifacts
99126
Write-Info "Creating update artifacts..."

src-tauri/tauri.conf.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,3 @@
7575
}
7676
}
7777
}
78-
79-
80-
81-
82-
83-

src-tauri/windows/smart-installer-hooks.nsh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Var GPUName
2727
${AndIf} $1 != ""
2828
StrCpy $GPUDetected "YES"
2929
; Simple GPU detection message
30-
StrCpy $GPUName "your GPU"
30+
StrCpy $GPUName "GPU"
3131
DetailPrint "Dedicated GPU detected"
3232
${Else}
3333
DetailPrint "No dedicated GPU detected - will use CPU mode"
@@ -39,11 +39,8 @@ Var GPUName
3939
StrCpy $VulkanInstalled "YES"
4040
DetailPrint "✓ Vulkan Runtime detected - GPU acceleration ready!"
4141

42-
; Show success message
43-
MessageBox MB_OK|MB_ICONINFORMATION "GPU Acceleration Ready!$\n$\n\
44-
Your $GPUName supports GPU acceleration and Vulkan is installed.$\n$\n\
45-
VoiceTypr will automatically use your GPU for 5-10x faster transcription!"
46-
42+
; Everything is ready - no need to show a message, just continue
43+
; The app will automatically use GPU acceleration
4744
Goto install_complete
4845
${Else}
4946
; GPU exists but Vulkan missing - inform user

0 commit comments

Comments
 (0)