def show_nightly(close_script): file_xml = "IPX-Nightly.xml" # "IPX-Updater.xml" dir_path = os.getcwd().replace(";", "") current_skin, force_fallback = getUserSkin() w = Nightly(file_xml, dir_path, current_skin, force_fallback, close_script=close_script) w.doModal() del w
def show_nightly(close_script): file_xml = "IPX-Nightly.xml" #"IPX-Updater.xml" dir_path = os.getcwd().replace(";", "") current_skin, force_fallback = getUserSkin() w = Nightly(file_xml, dir_path, current_skin, force_fallback, close_script=close_script) w.doModal() del w
def MAIN(): try: output.PRINT_DEBUG = ( XBMC_SETTINGS.getSetting( "script_debug" ) == "true" ) except: print_exc() # print depend of output.PRINT_DEBUG is True or False print "bypass_debug: %s" % str( "-" * 100 ) print "bypass_debug: Starting %s %s, %s, SVN r%s. Built on %s" % ( __script__, __version__, __statut__, __svn_revision__, __date__ ) print "bypass_debug: The executable script running is: %s" % os.path.join( os.getcwd(), "default.py" ) print "bypass_debug: %s" % str( "-" * 100 ) dialog_error = False updating = False try: from utilities import getUserSkin current_skin, force_fallback = getUserSkin() print "bypass_debug: load default skin:[%s]" % current_skin print "bypass_debug: default skin use force fallback: %s" % repr( force_fallback ) del getUserSkin except: pass #setup skins utilities and reload xbmc skin if necessary import skins_utilities if skins_utilities.setupUtilities(): print "Reloaded Skin: %s" % xbmc.getSkinDir() xbmc.executebuiltin( "XBMC.Notification(%s,Reloaded Skin...,3000,%s)" % ( xbmc.getSkinDir(), os.path.join( os.getcwd(), "default.tbn" ), ) ) xbmc.executebuiltin( "XBMC.ReloadSkin()" ) xbmc.sleep( 2000 ) # INITIALISATION CHEMINS DE FICHIER LOCAUX try: import CONF setconf = False config = CONF.ReadConfig() DIALOG_PROGRESS.update( -1, __language__( 101 ), __language__( 110 ) ) curversion = config.get('Version','version') if "1." in curversion: setconf = True if not config.getboolean( 'InstallPath', 'pathok' ): setconf = True if setconf: # GENERATION DES INFORMATIONS LOCALES CONF.SetConfiguration() except: dialog_error = True print "Error while setting the configuration" print_exc() # CHECK SCRIPT UPDATE AVAILABILITY AND UPDATE CONFIGUARTION FILE try: import CHECKMAJ try: CHECKMAJ.UPDATE_STARTUP = ( XBMC_SETTINGS.getSetting( "update_startup" ) == "true" ) except: CHECKMAJ.UPDATE_STARTUP = False print_exc() print "CHECKMAJ.UPDATE_STARTUP = %s"%str(CHECKMAJ.UPDATE_STARTUP) if CHECKMAJ.UPDATE_STARTUP: DIALOG_PROGRESS.update( -1, __language__( 102 ), __language__( 110 ) ) CHECKMAJ.go() del CHECKMAJ except: # In case of an Exception here we still load the script print "Error while checking availability of an update for the installer" print "We still going to start the script ..." print_exc() # RETRIEVING CONFIGURATION FROM CONF FILE try: config = CONF.ReadConfig() del CONF except: print "Error while reading the configuration" dialog_error = True print_exc() try: updating = config.getboolean( 'Version', 'UPDATING' ) except: # Issue with conf file, stopping update dialog_error = True print_exc() try: if not updating: try: # LANCEMENT DU SCRIPT try: import Home DIALOG_PROGRESS.close() HomeAction = Home.show_home() except: print_exc() HomeAction = "error" if HomeAction == "error": import MainGui MainGui.show_main() except: print "bypass_debug: MAIN: Exception while loading the script" print_exc() dialog_error = True else: # UPDATING THE SCRIPT try: scriptmaj = config.get( 'Version', 'SCRIPTMAJ' ) xbmc.executescript( scriptmaj ) except: print "bypass_debug: MAIN: Exception while updating of the script" print_exc() dialog_error = True if dialog_error: xbmcgui.Dialog().ok( __language__( 111 ), __language__( 112 ) ) except: print_exc() DIALOG_PROGRESS.close()
# Modules general import os import sys import shutil from traceback import print_exc # Modules XBMC import xbmc # Modules custom from utilities import getUserSkin CURRENT_SKIN, FORCE_FALLBACK = getUserSkin() def addMyFontsToSkin(): import MyFont return MyFont.addFonts() def addIncludesXmlToSkin(): reload_skin = False includes_path = os.path.join( os.getcwd(), "resources", "skins", CURRENT_SKIN, "720p", "scripts_includes", "Installer Passion-XBMC" ) destination_path = xbmc.translatePath( "special://skin/720p/scripts_includes/Installer Passion-XBMC/" ) if os.path.exists( includes_path ): try: if not os.path.exists( destination_path ): os.makedirs( destination_path ) for xml in os.listdir( includes_path ):
# Modules general import os import sys import shutil from traceback import print_exc # Modules XBMC import xbmc # Modules custom from utilities import getUserSkin CURRENT_SKIN, FORCE_FALLBACK = getUserSkin() def addMyFontsToSkin(): import MyFont return MyFont.addFonts() def addIncludesXmlToSkin(): reload_skin = False includes_path = os.path.join(os.getcwd(), "resources", "skins", CURRENT_SKIN, "720p", "scripts_includes", "Installer Passion-XBMC") destination_path = xbmc.translatePath( "special://skin/720p/scripts_includes/Installer Passion-XBMC/") if os.path.exists(includes_path): try: if not os.path.exists(destination_path): os.makedirs(destination_path)