ENH: Facilitate code maintenance by abstracting the operating system names.

* Introduced CMake variables and macros named Slicer_OS_{LINUX, MAC, WIN}_NAME

* Update the CMake script referencing hard coded operating system names

* Note that since the dashboard driver script id downloaded as a single file,
the operating system name is still hard coded. Ideally, the driver script
could downloaded some additional script providing the requested information.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19643 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Extension package are now properly "fixed up" on MacOX

* Disable CMAKE_INSTALL_NAME_TOOL when packaging extension, that way all
installed library will contain the full path to their direct dependencies provided
by the extension itself. Doing so will allow the to properly fix all libraries.

* Copy SlicerCompleteBundle.cmake.in into SlicerExtensionCompleteBundle.cmake.in,
also copy function "get_bundle_keys" and "fixup_bundle" from BundleUtilities.cmake
and respectively rename them into "get_extension_keys" and "fixup_extension".
This has been motivated by the fact there is no executable available within the
"Slicer.app/Contents/MacOS" directory. It means we have to "fake" it by
commenting the function which was explicitly checking for the existence
of an executable. For instance, "get_bundle_and_executable" has been commented out.
The variable "exepath" is now explicitly set within the function "fixup_extension"
and "get_extension_keys"

* To speed up the "fixup" process, "get_prerequisites" is called with
"recurse" parameter set to "0".

* Note also that since all the libraries available under the Slicer superbuild
directory have already been fixed up, the "fixup_extension" function
check if a given item is located within a sub directory of "Slicer_SUPERBUILD_DIR".
If it's the case, the item will be skipped.

* The install directory being different within the bundle, the CMake block
"SlicerBlockUploadExtensionPrerequisites" has been updated to "patch"
the *MODULES_*_DIR" variable with "Slicer_BUNDLE_EXTENSIONS_LOCATION".

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19644 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Improve readability factoring out code used to extract the extension archive.

* Note also the addition of the convenience typedef "Pimpl".

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19645 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Make sure qSlicerExtensionsManagerModel tests pass even if Slicer version is updated

* Test are now version agnostic. qSlicerExtensionsManagerModelTester class
has now the member "SlicerVersion" allowing to specify which version
of Slicer has been used to generate the baseline data.

* Add qSlicerExtensionsManagerModel::setSlicerVersion/slicerVersion

* Note also that the temporary Settings file associated with the test
will now be deleted.

Conflicts:

	Base/QTCore/qSlicerExtensionsManagerModel.cxx

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19646 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Update qSlicerExtensionsManagerModel extraction mechanism to consider macosx extensions.

* On macosx, the extraction process is different from windows and linux.

Indeed, within a macosx extension archive, files are all contained within
the "Slicer.app/Contents/<Slicer_BUNDLE_EXTENSIONS_DIRNAME>/..." directory. After extraction, files will
be located in the folder "/<extensionsPath>/<archiveBaseName>/Slicer.app/Contents/Plugins/..."

Then, they will be copied from:

  "/<extensionsPath>/<archiveBaseName>/Slicer.app/Contents/<Slicer_BUNDLE_EXTENSIONS_DIRNAME>/<extensionName>/..."

into

  "/<extensionsPath>/<extensionName>"

It is assume that, to successfully load the extension, the application will
have to set the extensions path to "/path/to/Slicer.app/Contents/<Slicer_BUNDLE_EXTENSIONS_DIRNAME>".

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19647 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Ensure extensionsInstallPath is properly set on MacOSX

* Since extension libraries and executable are fixed up, there are expected
to be located within the "Slicer.app/Contents" folder. For that purpose,
the following changes have been introduced:

 -  Introduce method "defaultExtensionsInstallPathForMacOSX" in the pimpl
of qSlicerCoreApplication. This method is used to force the extensionsInstallPath
to have always the same value on macosx.

 - The ExtensionsInstallPathButton in extension settings panel is now
always disabled if the operating system is macosx.

 - In case of non-installed Slicer on macosx, the path prefixed with
"bin/Slicer.app/Contents/<Slicer_BUNDLE_EXTENSIONS_DIRNAME>" are added as search paths.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19648 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Prevent assertion from happening in when registering a module

* On macosx, when a plugin is improperly fixed, the assertion occurred. This
commit remove the assertion and emit the "moduleIgnored" signal if the
associated condition happen.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19649 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Prevent confusion by removing unused CMake macro

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19650 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Qt Script library is required when ExtensionManager support is enabled

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19651 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Add test for "qSlicerExtensionsManagerModelTester::serverKeysToIgnore"

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19652 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Refactor code and add "qSlicerExtensionsManagerModel::serverToExtensionDescriptionKey"

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19653 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Simplify mechanism allowing to retrieve expected metadata in qSlicerExtensionsManagerModel test

* Fully test "testExtensionLauncherSettingsUpdated" with both linux and macosx extension

* Introduce "ExtensionIdType", a tuple <OperatingSystem, ExtensionId> allowing
to easily retrieve the input data associated with an extension.

* Remove "initializeModel" method and explicitly set the slicer version when
it applies.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19654 3bd1e089-480b-0410-8dfb-8563597acbee