Solved QtIFW CreateShortcut with app description
-
Hi all,
How to create windows start menu shortcut with description ?
I have followed this example
QtIFW start menu shortcut example
And it works, however in start menu inside "My App Dir" there is link to exectable binary and it has name as the binary itself (without exe),
I would like to be able to set some other name, like description, but was unable to find proper parameter for addOperation inside installscript.qs
Anyone knows how to set custom name for the item in start menu ?
I'm using Qt 5.7 and QtIFW 2.0.3 on Windows 10Best Regards
Marek -
@Marek
Did you mean this way ?Component.prototype.createOperations = function() { try { // call the base create operations function component.createOperations(); if (installer.value("os") == "win") { try { var userProfile = installer.environmentVariable("USERPROFILE"); installer.setValue("UserProfile", userProfile); component.addOperation("CreateShortcut", "@TargetDir@/YOURAPP.exe", "@StartMenuDir@/YOURAPP.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/YOURAPP.ico"); } catch (e) { // Do nothing if key doesn't exist } } } catch (e) { print(e); } }
-
in an essence, yes
I have used simpler versionComponent.prototype.createOperations = function() { // call default implementation to actually install README.txt! component.createOperations(); if (systemInfo.productType === "windows") { component.addOperation("CreateShortcut", "@TargetDir@/app.exe", "@StartMenuDir@/app.lnk", "workingDirectory=@TargetDir@"); } }
But then menu start item name is "app".
I would like to set different name eg.: "My App" -
@Marek just change
app.lnk
intoMy App.lnk
-
Sh... you are right ;)
Probably I'm not used to spaces in file names.Regards
Marek