Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt installer framework create desktop form at end of installer

Qt installer framework create desktop form at end of installer

Scheduled Pinned Locked Moved Unsolved General and Desktop
installershort cut
2 Posts 1 Posters 424 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kiro22
    wrote on 13 Aug 2020, 20:29 last edited by Kiro22
    #1

    Hello everyone, I created a form which can be checked to create desktop short cuts, the form is visible however it doesnt create anything, here's the code, any idea whats wrong?

    function Component()
    {
        installer.installationFinished.connect(this, Component.prototype.installationFinishedPageIsShown);
        installer.finishButtonClicked.connect(this, Component.prototype.installationFinished);
    }
    
    Component.prototype.installationFinishedPageIsShown = function()
    {
        try {
            if (installer.isInstaller() && installer.status == QInstaller.Success) {
                installer.addWizardPageItem( component, "ShortCutCheckBoxForm", QInstaller.InstallationFinished );
            }
        } catch(e) {
            console.log(e);
        }
    }
    Component.prototype.createOperations = function()
    {
        component.createOperations();
    }
    Component.prototype.installationFinished = function()
    {
       component.createOperations();
        try {
            if (installer.isInstaller() && installer.status == QInstaller.Success) {
                var isReadMeCheckBoxChecked = component.userInterface( "ShortCutCheckBoxForm" ).ShortCutCheckBox.checked;
                if (isReadMeCheckBoxChecked) {
               component.addOperation("CreateShortcut",
    								"@TargetDir@/Prog.exe",
    								"@DesktopDir@/Prog.lnk",
    								"workingDirectory=@TargetDir@",
    								"iconPath=@TargetDir@/Prog.exe",
    								"iconId=0",
    								"description=Execute Prog");
    								
    			
    
        
                }
            }
        } catch(e) {
            console.log(e);
        }
    }
    

    T

    1 Reply Last reply
    0
    • K Offline
      K Offline
      Kiro22
      wrote on 14 Aug 2020, 17:28 last edited by
      #2

      Any body?

      1 Reply Last reply
      0

      1/2

      13 Aug 2020, 20:29

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved