You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1007 B
Python

# VR4Life - Launcher (Diretriz Babylon)
import pymxs
import os
import sys
rt = pymxs.runtime
def main():
# 1. Identifica onde este script está rodando
script_dir = os.path.dirname(os.path.realpath(__file__))
# 2. Adiciona o caminho ao sys.path para que o 'import vr4life_ui' funcione
if script_dir not in sys.path:
sys.path.append(script_dir)
print(f">>> VR4Life: Carregando de {script_dir}")
try:
# Tenta carregar a interface principal
import vr4life_ui
# Supondo que sua classe de UI tenha um método show()
vr4life_ui.show()
except ImportError:
# Se o arquivo ainda não existe (primeira instalação)
rt.messageBox("Arquivos de interface não encontrados.\nUse o menu 'Update' para baixar os componentes do Gitea.", title="VR4Life")
except Exception as e:
rt.messageBox(f"Erro ao iniciar VR4Life: {str(e)}", title="VR4Life")
if __name__ == "__main__":
main()