Uninstall doesn't happen when expected

Answered

Comments

2 comments

  • Avatar
    wojciechka

    In order to properly unpack and remove files, you can use InstallBuilder's downloadable components feature, which allows you to generate all or some of the components as external files that get downloaded by InstallBuilder automatically.

    All that is needed is to set <downloadable> = 1 for component(s) that should be downloaded and make a build with downloadable components enabled.

    In order to build the project with downloadable components enabled, the --downloadable-components flag should be passed to the CLI.

    $ path/to/bin/builder build project.xml linux --downloadable-components
    

    When using the GUI, the downloadable components checkbox should be enabled in the Build section before building the project.

    It is documented in more details in the Downloadable components section of InstallBuilder User Guide.

    With your current solution, the <addDirectoriesToUninstaller> action currently adds the files to uninstaller for project, not individual components. What you can do is add <deleteFile> action to <preUninstallationActionList> for <component> that unpacks the files. The path should be one or more files/directories that the tarball has created.

  • Avatar
    juanjo

    Currently, it is only possible to add files manually to the uninstaller belonging to the project, so they are just deleted when the full application is deleted. We will improve the actions to support registering the files to a particular component but in the meantime, if you can safely delete all the contents, you could place a <deleteFile> action in the <preUninstallationActionList> of the component:

    <component>
       <name>foo</name>
       ...
       <preUninstallationActionList>
          <!-- 'somedir' is the directory containing the files not registered --> 
          <deleteFile path="${installdir}/foo/somedir"/>
       </preUninstallationActionList>
    </component>
    

Please sign in to leave a comment.