franky
21st September 2017, 20:06
Hi guys,
I've been said it's a simple issue, and I myself too think so because there are many Windows programs published daily to the marked all have that ability and a good part of that programs are based on C++ or created by Qt.
Here (https://www.dropbox.com/s/ebv4qvol49rrqd3/SP.rar?dl=0) is the source file and I use Qt Installer Framework with this script file for making an installer:
function Component(){ }
Component.prototype.createOperations = function()
{
component.createOperations();
if (installer.value("os") == "win")
{
var userProfile = installer.environmentVariable("USERPROFILE");
installer.setValue("UserProfile", userProfile);
component.addOperation("CreateShortcut", "@TargetDir@/Spreadsheet.exe",
"@UserProfile@/Desktop/Spreadsheet.lnk" ,"workingDirectory=@TargetDir@",
"iconPath=@TargetDir@/Spreadsheet.ico");
component.addOperation("CreateShortcut", "@TargetDir@/QSpreadsheet.exe",
"@TargetDir@/Spreadsheet.lnk" ,"workingDirectory=@TargetDir@",
"iconPath=@TargetDir@/Spreadsheet.ico");
component.addOperation("CreateShortcut", "@TargetDir@/Spreadsheet.exe",
"@StartMenuDir@/Spreadsheet.lnk", "workingDirectory=@TargetDir@",
"iconPath=@TargetDir@/Spreadsheet.ico");
component.addOperation("RegisterFileType", "sp",
"@TargetDir@\\Spreadsheet.exe \" %1\"", "Tomy Files", "application/Tomy",
"@TargetDir@/Spreadsheet.ico", "ProgId=Spreadsheet.sp")
}
}
I've been said using that script file and Qt Installer Framework I can have the job done. But when I make the installer this way, no icon will be set on the file type of the program.
Does anybody know what the problem is please?
I've been said it's a simple issue, and I myself too think so because there are many Windows programs published daily to the marked all have that ability and a good part of that programs are based on C++ or created by Qt.
Here (https://www.dropbox.com/s/ebv4qvol49rrqd3/SP.rar?dl=0) is the source file and I use Qt Installer Framework with this script file for making an installer:
function Component(){ }
Component.prototype.createOperations = function()
{
component.createOperations();
if (installer.value("os") == "win")
{
var userProfile = installer.environmentVariable("USERPROFILE");
installer.setValue("UserProfile", userProfile);
component.addOperation("CreateShortcut", "@TargetDir@/Spreadsheet.exe",
"@UserProfile@/Desktop/Spreadsheet.lnk" ,"workingDirectory=@TargetDir@",
"iconPath=@TargetDir@/Spreadsheet.ico");
component.addOperation("CreateShortcut", "@TargetDir@/QSpreadsheet.exe",
"@TargetDir@/Spreadsheet.lnk" ,"workingDirectory=@TargetDir@",
"iconPath=@TargetDir@/Spreadsheet.ico");
component.addOperation("CreateShortcut", "@TargetDir@/Spreadsheet.exe",
"@StartMenuDir@/Spreadsheet.lnk", "workingDirectory=@TargetDir@",
"iconPath=@TargetDir@/Spreadsheet.ico");
component.addOperation("RegisterFileType", "sp",
"@TargetDir@\\Spreadsheet.exe \" %1\"", "Tomy Files", "application/Tomy",
"@TargetDir@/Spreadsheet.ico", "ProgId=Spreadsheet.sp")
}
}
I've been said using that script file and Qt Installer Framework I can have the job done. But when I make the installer this way, no icon will be set on the file type of the program.
Does anybody know what the problem is please?