daborun Commit Revision 30 Date: 2010-12-26 12:04:28 -0800 (Sun, 26 Dec 2010) Author: Ed Trac: http://trac.dabodev.com/changeset/30
Changed: U trunk/daborun.iss U trunk/daborun.py U trunk/setup.py Log: Updated for the 0.9.3 release; fixed a few bugs in the prior build. Diff: Modified: trunk/daborun.iss =================================================================== --- trunk/daborun.iss 2009-12-27 20:58:40 UTC (rev 29) +++ trunk/daborun.iss 2010-12-26 20:04:28 UTC (rev 30) @@ -3,7 +3,7 @@ [Setup] AppName=Dabo Runtime Engine -AppVerName=DaboRun 0.9.2 - rev 20091227 +AppVerName=DaboRun 0.9.3 - rev 20101226 AppPublisher=Ed Leafe AppPublisherURL=http://dabodev.com AppSupportURL=http://dabodev.com @@ -33,9 +33,9 @@ [Files] Source: C:\projects\daborun\dist\daborun.exe; DestDir: {app}; Flags: ignoreversion Source: C:\projects\daborun\dist\*; Excludes: Output\*, *.iss; DestDir: {app}; Flags: ignoreversion recursesubdirs -Source: C:\projects\dabo-0.9.2\dabo\*; DestDir: {app}\dabo; Flags: ignoreversion recursesubdirs -Source: C:\projects\dabo-0.9.2\demo\*; DestDir: {app}\demo; Flags: ignoreversion recursesubdirs; AfterInstall: LinkDemo -Source: C:\projects\dabo-0.9.2\ide\*; DestDir: {app}\ide; Flags: ignoreversion recursesubdirs; AfterInstall: LinkIDE +Source: C:\projects\cleandabo\dabo\*; DestDir: {app}\dabo; Flags: ignoreversion recursesubdirs +Source: C:\projects\cleandabo\demo\*; DestDir: {app}\demo; Flags: ignoreversion recursesubdirs; AfterInstall: LinkDemo +Source: C:\projects\cleandabo\ide\*; DestDir: {app}\ide; Flags: ignoreversion recursesubdirs; AfterInstall: LinkIDE Source: C:\Python25\msvcr71.dll; DestDir: {app}; Flags: ignoreversion ; NOTE: Don't use "Flags: ignoreversion" on any shared system files Source: README.txt; DestDir: {app}; Flags: isreadme Modified: trunk/daborun.py =================================================================== --- trunk/daborun.py 2009-12-27 20:58:40 UTC (rev 29) +++ trunk/daborun.py 2010-12-26 20:04:28 UTC (rev 30) @@ -14,7 +14,7 @@ import xml.sax import xml.dom.minidom -def debugout(*args): +def debugmsg(*args): # Change this to True to see all the debugging info debug = True if debug: @@ -24,6 +24,7 @@ # Add the current dir and library path pth = sys.path +basepth = os.getcwd() # For py2exe installations: sys.path will be the path to 'library.zip', # which contains all the compiled modules. We need to strip that off @@ -35,7 +36,7 @@ dabopth = os.path.join(basepth, "dabo") if not basepth in pth: sys.path.insert(0, basepth) - debugout( "INSERTED %s INTO PATH" % basepth) + debugmsg( "INSERTED %s INTO PATH" % basepth) break # Reroute stderr to avoid the popup window: @@ -45,7 +46,7 @@ libdir = os.path.join(currdir, "lib") if not currdir in pth: sys.path.insert(0, "\"%s\"" % currdir) - debugout("INSERTING %s INTO PATH" % currdir) + debugmsg("INSERTING %s INTO PATH" % currdir) def dummyImport(): # This proc does nothing except force the inclusion of all the modules @@ -132,6 +133,10 @@ import XVThumbImagePlugin import XbmImagePlugin import XpmImagePlugin + + # Logging handlers are ignored without this. + import logging + import logging.handlers class DaboRuntimeEngine(object): @@ -162,24 +167,23 @@ # it to be the first in sys.path. Remove it and insert: try: sys.path.remove(pth) - debugout("INIT: REMOVED %s TO PATH" % pth) + debugmsg("INIT: REMOVED %s TO PATH" % pth) except ValueError: pass sys.path.insert(0, pth) - debugout("INIT: INSERTED %s TO PATH" % pth) + debugmsg("INIT: INSERTED %s TO PATH" % pth) # Debugging! - debugout("-"*44) - debugout("RUN") - debugout("ARGS", sys.argv) - debugout("PATH", sys.path) - debugout("CURDIR", os.getcwd()) + debugmsg("-"*44) + debugmsg("RUN") + debugmsg("ARGS", sys.argv) + debugmsg("PATH", sys.path) + debugmsg("CURDIR", os.getcwd()) # Update the argv list to eliminate this program sys.argv = sys.argv[1:] - def run(self): if not self.prg: app = wx.PySimpleApp() @@ -193,8 +197,8 @@ app.Destroy() pth = openDlg.GetPath() - debugout("SELECTION", pth) - debugout("DLG RESULT", res, res == wx.ID_OK) + debugmsg("SELECTION", pth) + debugmsg("DLG RESULT", res, res == wx.ID_OK) openDlg.Destroy() if res == wx.ID_OK: @@ -207,10 +211,10 @@ impt = self.prg[:-3] sys._daboRunHomeDir = os.path.dirname(self.prg) - debugout("self.prg:", self.prg) - debugout("impt", impt) - debugout("homedir", sys._daboRunHomeDir) - debugout("self.module:", self.module) + debugmsg("self.prg:", self.prg) + debugmsg("impt", impt) + debugmsg("homedir", sys._daboRunHomeDir) + debugmsg("self.module:", self.module) if os.path.exists("C:\DABO-DEBUG.TXT"): import pdb @@ -218,7 +222,7 @@ hasRun = False if self.module: - debugout("EXEC:", impt + "." + self.module + "()") + debugmsg("EXEC:", impt + "." + self.module + "()") try: exec(impt + "." + self.module + "()") hasRun = True @@ -230,28 +234,25 @@ pthDir, prg = os.path.split(self.prg) if not pthDir: pthDir = os.getcwd() - debugout("PTHDIR", pthDir, "PRG", prg) + pthDir = os.path.abspath(pthDir) + debugmsg("PTHDIR", pthDir, "PRG", prg) if pthDir not in sys.path: sys.path.insert(0, pthDir) - debugout("BEFORE EXEC ISFILE: INSERTING %s INTO PATH"% pthDir) - debugout("SYSPATH", sys.path) + debugmsg("BEFORE EXEC ISFILE: INSERTING %s INTO PATH"% pthDir) + debugmsg("SYSPATH", sys.path) os.chdir(pthDir) sys._daboRunHomeDir = pthDir - try: - debugout("ABOUT TO EXECFILE:", prg) - debugout("CURDIR:", os.getcwd()) + debugmsg("ABOUT TO EXECFILE:", prg) + debugmsg("CURDIR:", os.getcwd()) execfile(prg, {"__name__": "__main__"} ) except StandardError, e: - debugout("EXECFILE ERROR", e) + debugmsg("EXECFILE ERROR", e) print "-"*60 print "ARGS:", sys.argv print "-"*60 traceback.print_exc(file=sys.stdout) print "-"*60 - traceback.print_tb(sys.last_traceback) - print "-"*60 - else: # File should run directly when imported exec("import " + impt) Modified: trunk/setup.py =================================================================== --- trunk/setup.py 2009-12-27 20:58:40 UTC (rev 29) +++ trunk/setup.py 2010-12-26 20:04:28 UTC (rev 30) @@ -7,7 +7,7 @@ # The first three parameters are not required, if at least a # 'version' is given, then a versioninfo resource is built from # them and added to the executables. - version = "0.9.2", + version = "0.9.3", description = "Dabo Runtime Engine", name = "daborun", # targets to build _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/[email protected]
