# HG changeset patch # User sirebral # Date 1249519976 18000 # Node ID 599f727e3833ff8f6a6c82765854581c4d908c20 # Parent 50e82d8090cf795660e04318afc169a66d57ee4f Getting ready to test!! Main functions seem to be working. Auto Update or No Update pass the window, but Auto Update does not update yet. .hgignore is now in the System folder, not myfiles. diff -r 50e82d8090cf -r 599f727e3833 orpg/orpg_version.py --- a/orpg/orpg_version.py Wed Aug 05 18:56:43 2009 -0500 +++ b/orpg/orpg_version.py Wed Aug 05 19:52:56 2009 -0500 @@ -4,7 +4,7 @@ #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed) DISTRO = "Traipse Dev" DIS_VER = "Grumpy Goblin" -BUILD = "090805-08" +BUILD = "090805-09" # This version is for network capability. PROTOCOL_VERSION = "1.2" diff -r 50e82d8090cf -r 599f727e3833 upmana/updatemana.py --- a/upmana/updatemana.py Wed Aug 05 18:56:43 2009 -0500 +++ b/upmana/updatemana.py Wed Aug 05 19:52:56 2009 -0500 @@ -9,6 +9,7 @@ import orpg.tools.validate from mercurial import ui, hg, commands, repo, revlog, cmdutil + class Updater(wx.Panel): def __init__(self, parent, open_rpg, manifest): wx.Panel.__init__(self, parent) @@ -170,7 +171,7 @@ self.filelist.SetValue('') self.filelist.AppendText("Files that will change\n\n") self.changelog.SetValue('') - changelog = "Traipse 'OpenRPG' Update Manager.\n\nThis is Dev Build 0.5 of the Update Manager. It has limited functionality.\n\nThe full release will search your Revision log and show the contents here.\n\nMajor changes in this version are ... Manifest is now in a CheckListBox, very nice, Repos now allow for scrolling, New button works. Checks Box on the Updater tab work. Settings file is created and data is saved to it." + changelog = "Traipse 'OpenRPG' Update Manager.\n\nThis is Dev Build 0.6.5 of the Update Manager. It has limited functionality.\n\nThe full release will search your Revision log and show the contents here.\n\nMajor changes in this version are ... Manifest is now in a CheckListBox, very nice, Repos now allow for scrolling, New button works. Checks Box on the Updater tab work. Settings file is created and data is saved to it." self.changelog.AppendText(changelog + '\n') self.filelist.AppendText("Update to " + branch + "\n\n The full release will show the files to be changed here.") @@ -179,15 +180,7 @@ # fc = c[f] # self.filelist.AppendText(str(f + '\n')) - - def verify_file(self, abs_path): - """Returns True if file or directory exists""" - try: - os.stat(abs_path) - return True - except OSError: - self.log.log("Invalid File or Directory: " + abs_path, ORPG_GENERAL) - return False + def get_packages(self, type=None): #Fixed and ready for Test. Can be cleaner @@ -369,8 +362,8 @@ wx.LC_REPORT|wx.SUNKEN_BORDER|wx.EXPAND|wx.LC_HRULES) filename = '.hgignore' - self.filename = orpg.dirpath.dir_struct["user"] + filename - orpg.tools.validate.Validate().config_file('.hgignore',"default.hgignore") + self.filename = orpg.dirpath.dir_struct["home"] + filename + orpg.tools.validate.Validate(orpg.dirpath.dir_struct["home"]).config_file(filename, "default.hgignore") self.mana = self.LoadDoc() self.manifestlog.Bind(wx.EVT_CHECKLISTBOX, self.GetChecked) @@ -390,6 +383,7 @@ f = open(self.filename, "w") for mana in self.mana: f.write(mana+'\n') + #f.write('\n') f.close() def LoadDoc(self): @@ -447,8 +441,15 @@ self.open_rpg.add_component("dir_struct", orpg.dirpath.dir_struct) self.validate = orpg.tools.validate.Validate() self.open_rpg.add_component("validate", self.validate) - self.updater = updaterFrame(self, "OpenRPG Update Manager Beta 0.5", self.open_rpg, self.manifest) - self.updated = False + self.updater = updaterFrame(self, "OpenRPG Update Manager Beta 0.6.5", self.open_rpg, self.manifest) + + if self.manifest.GetString("updatemana", "auto_update", "") == 'on': + print 'Auto Update not completed' + self.OnExit() + + if self.manifest.GetString('updatemana', 'no_update', '') == 'on': + self.OnExit() + try: self.updater.Show() self.SetTopWindow(self.updater) @@ -457,14 +458,12 @@ return True - def OnExit(self): - #self.settings.save() - """ - imported = ['orpg.orpgCore', 'orpg.orpg_wx', 'orpg.orpg_version', 'orpg.tools.orpg_log', 'orpg.orpg_xml', 'orpg.dirpath', 'orpg.tools.orpg_settings', 'orpg.tools.validate', 'orpg.pulldom', 'orpg.tools.NotebookCtrl', 'orpg.tools.config_update', 'orpg.systempath', 'orpg.minidom', 'orpg.dirpath.dirpath_tools', 'orpg.tools.rgbhex', 'orpg.orpg_windows'] + def OnExit(self): + imported = ['manifest', 'orpg.dirpath', 'orpg.orpgCore', 'orpg.orpg_version', 'orpg.tools.orpg_log', 'orpg.tools.orpg_log', 'orpg.orpg_xml', 'orpg.dirpath', 'orpg.dirpath', 'orpg.tools.validate', 'mercurial.ui', 'mercurial.hg', 'mercurial.commands', 'mercurial.repo', 'mercurial.revlog', 'mercurial.cmdutil'] for name in imported: if name in sys.modules: - self.log.log("Unimported " + name, ORPG_DEBUG) - del sys.modules[name] - """ - self.log.log("Updater Exit\n\n", ORPG_NOTE) + #self.log.log("Unimported " + name, ORPG_DEBUG) + del sys.modules[name] + self.updater.Destroy() + #self.log.log("Updater Exit\n\n", ORPG_NOTE)