mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Support linux binaries with spaces in the name
This commit is contained in:
0
samples/AvaloniaCrossPlat/dev-scripts/build-linux.sh
Normal file → Executable file
0
samples/AvaloniaCrossPlat/dev-scripts/build-linux.sh
Normal file → Executable file
@@ -30,7 +30,7 @@ public class LinuxPackCommandRunner : PackageBuilder<LinuxPackOptions>
|
||||
#!/bin/sh
|
||||
HERE="$(dirname "$(readlink -f "${0}")")"
|
||||
export PATH="${HERE}"/usr/bin/:"${PATH}"
|
||||
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2 | cut -d " " -f 1)
|
||||
EXEC=$(grep -e '^Exec=.*' "${HERE}"/*.desktop | head -n 1 | cut -d "=" -f 2 | cut -d " " -f 1 | sed 's/\\s/ /g')
|
||||
exec "${EXEC}" $@
|
||||
""");
|
||||
Chmod.ChmodFileAsExecutable(appRunPath);
|
||||
@@ -40,6 +40,10 @@ exec "${EXEC}" $@
|
||||
if (!File.Exists(mainExePath))
|
||||
throw new Exception($"Could not find main executable at '{mainExePath}'. Please specify with --exeName.");
|
||||
|
||||
// spaces should be represented by \s
|
||||
// https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html
|
||||
mainExeName = mainExeName.Replace(" ", "\\s");
|
||||
|
||||
File.WriteAllText(Path.Combine(dir.FullName, Options.PackId + ".desktop"), $"""
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
|
||||
0
vendor/appimagetool-x86_64.AppImage
vendored
Normal file → Executable file
0
vendor/appimagetool-x86_64.AppImage
vendored
Normal file → Executable file
Reference in New Issue
Block a user