chore(release): 1.2.15 — Windows MSI 修复 IME bundle 集成
1.2.14 三轮 release pipeline Windows job 全挂在 WiX 集成上:
1. 没构建 IME DLL → light.exe 找不到文件
2. 加了 build 步骤后用相对路径 src-tauri\target\... → Tauri wix bundler
cwd 和本地脚本不同,相对路径 resolve 错位
3. 改 $(env.OPENLESS_IME_DLL_X64) 想用绝对路径 → candle 处理 env var
substitution 时 abort(具体原因被 Tauri 吞掉)
1.2.15 切换到本地 windows-package-msvc.ps1 已经验证可行的 Repair 思路:
- wxs 维持字面相对路径 src-tauri\target\... (让 candle 正常吃过)
- workflow 接住 tauri build 失败:从 appRoot (openless-all/app/) 手动跑
light.exe 重链 main.wixobj + openless-ime.wixobj。这是 light 唯一能
resolve 该相对路径的 cwd。
This commit is contained in:
1 parent
9c3ab9b100
commit
dcfeb405bf
7 files changed
+50
-15
No files matched your search
@@ -214,20 +214,55 @@ jobs:
|
||||
Write-Host "[ok] built $dll (exported $($t.EnvName))"
|
||||
}
|
||||
|
||||
# ── Windows:仅 Windows 跑通用 tauri build(Linux 用下方专用 step,避免重复构建)──
|
||||
# ── Windows:跑 tauri build;如果失败,从 appRoot 手动调 light.exe 重链
|
||||
# (mirror 本地 windows-package-msvc.ps1::Repair-TauriMsiBundle)。
|
||||
# 根因:openless-ime.wxs 用相对路径 src-tauri\target\... 引 IME DLL,
|
||||
# Tauri wix bundler 内部 cwd 不固定,light 找不到文件;本地脚本通过把
|
||||
# light 从 openless-all/app/ 跑一遍来 resolve。issue: rounds 1-3 reaches
|
||||
# same dead end via Tauri-only bundling.
|
||||
- name: Build (Windows)
|
||||
if: matrix.platform == 'windows-latest'
|
||||
shell: bash
|
||||
shell: pwsh
|
||||
working-directory: 'openless-all/app'
|
||||
env:
|
||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||
run: |
|
||||
if [ -n "${TAURI_SIGNING_PRIVATE_KEY:-}" ]; then
|
||||
npm run tauri -- build --config '{"bundle":{"createUpdaterArtifacts":true}}'
|
||||
else
|
||||
npm run tauri build
|
||||
fi
|
||||
$appRoot = (Resolve-Path .).Path
|
||||
if ($env:TAURI_SIGNING_PRIVATE_KEY) {
|
||||
& npm run tauri -- build --config '{"bundle":{"createUpdaterArtifacts":true}}'
|
||||
} else {
|
||||
& npm run tauri build
|
||||
}
|
||||
$tauriExit = $LASTEXITCODE
|
||||
|
||||
$msi = Get-ChildItem "src-tauri\target\release\bundle\msi\*.msi" -ErrorAction SilentlyContinue | Select-Object -First 1
|
||||
if (-not $msi -and $tauriExit -ne 0) {
|
||||
Write-Warning "Tauri MSI failed (exit $tauriExit). Trying manual light.exe relink from app root."
|
||||
$wixRoot = Join-Path $appRoot "src-tauri\target\release\wix\x64"
|
||||
$mainObj = Join-Path $wixRoot "main.wixobj"
|
||||
$imeObj = Join-Path $wixRoot "openless-ime.wixobj"
|
||||
$locale = Join-Path $wixRoot "locale.wxl"
|
||||
foreach ($p in @($mainObj, $imeObj, $locale)) {
|
||||
if (-not (Test-Path $p)) { throw "Required WiX object missing: $p" }
|
||||
}
|
||||
$light = (Get-ChildItem "$env:LOCALAPPDATA\tauri\WixTools314\light.exe" -ErrorAction SilentlyContinue | Select-Object -First 1).FullName
|
||||
if (-not $light) { throw "WiX light.exe not found in $env:LOCALAPPDATA\tauri\WixTools314" }
|
||||
$version = (Get-Content src-tauri\tauri.conf.json -Raw | ConvertFrom-Json).version
|
||||
$bundleDir = Join-Path $appRoot "src-tauri\target\release\bundle\msi"
|
||||
New-Item -ItemType Directory -Force -Path $bundleDir | Out-Null
|
||||
$msiPath = Join-Path $bundleDir "OpenLess_${version}_x64_en-US.msi"
|
||||
Push-Location $appRoot
|
||||
try {
|
||||
& $light -nologo -ext WixUIExtension -ext WixUtilExtension -loc $locale -out $msiPath $mainObj $imeObj
|
||||
if ($LASTEXITCODE -ne 0) { throw "light.exe relink failed with exit $LASTEXITCODE" }
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
Write-Host "[ok] MSI rebuilt at $msiPath"
|
||||
} elseif ($tauriExit -ne 0) {
|
||||
throw "Tauri build failed with exit $tauriExit and no recoverable wixobj."
|
||||
}
|
||||
|
||||
# ── Linux:产 deb / rpm / AppImage ──
|
||||
- name: Build (Linux)
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "openless-app",
|
||||
"version": "1.2.14",
|
||||
"version": "1.2.15",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "openless-app",
|
||||
"version": "1.2.14",
|
||||
"version": "1.2.15",
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.1.1",
|
||||
"@tauri-apps/plugin-autostart": "^2.5.1",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "openless-app",
|
||||
"private": true,
|
||||
"version": "1.2.14",
|
||||
"version": "1.2.15",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
Generated
+1
-1
@@ -3281,7 +3281,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "openless"
|
||||
version = "1.2.14"
|
||||
version = "1.2.15"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arboard",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "openless"
|
||||
version = "1.2.14"
|
||||
version = "1.2.15"
|
||||
description = "OpenLess — local voice input that types where your cursor is"
|
||||
authors = ["OpenLess"]
|
||||
edition = "2021"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "OpenLess",
|
||||
"version": "1.2.14",
|
||||
"version": "1.2.15",
|
||||
"identifier": "com.openless.app",
|
||||
"build": {
|
||||
"beforeDevCommand": "npm run dev",
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
<Directory Id="OpenLessImeDirectory" Name="windows-ime">
|
||||
<Directory Id="OpenLessImeX64Directory" Name="x64">
|
||||
<Component Id="OpenLessImeDllX64Component" Guid="{B787DE6F-DF71-4D68-9DE8-04D3665A26F3}" Win64="yes">
|
||||
<File Id="OpenLessImeDllX64" Name="OpenLessIme.dll" Source="$(env.OPENLESS_IME_DLL_X64)" KeyPath="yes" />
|
||||
<File Id="OpenLessImeDllX64" Name="OpenLessIme.dll" Source="src-tauri\target\windows-ime-msvc\x64\Release\OpenLessIme.dll" KeyPath="yes" />
|
||||
</Component>
|
||||
</Directory>
|
||||
<Directory Id="OpenLessImeX86Directory" Name="x86">
|
||||
<Component Id="OpenLessImeDllX86Component" Guid="{A2E61B9A-4034-4ABF-A42F-964A9B1F08BB}" Win64="no">
|
||||
<File Id="OpenLessImeDllX86" Name="OpenLessIme.dll" Source="$(env.OPENLESS_IME_DLL_X86)" KeyPath="yes" />
|
||||
<File Id="OpenLessImeDllX86" Name="OpenLessIme.dll" Source="src-tauri\target\windows-ime-msvc\x86\Release\OpenLessIme.dll" KeyPath="yes" />
|
||||
</Component>
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
||||
Reference in new issue
Block a user