Mercurial > traipse_dev
comparison upmana/updatemana.py @ 149:c2caca988a11 alpha
Traipse Alpha 'OpenRPG' {091124-00}
Traipse is a distribution of OpenRPG that is designed to be easy to setup and go.
Traipse also makes it easy for developers to work on code without fear of
sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the
code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the
productivity of the user.
Update Summary (Cleaning up for Beta)
Added Bookmarks
Fix to Remote Admin Commands
Minor fix to text based Server
Fix to Pretty Print, from Core
Fix to Splitter Nodes not being created
Fix to massive amounts of images loading, from Core
Added 'boot' command to remote admin
Added confirmation window for sent nodes
Minor changes to allow for portability to an OpenSUSE linux OS
Miniatures Layer pop up box allows users to turn off Mini labels, from FlexiRPG
Zoom Mouse plugin added
Images added to Plugin UI
Switching to Element Tree
Map efficiency, from FlexiRPG
Added Status Bar to Update Manager
default_manifest.xml renamed to default_upmana.xml
Cleaner clode for saved repositories
New TrueDebug Class in orpg_log (See documentation for usage)
Mercurial's hgweb folder is ported to upmana
Pretty important update that can help remove thousands of dead children from your
gametree.
Children, <forms />, <group_atts />, <horizontal />, <cols />, <rows />, <height
/>, etc... are all tags now. Check your gametree and look for dead children!!
New Gametree Recursion method, mapping, and context sensitivity. !Infinite Loops
return error instead of freezing the software!
New Syntax added for custom PC sheets
Tip of the Day added, from Core and community
Fixed Whiteboard ID to prevent random line or text deleting. Modified ID's to
prevent non updated clients from ruining the fix.
author | sirebral |
---|---|
date | Tue, 24 Nov 2009 17:17:42 -0600 |
parents | 2ffc5de126c8 |
children | ff6cbd2b7620 |
comparison
equal
deleted
inserted
replaced
147:a771ba7b7875 | 149:c2caca988a11 |
---|---|
13 class Term2Win(object): | 13 class Term2Win(object): |
14 # A stdout redirector. Allows the messages from Mercurial to be seen in the Install Window | 14 # A stdout redirector. Allows the messages from Mercurial to be seen in the Install Window |
15 def write(self, text): | 15 def write(self, text): |
16 statbar.SetStatusText(text) | 16 statbar.SetStatusText(text) |
17 wx.Yield() | 17 wx.Yield() |
18 #sys.__stdout__.write(text) | 18 sys.__stdout__.write(text) |
19 | 19 |
20 class Updater(wx.Panel): | 20 class Updater(wx.Panel): |
21 @debugging | 21 @debugging |
22 def __init__(self, parent, component): | 22 def __init__(self, parent, component): |
23 wx.Panel.__init__(self, parent) | 23 wx.Panel.__init__(self, parent) |
103 self.filename = dir_struct["home"] + 'upmana' + os.sep + filename | 103 self.filename = dir_struct["home"] + 'upmana' + os.sep + filename |
104 component.get('validate').config_file(filename, "default_ignorelist.txt") | 104 component.get('validate').config_file(filename, "default_ignorelist.txt") |
105 self.mana = self.LoadDoc() | 105 self.mana = self.LoadDoc() |
106 temp = dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep | 106 temp = dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep |
107 for ignore in self.ignorelist: | 107 for ignore in self.ignorelist: |
108 shutil.copy(ignore, temp + ignore.split('/')[len(ignore.split('/')) - 1]) | 108 if len(ignore.split('/')) > 1: |
109 gets = 0; dir1 = '' | |
110 while gets != len(ignore.split('/'))-1: | |
111 dir1 += ignore.split('/')[gets] + os.sep | |
112 gets += 1 | |
113 os.makedirs(temp+dir1) | |
114 shutil.copy(ignore, temp + dir1 + ignore.split('/')[len(ignore.split('/')) - 1]) | |
109 hg.clean(self.repo, self.current) | 115 hg.clean(self.repo, self.current) |
110 for ignore in self.ignorelist: | 116 for ignore in self.ignorelist: |
111 shutil.copyfile(temp + ignore.split('/')[len(ignore.split('/')) - 1], ignore) | 117 shutil.copyfile(temp + ignore.split('/')[len(ignore.split('/')) - 1], ignore) |
112 os.remove(temp + ignore.split('/')[len(ignore.split('/')) - 1]) | 118 os.remove(temp + ignore.split('/')[len(ignore.split('/')) - 1]) |
119 if len(ignore.split('/')) > 1: | |
120 gets = 0; dir1 = '' | |
121 while gets != len(ignore.split('/'))-1: | |
122 dir1 += ignore.split('/')[gets] + os.sep | |
123 gets += 1 | |
124 os.removedirs(temp+dir1) | |
113 | 125 |
114 def LoadDoc(self): | 126 def LoadDoc(self): |
115 ignore = open(self.filename) | 127 ignore = open(self.filename) |
116 self.ignorelist = [] | 128 self.ignorelist = [] |
117 for i in ignore: self.ignorelist.append(str(i [:len(i)-1])) | 129 for i in ignore: self.ignorelist.append(str(i [:len(i)-1])) |
595 def get_package(self): | 607 def get_package(self): |
596 self.get_packages() | 608 self.get_packages() |
597 if self.package_list == None: return None | 609 if self.package_list == None: return None |
598 return None | 610 return None |
599 | 611 |
612 class Help(wx.Panel): | |
613 def __init__(self, parent): | |
614 wx.Panel.__init__(self, parent) | |
615 sizer = wx.BoxSizer(wx.VERTICAL) | |
616 self.help = wx.TextCtrl(self, wx.ID_ANY, size=(-1, -1), | |
617 style=wx.TE_MULTILINE | wx.TE_READONLY) | |
618 sizer.Add(self.help, 1, wx.EXPAND) | |
619 self.build_help() | |
620 self.SetSizer(sizer) | |
621 self.Layout() | |
622 | |
623 def build_help(self): | |
624 help = """'Traipse' OpenRPG Update Manager Help: | |
625 The Traipse Update Manager can be confusing at first glance. There is alot involved in the new addition so it is easy to by pass the finer details. This small page will help a new user understand how to use the new Update Manager to it's full capability.\n\n""" | |
626 self.help.AppendText(help) | |
627 help = """The Different Tabs: There are 5 different tabs available to users, and each tab has a different purpose. These five tabs are: Updater, Repos, Manifest, Control and Help. | |
628 --- | |
629 | |
630 The Updater Tab: | |
631 The Updater tab is divided into three sections. The left section shows a description of the your current or selected version. The right top section shows the files that have been updated in your current or selected version. Underneath is a selection of buttons and check boxes. | |
632 | |
633 Package Select: | |
634 When you press this button a small window pops up showing you the available packages to update too. You can select a package and the Updater's detail sections will reflect the change. | |
635 | |
636 Update Now: | |
637 Press this button when you want to update to the selected package | |
638 | |
639 Auto Update: | |
640 Check this if want to update when you start the software. You need to have a default Repository checked in the Repo tab. | |
641 | |
642 No Update: | |
643 Check this if you do not want to see the Update Manager when you start the software. | |
644 ---\n\n""" | |
645 self.help.AppendText(help) | |
646 help = """The Repos Tab: | |
647 The Repos tab has two parts to it. The top most part is a section is where you name and create repositories. The second part shows you a list of all your available repositories. | |
648 | |
649 What is a repostiory? | |
650 1: a place, room, or container where something is deposited or stored (Merriam-Webster). A repository, or repo for short, is a place to hold source code so others can download it. | |
651 | |
652 Creating new Repos: | |
653 Creating a new repos is really easy. First you need to give your repo a name, any name will work, then press the New button. You will see that your named repo shows up in your list immediately. | |
654 | |
655 You will then need to connect the named repo to a URL so you can download source code. Enter a URL (http://hg.assembla.com/traipse) into the new entry and press the Refresh button. This downloads the new source code to your computer only. Refreshing a repo does not update your software. | |
656 | |
657 Default: | |
658 You can set any repo as your default repository. This is the repo the software will update from if you Auto Update. | |
659 ---\n\n""" | |
660 self.help.AppendText(help) | |
661 help = """The Manifest Tab: | |
662 The Manifest Tab is really easy to understand, it's just named differently. The manifest shows a list of all the files that are being tracked by your current package. Checking files in the list will place them into a list that prevents these files from being changed when you update to a new package. | |
663 | |
664 The manifest can cause problems with compatibility if the newer source does not understand the unchanged files, so it would be smart to test out a new package in a different folder. | |
665 ---\n\n""" | |
666 self.help.AppendText(help) | |
667 help = """The Control Tab: | |
668 The control tab is recommended for developers only. The control tab contains the two details elements from the Updater tab and a new section that contains all of the revisions for your selected package. | |
669 | |
670 You can select any of the available packages from the drop down and the list of revisions will change. You can also select any of the revisions in the list and the details on the left side will change to reflect the details of that revision. | |
671 | |
672 You are also allowed to update to any of the selected revisions. Older revisions often times contain bugs and newer methods of coding, so revision updates commonly cause problems with software. | |
673 | |
674 What is the Control Tab for? | |
675 The control tab is for developers who want to see how the source code has changed from revision to revision. When a user downloads the software they also download all past revisions made to that software. This tab allows users to roll back if a problem has been created with new source, or for developers they can watch the software evolve. | |
676 ---""" | |
677 self.help.AppendText(help) | |
678 | |
600 class updaterFrame(wx.Frame): | 679 class updaterFrame(wx.Frame): |
601 def __init__(self, parent, title, openrpg, manifest, main): | 680 def __init__(self, parent, title, openrpg, manifest, main): |
602 | 681 |
603 wx.Frame.__init__(self, None, wx.ID_ANY, title, size=(600,500), style=wx.DEFAULT_FRAME_STYLE) | 682 wx.Frame.__init__(self, None, wx.ID_ANY, title, size=(600,500), style=wx.DEFAULT_FRAME_STYLE) |
604 if wx.Platform == '__WXMSW__': icon = wx.Icon(dir_struct["icon"]+'d20.ico', wx.BITMAP_TYPE_ICO) | 683 if wx.Platform == '__WXMSW__': icon = wx.Icon(dir_struct["icon"]+'d20.ico', wx.BITMAP_TYPE_ICO) |
617 # create the page windows as children of the notebook | 696 # create the page windows as children of the notebook |
618 page1 = Updater(nb, openrpg) | 697 page1 = Updater(nb, openrpg) |
619 page2 = Repos(nb, openrpg) | 698 page2 = Repos(nb, openrpg) |
620 page3 = Manifest(nb) | 699 page3 = Manifest(nb) |
621 page4 = Control(nb) | 700 page4 = Control(nb) |
701 page5 = Help(nb) | |
622 | 702 |
623 # add the pages to the notebook with the label to show on the tab | 703 # add the pages to the notebook with the label to show on the tab |
624 nb.AddPage(page1, "Updater") | 704 nb.AddPage(page1, "Updater") |
625 nb.AddPage(page2, "Repos") | 705 nb.AddPage(page2, "Repos") |
626 nb.AddPage(page3, "Manifest") | 706 nb.AddPage(page3, "Manifest") |
627 nb.AddPage(page4, "Control") | 707 nb.AddPage(page4, "Control") |
708 nb.AddPage(page5, 'Help') | |
628 | 709 |
629 # finally, put the notebook in a sizer for the panel to manage | 710 # finally, put the notebook in a sizer for the panel to manage |
630 # the layout | 711 # the layout |
631 sizer = wx.BoxSizer() | 712 sizer = wx.BoxSizer() |
632 sizer.Add(nb, 1, wx.EXPAND) | 713 sizer.Add(nb, 1, wx.EXPAND) |
644 self.main = False | 725 self.main = False |
645 sys.stdout = Term2Win() | 726 sys.stdout = Term2Win() |
646 logger._set_log_to_console(False) | 727 logger._set_log_to_console(False) |
647 logger.note("Updater Start") | 728 logger.note("Updater Start") |
648 component.add('validate', validate) | 729 component.add('validate', validate) |
649 self.updater = updaterFrame(self, "OpenRPG Update Manager 0.9 (final beta)", | 730 self.updater = updaterFrame(self, "OpenRPG Update Manager 1.0", |
650 component, manifest, self.main) | 731 component, manifest, self.main) |
651 if manifest.GetString("updatemana", "auto_update", "") == 'on' and self.main == False: | 732 if manifest.GetString("updatemana", "auto_update", "") == 'on' and self.main == False: |
652 self.AutoUpdate(); self.OnExit() | 733 self.AutoUpdate(); self.OnExit() |
653 else: pass | 734 else: pass |
654 if manifest.GetString('updatemana', 'no_update', '') == 'on' and self.main == False: | 735 if manifest.GetString('updatemana', 'no_update', '') == 'on' and self.main == False: |
673 self.filename = dir_struct["home"] + 'upmana' + os.sep + filename | 754 self.filename = dir_struct["home"] + 'upmana' + os.sep + filename |
674 component.get('validate').config_file(filename, "default_ignorelist.txt") | 755 component.get('validate').config_file(filename, "default_ignorelist.txt") |
675 self.mana = self.LoadDoc() | 756 self.mana = self.LoadDoc() |
676 temp = dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep | 757 temp = dir_struct["home"] + 'upmana' + os.sep + 'tmp' + os.sep |
677 for ignore in self.ignorelist: | 758 for ignore in self.ignorelist: |
678 shutil.copy(ignore, temp + ignore.split('/')[len(ignore.split('/')) - 1]) | 759 if len(ignore.split('/')) > 1: |
760 gets = 0; dir1 = '' | |
761 while gets != len(ignore.split('/'))-1: | |
762 dir1 += ignore.split('/')[gets] + os.sep | |
763 gets += 1 | |
764 os.makedirs(temp+dir1) | |
765 shutil.copy(ignore, temp + dir1 + ignore.split('/')[len(ignore.split('/')) - 1]) | |
679 hg.clean(self.repo, self.current) | 766 hg.clean(self.repo, self.current) |
680 for ignore in self.ignorelist: | 767 for ignore in self.ignorelist: |
681 shutil.copyfile(temp + ignore.split('/')[len(ignore.split('/')) - 1], ignore) | 768 shutil.copyfile(temp + ignore.split('/')[len(ignore.split('/')) - 1], ignore) |
682 os.remove(temp + ignore.split('/')[len(ignore.split('/')) - 1]) | 769 os.remove(temp + ignore.split('/')[len(ignore.split('/')) - 1]) |
770 if len(ignore.split('/')) > 1: | |
771 gets = 0; dir1 = '' | |
772 while gets != len(ignore.split('/'))-1: | |
773 dir1 += ignore.split('/')[gets] + os.sep | |
774 gets += 1 | |
775 os.removedirs(temp+dir1) | |
683 else: wx.MessageBox('No default Rpository set. Skipping Auto Update!', 'Info') | 776 else: wx.MessageBox('No default Rpository set. Skipping Auto Update!', 'Info') |
684 | 777 |
685 def LoadDoc(self): | 778 def LoadDoc(self): |
686 ignore = open(self.filename) | 779 ignore = open(self.filename) |
687 self.ignorelist = [] | 780 self.ignorelist = [] |