Publishing an Executable
See this page in the Vizard Documentation on how to publish your SightLab script as an executable if you wish to distribute it to users who are not running Vizard.
Note this is currently only supported for non-GUI scripts
For publishing executables with the interactive replay you may need to also share your Resources/environments (or Resources/media for 360 media) folder, or whatever folder has the assets you are using.
You will also need to make a separate executable of the SightLabVR_Replay file and copy that to the folder with your exe to use the replay.
To choose which vizconnects (hardware configurations) to show for the hardware configuration dropdown add this code. To see the available options see the settings.py file
#Add before importing sightlab
from sightlab\_utils import settings
settings.VIZCONNECT\_CONFIG\_LIST = \['Desktop',''Meta Quest 3'']
-
See ExampleScripts\PublishExe in the SightLab ExampleScripts Directory for publish exe examples
-
Make sure to run from the Vizard IDE with File- Publish as Exe
-
Data files will be saved to the folder you run the exe from
-
Drag "data" folder into the screen where it prompts for any missing files
Example
Add the published directories
#Add publish directories
publish_directories = [
'data',
viz.res.getVizardPath() + 'bin/lib/site-packages/sightlab_utils/',
viz.res.getVizardPath() + 'bin/lib/site-packages/deepdiff'
]
Next add these lines of code
for directory in publish_directories:
viz.res.addPublishDirectory(directory)
Session Replay EXE (Note: Any environments or assets that may be used with the Session Replay will need to be included in the exe)
Use this for published directories, where the Resources/environments is the name of where your assets for 3D models are or Resources/media for 360 media
publish_directories = [
'data',
'Resources/environments/',
viz.res.getVizardPath() + 'bin/lib/site-packages/sightlab_utils/'
]
for directory in publish_directories:
viz.res.addPublishDirectory(directory)
See this page in the Vizard Documentation for more information
Additional built in options related to publishing can be modified in the sightlab_config.py file in sightlab_utils (C:\Program Files\WorldViz\Vizard\<version>\bin\lib\site-packages\sightlab_utils)
For video recording as an option add
viz.setOption('viz.publish.allow_capture_video',1)