Hi all,

how can I extend the installer page? I want to add an action incl. message after install process and before create uninstaller for register mimetypes and create dekstop shortcuts. As well as in qt-creator installer:

alt text

How could I do this?

Thanks!

Kai

asked 29 Apr '12, 17:28

Kai%20Heitkamp's gravatar image

Kai Heitkamp
26778
accept rate: 0%


It is not possible to add more information to the uninstaller after the installation page finishes (the uninstaller is created at the end of the installation process). Would be possible to move the page before the installation page and execute the actions in the <postInstallationActionList>?

If that is not an option, you can place custom pages right after installing the files and before displaying the installation finished page using the below:

<booleanParameter>
  <name>createshortcuts</name>
  <title>Create shortcuts</title>
  <description>Create desktop shortcuts</description>
  <insertAfter>installation</insertAfter>
  <postShowPageActionList>
    <createShortcuts>
      <destination>${windows_folder_desktop}</destination>
      <shortcutList>
        <shortcut>
          <comment>Launches ${project.fullName}</comment>
          <name>Launch ${project.fullName}</name>
          <runAsAdmin>0</runAsAdmin>
          <windowsExec>${installdir}/myApp.exe</windowsExec>
        </shortcut>
      </shortcutList>
      <ruleList>
          <isTrue value="${createshortcuts}"/>
      </ruleList>
    </createShortcuts>
  </postShowPageActionList>
</booleanParameter>

And then manually revert the actions in the <preuninstallationactionlist>:

<preUninstallationActionList> 
   <deleteFile path="${windows_folder_desktop}/Launch ${project.fullName}.lnk"/>
</preUninstallationActionList>

If you do not want to try to revert actions that may not be performed by the installed (like deletig the shortcuts regardless of if they were created by the installation), you could write a file in the installation directory that will be read at uninstallation time:

<postShowPageActionList>
   <actionGroup>
      <actionList>
         <createShortcuts>
            ...
         </createShortcuts>
         <iniFileSet>
           <file>${installdir}/postinstall_steps.ini</file>
           <key>created_shortcuts</key>
           <section>General</section>
           <value>1</value>
         </iniFileSet>
      </actionList>
      <ruleList>
         <isTrue value="${createshortcuts}"/>
      </ruleList>
   </actionGroup>
</postShowPageActionList>
...
<preUninstallationActionList> 
  <iniFileGet>
     <file>${installdir}/postinstall_steps.ini</file>
     <key>created_shortcuts</key>
     <section>General</section>
     <variable>created_shortcuts</variable>
  </iniFileGet>
  <deleteFile path="${windows_folder_desktop}/Launch ${project.fullName}.lnk">
      <ruleList>
         <isTrue value="${created_shortcuts}"/>
      </ruleList>
  </deleteFile>
</preUninstallationActionList>
link

answered 30 Apr '12, 04:35

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:

×156
×25
×1

Asked: 29 Apr '12, 17:28

Seen: 1,184 times

Last updated: 30 Apr '12, 04:35