Difference between revisions of "Documentation/Nightly/Developers/Launcher"

From Slicer Wiki
Jump to: navigation, search
(4.1 -> Nightly)
 
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{documentation/underconstruction}}
+
<noinclude>{{documentation/versioncheck}}</noinclude>
 +
 
 
The [[Slicer3:Launcher|Slicer3 launcher]] has been ported to Qt in Slicer4.
 
The [[Slicer3:Launcher|Slicer3 launcher]] has been ported to Qt in Slicer4.
  
Line 6: Line 7:
 
   Slicer [options]
 
   Slicer [options]
  
Options
+
   --launcher-help                             Display help
   --launcher-help               Display help
+
  --launcher-version                          Show launcher version information
   --launcher-verbose             Verbose mode
+
   --launcher-verbose                           Verbose mode
   --launch                       Specify the application to launch
+
   --launch                                     Specify the application to launch
   --launcher-detach             Launcher will NOT wait for the application to finish
+
   --launcher-detach                           Launcher will NOT wait for the application to finish
   --launcher-no-splash           Hide launcher splash
+
   --launcher-no-splash                         Hide launcher splash
   --launcher-timeout             Specify the time in second before the launcher kills the application. -1 means no timeout (default: -1)
+
   --launcher-timeout                           Specify the time in second before the launcher kills the application. -1 means no timeout (default: -1)
   --launcher-generate-template   Generate an example of setting file
+
   --launcher-load-environment                  Specify the saved environment to load.
   --designer                    Start Qt designer using Slicer plugins
+
  --launcher-dump-environment                  Launcher will print environment variables to be set, then exit
   --xterm                        Start xterm
+
   --launcher-show-set-environment-commands    Launcher will print commands suitable for setting the parent environment (i.e. using 'eval' in a POSIX shell), then exit
   --gdb                          Start gdb
+
  --launcher-additional-settings              Additional settings file to consider
   --, --ignore-rest                     Ignores the rest of the labeled arguments following this flag. (default: false)
+
   --launcher-ignore-user-additional-settings  Ignore additional user settings
   -h, --help                           Display available command line arguments.
+
  --launcher-generate-exec-wrapper-script      Generate executable wrapper script allowing to set the environment
   --disable-python                     Disable python support. This is equivalent to build the application with Slicer_USE_PYTHONQT=OFF.
+
   --launcher-generate-template                Generate an example of setting file
   --python-script                       Python script to execute after slicer loads.
+
   --cmd                                        Start cmd
   --python-code                         Python code to execute after slicer loads.
+
 
   --ignore-slicerrc                     Do not load the Slicer resource file (~/.slicerrc.py).
+
   --, --ignore-rest                             Ignores the rest of the labeled arguments following this flag. (default: false)
   --disable-cli-modules                Disables the loading of Command Line Modules.
+
   -h, --help                                   Display available command line arguments.
   --disable-loadable-modules            Disables the loading of Loadable Modules.
+
  --testing                                    Activate testing mode. It implies --disable-settings and --ignore-slicerrc. (default: false)
   --disable-scripted-loadable-modules  Disables the loading of Scripted Loadable Modules.
+
   --disable-python                             Disable python support. This is equivalent to build the application with Slicer_USE_PYTHONQT=OFF.
   --version                             Displays version information and exits.
+
   --python-script                               Python script to execute after slicer loads.
   --program-path                       Displays application program path and exits.
+
   --python-code                                 Python code to execute after slicer loads.
   --home                               Displays home path and exits.
+
  -c                                            Python code to execute after slicer loads. By default, no modules are loaded and Slicer exits afterward.
   --settings-path                       Displays settings path and exits.
+
   --ignore-slicerrc                             Do not load the Slicer resource file (~/.slicerrc.py).
   --verbose-module-discovery           Enable verbose output during module discovery process.
+
  --additional-module-path                      Additional module path to consider when searching for modules to load.
   --disable-settings                   Start application ignoring user settings.
+
  --additional-module-paths                    List of additional module path to consider when searching for modules to load.
   --disable-message-handlers           Start application disabling the 'terminal' message handlers.
+
  --modules-to-ignore                          Comma separated list of modules that should *NOT* be loaded.
   --disable-tooltips                   Disables toolstips in the user interface.
+
  --disable-modules                            Disable the loading of any Modules.
   --no-splash                           Disables the startup splash screen.
+
  --disable-builtin-modules                    Disable the loading of builtin Modules.
   --no-main-window                     Disables display of the main slicer window.  Use with --python-script for alternate interface
+
  --disable-cli-modules                        Disable the loading of any Command Line Modules.
   --show-python-interactor             Show Python interactor at startup.
+
   --disable-builtin-cli-modules                Disable the loading of builtin Command Line Modules.
 +
   --disable-loadable-modules                    Disable the loading of any Loadable Modules.
 +
  --disable-builtin-loadable-modules            Disable the loading of builtin Loadable Modules.
 +
  --disable-scripted-loadable-modules          Disable the loading of any Scripted Loadable Modules.
 +
   --disable-builtin-scripted-loadable-modules  Disable the loading of builtinScripted Loadable Modules.
 +
   --version                                     Display version information and exits.
 +
   --program-path                               Display application program path and exits.
 +
   --home                                       Display home path and exits.
 +
   --settings-path                               Display settings path and exits.
 +
  --temporary-path                              Display temporary path and exits.
 +
  --application-information                    Display application information in the terminal.
 +
   --verbose-module-discovery                   Enable verbose output during module discovery process.
 +
   --disable-settings                           Start application ignoring user settings and using new temporary settings.
 +
  --keep-temporary-settings                    Indicate whether temporary settings should be maintained.
 +
   --disable-message-handlers                   Start application disabling the 'terminal' message handlers.
 +
   --disable-tooltips                           Disable toolstips in the user interface.
 +
   --no-splash                                   Disable the startup splash screen.
 +
   --no-main-window                             Disable display of the main slicer window.  Use with --python-script for alternate interface
 +
   --show-python-interactor                     Show Python interactor at startup.
 +
  --qt-testing                                  Enable QtTesting in the user interface
 +
  --exit-after-startup                          Exit after startup is complete. Useful for measuring startup time
 
</pre>
 
</pre>
 +
 
== Notes ==
 
== Notes ==
 
;--launch <executable> [parameters]
 
;--launch <executable> [parameters]
Line 60: Line 82:
  
 
== Builds ==
 
== Builds ==
AppLauncher is built statically with Qt on Windows, Linux and MacOsX:
+
AppLauncher is built statically with Qt on Windows, Linux and macOS:
https://github.com/commontk/AppLauncher/downloads
+
https://github.com/commontk/AppLauncher/releases

Latest revision as of 17:41, 27 July 2019

Home < Documentation < Nightly < Developers < Launcher


For the latest Slicer documentation, visit the read-the-docs.


The Slicer3 launcher has been ported to Qt in Slicer4.

Usage
  Slicer [options]

  --launcher-help                              Display help
  --launcher-version                           Show launcher version information
  --launcher-verbose                           Verbose mode
  --launch                                     Specify the application to launch
  --launcher-detach                            Launcher will NOT wait for the application to finish
  --launcher-no-splash                         Hide launcher splash
  --launcher-timeout                           Specify the time in second before the launcher kills the application. -1 means no timeout (default: -1)
  --launcher-load-environment                  Specify the saved environment to load.
  --launcher-dump-environment                  Launcher will print environment variables to be set, then exit
  --launcher-show-set-environment-commands     Launcher will print commands suitable for setting the parent environment (i.e. using 'eval' in a POSIX shell), then exit
  --launcher-additional-settings               Additional settings file to consider
  --launcher-ignore-user-additional-settings   Ignore additional user settings
  --launcher-generate-exec-wrapper-script      Generate executable wrapper script allowing to set the environment
  --launcher-generate-template                 Generate an example of setting file
  --cmd                                        Start cmd

  --, --ignore-rest                             Ignores the rest of the labeled arguments following this flag. (default: false)
  -h, --help                                    Display available command line arguments.
  --testing                                     Activate testing mode. It implies --disable-settings and --ignore-slicerrc. (default: false)
  --disable-python                              Disable python support. This is equivalent to build the application with Slicer_USE_PYTHONQT=OFF.
  --python-script                               Python script to execute after slicer loads.
  --python-code                                 Python code to execute after slicer loads.
  -c                                            Python code to execute after slicer loads. By default, no modules are loaded and Slicer exits afterward.
  --ignore-slicerrc                             Do not load the Slicer resource file (~/.slicerrc.py).
  --additional-module-path                      Additional module path to consider when searching for modules to load.
  --additional-module-paths                     List of additional module path to consider when searching for modules to load.
  --modules-to-ignore                           Comma separated list of modules that should *NOT* be loaded.
  --disable-modules                             Disable the loading of any Modules.
  --disable-builtin-modules                     Disable the loading of builtin Modules.
  --disable-cli-modules                         Disable the loading of any Command Line Modules.
  --disable-builtin-cli-modules                 Disable the loading of builtin Command Line Modules.
  --disable-loadable-modules                    Disable the loading of any Loadable Modules.
  --disable-builtin-loadable-modules            Disable the loading of builtin Loadable Modules.
  --disable-scripted-loadable-modules           Disable the loading of any Scripted Loadable Modules.
  --disable-builtin-scripted-loadable-modules   Disable the loading of builtinScripted Loadable Modules.
  --version                                     Display version information and exits.
  --program-path                                Display application program path and exits.
  --home                                        Display home path and exits.
  --settings-path                               Display settings path and exits.
  --temporary-path                              Display temporary path and exits.
  --application-information                     Display application information in the terminal.
  --verbose-module-discovery                    Enable verbose output during module discovery process.
  --disable-settings                            Start application ignoring user settings and using new temporary settings.
  --keep-temporary-settings                     Indicate whether temporary settings should be maintained.
  --disable-message-handlers                    Start application disabling the 'terminal' message handlers.
  --disable-tooltips                            Disable toolstips in the user interface.
  --no-splash                                   Disable the startup splash screen.
  --no-main-window                              Disable display of the main slicer window.  Use with --python-script for alternate interface
  --show-python-interactor                      Show Python interactor at startup.
  --qt-testing                                  Enable QtTesting in the user interface
  --exit-after-startup                          Exit after startup is complete. Useful for measuring startup time

Notes

--launch <executable> [parameters]
specify the full path of the executable. Use which executable or locate executable to find the full path of an executable.
parameters is passed to the executable

Examples

.\Slicer.exe --launch "C:\Program Files (x86)\depends22_x86\depends.exe" bin\Debug\MRMLCore.dll

Starts the dependency walker with the MRMLCore.dll library.

Developers

The executable Slicer application is: Slicer-Superbuild/Slicer-build/Slicer (or Slicer.exe)

Slicer is actually a wrapper created using the CTK AppLauncher. The wrapper exists to set library and environment paths before launching the real application binary in Slicer-Superbuild/Slicer-build/bin/SlicerQT-real (or SlicerQT-real.exe)

The launcher is part of the CTK effort.

Source code

The AppLauncher source code is here: https://github.com/commontk/AppLauncher

Builds

AppLauncher is built statically with Qt on Windows, Linux and macOS: https://github.com/commontk/AppLauncher/releases