import os
import sys

def start_detached():
	os.startfile(os.path.expandvars("$WIZART_SOFTWARE_PATH/standalone/wizart_desktop/wizart_desktop.exe"))


def get_rez_config_path():
	if hasattr(sys, 'frozen') and sys.executable:
		return os.path.join(os.path.dirname(sys.executable), 'rezconfig.py')
	else:
		return os.path.abspath("./rezconfig.py")

if os.environ.get("REZ_CONFIG_FILE") is None:
	os.environ['REZ_CONFIG_FILE'] = get_rez_config_path()