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 make sure 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 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'']

Example

Add the published directories (need to exist first, for the GUI you will need these)

publish_directories = [

    'data',

    viz.res.getVizardPath() + 'bin/lib/site-packages/sightlab_utils/',

    viz.res.getVizardPath() + 'bin/lib/site-packages/deep_diff-0.0.4.dist-info',

    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)