Merge pull request #599 from QuasarApp/task_559

Make deb packages independent
This commit is contained in:
Andrei Yankovich 2021-05-19 18:00:18 +03:00 committed by GitHub
commit 5acd532b6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 21 deletions

View File

@ -4,6 +4,5 @@ Maintainer: $PUBLISHER
Version: $VERSION
Homepage: $HOMEPAGE
Architecture: all
Depends: libgl1-mesa-dev
Description: $DESCRIPTION

View File

@ -2,26 +2,18 @@ function Component() {
}
function extractFileName(path) {
var fullName = path.substring(path.lastIndexOf('/') + 1);
var index = fullName.lastIndexOf('.');
if (index >= 0) {
return fullName.substring(0, index)
}
return fullName;
}
function generateShortCutCmd(cmd) {
var prefix = "$PREFIX";
if (systemInfo.kernelType === "winnt") {
console.log("create icons!!! on Windows");
component.addOperation(
"CreateShortcut",
"@TargetDir@/" + cmd + ".bat",
"@DesktopDir@/" + extractFileName(cmd) + ".lnk",
"@TargetDir@/" + prefix + "/" + cmd + ".bat",
"@DesktopDir@/" + cmd + ".lnk",
"iconPath=@TargetDir@/$ICON",
"iconId=0");
@ -30,16 +22,15 @@ function generateShortCutCmd(cmd) {
if (systemInfo.kernelType === "linux") {
console.log("create icons!!! on LINUX");
var name = extractFileName(cmd);
component.addOperation("CreateDesktopEntry",
"@HomeDir@/.local/share/applications/" + name + ".desktop",
"@HomeDir@/.local/share/applications/" + cmd + ".desktop",
"Version=@Version@\n
Type=Application\n
Terminal=false\n
Exec=\"@TargetDir@/" + cmd + ".sh\"\n
Name=" + name + "\n
Exec=\"@TargetDir@/" + prefix + "/" + cmd + ".sh\"\n
Name=" + cmd + "\n
Icon=@TargetDir@/$ICON\n
Name[en_US]=" + name);
Name[en_US]=" + cmd);
console.log("create icons!!! on LINUX done");
}

View File

@ -205,8 +205,8 @@ bool iDistribution::collectInfo(const DistroModule& pkg,
cmdArray += ",";
bashArray += " ";
}
cmdArray += "\"" + releativeLocation(pkg) + "/" + fileinfo.baseName() + "\"";
bashArray += fileinfo.baseName();
cmdArray += "\"/" + fileinfo.baseName() + "\"";
bashArray += "\"" + fileinfo.baseName() + "\"";
}
}
cmdArray += "]";