Skip to content

Commit da5fa40

Browse files
committed
perf: change build 2
1 parent f71eccd commit da5fa40

File tree

2 files changed

+26
-41
lines changed

2 files changed

+26
-41
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -101,23 +101,13 @@ jobs:
101101
run: |
102102
brew install create-dmg
103103
104-
- name: Install Chocolatey (Windows)
104+
- name: Install WiX Toolset (Windows)
105105
if: matrix.os == 'windows-latest'
106106
run: |
107-
# Install Chocolatey package manager
108-
Set-ExecutionPolicy Bypass -Scope Process -Force
109-
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
110-
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
111-
# Refresh environment variables
112-
refreshenv
113-
# Verify Chocolatey installation
114-
choco --version
115-
116-
- name: Install WiX Toolset via Chocolatey (Windows)
117-
if: matrix.os == 'windows-latest'
118-
run: |
119-
# Install WiX Toolset using Chocolatey
120-
choco install wixtoolset --version=3.14.1 -y
107+
# Enable VBSCRIPT feature required for MSI packages
108+
Enable-WindowsOptionalFeature -Online -FeatureName "VBScript" -All
109+
# Install WiX Toolset using winget (Windows Package Manager)
110+
winget install Microsoft.WiXToolset
121111
# Refresh environment variables
122112
refreshenv
123113
# Verify installation
@@ -126,12 +116,9 @@ jobs:
126116
# Get WiX installation path
127117
$wixPath = (Get-Command candle.exe).Source | Split-Path -Parent
128118
echo "WiX installed at: $wixPath"
129-
# Set environment variables
119+
# Set environment variables for Tauri 2.0
130120
echo "WIX=$wixPath" | Out-File -FilePath $env:GITHUB_ENV -Append
131121
echo "WIX_ROOT=$wixPath" | Out-File -FilePath $env:GITHUB_ENV -Append
132-
echo "TAURI_WIX_PATH=$wixPath" | Out-File -FilePath $env:GITHUB_ENV -Append
133-
echo "WIX_BIN_PATH=$wixPath" | Out-File -FilePath $env:GITHUB_ENV -Append
134-
echo "TAURI_SKIP_WIX_DOWNLOAD=true" | Out-File -FilePath $env:GITHUB_ENV -Append
135122
136123
- name: Install Rust
137124
uses: dtolnay/rust-toolchain@stable
@@ -164,23 +151,28 @@ jobs:
164151
- name: Build frontend
165152
run: pnpm generate
166153

167-
- name: Verify WiX installation (Windows)
154+
- name: Verify Windows build dependencies (Windows)
168155
if: matrix.os == 'windows-latest'
169156
run: |
170-
echo "Verifying WiX installation..."
157+
echo "Verifying Windows build dependencies..."
158+
# Check WiX tools
171159
candle.exe -?
172160
light.exe -?
173161
echo "WiX tools are working correctly"
174-
# Get WiX path and create symlink for Tauri
175-
$wixPath = (Get-Command candle.exe).Source | Split-Path -Parent
176-
echo "WiX path: $wixPath"
177-
# Clean any existing Tauri WiX cache
178-
if (Test-Path "C:\Users\runneradmin\AppData\Local\tauri\WixTools314") {
179-
Remove-Item -Recurse -Force "C:\Users\runneradmin\AppData\Local\tauri\WixTools314"
162+
# Check VBScript feature
163+
$vbScript = Get-WindowsOptionalFeature -Online -FeatureName "VBScript"
164+
if ($vbScript.State -eq "Enabled") {
165+
echo "VBScript feature is enabled"
166+
} else {
167+
echo "WARNING: VBScript feature is not enabled"
168+
}
169+
# Check WebView2
170+
$webview2 = Get-ItemProperty "HKLM:\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" -ErrorAction SilentlyContinue
171+
if ($webview2) {
172+
echo "WebView2 is installed: $($webview2.pv)"
173+
} else {
174+
echo "WebView2 will be installed by the installer"
180175
}
181-
# Create symlink for Tauri
182-
New-Item -ItemType Directory -Force -Path "C:\Users\runneradmin\AppData\Local\tauri"
183-
New-Item -ItemType SymbolicLink -Force -Path "C:\Users\runneradmin\AppData\Local\tauri\WixTools314" -Target $wixPath
184176
185177
- name: Build Tauri app (Windows)
186178
if: matrix.os == 'windows-latest'
@@ -195,15 +187,6 @@ jobs:
195187
P12_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
196188
CSC_LINK: ${{ secrets.CSC_LINK }}
197189
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
198-
# Windows-specific environment variables
199-
WIX: C:\WixTools
200-
WIX_ROOT: C:\WixTools
201-
# Tell Tauri to use our WiX installation
202-
TAURI_WIX_PATH: C:\WixTools
203-
WIX_BIN_PATH: C:\WixTools
204-
# Disable Tauri's automatic WiX download
205-
TAURI_SKIP_WIX_DOWNLOAD: true
206-
WIX_DOWNLOAD_URL: ""
207190

208191
- name: Build Tauri app (macOS)
209192
if: matrix.os == 'macos-14'

src-tauri/tauri.conf.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
"type": "embedBootstrapper"
1919
},
2020
"nsis": {
21-
"installMode": "both"
21+
"installMode": "both",
22+
"displayLanguageSelector": true,
23+
"minimumWebview2Version": "110.0.1531.0"
2224
}
2325
},
2426
"linux": {
@@ -34,7 +36,7 @@
3436
},
3537
"productName": "JumpServerClient",
3638
"version": "3.1.0",
37-
"identifier": "",
39+
"identifier": "com.jumpserver.client",
3840
"plugins": {
3941
"updater": {
4042
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDQ0NDhCRUVCN0Y5M0UwMTcKUldRWDRKTi82NzVJUkh2cW5xeUtKYTRZYkErU1ZPZkNramNXMjlRQWVmdnVtVEY0dk5RcDIvZ2IK",

0 commit comments

Comments
 (0)