Documentation/Labs/AutomaticUpdateAndInstallationFramework

From Slicer Wiki
Revision as of 11:31, 7 December 2016 by Mneugebauer (talk | contribs) (added a link to a patch file)
Jump to: navigation, search
Home < Documentation < Labs < AutomaticUpdateAndInstallationFramework

Overview

This page serves as roadmap for the Slicer Automatic Update and Installation framework.

Use cases:

  • New Slicer version installed locally should be updated with the list of extensions previously installed.
  • Self update of Slicer

Terminology

  • User Interface
    • Extensions Manager is a Slicer dialog allowing the user to Search, Install, Remove and disable extensions.
    • ExtensionWizard module: This is a Slicer module providing a graphical interface within Slicer to aid in the creation of Slicer extensions.



Convention

Tasks listed in this page can be associated with any of these state:

  • ToBeDone
  • Check.svg Completed
  • In progress

Use case: Keep track of the installed extensions across version

The goal here is to simplify the number of steps allowing people to reinstall extensions that were used in a previous installation.

Idea

  • After installing a new version of Slicer, the user can select from all previously installed extensions and batch-install them
  • extensions installed in the last (previous) Slicer versions are marked and preselected (one click-solution for getting the previous setup)
  • extensions that where previously installed but are not compatible for some reason, are shown but not selectable
  • UI: a third tab ("Restore Extensions") should be added to the Extension Manager and provide at least a list view for selection / a button button for installing the selected extensions

Gathering information about previous extensions

  • extensions information / subfolders containing the extensions are available in the "NA-MIC" folder
    • on Linux, that's in ~/.config/NA-MIC
    • on Windows, in AppData/Roaming
    • on OS X, seems to be a subdirectory of the application bundle
  • folder contains and Slicer-[Revision].ini file that points to paths relevant for extensions (modules/libraries/dependencies)
  • however, no explicit information about installed extensions are stored there, information about installed extension is gathered at runtime by parsing the extension subfolders
  • PROPOSAL: added the extension IDs of all currently installed extensions in an additional setting information [Extensions]/InstalledExtension, thus, no folders need to be parsed and only the .ini files are needed

Changes

  • Base/QTGUI/Resources/UI/qSlicerExtensionsManagerWidget.ui
    • a new tab ("Restore Extensions") was added
    • this tab contains a placeholder-widget for the qSlicerExtensionsRestoreWidget
  • qSlicerExtensionsManagerModel
    • add a function that provides informations about previous extensions: getExtensionRestoreInformation()
    • add a callback for tracking the progress during non-update related updates: onInstallDownloadProgress (used in: downloadAndInstallExtension)
    • extend installExtension / scheduleExtensionForUninstall to add (remove) ids of installed extensions to a new parameter [Extensions]/InstalledExtension

Addition

  • qSlicerExtensionsRestoreWidget
    • a new widget that renders a list of available extension that were previously installed
    • on initialization it calls getExtensionRestoreInformation() and builds a ListItemWidget
    • if "Install selected" is triggered, downloadAndInstallExtension is called sequentially for each selected extension
    • after installation of all extensions, the list is updated
Screenshot of the "restore extension" widget

Progress

  • Adapt extensions manager model to provide neccessary information Check.svg Completed
  • Extend the UI of the extensions manager (new tab, new widget) Check.svg Completed
  • Add a widget that provides a selectable list of previously installed extensions Check.svg Completed
  • Install procedure (with feedback) for selected extensions Check.svg Completed
  • Discuss the proposed solution with JC ToBeDone
  • Adapt solution accordingly ToBeDone
  • Submit solution ToBeDone

Patch

Questions

  • Does the uninstall progress also remove the extension-subfolders?
  • Is the proposed solution (accessing the .ini file) suitable for all OS?

Completed

NA

Use case: Self update of Slicer

Proposed Changes

  • Display list of nightly builds in a web view
  • Selecting a new version should automate:
    • download
    • auto-start installer, with extra information for the next steps
    • auto-start new Slicer
    • possibly, directly going to the above extensions-reinstallation tab (maybe not even showing the main window before)
  • stuff that is there, or might be useful
    • cross-platform re-start functionality is there (as part of extension installation)
    • probably, at least on Win/Linux, "start Slicer after installation" is possible
    • unattended installation on any platform(s)?

Notes

2016.05.03

  • Serialize what is installed in you current Slicer