Documentation/Labs/AutomaticUpdateAndInstallationFramework
From Slicer Wiki
Revision as of 09:49, 17 January 2017 by Mneugebauer (talk | contribs) (added feedback from JC from the hangout in december)
Home < Documentation < Labs < AutomaticUpdateAndInstallationFramework
Contents
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.
- Command line
- ExtensionWizard is a command line tool to simplify the process of creating and contributing extensions.
- API
- ExtensionsManagerModel: This is the backend of the Extensions Manager displayed to the user
- Utilities/Scripts/SlicerWizard: This is a python package used in the ExtensionWizard
Convention
Tasks listed in this page can be associated with any of these state:
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.
- Update: Mathias is currently working on this task (Previous Efforts by Dennis)
- Meta issue: 2779: Mechanism to keep track of the installed extensions across version
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
- add a function that provides informations about previous extensions:
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
Progress
- Adapt extensions manager model to provide neccessary information Completed
- Extend the UI of the extensions manager (new tab, new widget) Completed
- Add a widget that provides a selectable list of previously installed extensions Completed
- Install procedure (with feedback) for selected extensions Completed
- Discuss the proposed solution with JC Completed
- Adapt solution accordingly ToBeDone
- Submit solution ToBeDone
Patch
- First (not final) version: File:0001-ENH-working-version-of-extension-restore-functionali.zip
Questions
- Does the uninstall progress also remove the extension-subfolders? (yes)
- Is the proposed solution (accessing the .ini file) suitable for all OS? (yes)
- How could settings of previous Slicer installations be accessed under MacOS? (same way as for other platforms)
Feedback from JC on first version (12/08/2016)
- Generally agrees to current solution
- Solution should be compatible to all platforms (there is a central config/extension folder also on MacOS)
- Suggested Changes:
- add a legend to explain color coding (green, gray, black, marked - unmarked) of the presented extensions
- check for extension compatibility currently deactivated, because model functionality used local information to check compatibility
- JC added patch to add server-side information to the compatibility check
- commit d448b1c9634c71a61b3476a98bfccffba6bcedb5
- would be better to track previously installed extensions in the central, not revision-dependent slicer.ini
- thus, no (possibly error-prone) parsing of the file names is necessary
- also, we would no long have to rely on a central saving location for all extension related information (currently the NA-MIC folder = Extension install path)
- Structure could be:
- [installedExtensionsHistory] → [Revision] → [ExtensionID]
- To enable access to slicer.ini the SlicerCoreApp needs to be extened (e.g. getHistoryFilePath, see. line 319, qSlicerCoreApp.cxx)
- Additional Information:
- Q: Why are extensions not removed after uninstalling Slicer?
- A: related to NSIS installer setup, could be changed if installation setup is changed
- Q: How could an semi-/automatic update be realized?
- A:
- Change of the underlying QT framework (would mean fundamental changes to the current setup)
- or: use an approach similar to the installation of extensions, by having a central store for new slicer version
- no auto-uninstall but auto-install / maybe just a popup on start, with a link to the new version
- since extension information is saved in central slicer.ini the installation of extensions could be triggered on the first start of the new version
- General vision (this addition to the extension manager is the first step):
- core Slicer application + profiles (e.g. using the same set of extensions / setup / layout that was used for a paper) :
- pre-packed Slicer versions available for downloads
- can be extended with downloadable profiles
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
- Ability to ask the installer (or Slicer) to install other extensions
- Would it make sense to transition to http://doc.qt.io/qtinstallerframework/ ?
- Serialize what is installed in you current Slicer
- Update of installed extensions: