Skip to content

Instantly share code, notes, and snippets.

@HamedMasafi
Created December 18, 2021 14:56
Show Gist options
  • Save HamedMasafi/1c7a2a65f67601a81388968ef091a374 to your computer and use it in GitHub Desktop.
Save HamedMasafi/1c7a2a65f67601a81388968ef091a374 to your computer and use it in GitHub Desktop.
function Component() {
if (installer.isInstaller()) {
component.loaded.connect(this, Component.prototype.installerLoaded);
ComponentSelectionPage = gui.pageById(QInstaller.ComponentSelection);
if (systemInfo.productType === "windows")
installer.setDefaultPageVisible(QInstaller.StartMenuSelection, true);
}
}
Component.prototype.createOperations = function()
{
component.createOperations();
if (systemInfo.productType === "windows") {
component.addOperation("CreateShortcut",
"@TargetDir@/analyser.exe",
"@DesktopDir@/analyser.lnk",
"workingDirectory=@TargetDir@",
"iconPath=@TargetDir@/icon.ico",
"description=Eagle AI");
} else {
component.addOperation("CreateDesktopEntry",
"Eagle AI.desktop",
"Type=Application\nTerminal=false\nExec=@TargetDir@/analyser.sh\nName=Eagle AI\nIcon=@TargetDir@/icon.ico");
}
}
<Package>
<DisplayName>Core</DisplayName>
<Description>Main app</Description>
<Version>0.18.1</Version>
<ReleaseDate>2021-01-30</ReleaseDate>
<Default>true</Default>
<Required>true</Required>
<Script>installscript.qs</Script>
<RequiresAdminRights>false</RequiresAdminRights>
</Package>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment