# stop_if_duplicate() # Ensure that the wizard's name matches its folder check.check_paths() # FIRST RUN SETTINGS if CONFIG.get_setting('first_install') == 'true': logging.log("[First Run] Showing Save Data Settings", level=xbmc.LOGINFO) window.show_save_data_settings() else: logging.log("[First Run] Skipping Save Data Settings", level=xbmc.LOGINFO) # BUILD INSTALL PROMPT if tools.open_url(CONFIG.BUILDFILE, check=True) and CONFIG.get_setting('installed') == 'false': logging.log("[Current Build Check] Build No Instalado", level=xbmc.LOGINFO) window.show_build_prompt() else: logging.log("[Current Build Check] Build Instalado: {0}".format(CONFIG.BUILDNAME), level=xbmc.LOGINFO) # ENABLE ALL ADDONS AFTER INSTALL if CONFIG.get_setting('enable_all') == 'true': logging.log("[Post Install] Enabling all Add-ons", level=xbmc.LOGINFO) from resources.libs.gui import menu menu.enable_addons(all=True) if os.path.exists(os.path.join(CONFIG.USERDATA, '.enableall')): logging.log("[Post Install] .enableall file found in userdata. Deleting..", level=xbmc.LOGINFO) import xbmcvfs xbmcvfs.delete(os.path.join(CONFIG.USERDATA, '.enableall')) xbmc.executebuiltin('UpdateLocalAddons') xbmc.executebuiltin('UpdateAddonRepos') db.force_check_updates(auto=True)
def test_first_run(): from resources.libs.gui import window window.show_build_prompt()