Update Windows installer and build scripts to transition from deeplink.exe to deeplink.js
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
- Modified the Windows installer script to change the command for the farmcontrol URI handler from `deeplink.exe` to `bun.exe` executing `deeplink.js`, improving the handling of deep links. - Updated the build script to output `deeplink.js` instead of `deeplink.exe`, aligning with the new execution method. - Adjusted the PowerShell script to check for the presence of `deeplink.js` instead of `deeplink.exe`, ensuring the correct file is validated during the staging process. - Refined the patching script to remove references to `deeplink.exe`, streamlining the target executables for patching.
This commit is contained in:
parent
2e7d255b20
commit
7d48ab6e85
@ -85,7 +85,7 @@
|
||||
WriteRegStr HKCR "farmcontrol\DefaultIcon" "" "$INSTDIR\bin\launcher.exe"
|
||||
WriteRegStr HKCR "farmcontrol\shell" "" ""
|
||||
WriteRegStr HKCR "farmcontrol\shell\Open" "" ""
|
||||
WriteRegStr HKCR "farmcontrol\shell\Open\command" "" '"$INSTDIR\bin\deeplink.exe" "%1"'
|
||||
WriteRegStr HKCR "farmcontrol\shell\Open\command" "" '"$INSTDIR\bin\bun.exe" "$INSTDIR\bin\deeplink.js" "%1"'
|
||||
|
||||
DetailPrint "Creating shortcuts"
|
||||
!insertmacro createDesktopShortcut
|
||||
|
||||
@ -11,16 +11,15 @@ export function stageWindowsDeeplink(appDir) {
|
||||
throw new Error(`stage-windows-deeplink: entrypoint not found: ${entrypoint}`)
|
||||
}
|
||||
|
||||
const outputPath = path.join(appDir, 'bin', 'deeplink.exe')
|
||||
const outputPath = path.join(appDir, 'bin', 'deeplink.js')
|
||||
mkdirSync(path.dirname(outputPath), { recursive: true })
|
||||
|
||||
const result = spawnSync(
|
||||
'bun',
|
||||
[
|
||||
'build',
|
||||
'--compile',
|
||||
'--minify',
|
||||
'--target=bun-windows-x64',
|
||||
'--target=bun',
|
||||
entrypoint,
|
||||
'--outfile',
|
||||
outputPath
|
||||
|
||||
@ -71,12 +71,12 @@ if ($stagedAppBytes -lt 5242880) {
|
||||
}
|
||||
|
||||
$requiredExe = Join-Path $stagingAppDir "bin\launcher.exe"
|
||||
$requiredDeeplinkExe = Join-Path $stagingAppDir "bin\deeplink.exe"
|
||||
$requiredDeeplinkScript = Join-Path $stagingAppDir "bin\deeplink.js"
|
||||
if (-not (Test-Path $requiredExe)) {
|
||||
throw "Staged application is missing bin\launcher.exe"
|
||||
}
|
||||
if (-not (Test-Path $requiredDeeplinkExe)) {
|
||||
throw "Staged application is missing bin\deeplink.exe"
|
||||
if (-not (Test-Path $requiredDeeplinkScript)) {
|
||||
throw "Staged application is missing bin\deeplink.js"
|
||||
}
|
||||
|
||||
Copy-Item -LiteralPath $nsiPath -Destination (Join-Path $workDir "farmcontrol.nsi")
|
||||
|
||||
@ -3,7 +3,7 @@ import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import rcedit from 'rcedit'
|
||||
|
||||
const PATCH_TARGETS = new Set(['launcher.exe', 'deeplink.exe'])
|
||||
const PATCH_TARGETS = new Set(['launcher.exe'])
|
||||
|
||||
export async function patchWindowsBinaries(appDir) {
|
||||
if (process.platform !== 'win32') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user