Skip to content
Merged
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
4 changes: 1 addition & 3 deletions openless-all/app/scripts/build-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ else
fi

echo "▶ tauri build"
# bundle.resources 里有 Windows TSF DLL(仅 NSIS/MSI 需要),mac 端用空 map 覆盖避免
# 把 0 字节占位 OpenLessIme.dll 打进 .app/Contents/Resources。
TAURI_BUILD_ARGS=(build --config '{"bundle":{"resources":{}}}')
TAURI_BUILD_ARGS=(build)
if [ -n "${TAURI_SIGNING_PRIVATE_KEY:-}" ] || [ -n "${TAURI_SIGNING_PRIVATE_KEY_PATH:-}" ]; then
TAURI_BUILD_ARGS+=(--config '{"bundle":{"createUpdaterArtifacts":true}}')
fi
Expand Down
22 changes: 22 additions & 0 deletions openless-all/app/scripts/windows-build-gnu.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,28 @@ try {
Copy-Item -LiteralPath (Join-Path $releaseRoot "openless.exe") -Destination (Join-Path $artifactDevRoot "openless.exe") -Force
Copy-Item -LiteralPath (Resolve-WebView2Loader) -Destination (Join-Path $artifactDevRoot "WebView2Loader.dll") -Force

# Build OpenLessIme.dll (x64 + x86) 并导出绝对路径 env var——
# nsis/openless-ime-hooks.nsh 的 PREINSTALL 用 File "$%OPENLESS_IME_DLL_X64%" / _X86
# 在 makensis 编译时把 dll 嵌入 NSIS 包;wix/openless-ime.wxs 也用同一对 env 解析
# candle/light 的绝对路径(CI release-tauri.yml 同款做法)。
foreach ($t in @(
@{ Platform = 'x64'; Folder = 'x64'; EnvName = 'OPENLESS_IME_DLL_X64' },
@{ Platform = 'Win32'; Folder = 'x86'; EnvName = 'OPENLESS_IME_DLL_X86' }
)) {
$out = Join-Path $buildRoot "src-tauri\target\windows-ime-msvc\$($t.Folder)\Release"
$obj = Join-Path $buildRoot "src-tauri\target\windows-ime-msvc\obj\$($t.Folder)\Release"
& ./scripts/windows-ime-build.ps1 -Configuration Release -Platform $t.Platform -OutputDirectory $out -IntermediateDirectory $obj
if ($LASTEXITCODE -ne 0) {
throw "OpenLessIme $($t.Platform) build failed with exit $LASTEXITCODE"
}
$dll = (Resolve-Path (Join-Path $out 'OpenLessIme.dll')).Path
if (-not (Test-Path $dll)) {
throw "OpenLessIme.dll not produced at $dll"
}
Set-Item -Path "Env:$($t.EnvName)" -Value $dll
Write-Host "[ok] built $dll (exported $($t.EnvName))"
}

npm run tauri build -- --target x86_64-pc-windows-gnu --bundles msi nsis
} finally {
Pop-Location
Expand Down
52 changes: 0 additions & 52 deletions openless-all/app/src-tauri/installer.nsh

This file was deleted.

Empty file.
Empty file.
8 changes: 0 additions & 8 deletions openless-all/app/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@
"icons/icon.icns",
"icons/icon.ico"
],
"resources": {
"openless-ime-payload/x64/OpenLessIme.dll": "tsf-ime/x64/OpenLessIme.dll",
"openless-ime-payload/x86/OpenLessIme.dll": "tsf-ime/x86/OpenLessIme.dll"
},
"macOS": {
"minimumSystemVersion": "12.0",
"infoPlist": "Info.plist",
Expand All @@ -101,10 +97,6 @@
"OpenLessImeDllX64Component",
"OpenLessImeDllX86Component"
]
},
"nsis": {
"installMode": "perMachine",
"installerHooks": "installer.nsh"
}
Comment on lines 97 to 100
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve a path for GNU Windows bundling

This removal makes the documented scripts/windows-build-gnu.ps1 path switch from the self-contained installer.nsh/payload setup to nsis/openless-ime-hooks.nsh; that hook embeds File "$%OPENLESS_IME_DLL_X64%" and _X86, but the GNU script still reaches npm run tauri build -- --target x86_64-pc-windows-gnu --bundles msi nsis without building those DLLs or exporting either env var. In that context the NSIS compile fails before the script can produce the advertised Windows GNU bundle artifacts, so this cleanup needs either a GNU-script env setup or a separate fallback before dropping the old hook.

Useful? React with 👍 / 👎.

}
},
Expand Down
Loading