diff --git a/packaging/windows/installer.nsh b/packaging/windows/installer.nsh index 4fd380c..0e5fb91 100644 --- a/packaging/windows/installer.nsh +++ b/packaging/windows/installer.nsh @@ -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 diff --git a/scripts/build-windows-deeplink.mjs b/scripts/build-windows-deeplink.mjs index c208ca3..5a1b05f 100644 --- a/scripts/build-windows-deeplink.mjs +++ b/scripts/build-windows-deeplink.mjs @@ -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 diff --git a/scripts/build-windows-nsis.ps1 b/scripts/build-windows-nsis.ps1 index 87ee010..7f5270d 100644 --- a/scripts/build-windows-nsis.ps1 +++ b/scripts/build-windows-nsis.ps1 @@ -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") diff --git a/scripts/patch-windows-binaries.mjs b/scripts/patch-windows-binaries.mjs index 41085bc..6df9528 100644 --- a/scripts/patch-windows-binaries.mjs +++ b/scripts/patch-windows-binaries.mjs @@ -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') {