Fix chrome sandbox issue on Ubuntu (#835)

This commit is contained in:
Evan Simkowitz 2024-09-24 21:26:16 -07:00 committed by GitHub
parent 762075db5a
commit 192f6b602f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 0 deletions

21
build/deb-postinstall.tpl Normal file
View File

@ -0,0 +1,21 @@
#!/bin/bash
if type update-alternatives 2>/dev/null >&1; then
# Remove previous link if it doesn't use update-alternatives
if [ -L '/usr/bin/waveterm' -a -e '/usr/bin/waveterm' -a "`readlink '/usr/bin/waveterm'`" != '/etc/alternatives/waveterm' ]; then
rm -f '/usr/bin/waveterm'
fi
update-alternatives --install '/usr/bin/waveterm' 'waveterm' '/opt/Wave/waveterm' 100 || ln -sf '/opt/Wave/waveterm' '/usr/bin/waveterm'
else
ln -sf '/opt/Wave/waveterm' '/usr/bin/waveterm'
fi
chmod 4755 '/opt/Wave/chrome-sandbox' || true
if hash update-mime-database 2>/dev/null; then
update-mime-database /usr/share/mime || true
fi
if hash update-desktop-database 2>/dev/null; then
update-desktop-database /usr/share/applications || true
fi

View File

@ -67,6 +67,9 @@ const config = {
category: "Development;Utility;", category: "Development;Utility;",
}, },
}, },
deb: {
afterInstall: "build/deb-postinstall.tpl",
},
win: { win: {
icon: "build/icons.icns", icon: "build/icons.icns",
publisherName: "Command Line Inc", publisherName: "Command Line Inc",