View Issue Details

IDProjectCategoryView StatusLast Update
0002920Slicer4Core: Extensionspublic2016-06-09 00:16
Reporterfbudin Assigned Tojcfr  
PrioritylowSeverityminorReproducibilityhave not tried
Status acknowledgedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0002920: Possibility to run a post install script
Description

After installing an extension, it should be possible to run a script/executable.

Convention could be that:

  • during the installation process
  • after the tgz is extracted
  • if a file matching </path/to/extensionname/post-install-scripts.(sh|bat)> exists
  • notify the user [possibility to hide the dialog if other install]
  • run the script

If installing extension from python, it should be possible to pass a flag preventing such popup from appearing.

What trigger the creation of this issue are the pull requests associated with the DTI* extensions - See https://github.com/Slicer/ExtensionsIndex/pull/212

Tagshelp-wanted

Activities

fbudin

fbudin

2014-05-13 07:04

developer   ~0011752

What Adrien and I reported in this thread https://github.com/Slicer/ExtensionsIndex/pull/212 is not necessary anymore since the rpath issue has been addressed since then. However, it might still be a good thing to be able to run scripts post installation in certain cases.

jcfr

jcfr

2016-06-09 00:16

administrator   ~0013958

I discussed this with Davide earlier today, a possible design could be:

After installation, execute a python script defined as "post_install_script" in the extension metadata.

Entrypoint

post_install_script: the name of the script would be relative the "share" folder of the extension.

Script execution

Should we run code in the 'if name == "main"' section ?

Should we lookup a function named "post_install_setup(extension_directory)" ?

or ... ?

Sandboxed execution in the Extension installation directory ? Discarded: Downloaded code is assumed to be trusted.

Testing of the script

Diffing the setting before and after execution ?

Issue History

Date Modified Username Field Change
2013-02-07 11:17 jcfr New Issue
2013-02-07 11:17 jcfr Status new => assigned
2013-02-07 11:17 jcfr Assigned To => jcfr
2013-02-07 11:17 jcfr Target Version => Slicer 4.4.0
2013-02-07 11:35 jcfr Description Updated
2013-02-07 11:36 jcfr Description Updated
2014-05-12 23:25 jcfr Reporter jcfr => fbudin
2014-05-12 23:25 jcfr Status assigned => acknowledged
2014-05-12 23:25 jcfr Target Version Slicer 4.4.0 =>
2014-05-12 23:25 jcfr Tag Attached: help-wanted
2014-05-12 23:25 jcfr Priority normal => low
2014-05-13 07:04 fbudin Note Added: 0011752
2016-06-09 00:16 jcfr Note Added: 0013958