I'm taking a look at the Qt installer framework, particularly the Start Menu Shortcut Example where I found
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@/README.txt", "@StartMenuDir@/README.lnk",
"workingDirectory=@TargetDir@", "iconPath=%SystemRoot%/system32/SHELL32.dll",
"iconId=2", "description=Open README file");
}
}
Looks like javascript (or Qt script) is in use here and I'm a little lost. In the code above, where does compoent
comes from? Is it created by the function Component(){}
?
I found the documentation saying
The script has to contain a Component object that the installer creates when it loads the script. Therefore, the script must contain at least the Component() function, which performs initialization
Is function Component(){}
kind of a constructor?