npm run deploy stopped building the daemon, with "rustup could not choose a version of cargo to run" - which reads like rust is missing and is not. rustup installs a shim, and the shim finds the real toolchain through CARGO_HOME and RUSTUP_HOME. On the XDG layout those point under ~/.local/share rather than ~/.cargo, so they are named by environment variables a login shell sets and an npm script never sees. The shim then has nowhere to look. The distribution's own /usr/bin/cargo does run, which makes it look like the answer, and for a native build it is. It is also the wrong one: it carries no cross-compilation targets, so a Windows build through it fails with "can't find crate for `core`" - which in turn reads like a broken checkout. Each wrong answer points at the other, which is why this has been worked around by hand all week instead of fixed. So the XDG locations are filled in when nothing else has, rustup's shim is preferred because it is the toolchain carrying the targets, and every candidate is asked `--version` rather than assumed - that question being the only thing that tells a working toolchain from a shim that cannot find one. The Linux build goes through the same script as the Windows one now, since it had the same problem and no reason to solve it differently. Both were verified through npm rather than from a shell that already had the right environment, which is the only way this bug is visible at all. Co-Authored-By: Claude Opus 5 <[email protected]>
99 lines
2.6 KiB
JSON
99 lines
2.6 KiB
JSON
{
|
|
"name": "moho",
|
|
"version": "0.1.0",
|
|
"description": "Unified desktop chat client for IRC, Discord, Sneedchat and Matrix",
|
|
"author": "Salastil",
|
|
"license": "GPL-3.0-or-later",
|
|
"homepage": "https://git.salastil.com/Salastil/moho",
|
|
"main": "./out/main/index.js",
|
|
"scripts": {
|
|
"dev": "electron-vite dev",
|
|
"build": "npm run typecheck && electron-vite build",
|
|
"start": "electron-vite preview",
|
|
"typecheck": "tsc --noEmit -p tsconfig.node.json && tsc --noEmit -p tsconfig.web.json",
|
|
"pack": "npm run daemon && npm run build && electron-builder --linux AppImage",
|
|
"pack:dir": "npm run daemon && npm run build && electron-builder --linux dir",
|
|
"daemon": "./scripts/build-daemon.sh",
|
|
"deploy": "npm run pack && ./scripts/install-desktop.sh",
|
|
"daemon:win": "./scripts/build-daemon-win.sh",
|
|
"pack:win": "npm run daemon:win && npm run build && electron-builder --win nsis"
|
|
},
|
|
"dependencies": {
|
|
"@electron-toolkit/preload": "^3.0.1",
|
|
"@electron-toolkit/utils": "^3.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.10.2",
|
|
"@types/react": "^18.3.17",
|
|
"@types/react-dom": "^18.3.5",
|
|
"@vitejs/plugin-react": "^4.3.4",
|
|
"electron": "^33.2.1",
|
|
"electron-builder": "^25.1.8",
|
|
"electron-vite": "^2.3.0",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1",
|
|
"typescript": "^5.7.2",
|
|
"vite": "^5.4.11"
|
|
},
|
|
"build": {
|
|
"appId": "com.salastil.moho",
|
|
"productName": "moho",
|
|
"files": [
|
|
"out/**/*"
|
|
],
|
|
"extraResources": [
|
|
{
|
|
"from": "nobilis/resources/sockchat-smilies",
|
|
"to": "sockchat-smilies"
|
|
},
|
|
{
|
|
"from": "resources/icons",
|
|
"to": "icons"
|
|
}
|
|
],
|
|
"linux": {
|
|
"target": [
|
|
"AppImage"
|
|
],
|
|
"category": "Network",
|
|
"icon": "resources/icons/moho.png",
|
|
"desktop": {
|
|
"Name": "moho",
|
|
"Comment": "Unified chat client for IRC, Discord, Sneedchat and Matrix"
|
|
},
|
|
"extraResources": [
|
|
{
|
|
"from": "nobilis/target/release/nobilis",
|
|
"to": "nobilis"
|
|
}
|
|
]
|
|
},
|
|
"win": {
|
|
"target": [
|
|
{
|
|
"target": "nsis",
|
|
"arch": [
|
|
"x64"
|
|
]
|
|
}
|
|
],
|
|
"icon": "resources/icons/moho.png",
|
|
"extraResources": [
|
|
{
|
|
"from": "nobilis/target/release/nobilis.exe",
|
|
"to": "nobilis.exe"
|
|
}
|
|
]
|
|
},
|
|
"nsis": {
|
|
"oneClick": false,
|
|
"allowToChangeInstallationDirectory": true,
|
|
"perMachine": false
|
|
}
|
|
},
|
|
"allowScripts": {
|
|
"[email protected]": true,
|
|
"[email protected]": true
|
|
}
|
|
}
|