Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved installer.updateFinished() never called

    Installation and Deployment
    1
    1
    100
    Loading More Posts
    • 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.
    • M
      m1keall1son last edited by

      Re: QtIFw: updateFinished does not called

      bumping this topic.

      I have a file in the target dir i have to write to on installation and on update. Installation works fine but the update mode maintenance tool does not even call the ControlScript or the updateFinished() signal at all. I know this because my message doesn't appear in the log and the file is not appended with the text. I need admin rights because i'm on windows and the file lives next to the executable in Program Files.

      //installer FW 3.0
      function Controller()
      {
      	console.log("setting up control script"); //works on install, does not work on update
      	installer.installationFinished.connect(writeEnv); //works on install
      	installer.updateFinished.connect(writeEnv); //does not work on update
      }
      
      writeEnv = function()
      {
      	console.log("gaining rights...");
      	if(installer.gainAdminRights())
      	{
      		installer.performOperation("AppendFile", ["@TargetDir@/myFile", "blah blah blah"]);
      		console.log("appended text to file");
      	}
      	else
      	{
      		console.log("[ERROR] didn't have permission to append to the file.");
      	}
      }
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post