fix(tauri): require standalone server in desktop bundles

This commit is contained in:
Shantur Rathore
2026-04-21 08:33:53 +01:00
parent 25512e8dc1
commit c9eea8c003
3 changed files with 6 additions and 117 deletions

View File

@@ -87,10 +87,6 @@ function ensureStandaloneServerBuild() {
})
}
function shouldBuildStandaloneServer() {
return process.platform !== "linux"
}
function ensureUiBuild() {
const loadingHtml = path.join(uiDist, "loading.html")
if (fs.existsSync(loadingHtml)) {
@@ -146,17 +142,6 @@ function ensureServerDependencies() {
}
}
function removeStaleStandaloneServerBuild() {
const staleNames = ["codenomad-server", "codenomad-server.exe"]
for (const name of staleNames) {
const stalePath = path.join(serverRoot, "dist", name)
if (fs.existsSync(stalePath)) {
fs.rmSync(stalePath, { force: true })
console.log(`[prebuild] removed stale standalone server artifact ${stalePath}`)
}
}
}
function ensureUiDevDependencies() {
if (fs.existsSync(viteBinPath)) {
return
@@ -328,12 +313,7 @@ function copyUiLoadingAssets() {
ensureRollupPlatformBinary()
ensureEsbuildPlatformBinary()
ensureServerBuild()
if (shouldBuildStandaloneServer()) {
ensureStandaloneServerBuild()
} else {
removeStaleStandaloneServerBuild()
console.log("[prebuild] skipping standalone server executable for Linux packaging; linuxdeploy fails on the bundled ELF")
}
ensureStandaloneServerBuild()
ensureServerDependencies()
ensureUiBuild()
syncServerUiBundle()