-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix extension build on macOS by replacing real Virtual Reality module…
… by a placeholder Virtual Reality is not supported on macOS. Instead of having a build error on the dashboard and extension missing from the Extensions Manager, we now create an extension that contains a stub module that just displays the message that Virtual Reality is not supported on the platform. fixes #92 Co-authored-by: Jean-Christophe Fillion-Robin <[email protected]>
- Loading branch information
Showing
5 changed files
with
72 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#----------------------------------------------------------------------------- | ||
set(MODULE_NAME VirtualRealityStub) | ||
|
||
#----------------------------------------------------------------------------- | ||
set(MODULE_PYTHON_SCRIPTS | ||
${MODULE_NAME}.py | ||
) | ||
|
||
set(MODULE_PYTHON_RESOURCES | ||
Resources/Icons/${MODULE_NAME}.png | ||
) | ||
|
||
#----------------------------------------------------------------------------- | ||
slicerMacroBuildScriptedModule( | ||
NAME ${MODULE_NAME} | ||
SCRIPTS ${MODULE_PYTHON_SCRIPTS} | ||
RESOURCES ${MODULE_PYTHON_RESOURCES} | ||
) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import slicer | ||
from slicer.ScriptedLoadableModule import * | ||
|
||
# | ||
# VirtualRealityStub | ||
# | ||
|
||
class VirtualRealityStub(ScriptedLoadableModule): | ||
def __init__(self, parent): | ||
ScriptedLoadableModule.__init__(self, parent) | ||
self.parent.title = "Virtual Reality" | ||
self.parent.categories = ["Virtual Reality"] | ||
self.parent.dependencies = [] | ||
self.parent.contributors = ["Andras Lasso (PerkLab)"] | ||
self.parent.helpText = """ | ||
This is a placeholder module to tell the user that Virtual Reality extension is not available on the platform. | ||
See more information in the <a href="https://github.com/KitwareMedical/SlicerVirtualReality">extension documentation</a>. | ||
""" | ||
self.parent.acknowledgementText = "" | ||
|
||
# | ||
# VirtualRealityStubWidget | ||
# | ||
|
||
class VirtualRealityStubWidget(ScriptedLoadableModuleWidget): | ||
def __init__(self, parent=None): | ||
ScriptedLoadableModuleWidget.__init__(self, parent) | ||
|
||
def setup(self): | ||
ScriptedLoadableModuleWidget.setup(self) | ||
|
||
def enter(self): | ||
""" | ||
Called each time the user opens this module. | ||
""" | ||
slicer.util.messageBox("Virtual Reality is not supported on this platform.<br>" | ||
"See <a href='https://github.com/KitwareMedical/SlicerVirtualReality#setup'>Slicer Virtual Reality extension website</a> for details.") |