fix insanities
This commit is contained in:
parent
c45f3f37f0
commit
9bd3ed06c2
1 changed files with 13 additions and 10 deletions
|
@ -28,7 +28,8 @@ const hook = async () => {
|
||||||
await fs.rm(newPath, {
|
await fs.rm(newPath, {
|
||||||
recursive: true
|
recursive: true
|
||||||
});
|
});
|
||||||
} catch (_) {}
|
} catch {}
|
||||||
|
|
||||||
console.log("Copying to apply appimage fix", oldPath, newPath);
|
console.log("Copying to apply appimage fix", oldPath, newPath);
|
||||||
await fs.cp(oldPath, newPath, {
|
await fs.cp(oldPath, newPath, {
|
||||||
recursive: true
|
recursive: true
|
||||||
|
@ -37,17 +38,19 @@ const hook = async () => {
|
||||||
|
|
||||||
const executable = path.join(newPath, this.packager.executableName);
|
const executable = path.join(newPath, this.packager.executableName);
|
||||||
|
|
||||||
const loaderScript = `#!/usr/bin/env bash
|
const loaderScript = `
|
||||||
SCRIPT_DIR="$( cd "$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
|
#!/usr/bin/env bash
|
||||||
IS_STEAMOS=0
|
|
||||||
|
|
||||||
if [[ "$SteamOS" == "1" && "$SteamGamepadUI" == "1" ]]; then
|
SCRIPT_DIR="$( cd "$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
echo "Running Vesktop on SteamOS, disabling sandbox"
|
IS_STEAMOS=0
|
||||||
IS_STEAMOS=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "$SCRIPT_DIR/${this.packager.executableName}.bin" "$([ "$IS_STEAMOS" == 1 ] && echo '--no-sandbox')" "$@"
|
if [[ "$SteamOS" == "1" && "$SteamGamepadUI" == "1" ]]; then
|
||||||
`;
|
echo "Running Vesktop on SteamOS, disabling sandbox"
|
||||||
|
IS_STEAMOS=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$SCRIPT_DIR/${this.packager.executableName}.bin" "$([ "$IS_STEAMOS" == 1 ] && echo '--no-sandbox')" "$@"
|
||||||
|
`.trim();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await fs.rename(executable, executable + ".bin");
|
await fs.rename(executable, executable + ".bin");
|
||||||
|
|
Reference in a new issue