Difference between revisions of "Documentation/Labs/AutomaticUpdateAndInstallationFramework"

From Slicer Wiki
Jump to: navigation, search
(added link to my user page, created link for subpage to shift previous effort information to)
Line 35: Line 35:
  
 
* Update: [[User:Mneugebauer|Mathias]] is currently working on this task ([[{{FULLPAGENAME}}/PreviousEfforts|Previous Efforts by Dennis]])
 
* Update: [[User:Mneugebauer|Mathias]] is currently working on this task ([[{{FULLPAGENAME}}/PreviousEfforts|Previous Efforts by Dennis]])
 +
* Meta issue: [http://www.na-mic.org/Bug/view.php?id=2779 2779]: Mechanism to keep track of the installed extensions across version
  
== Current Process ==
+
== Idea ==
* Dennis added a third tab in the extension manager, using Qt Designer
+
* After installing a new version of Slicer, the user can select from all previously installed extensions and batch-install them
* extensionsInstallPath() returns platform-specific path to "NA-MIC" folder which has "Extensions-2456" subfolders for all installed Slicer versions
+
* 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 Linux, that's in ~/.config/NA-MIC
 
** on Windows, in AppData/Roaming
 
** on Windows, in AppData/Roaming
 
** on OS X, seems to be a subdirectory of the application bundle
 
** on OS X, seems to be a subdirectory of the application bundle
* Dennis' idea: look for all Extensions-* subfolders – how to do that on OS X properly?
+
* folder contains and Slicer-[Revision].ini file that points to paths relevant for extensions (modules/libraries/dependencies)
** just found [Extensions]/InstallPath setting in .ini files -> by parsing all ini files, that could work cross-platform
+
* however, no explicit information about installed extensions are stored there, information about installed extension is gathered at runtime by parsing the extension subfolders
** on OS X, the inis are in ~/.config//www.na-mic.org
+
* '''PROPOSAL:''' added the extension IDs of all currently installed extensions in an additional setting information <code>[Extensions]/InstalledExtension</code>, thus, no folders need to be parsed and only the .ini files are needed
* Dennis' plan was to use Python scripting, but using C++/Qt would also be a good option
 
  
== Proposed Changes ==
+
== Changes ==
* a new (third) tab in the extension manager, which should list all previously installed extensions
+
* <code>Base/QTGUI/Resources/UI/qSlicerExtensionsManagerWidget.ui</code>
* view should have columns:
+
** a new tab ("Restore Extensions") was added
** extension name
+
** this tab contains a placeholder-widget for the <code>qSlicerExtensionsRestoreWidget</code>
** Slicer revisions / last revision in which the extension was installed
+
* <code>qSlicerExtensionsManagerModel</code>
** checkbox for batch installation, pre-checked from latest previous Slicer revision
+
** add a function that provides informations about previous extensions: <code>getExtensionRestoreInformation()</code>
** rows with installed extensions could be grayed out
+
** add a callback for tracking the progress during non-update related updates: <code>onInstallDownloadProgress</code> (used in: <code>downloadAndInstallExtension</code>)
* below that, a button for installing the checked extensions
+
** extend <code>installExtension</code> / <code>scheduleExtensionForUninstall</code> to add (remove) ids of installed extensions to a new parameter <code>[Extensions]/InstalledExtension</code>
 +
 
 +
== Addition ==
 +
* <code>qSlicerExtensionsRestoreWidget</code>
 +
** a new widget that renders a list of available extension that were previously installed
 +
** on initialization it calls <code>getExtensionRestoreInformation()</code> and builds a ListItemWidget
 +
** if "Install selected" is triggered, <code>downloadAndInstallExtension</code> is called sequentially for each selected extension
 +
** after installation of all extensions, the list is updated
 +
[[File:Image2016-11-25 15-26-52.png|thumb|Screenshot of the "restore extension" widget]]
  
 
== Progress ==
 
== Progress ==
 +
* Adapt extensions manager model to provide neccessary information '''Done'''
 +
* Extend the UI of the extensions manager (new tab, new widget) '''Done'''
 +
* Add a widget that provides a selectable list of previously installed extensions '''Done'''
 +
* Install procedure (with feedback) for selected extensions '''Done'''
 +
* Discuss the proposed solution with JC '''ToBeDone'''
 +
* Adapt solution accordingly '''ToBeDone'''
 +
* Submit solution '''ToBeDone'''
  
* Extract list of extensions installed. Look at npm for the format. '''ToBeDone'''
+
== Patch ==
* Extension manager:
 
** Update ExtensionManageModel API so that "list" can be processed '''ToBeDone'''
 
** Update entry "Install Extension from file" to "Install Extensions from file" and support "tar.gz", ".json" '''ToBeDone'''
 
  
Meta issue:
+
== Questions ==
* [http://www.na-mic.org/Bug/view.php?id=2779 2779]: Mechanism to keep track of the installed extensions across version '''ToBeDone'''
+
* Does the uninstall progress also remove the extension-subfolders?
 +
* Is the proposed solution (accessing the .ini file) suitable for all OS?  
  
 
== Completed ==
 
== Completed ==
 
 
NA
 
NA
  

Revision as of 10:45, 7 December 2016

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 Done
  • Extend the UI of the extensions manager (new tab, new widget) Done
  • Add a widget that provides a selectable list of previously installed extensions Done
  • Install procedure (with feedback) for selected extensions Done
  • 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