Как назначить иконку для типа файла программы Qt, используя файл скрипта

Как мне сказали, используя файл сценария ниже и Qt Installer Framework, я могу выполнить работу в Windows.

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")
      }
 }

Вот также исходный код, который я использую.
Когда я делаю установщик таким образом и устанавливаю его на свой Windows 7, для типа файла программы не будет установлен значок.
Я использую Qt 5.9.

Кто-нибудь знает, в чем проблема, пожалуйста?

0 ответов

Другие вопросы по тегам