Skip to content

Commit

Permalink
deploy: add install script to create shortcuts after installation
Browse files Browse the repository at this point in the history
  • Loading branch information
centaurialpha committed Apr 9, 2021
1 parent e214ad8 commit 7b8ae80
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion windows/deploy/config/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<Title>Pireal</Title>
<Publisher>Gabriel Acosta</Publisher>
<StartMenuDir>Pireal</StartMenuDir>
<TargetDir>@HomeDir@/Pireal</TargetDir>
<TargetDir>@ApplicationsDir@/Pireal</TargetDir>
<InstallerWindowIcon>../../icon.ico</InstallerWindowIcon>
</Installer>
31 changes: 31 additions & 0 deletions windows/deploy/packages/com.pireal.installer/meta/installscript.qs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
function Component()
{
// default constructor
}

Component.prototype.createOperations = function()
{
// call default implementation to actually install README.txt!
component.createOperations();

if (systemInfo.productType === "windows") {
component.addOperation(
"CreateShortcut",
"@TargetDir@/win64/pireal.exe",
"@DesktopDir@/Pireal.lnk",
"workingDirectory=@TargetDir@",
"iconPath=@TargetDir@/win64/icon.ico",
"iconId=0",
"description=Open Pireal"
);
component.addOperation(
"CreateShortcut",
"@TargetDir@/win64/pireal.exe",
"@StartMenuDir@/Pireal.lnk",
"workingDirectory=@TargetDir@",
"iconPath=@TargetDir@/win64/icon.ico",
"iconId=0",
"description=Open README file"
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
<License name="LICENSE TITLE" file="license.txt" />
</Licenses>
<Default>true</Default>
<Script>installscript.qs</Script>
</Package>
1 change: 1 addition & 0 deletions windows/pireal.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ block_cipher = None
added_files = [
('../pireal/resources/samples/database.pdb', 'pireal/resources/samples'),
('../pireal/resources/samples/queries.pqf', 'pireal/resources/samples'),
('icon.ico', '.'),
]

a = Analysis(['Z:\\projects\\pireal\\bin\\pireal'],
Expand Down

0 comments on commit 7b8ae80

Please sign in to comment.