diff -Naur SVN Repo Installer/installerAPI/xbmcplugin_actions.py SVN Repo Installer.fix/installerAPI/xbmcplugin_actions.py --- SVN Repo Installer/installerAPI/xbmcplugin_actions.py 2009-10-14 17:04:02.748858593 -0500 +++ SVN Repo Installer.fix/installerAPI/xbmcplugin_actions.py 2009-10-14 00:07:21.059126995 -0500 @@ -15,7 +15,7 @@ class Main: - INSTALLED_ITEMS_FILENAME = os.path.join( os.getcwd(), "installed_items.dat" ) + INSTALLED_ITEMS_FILENAME = os.path.join( os.path.dirname(os.path.dirname(__file__)), "installed_items.dat" ) def __init__( self ): log( "%s started!" % self.__class__ ) diff -Naur SVN Repo Installer/installerAPI/xbmcplugin_downloader.py SVN Repo Installer.fix/installerAPI/xbmcplugin_downloader.py --- SVN Repo Installer/installerAPI/xbmcplugin_downloader.py 2009-10-14 17:04:02.768870537 -0500 +++ SVN Repo Installer.fix/installerAPI/xbmcplugin_downloader.py 2009-10-14 16:12:12.632504190 -0500 @@ -74,7 +74,7 @@ def _get_repo_info( self ): # path to info file - repopath = os.path.join( os.getcwd(), "resources", "repositories", self.args.repo, "repo.xml" ) + repopath = os.path.join( os.path.dirname(os.path.dirname(__file__)), "resources", "repositories", self.args.repo, "repo.xml" ) try: # grab a file object fileobject = open( repopath, "r" ) @@ -109,7 +109,7 @@ log("> _update_all()") """ Download and install all new Addons as stored in update file """ # eg 'download_url="%2Ftrunk%2Fplugins%2Fmusic/iTunes%2F"&repo=\'xbmc-addons\'&install=""&ioffset=2&voffset=0' - fn = os.path.join( os.getcwd(), "update_all.dat" ) + fn = os.path.join( os.path.dirname(os.path.dirname(__file__)), "update_all.dat" ) items = loadFileObj(fn) if items: if xbmcgui.Dialog().yesno( __plugin__, xbmc.getLocalizedString( 30019 ) + " ?", "", "", xbmc.getLocalizedString( 30020 ), xbmc.getLocalizedString( 30021 ) ): @@ -138,7 +138,9 @@ def _download_item( self, forceInstall=False ): log("> _download_item() forceInstall=%s" % forceInstall) try: - if ( forceInstall or xbmcgui.Dialog().yesno( self.title, xbmc.getLocalizedString( 30000 ), "", "", xbmc.getLocalizedString( 30020 ), xbmc.getLocalizedString( 30021 ) ) ): +# if ( forceInstall or xbmcgui.Dialog().yesno( self.title, xbmc.getLocalizedString( 30000 ), "", "", xbmc.getLocalizedString( 30020 ), xbmc.getLocalizedString( 30021 ) ) ): + if ( forceInstall or 1 ): +# log("NOTENOTENOTE self.dialog.create( %s, %s, %s )" % ( self.title, xbmc.getLocalizedString( 30002 ), xbmc.getLocalizedString( 30003 ))) self.dialog.create( self.title, xbmc.getLocalizedString( 30002 ), xbmc.getLocalizedString( 30003 ) ) asset_files = [] folders = [ self.args.download_url.replace( " ", "%20" ) ] diff -Naur SVN Repo Installer/installerAPI/xbmcplugin_info.py SVN Repo Installer.fix/installerAPI/xbmcplugin_info.py --- SVN Repo Installer/installerAPI/xbmcplugin_info.py 2009-10-14 17:04:02.768870537 -0500 +++ SVN Repo Installer.fix/installerAPI/xbmcplugin_info.py 2009-10-14 15:42:22.852682703 -0500 @@ -22,7 +22,7 @@ self.buttons = {} def onInit( self ): - xbmcgui.lock() + #xbmcgui.lock() thumb = xbmc.translatePath(self.info.get('thumb', '')) if thumb: @@ -50,7 +50,7 @@ id = btnIDs[btnName] self.getControl( id ).setEnabled( isEnabled ) - xbmcgui.unlock() + #xbmcgui.unlock() def showChangelog(self): self.getControl( 30 ).setText(self.info.get('changelog','')) @@ -96,7 +96,7 @@ ######################################################################################################################## class Main: - INSTALLED_ITEMS_FILENAME = os.path.join( os.getcwd(), "installed_items.dat" ) + INSTALLED_ITEMS_FILENAME = os.path.join( os.path.dirname(os.path.dirname(__file__)), "installed_items.dat" ) def __init__( self, *args, **kwargs): log( "%s started!" % self.__class__ ) @@ -168,7 +168,7 @@ buttons['uninstall'] = False while info: - action = InfoDialog( InfoDialog.XML_FILENAME, os.getcwd(), "Default" ).ask( info, buttons ) + action = InfoDialog( InfoDialog.XML_FILENAME, os.path.dirname(os.path.dirname(__file__)), "Default" ).ask( info, buttons ) if not action: break elif action == "install": diff -Naur SVN Repo Installer/installerAPI/xbmcplugin_lib.py SVN Repo Installer.fix/installerAPI/xbmcplugin_lib.py --- SVN Repo Installer/installerAPI/xbmcplugin_lib.py 2009-10-14 17:04:02.748858593 -0500 +++ SVN Repo Installer.fix/installerAPI/xbmcplugin_lib.py 2009-10-14 00:07:25.149125947 -0500 @@ -85,7 +85,7 @@ ##################################################################################################### def get_repo_info( repo ): # path to info file - repopath = os.path.join( os.getcwd(), "resources", "repositories", repo, "repo.xml" ) + repopath = os.path.join( os.path.dirname(os.path.dirname(__file__)), "resources", "repositories", repo, "repo.xml" ) try: info = open( repopath, "r" ).read() # repo's base url @@ -103,9 +103,9 @@ ##################################################################################################### def load_repos( ): repo_list = [] - repos = os.listdir( os.path.join( os.getcwd(), "resources", "repositories" ) ) + repos = os.listdir( os.path.join( os.path.dirname(os.path.dirname(__file__)), "resources", "repositories" ) ) for repo in repos: - if ("(tagged)" not in repo and repo != ".svn") and (os.path.isdir( os.path.join( os.getcwd(), "resources", "repositories", repo ) ) ): + if ("(tagged)" not in repo and repo != ".svn") and (os.path.isdir( os.path.join( os.path.dirname(os.path.dirname(__file__)), "resources", "repositories", repo ) ) ): repo_list.append( repo ) log("load_repos() %s" % repo_list) return repo_list diff -Naur SVN Repo Installer/installerAPI/xbmcplugin_list.py SVN Repo Installer.fix/installerAPI/xbmcplugin_list.py --- SVN Repo Installer/installerAPI/xbmcplugin_list.py 2009-10-14 17:04:02.765525121 -0500 +++ SVN Repo Installer.fix/installerAPI/xbmcplugin_list.py 2009-10-14 13:11:00.623589598 -0500 @@ -62,7 +62,7 @@ class Main: # base path BASE_CACHE_PATH = os.path.join( xbmc.translatePath( "special://profile/" ), "Thumbnails", "Pictures" ) - INSTALLED_ITEMS_FILENAME = os.path.join( os.getcwd(), "installed_items.dat" ) + INSTALLED_ITEMS_FILENAME = os.path.join( os.path.dirname(os.path.dirname(__file__)), "installed_items.dat" ) def __init__( self ): log( "%s init!" % self.__class__ ) @@ -89,7 +89,7 @@ xbmcplugin.endOfDirectory( handle=int( sys.argv[ 1 ] ), succeeded=ok ) def _clear_log( self, repo ): - base_path = os.path.join( xbmc.translatePath( "special://profile/" ), "plugin_data", "programs", os.path.basename( os.getcwd() ) ) + base_path = os.path.join( xbmc.translatePath( "special://profile/" ), "plugin_data", "programs", os.path.basename( __file__ ) ) for page in range( 3 ): path = os.path.join( base_path, "%s%d.txt" % ( repo, page, ) ) # remove log file @@ -113,7 +113,7 @@ # set the default icon icon = "DefaultFolder.png" # set thumbnail - thumbnail = os.path.join( os.getcwd(), "resources", "media", "update_checker.png" ) + thumbnail = os.path.join( os.path.dirname(os.path.dirname(__file__)), "resources", "media", "update_checker.png" ) # create our listitem, fixing title listitem = xbmcgui.ListItem( xbmc.getLocalizedString( 30500 ), iconImage=icon, thumbnailImage=thumbnail ) # set the title @@ -130,7 +130,7 @@ # create the url url = "%s?category='root'&repo=%s&title=%s" % ( sys.argv[ 0 ], repr( urllib.quote_plus( repo ) ), repr( urllib.quote_plus( repo ) ), ) # set thumbnail - thumbnail = os.path.join( os.getcwd(), "resources", "media", "svn_repo.png" ) + thumbnail = os.path.join( os.path.dirname(os.path.dirname(__file__)), "resources", "media", "svn_repo.png" ) # create our listitem, fixing title listitem = xbmcgui.ListItem( repo, iconImage=icon, thumbnailImage=thumbnail ) # set the title diff -Naur SVN Repo Installer/installerAPI/xbmcplugin_logviewer.py SVN Repo Installer.fix/installerAPI/xbmcplugin_logviewer.py --- SVN Repo Installer/installerAPI/xbmcplugin_logviewer.py 2009-10-14 17:04:02.748858593 -0500 +++ SVN Repo Installer.fix/installerAPI/xbmcplugin_logviewer.py 2009-10-14 16:08:50.712523117 -0500 @@ -45,9 +45,9 @@ def fetch_changelog( self ): try: if ( DEBUG ): - base_path = os.getcwd() + base_path = os.path.dirname(os.path.dirname(__file__)) else: - base_path = os.path.join( xbmc.translatePath( "special://profile/" ), "plugin_data", "programs", os.path.basename( os.getcwd() ) ) + base_path = os.path.join( xbmc.translatePath( "special://profile/" ), "plugin_data", "programs", os.path.basename( __file__ ) ) # make path if ( not os.path.isdir( base_path ) ): os.makedirs( base_path ) @@ -150,14 +150,14 @@ return parser.fetch_changelog() def getReadmePath(self): - base_path = os.path.join( os.getcwd(), "resources", "language" ) + base_path = os.path.join( os.path.dirname(os.path.dirname(__file__)), "resources", "language" ) path = os.path.join( base_path, xbmc.getLanguage(), "readme.txt" ) if not os.path.isfile(path): path = os.path.join( base_path, "English", "readme.txt" ) if not os.path.isfile(path): - path = os.path.join( os.getcwd(), "resources", "readme.txt" ) + path = os.path.join( os.path.dirname(os.path.dirname(__file__)), "resources", "readme.txt" ) if not os.path.isfile(path): - path = os.path.join( os.getcwd(), "readme.txt" ) + path = os.path.join( os.path.dirname(os.path.dirname(__file__)), "readme.txt" ) if not os.path.isfile(path): path = None return path @@ -211,7 +211,7 @@ self.close() def Main(): - ui = GUI( "DialogScriptInfo.xml", os.getcwd(), "Default" ) + ui = GUI( "DialogScriptInfo.xml", os.path.dirname(os.path.dirname(__file__)), "Default" ) ui.doModal() del ui diff -Naur SVN Repo Installer/installerAPI/xbmcplugin_update.py SVN Repo Installer.fix/installerAPI/xbmcplugin_update.py --- SVN Repo Installer/installerAPI/xbmcplugin_update.py 2009-10-14 17:04:02.748858593 -0500 +++ SVN Repo Installer.fix/installerAPI/xbmcplugin_update.py 2009-10-14 00:07:30.515799946 -0500 @@ -33,8 +33,8 @@ class Main: URL_BASE_SVN_SCRIPTING = "http://xbmc-scripting.googlecode.com/svn" - INSTALLED_ITEMS_FILENAME = os.path.join( os.getcwd(), "installed_items.dat" ) - UPDATE_ALL_FILENAME = os.path.join( os.getcwd(), "update_all.dat" ) + INSTALLED_ITEMS_FILENAME = os.path.join( os.path.dirname(os.path.dirname(__file__)), "installed_items.dat" ) + UPDATE_ALL_FILENAME = os.path.join( os.path.dirname(os.path.dirname(__file__)), "update_all.dat" ) def __init__( self ): log( "%s init!" % self.__class__ )