When the auto update exe is run if an update is availabe it just shows the Update available.I need show a text which details about whats changed in the update.How can I do this.This is becoming a bottleneck in the autoupdate which I am adding for particular installer.

asked 08 Aug '13, 15:32

Manoj%20Rajashekariah's gravatar image

Manoj Rajash...
269912
accept rate: 0%


It is not possible to do that at that point. What you could do is use another binary (that may be an InstallBuilder installer) to do the logic. It would call the autoupdate in unattended mode, and if an update is available, contact your server using an <httpGet> action to retrieve a changelog and display it in a <showText> dialog. For example, assuming you have the current version in the variable ${current_version_id}:

 <project>
    ...
    <initializationActionList>
       <showQuestion default="yes" text="Would you like to check for updates?" variable="shouldCheckForUpdates" />
       <actionGroup>
          <actionList>
             <!-- Once you have unpacked the bundled autoupdate and update.ini to some folder, like /tmp/autoupdate -->
             <runProgram>
                <program>/tmp/autoupdate/autoupdate-linux.run</program>
                <programArguments>--mode unattended</programArguments>
             </runProgram>
             <actionGroup>
                 <actionList>
                       <httpGet url="http://example.com/changelog.php?current_version=${current_version_id}" filename="${system_temp_directory}/changelog.txt"/>
                       <readFile path="${system_temp_directory}/changelog.txt" name="changelog"/>
                       <showText title="An update is available!" text="${changelog}"/>
                       <showQuestion default="yes" text="Do you want to launch the upgrade process?" variable="shouldUpdate" />
                       <runProgram>
                          <program>/tmp/autoupdate/autoupdate-linux.run</program>
                          <programArguments>&amp;</programArguments>
                          <ruleList>
                              <isTrue value="${shouldUpdate}" />
                          </ruleList>
                       </runProgram>
                       <exit/>
                  </actionList>
                   <ruleList>
                       <isFalse value="${program_exit_code}" />
                   </ruleList>
             </actionGroup>
             <showInfo text="Sorry, no update is available...">
               <ruleList>
                   <compareText text="${program_exit_code}" value="0" logic="does_not_equal" />
               </ruleList>
             </showInfo>
          </actionList>
          <ruleList>
             <compareText text="${shouldCheckForUpdates}" value="yes" logic="equals" />
          </ruleList>
       </actionGroup>
    </initializationActionList>
    ...
</project>
link

answered 08 Aug '13, 15:56

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×52

Asked: 08 Aug '13, 15:32

Seen: 4,991 times

Last updated: 08 Aug '13, 15:56