Mercurial > traipse
annotate orpg/dirpath/dirpath_tools.py @ 28:ff154cf3350c ornery-orc
Traipse 'OpenRPG' {100203-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 (Stable)
New Features:
New Bookmarks Feature
New 'boot' command to remote admin
New confirmation window for sent nodes
Miniatures Layer pop up box allows users to turn off Mini labels, from
FlexiRPG
New Zoom Mouse plugin added
New Images added to Plugin UI
Switching to Element Tree
New Map efficiency, from FlexiRPG
New Status Bar to Update Manager
New TrueDebug Class in orpg_log (See documentation for usage)
New Portable Mercurial
New Tip of the Day, from Core and community
New Reference Syntax added for custom PC sheets
New Child Reference for gametree
New Parent Reference for gametree
New Gametree Recursion method, mapping, context sensitivity, and
effeciency..
New Features node with bonus nodes and Node Referencing help added
New Dieroller structure from Core
New DieRoller portability for odd Dice
New 7th Sea die roller; ie [7k3] = [7d10.takeHighest(3).open(10)]
New 'Mythos' System die roller added
New vs. die roller method for WoD; ie [3v3] = [3d10.vs(3)]. Included for
Mythos roller also
New Warhammer FRPG Die Roller (Special thanks to Puu-san for the
support)
New EZ_Tree Reference system. Push a button, Traipse the tree, get a
reference (Beta!)
New Grids act more like Spreadsheets in Use mode, with Auto Calc
Fixes:
Fix to allow for portability to an OpenSUSE linux OS
Fix to mplay_client for Fedora and OpenSUSE
Fix to Text based Server
Fix to Remote Admin Commands
Fix to Pretty Print, from Core
Fix to Splitter Nodes not being created
Fix to massive amounts of images loading, from Core
Fix to Map from gametree not showing to all clients
Fix to gametree about menus
Fix to Password Manager check on startup
Fix to PC Sheets from tool nodes. They now use the tabber_panel
Fix to Whiteboard ID to prevent random line or text deleting.
Fixes to Server, Remote Server, and Server GUI
Fix to Update Manager; cleaner clode for saved repositories
Fixes made to Settings Panel and now reactive settings when Ok is
pressed
Fixes to Alternity roller's attack roll. Uses a simple Tuple instead of
a Splice
Fix to Use panel of Forms and Tabbers. Now longer enters design mode
Fix made Image Fetching. New fetching image and new failed image
Fix to whiteboard ID's to prevent non updated clients from ruining the
fix.
default_manifest.xml renamed to default_upmana.xml
author | sirebral |
---|---|
date | Wed, 03 Feb 2010 22:16:49 -0600 |
parents | 97265586402b |
children | d02e9197c066 |
rev | line source |
---|---|
28 | 1 import sys |
2 import os | |
3 import errno | |
4 from orpg.orpg_wx import * | |
5 | |
6 if WXLOADED: | |
7 class tmpApp(wx.App): | |
8 def OnInit(self): | |
9 return True | |
10 | |
11 #------------------------------------------------------- | |
12 # void load_paths( dir_struct_reference ) | |
13 # moved structure loading from dirpath.py by Snowdog 3-8-05 | |
14 #------------------------------------------------------- | |
15 def load_paths(dir_struct, root_dir): | |
16 dir_struct["home"] = root_dir + os.sep | |
17 dir_struct["core"] = dir_struct["home"] + "orpg"+ os.sep | |
18 dir_struct["data"] = dir_struct["home"] + "data"+ os.sep | |
19 dir_struct["d20"] = dir_struct["data"] + "d20" + os.sep | |
20 dir_struct["dnd3e"] = dir_struct["data"] + "dnd3e" + os.sep | |
21 dir_struct["dnd35"] = dir_struct["data"] + "dnd35" + os.sep | |
22 dir_struct["SWd20"] = dir_struct["data"] + "SWd20" + os.sep | |
23 dir_struct["icon"] = dir_struct["home"] + "images" + os.sep | |
24 dir_struct["template"] = dir_struct["core"] + "templates" + os.sep | |
25 dir_struct["plugins"] = dir_struct["home"] + "plugins" + os.sep | |
26 dir_struct["nodes"] = dir_struct["template"] + "nodes" + os.sep | |
27 dir_struct["rollers"] = dir_struct["core"] + "dieroller" + os.sep + "rollers" + os.sep | |
28 | |
29 _userbase_dir = dir_struct["home"] | |
30 _user_dir = dir_struct["home"] + "myfiles" + os.sep | |
31 | |
32 try: | |
33 os.makedirs(_user_dir) | |
34 os.makedirs(_user_dir + "runlogs" + os.sep); | |
35 os.makedirs(_user_dir + "logs" + os.sep); | |
36 os.makedirs(_user_dir + "webfiles" + os.sep); | |
37 except OSError, e: | |
38 if e.errno != errno.EEXIST: raise | |
39 | |
40 dir_struct["user"] = _user_dir | |
41 dir_struct["logs"] = dir_struct["user"] + "logs" + os.sep | |
42 | |
43 #------------------------------------------------------- | |
44 # int verify_home_path( directory_name ) | |
45 # added by Snowdog 3-8-05 | |
46 # updated with bailout code. Snowdog 7-25-05 | |
47 #------------------------------------------------------- | |
48 def verify_home_path( path ): | |
49 """checks for key ORPG files in the openrpg tree | |
50 and askes for user intervention if their is a problem""" | |
51 try: | |
52 #verify that the root dir (as supplied) exists | |
53 if not verify_file(path): return 0 | |
18 | 54 |
28 | 55 #These checks require that 'path' have a separator at the end. |
56 #Check and temporarily add one if needed | |
57 if (path[(len(path)-len(os.sep)):] != os.sep): | |
58 path = path + os.sep | |
59 # These files should always exist at the root orpg dir | |
60 check_files = ["orpg","data","images"] | |
61 for n in range(len(check_files)): | |
62 if not verify_file(path + check_files[n]): return 0 | |
63 except: | |
64 # an error occured while verifying the directory structure | |
65 # bail out with error signal | |
66 return 0 | |
67 | |
68 #all files and directories exist. | |
69 return 1 | |
70 | |
71 #------------------------------------------------------- | |
72 # int verify_file( absolute_path ) | |
73 # added by Snowdog 3-8-05 | |
74 #------------------------------------------------------- | |
75 def verify_file(abs_path): | |
76 """Returns True if file or directory exists""" | |
77 try: | |
78 os.stat(abs_path) | |
79 return 1 | |
80 except OSError: | |
81 #this exception signifies the file or dir doesn't exist | |
82 return 0 | |
83 | |
84 | |
18 | 85 #------------------------------------------------------- |
28 | 86 # pathname get_user_help() |
87 # added by Snowdog 3-8-05 | |
88 # bug fix (SF #1242456) and updated with bailout code. Snowdog 7-25-05 | |
89 #------------------------------------------------------- | |
90 ## This can be removed in the future. TaS '09 | |
91 def get_user_located_root(): | |
92 """Notify the user of directory problems | |
93 and show directory selection dialog """ | |
94 | |
95 if WXLOADED: | |
96 app = tmpApp(0) | |
97 app.MainLoop() | |
18 | 98 |
28 | 99 dir = None |
100 try: | |
101 msg = "OpenRPG cannot locate critical files.\nPlease locate the /System/ directory in the following window" | |
102 alert= wx.MessageDialog(None,msg,"Warning",wx.OK|wx.ICON_ERROR) | |
103 alert.Show() | |
104 if alert.ShowModal() == wx.OK: | |
105 alert.Destroy() | |
106 dlg = wx.DirDialog(None, "Locate the System directory:",style=wx.DD_DEFAULT_STYLE) | |
107 if dlg.ShowModal() == wx.ID_OK: | |
108 dir = dlg.GetPath() | |
109 dlg.Destroy() | |
110 app.Destroy() | |
111 return dir | |
112 except Exception, e: | |
113 print e | |
114 print "OpenRPG encountered a problem while attempting to load file dialog to locate the OpenRPG root directory." | |
115 print "please delete the files ./openrpg/orpg/dirpath/aproot.py and ./openrpg/orpg/dirpath/aproot.pyc and try again." | |
116 else: | |
117 dir = raw_input("Enter the full path to your openrpg folder: ") | |
118 return dir | |
10
5df1340bda13
Big patch! Linux GUI, Fetching Dict., Init2, Streaming lining.
sirebral
parents:
0
diff
changeset
|
119 |