Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 39 additions & 2 deletions .github/workflows/pr-preview-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,50 @@ jobs:
with:
bun-version-file: "package.json"

# Install Vulkan SDK with runtime (vulkan-1.dll) for Windows builds
# Using jakoch/install-vulkan-sdk-action because it supports install_runtime option
# which provides vulkan-1.dll needed for users without GPU drivers
- name: Install Vulkan SDK
if: matrix.platform == 'windows-latest'
uses: humbletim/install-vulkan-sdk@v1.2
uses: jakoch/install-vulkan-sdk-action@v1
with:
version: 1.4.309.0
vulkan_version: 1.4.309.0
install_runtime: true
cache: true

# Bundle Vulkan DLL for Windows users without Vulkan runtime
# The DLL is placed in src-tauri where tauri.windows.conf.json resources config picks it up
# This fixes the "vulkan-1.dll not found" error on Windows systems without GPU/Vulkan drivers
- name: Bundle Vulkan DLL (Windows)
if: matrix.platform == 'windows-latest'
shell: pwsh
run: |
Write-Host "VULKAN_SDK: $env:VULKAN_SDK"

# With jakoch/install-vulkan-sdk-action and install_runtime: true,
# vulkan-1.dll is located in the runtime/x64 subdirectory
$vulkanDll = "$env:VULKAN_SDK\runtime\x64\vulkan-1.dll"

if (-not (Test-Path $vulkanDll)) {
Write-Host "ERROR: vulkan-1.dll not found at expected path: $vulkanDll"
Write-Host "Searching for vulkan-1.dll in SDK directory..."
$found = Get-ChildItem -Path $env:VULKAN_SDK -Recurse -Filter "vulkan-1.dll" -ErrorAction SilentlyContinue
if ($found) {
Write-Host "Found vulkan-1.dll at:"
$found | ForEach-Object { Write-Host " $($_.FullName)" }
} else {
Write-Host "vulkan-1.dll not found anywhere in SDK"
Write-Host "Directory contents:"
Get-ChildItem -Path $env:VULKAN_SDK -Recurse -Depth 2 | ForEach-Object { Write-Host $_.FullName }
}
exit 1
}

Write-Host "Found vulkan-1.dll at: $vulkanDll"
$destination = "apps/whispering/src-tauri/vulkan-1.dll"
Copy-Item $vulkanDll $destination
Write-Host "Vulkan DLL bundled successfully to: $destination"

- name: setup node
uses: actions/setup-node@v4
with:
Expand Down
42 changes: 39 additions & 3 deletions .github/workflows/publish-tauri-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,50 @@ jobs:
with:
bun-version-file: "package.json"

# Windows Vulkan SDK installation
# Install Vulkan SDK with runtime (vulkan-1.dll) for Windows builds
# Using jakoch/install-vulkan-sdk-action because it supports install_runtime option
# which provides vulkan-1.dll needed for users without GPU drivers
- name: Install Vulkan SDK
if: matrix.platform == 'windows-latest'
uses: humbletim/install-vulkan-sdk@v1.2
uses: jakoch/install-vulkan-sdk-action@v1
with:
version: 1.4.309.0
vulkan_version: 1.4.309.0
install_runtime: true
cache: true

# Bundle Vulkan DLL for Windows users without Vulkan runtime
# The DLL is placed in src-tauri where tauri.windows.conf.json resources config picks it up
# This fixes the "vulkan-1.dll not found" error on Windows systems without GPU/Vulkan drivers
- name: Bundle Vulkan DLL (Windows)
if: matrix.platform == 'windows-latest'
shell: pwsh
run: |
Write-Host "VULKAN_SDK: $env:VULKAN_SDK"

# With jakoch/install-vulkan-sdk-action and install_runtime: true,
# vulkan-1.dll is located in the runtime/x64 subdirectory
$vulkanDll = "$env:VULKAN_SDK\runtime\x64\vulkan-1.dll"

if (-not (Test-Path $vulkanDll)) {
Write-Host "ERROR: vulkan-1.dll not found at expected path: $vulkanDll"
Write-Host "Searching for vulkan-1.dll in SDK directory..."
$found = Get-ChildItem -Path $env:VULKAN_SDK -Recurse -Filter "vulkan-1.dll" -ErrorAction SilentlyContinue
if ($found) {
Write-Host "Found vulkan-1.dll at:"
$found | ForEach-Object { Write-Host " $($_.FullName)" }
} else {
Write-Host "vulkan-1.dll not found anywhere in SDK"
Write-Host "Directory contents:"
Get-ChildItem -Path $env:VULKAN_SDK -Recurse -Depth 2 | ForEach-Object { Write-Host $_.FullName }
}
exit 1
}

Write-Host "Found vulkan-1.dll at: $vulkanDll"
$destination = "apps/whispering/src-tauri/vulkan-1.dll"
Copy-Item $vulkanDll $destination
Write-Host "Vulkan DLL bundled successfully to: $destination"

# Setup Node.js for compatibility
- name: setup node
uses: actions/setup-node@v4
Expand Down
3 changes: 3 additions & 0 deletions apps/whispering/src-tauri/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@
# Environment variables
.env
.env.local

# Vulkan DLL copied during CI build (not committed, generated from VULKAN_SDK)
vulkan-1.dll
21 changes: 21 additions & 0 deletions apps/whispering/src-tauri/nsis/installer-hooks.nsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
; Whispering NSIS Installer Hooks
; This file is included by the Tauri NSIS installer to handle custom installation tasks

; NSIS_HOOK_POSTINSTALL
; Called after all files are installed to $INSTDIR
; We need to move vulkan-1.dll from resources/ to the exe directory
; because Windows needs DLLs next to the executable for load-time linking
!macro NSIS_HOOK_POSTINSTALL
; Check if the DLL exists in resources and copy it to exe directory
${If} ${FileExists} "$INSTDIR\resources\vulkan-1.dll"
CopyFiles /SILENT "$INSTDIR\resources\vulkan-1.dll" "$INSTDIR\vulkan-1.dll"
Delete "$INSTDIR\resources\vulkan-1.dll"
${EndIf}
!macroend

; NSIS_HOOK_POSTUNINSTALL
; Called after uninstallation to clean up any remaining files
!macro NSIS_HOOK_POSTUNINSTALL
; Clean up the DLL if it exists
Delete "$INSTDIR\vulkan-1.dll"
!macroend
11 changes: 11 additions & 0 deletions apps/whispering/src-tauri/tauri.windows.conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://schema.tauri.app/config/2",
"bundle": {
"resources": ["vulkan-1.dll"],
"windows": {
"nsis": {
"installerHooks": "nsis/installer-hooks.nsh"
}
}
}
}
Loading