Update of /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5994 Modified Files: changelog.txt customDialogs.py helpAbout.rsrc.py standaloneBuilder.gtk.rsrc.py standaloneBuilder.py standaloneBuilder.rsrc.py Log Message: Updates for standaloneBuilder version 0.3: 1. Major re-design of the user interface 2. Removed the limitation on directories where projects can be created 3. Changed the help --> about dialog to use a tabbed notebook Index: standaloneBuilder.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder/standaloneBuilder.rsrc.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** standaloneBuilder.rsrc.py 12 May 2006 16:26:20 -0000 1.7 --- standaloneBuilder.rsrc.py 3 Nov 2006 14:56:25 -0000 1.8 *************** *** 4,9 **** {'type':'Background', 'name':'standaloneBuilder', ! 'title':'PythonCard standaloneBuilder', ! 'size':(800, 594), 'statusBar':1, --- 4,9 ---- {'type':'Background', 'name':'standaloneBuilder', ! 'title':u'PythonCard standaloneBuilder', ! 'size':(800, 590), 'statusBar':1, *************** *** 171,188 **** }, 'strings': { ! u'testString':u'This is a test string', }, 'components': [ {'type':'ImageButton', 'name':'newBtn', 'position':(5, 5), 'size':(32, 32), - 'backgroundColor':(255, 255, 255), 'border':'3d', 'command':'newBtn', 'file':'pixmaps/new.png', ! 'toolTip':'Create a new project', 'userdata':'frozen', }, --- 171,217 ---- }, 'strings': { ! u'versionString':u'0.3.0', }, 'components': [ + {'type':'StaticText', + 'name':'StaticText5', + 'position':(15, 155), + 'text':u'Main script file', + }, + + {'type':'StaticText', + 'name':'StaticText4', + 'position':(15, 95), + 'text':u'Description', + }, + + {'type':'StaticText', + 'name':'StaticText9', + 'position':(15, 185), + 'text':u'Icon (Win)', + }, + + {'type':'StaticText', + 'name':'StaticText7', + 'position':(15, 125), + 'text':u'Base directory', + }, + + {'type':'StaticText', + 'name':'StaticText6', + 'position':(15, 65), + 'text':u'Project name', + }, + {'type':'ImageButton', 'name':'newBtn', 'position':(5, 5), 'size':(32, 32), 'border':'3d', 'command':'newBtn', 'file':'pixmaps/new.png', ! 'toolTip':u'Create a new project', 'userdata':'frozen', }, *************** *** 192,212 **** 'position':(40, 5), 'size':(32, 32), - 'backgroundColor':(255, 255, 255), 'border':'3d', 'command':'openBtn', 'file':'pixmaps/open.png', ! 'toolTip':'Open an existing project', 'userdata':'frozen', }, {'type':'ImageButton', ! 'name':'saveBtn', 'position':(75, 5), 'size':(32, 32), ! 'backgroundColor':(255, 255, 255), 'border':'3d', 'command':'saveBtn', 'file':'pixmaps/save.png', ! 'toolTip':'Save the current project', 'userdata':'frozen', }, --- 221,321 ---- 'position':(40, 5), 'size':(32, 32), 'border':'3d', 'command':'openBtn', 'file':'pixmaps/open.png', ! 'toolTip':u'Open an existing project', 'userdata':'frozen', }, {'type':'ImageButton', ! 'name':'propertiesBtn', 'position':(75, 5), 'size':(32, 32), ! 'border':'3d', ! 'command':'editProps', ! 'file':'pixmaps/props.png', ! 'toolTip':u'Edit project properties', ! }, ! ! {'type':'ImageButton', ! 'name':'saveBtn', ! 'position':(111, 5), ! 'size':(32, 32), 'border':'3d', 'command':'saveBtn', 'file':'pixmaps/save.png', ! 'toolTip':u'Save the current project', ! 'userdata':'frozen', ! }, ! ! {'type':'ImageButton', ! 'name':'changelogBtn', ! 'position':(155, 5), ! 'size':(32, 32), ! 'border':'3d', ! 'command':'editChgLog', ! 'file':'pixmaps/changelog.png', ! 'toolTip':u'Edit the changelog file', ! }, ! ! {'type':'ImageButton', ! 'name':'readmeBtn2', ! 'position':(190, 5), ! 'size':(32, 32), ! 'border':'3d', ! 'command':'editReadme', ! 'file':'pixmaps/readme.png', ! 'toolTip':u'Edit the README file', ! }, ! ! {'type':'ImageButton', ! 'name':'specBtn', ! 'position':(225, 5), ! 'size':(32, 32), ! 'border':'3d', ! 'command':'editSpecFile', ! 'file':'pixmaps/spec.png', ! 'toolTip':u'View the applications spec file', ! }, ! ! {'type':'ImageButton', ! 'name':'innoBtn2', ! 'position':(260, 5), ! 'size':(32, 32), ! 'border':'3d', ! 'command':'editInnoFile', ! 'file':'pixmaps/inno.png', ! 'toolTip':u'View the Inno setup script for your application', ! }, ! ! {'type':'ImageButton', ! 'name':'runBtn', ! 'position':(305, 5), ! 'size':(32, 32), ! 'border':'3d', ! 'command':'runMainScript', ! 'file':'pixmaps/run.png', ! 'toolTip':u'Run main script', ! }, ! ! {'type':'ImageButton', ! 'name':'rebuildBtn', ! 'position':(350, 5), ! 'size':(32, 32), ! 'border':'3d', ! 'command':'rebuildCmd', ! 'file':'pixmaps/rebuild.png', ! 'toolTip':u'Rebuild project', ! 'userdata':'frozen', ! }, ! ! {'type':'ImageButton', ! 'name':'releaseBtn', ! 'position':(385, 5), ! 'size':(32, 32), ! 'border':'3d', ! 'command':u'releaseCmd', ! 'file':'pixmaps/release.png', ! 'toolTip':u'Make a release of the finished application', 'userdata':'frozen', }, *************** *** 216,224 **** 'position':(705, 5), 'size':(32, 32), - 'backgroundColor':(255, 255, 255), 'border':'3d', 'command':'editPrefs', 'file':'pixmaps/prefs.png', ! 'toolTip':'standaloneBuilder preferences', 'userdata':'frozen', }, --- 325,332 ---- 'position':(705, 5), 'size':(32, 32), 'border':'3d', 'command':'editPrefs', 'file':'pixmaps/prefs.png', ! 'toolTip':u'standaloneBuilder preferences', 'userdata':'frozen', }, *************** *** 228,236 **** 'position':(750, 5), 'size':(32, 32), - 'backgroundColor':(255, 255, 255), 'border':'3d', 'command':'quitBtn', 'file':'pixmaps/exit.png', ! 'toolTip':'Quit the program', 'userdata':'frozen', }, --- 336,343 ---- 'position':(750, 5), 'size':(32, 32), 'border':'3d', 'command':'quitBtn', 'file':'pixmaps/exit.png', ! 'toolTip':u'Quit the program', 'userdata':'frozen', }, *************** *** 239,301 **** 'name':'projectName', 'position':(95, 60), ! 'size':(250, -1), }, {'type':'TextField', ! 'name':'projectIcon', ! 'position':(500, 60), ! 'size':(250, -1), ! }, ! ! {'type':'Button', ! 'name':'iconBtn', ! 'position':(755, 60), ! 'size':(22, 22), ! 'label':'...', }, {'type':'TextField', 'name':'baseDir', ! 'position':(95, 90), ! 'size':(250, -1), }, {'type':'Button', 'name':'baseDirBtn', ! 'position':(350, 90), 'size':(22, 22), ! 'label':'...', }, {'type':'TextField', ! 'name':'projectDesc', ! 'position':(500, 90), ! 'size':(250, -1), }, ! {'type':'TextField', ! 'name':'mainScript', ! 'position':(95, 120), ! 'size':(250, -1), }, {'type':'Button', 'name':'mainScriptBtn', ! 'position':(350, 120), 'size':(22, 22), ! 'label':'...', }, {'type':'Button', ! 'name':'mainScriptEditBtn', ! 'position':(375, 120), ! 'size':(50, 22), ! 'command':'EditMainScript', ! 'label':'Edit...', }, {'type':'List', 'name':'scriptList', ! 'position':(15, 185), 'size':(360, 95), 'items':[], --- 346,408 ---- 'name':'projectName', 'position':(95, 60), ! 'size':(275, -1), }, {'type':'TextField', ! 'name':'projectDesc', ! 'position':(95, 90), ! 'size':(655, -1), }, {'type':'TextField', 'name':'baseDir', ! 'position':(95, 120), ! 'size':(655, -1), }, {'type':'Button', 'name':'baseDirBtn', ! 'position':(755, 120), 'size':(22, 22), ! 'label':u'...', }, {'type':'TextField', ! 'name':'mainScript', ! 'position':(95, 150), ! 'size':(600, -1), }, ! {'type':'Button', ! 'name':'mainScriptEditBtn', ! 'position':(700, 150), ! 'size':(50, 22), ! 'command':'EditMainScript', ! 'label':u'Edit...', }, {'type':'Button', 'name':'mainScriptBtn', ! 'position':(755, 150), 'size':(22, 22), ! 'label':u'...', ! }, ! ! {'type':'TextField', ! 'name':'projectIcon', ! 'position':(95, 180), ! 'size':(655, -1), }, {'type':'Button', ! 'name':'iconBtn', ! 'position':(755, 180), ! 'size':(22, 22), ! 'label':u'...', }, {'type':'List', 'name':'scriptList', ! 'position':(15, 235), 'size':(360, 95), 'items':[], *************** *** 304,337 **** {'type':'Button', 'name':'scriptAddBtn', ! 'position':(15, 285), 'size':(-1, 22), 'command':'addScript', ! 'label':'Add...', }, {'type':'Button', 'name':'scriptDelBtn', ! 'position':(95, 285), 'size':(-1, 22), ! 'label':'Remove', }, {'type':'Button', 'name':'scriptEditBtn', ! 'position':(175, 285), 'size':(-1, 22), ! 'label':'Edit...', }, {'type':'Button', 'name':'scriptDelAllBtn', ! 'position':(300, 285), 'size':(-1, 22), ! 'label':'Clear all', }, {'type':'List', 'name':'resList', ! 'position':(415, 185), 'size':(360, 95), 'items':[], --- 411,444 ---- {'type':'Button', 'name':'scriptAddBtn', ! 'position':(15, 335), 'size':(-1, 22), 'command':'addScript', ! 'label':u'Add...', }, {'type':'Button', 'name':'scriptDelBtn', ! 'position':(95, 335), 'size':(-1, 22), ! 'label':u'Remove', }, {'type':'Button', 'name':'scriptEditBtn', ! 'position':(175, 335), 'size':(-1, 22), ! 'label':u'Edit...', }, {'type':'Button', 'name':'scriptDelAllBtn', ! 'position':(300, 335), 'size':(-1, 22), ! 'label':u'Clear all', }, {'type':'List', 'name':'resList', ! 'position':(415, 235), 'size':(360, 95), 'items':[], *************** *** 340,373 **** {'type':'Button', 'name':'resAddBtn', ! 'position':(415, 285), 'size':(-1, 22), 'command':'addResource', ! 'label':'Add..', }, {'type':'Button', 'name':'resDelBtn', ! 'position':(495, 285), 'size':(-1, 22), ! 'label':'Remove', }, {'type':'Button', 'name':'resEditBtn', ! 'position':(575, 285), 'size':(-1, 22), ! 'label':'Edit...', }, {'type':'Button', 'name':'resDelAllBtn', ! 'position':(700, 285), 'size':(-1, 22), ! 'label':'Clear all', }, {'type':'List', 'name':'pixmapList', ! 'position':(15, 340), 'size':(360, 95), 'items':[], --- 447,480 ---- {'type':'Button', 'name':'resAddBtn', ! 'position':(415, 335), 'size':(-1, 22), 'command':'addResource', ! 'label':u'Add..', }, {'type':'Button', 'name':'resDelBtn', ! 'position':(495, 335), 'size':(-1, 22), ! 'label':u'Remove', }, {'type':'Button', 'name':'resEditBtn', ! 'position':(575, 335), 'size':(-1, 22), ! 'label':u'Edit...', }, {'type':'Button', 'name':'resDelAllBtn', ! 'position':(701, 336), 'size':(-1, 22), ! 'label':u'Clear all', }, {'type':'List', 'name':'pixmapList', ! 'position':(15, 390), 'size':(360, 95), 'items':[], *************** *** 376,409 **** {'type':'Button', 'name':'pixmapAddBtn', ! 'position':(14, 440), 'size':(-1, 22), 'command':'addPixmap', ! 'label':'Add...', }, {'type':'Button', 'name':'pixmapDelBtn', ! 'position':(95, 440), 'size':(-1, 22), ! 'label':'Remove', }, {'type':'Button', 'name':'pixmapEditBtn', ! 'position':(175, 440), 'size':(-1, 22), ! 'label':'Edit...', }, {'type':'Button', 'name':'pixmapDelAllBtn', ! 'position':(300, 440), 'size':(-1, 22), ! 'label':'Clear all', }, {'type':'List', 'name':'otherList', ! 'position':(415, 340), 'size':(360, 95), 'items':[], --- 483,516 ---- {'type':'Button', 'name':'pixmapAddBtn', ! 'position':(15, 490), 'size':(-1, 22), 'command':'addPixmap', ! 'label':u'Add...', }, {'type':'Button', 'name':'pixmapDelBtn', ! 'position':(95, 490), 'size':(-1, 22), ! 'label':u'Remove', }, {'type':'Button', 'name':'pixmapEditBtn', ! 'position':(175, 490), 'size':(-1, 22), ! 'label':u'Edit...', }, {'type':'Button', 'name':'pixmapDelAllBtn', ! 'position':(300, 490), 'size':(-1, 22), ! 'label':u'Clear all', }, {'type':'List', 'name':'otherList', ! 'position':(415, 390), 'size':(360, 95), 'items':[], *************** *** 412,591 **** {'type':'Button', 'name':'docAddBtn', ! 'position':(414, 440), 'size':(-1, 22), 'command':'addOther', ! 'label':'Add...', }, {'type':'Button', 'name':'docDelBtn', ! 'position':(495, 440), 'size':(-1, 22), ! 'label':'Remove', }, {'type':'Button', 'name':'docEditBtn', ! 'position':(575, 440), 'size':(-1, 22), ! 'label':'Edit...', }, {'type':'Button', 'name':'docDelAllBtn', ! 'position':(700, 440), ! 'size':(-1, 22), ! 'label':'Clear all', ! }, ! ! {'type':'Button', ! 'name':'propertiesBtn', ! 'position':(15, 475), ! 'size':(74, 22), ! 'command':'editProps', ! 'label':'Props...', ! 'toolTip':'Change your projects properties', ! }, ! ! {'type':'Button', ! 'name':'changelogBtn', ! 'position':(95, 475), ! 'size':(76, 22), ! 'command':'editChgLog', ! 'label':'Chglog...', ! 'toolTip':'Edit the changelog file', ! }, ! ! {'type':'Button', ! 'name':'readmeBtn', ! 'position':(95, 500), ! 'size':(-1, 22), ! 'command':'editReadme', ! 'label':'README...', ! 'toolTip':'Edit the README file', ! }, ! ! {'type':'Button', ! 'name':'specBtn', ! 'position':(175, 475), ! 'size':(-1, 22), ! 'command':'editSpecFile', ! 'label':'Spec file...', ! 'toolTip':'Edit the applications spec file', ! }, ! ! {'type':'Button', ! 'name':'innoBtn', ! 'position':(175, 500), ! 'size':(76, 22), ! 'command':'editInnoFile', ! 'label':'Inno script...', ! 'toolTip':'Edit the Inno setup script for your application', ! }, ! ! {'type':'Button', ! 'name':'runBtn', ! 'position':(300, 475), ! 'size':(-1, 22), ! 'command':'runMainScript', ! 'label':'Run...', ! 'toolTip':'Run the application', ! }, ! ! {'type':'Button', ! 'name':'rebuildBtn', ! 'position':(700, 475), ! 'size':(-1, 22), ! 'command':'rebuildCmd', ! 'label':'Rebuild', ! 'toolTip':'Rebuild the standalone version of your application', ! 'userdata':'frozen', ! }, ! ! {'type':'Button', ! 'name':'releaseBtn', ! 'position':(700, 500), 'size':(-1, 22), ! 'command':'releaseCmd', ! 'label':'Release', ! 'toolTip':'Make a release of your finished application', ! 'userdata':'frozen', }, ! {'type':'StaticText', ! 'name':'versionString', ! 'position':(500, 125), ! 'text':'n/a', }, {'type':'StaticBox', 'name':'StaticBox2', ! 'position':(5, 165), 'size':(380, 150), ! 'label':'Script files:', }, {'type':'StaticBox', 'name':'StaticBox3', ! 'position':(405, 165), 'size':(380, 150), ! 'label':'Resource files:', }, {'type':'StaticBox', 'name':'StaticBox4', ! 'position':(5, 320), 'size':(380, 150), ! 'label':'Pixmap files:', }, {'type':'StaticBox', 'name':'StaticBox5', ! 'position':(405, 320), 'size':(380, 150), ! 'label':'Other files:', ! }, ! ! {'type':'StaticBox', ! 'name':'StaticBox1', ! 'position':(5, 40), ! 'size':(780, 125), ! 'label':'Project:', ! }, ! ! {'type':'StaticText', ! 'name':'StaticText5', ! 'position':(15, 125), ! 'text':'Main script file', ! }, ! ! {'type':'StaticText', ! 'name':'StaticText4', ! 'position':(395, 95), ! 'text':'Project description', ! }, ! ! {'type':'StaticText', ! 'name':'StaticText9', ! 'position':(435, 65), ! 'text':'Icon (Win)', ! }, ! ! {'type':'StaticText', ! 'name':'StaticText8', ! 'position':(450, 125), ! 'text':'Version', ! }, ! ! {'type':'StaticText', ! 'name':'StaticText7', ! 'position':(15, 95), ! 'text':'Base directory', ! }, ! ! {'type':'StaticText', ! 'name':'StaticText6', ! 'position':(15, 65), ! 'text':'Name', }, --- 519,582 ---- {'type':'Button', 'name':'docAddBtn', ! 'position':(415, 490), 'size':(-1, 22), 'command':'addOther', ! 'label':u'Add...', }, {'type':'Button', 'name':'docDelBtn', ! 'position':(495, 490), 'size':(-1, 22), ! 'label':u'Remove', }, {'type':'Button', 'name':'docEditBtn', ! 'position':(575, 490), 'size':(-1, 22), ! 'label':u'Edit...', }, {'type':'Button', 'name':'docDelAllBtn', ! 'position':(700, 490), 'size':(-1, 22), ! 'label':u'Clear all', }, ! {'type':'StaticBox', ! 'name':'StaticBox1', ! 'position':(5, 40), ! 'size':(780, 170), ! 'label':u'Project:', }, {'type':'StaticBox', 'name':'StaticBox2', ! 'position':(5, 215), 'size':(380, 150), ! 'label':u'Script files:', }, {'type':'StaticBox', 'name':'StaticBox3', ! 'position':(405, 215), 'size':(380, 150), ! 'label':u'Resource files:', }, {'type':'StaticBox', 'name':'StaticBox4', ! 'position':(5, 370), 'size':(380, 150), ! 'label':u'Pixmap files:', }, {'type':'StaticBox', 'name':'StaticBox5', ! 'position':(405, 370), 'size':(380, 150), ! 'label':u'Other files:', }, Index: helpAbout.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder/helpAbout.rsrc.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** helpAbout.rsrc.py 15 Apr 2005 15:18:54 -0000 1.2 --- helpAbout.rsrc.py 3 Nov 2006 14:56:25 -0000 1.3 *************** *** 4,35 **** 'position':(129, 133), 'size':(680, 370), - 'components': [ ! {'type':'Button', ! 'name':'AboutBtn', ! 'position':(10, 5), ! 'size':(-1, 32), ! 'label':'About', }, ! {'type':'Button', ! 'name':'AuthorBtn', ! 'position':(90, 5), ! 'size':(-1, 32), ! 'label':'Author', }, ! {'type':'Button', ! 'name':'LicenseBtn', ! 'position':(170, 5), ! 'size':(-1, 32), ! 'label':'License', }, ! {'type':'HtmlWindow', ! 'name':'HtmlWindow', ! 'position':(5, 40), ! 'size':(668, 255), ! 'backgroundColor':(255, 255, 255), }, --- 4,30 ---- 'position':(129, 133), 'size':(680, 370), ! 'strings': { }, ! 'components': [ ! ! {'type':'Image', ! 'name':'Image1', ! 'position':(10, 10), ! 'file':u'pixmaps/apollon.png', }, ! {'type':'StaticText', ! 'name':'versionString', ! 'position':(70, 35), ! 'font':{'faceName': u'Trebuchet MS', 'family': 'sansSerif', 'size': 14}, ! 'text':u'standaloneBuilder version', }, ! {'type':'Notebook', ! 'name':'notebook', ! 'position':(5, 65), ! 'size':(660, 250), }, *************** *** 37,43 **** 'id':5100, 'name':'btnOK', ! 'position':(590, 305), ! 'size':(-1, 32), ! 'label':'Close', }, --- 32,37 ---- 'id':5100, 'name':'btnOK', ! 'position':(590, 40), ! 'label':u'Close', }, Index: changelog.txt =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder/changelog.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** changelog.txt 12 May 2006 16:26:20 -0000 1.10 --- changelog.txt 3 Nov 2006 14:56:25 -0000 1.11 *************** *** 1,2 **** --- 1,31 ---- + standaloneBuilder Version 0.3.0 release date TBA + ------------------------------------------------- + - Inno setup and spec file buttons on the main window now simply + display the files, rather than trying to launch a full blown + editor just to view them + - Toolbar spec file button is disabled when py2exe is selected as + the build tool + - Projects can now be created outside of the main directory + specified in preferences + - changed the 'about' dialog to use a tabbed notebook to display the + pages instead of an HTMLWindow component + - Added code to enable/disable the save button depending upon + whether the project needs to be saved or not + - added the ability to have different project paths on Windows and Linux + to allow projects to be stored on a shared network resource for + cross-platform testing + - edit main script button was crashing the program if the main script text + field was blank + - Fixed problem with toolbar icon transparency under Windows + - Added several new pixmap files to the project file for the new + toolbar buttons + - Moved a number of UI buttons up to the main toolbar for + consistency + - outputwindow was enabling the clipboard button after a successful + rebuild + - Path selection and help buttons were not working for the plain + text editor fields in prefs + + standaloneBuilder Version 0.2.0 release date May 10 2006 -------------------------------------------------------- Index: customDialogs.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder/customDialogs.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** customDialogs.py 12 May 2006 16:26:20 -0000 1.6 --- customDialogs.py 3 Nov 2006 14:56:25 -0000 1.7 *************** *** 29,32 **** --- 29,33 ---- from md5 import md5 import copy + from types import * # PythonCard & wxPython imports *************** *** 35,38 **** --- 36,40 ---- import wx from wx.lib import dialogs + import wx.html *************** *** 135,159 **** CustomDialog.__init__(self, aBg, aDialogRsrc) self.parent = aBg ! #self.components.versionText.text = 'Version %s' % self.parent.pimpversion ! ! # links is a 3-element list giving the HTML files to use for the About, Author ! # and License buttons ! if links is None: links = ['doc/about.html', 'doc/author.html', 'doc/license.html'] ! self.links = links ! self.components.HtmlWindow.text = self.links[0] def on_btnOK_mouseClick(self, event): event.Skip() - def on_AboutBtn_mouseClick(self, event): - self.components.HtmlWindow.text = self.links[0] - - def on_AuthorBtn_mouseClick(self, event): - self.components.HtmlWindow.text = self.links[1] - - def on_LicenseBtn_mouseClick(self, event): - self.components.HtmlWindow.text = self.links[2] - class newProjectWizard(CustomDialog): """Displays a wizard for creating a new project""" --- 137,173 ---- CustomDialog.__init__(self, aBg, aDialogRsrc) self.parent = aBg ! self.components.notebook.SetSize((660,270)) ! ! bgval = self.GetBackgroundColour() ! versionString = self.parent.str.versionString ! self.components.versionString.text = 'standaloneBuilder version %s' % versionString ! ! aboutPanel = wx.Panel(self.components.notebook, -1) ! aboutPanelHtmlWindow = wx.html.HtmlWindow(aboutPanel, -1) ! aboutPanelHtmlWindow.SetSize((660,270)) ! aboutPanelHtmlWindow.SetPosition((1,1)) ! aboutPanelHtmlWindow.LoadPage('doc/about.html') ! aboutPanelHtmlWindow.SetBackgroundColour(bgval) ! self.components.notebook.AddPage(aboutPanel, 'About', True) ! authorPanel = wx.Panel(self.components.notebook, -1) ! authorPanelHtmlWindow = wx.html.HtmlWindow(authorPanel, -1) ! authorPanelHtmlWindow.SetSize((660,270)) ! authorPanelHtmlWindow.SetPosition((1,1)) ! authorPanelHtmlWindow.LoadPage('doc/author.html') ! authorPanelHtmlWindow.SetBackgroundColour(bgval) ! self.components.notebook.AddPage(authorPanel, 'Author', False) + licensePanel = wx.Panel(self.components.notebook, -1) + licensePanelHtmlWindow = wx.html.HtmlWindow(licensePanel, -1) + licensePanelHtmlWindow.SetSize((660,270)) + licensePanelHtmlWindow.SetPosition((1,1)) + licensePanelHtmlWindow.LoadPage('doc/license.html') + licensePanelHtmlWindow.SetBackgroundColour(bgval) + self.components.notebook.AddPage(licensePanel, 'License', False) + def on_btnOK_mouseClick(self, event): event.Skip() class newProjectWizard(CustomDialog): """Displays a wizard for creating a new project""" *************** *** 292,309 **** # need an error here if the directory selected is not a subdirectory # of basepath... ! plist = [] ! plist.append(basepath) ! plist.append(str(result.path)) ! if os.path.commonprefix(plist) != basepath: ! title = 'Invalid project base directory' ! txt = 'This version of standaloneBuilder does not allow creation ' ! txt += 'of projects which reside outside of the projects directory ' ! txt += 'specified in your preferences. This issue will be addressed ' ! txt += 'in the next version. Yes, it\'s lame - sorry! :-(' ! bull = dialog.alertDialog(self, wrap_string(txt, 60), title) ! self.components.baseDir.SetFocus() ! else: ! self.components.baseDir.text = result.path ! self.components.nextBtn.enabled = True def getResult(self): --- 306,323 ---- # need an error here if the directory selected is not a subdirectory # of basepath... ! #plist = [] ! #plist.append(basepath) ! #plist.append(str(result.path)) ! #if os.path.commonprefix(plist) != basepath: ! # title = 'Invalid project base directory' ! # txt = 'This version of standaloneBuilder does not allow creation ' ! # txt += 'of projects which reside outside of the projects directory ' ! # txt += 'specified in your preferences. This issue will be addressed ' ! # txt += 'in the next version. Yes, it\'s lame - sorry! :-(' ! # bull = dialog.alertDialog(self, wrap_string(txt, 60), title) ! # self.components.baseDir.SetFocus() ! #else: ! self.components.baseDir.text = result.path ! self.components.nextBtn.enabled = True def getResult(self): *************** *** 435,438 **** --- 449,460 ---- self.showHelp(self.components.srcEditPath.userdata, self.components.StaticText4.text) + def on_txtEditPathBtn_mouseClick(self, event): + result = dialog.fileDialog(self, self.components.StaticText9.text, self.components.txtEditPath.text) + if result.accepted: + self.components.txtEditPath.text = result.paths[0] + + def on_txtEditPathHelpBtn_mouseClick(self, event): + self.showHelp(self.components.txtEditPath.userdata, self.components.StaticText9.text) + def on_pixmapEditPathBtn_mouseClick(self, event): result = dialog.fileDialog(self, self.components.StaticText5.text, self.components.pixmapEditPath.text) Index: standaloneBuilder.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder/standaloneBuilder.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** standaloneBuilder.py 12 May 2006 16:26:20 -0000 1.14 --- standaloneBuilder.py 3 Nov 2006 14:56:25 -0000 1.15 *************** *** 46,49 **** --- 46,51 ---- import outputWindow + from PythonCard.components import button, checkbox, choice, image, imagebutton, list, notebook, spinner, staticbox, statictext, textarea, textfield + # temporary hack until we get it working properly under MacOS if wx.Platform == '__WXMAC__': *************** *** 68,73 **** title = 'Required component missing' frame = wxFrame(None, -1, title) ! message = "standaloneBuilder requires that you have a version of the Python win32 extensions " + \ ! "installed - this appears to be missing from your system.\n\nClick OK to exit." dialog = wxMessageDialog(frame, wrap_string(message, 60), title, wxICON_EXCLAMATION | wxOK) dialog.ShowModal() --- 70,75 ---- title = 'Required component missing' frame = wxFrame(None, -1, title) ! message = "standaloneBuilder requires that you have a version of the Python win32 extensions" ! message += " installed - this appears to be missing from your system.\n\nClick OK to exit." dialog = wxMessageDialog(frame, wrap_string(message, 60), title, wxICON_EXCLAMATION | wxOK) dialog.ShowModal() *************** *** 78,88 **** # imports required by mcmillan installer - #from PythonCard.components import statictext, imagebutton, textfield, \ - # textarea, list, staticbox, checkbox, choice from PythonCard.components import button, checkbox, choice, htmlwindow, image, imagebutton, list, spinner, staticbox, statictext, textarea, textfield - class standaloneBuilder(model.Background): - ############################################################################## # generic pythoncard event handlers --- 80,86 ---- *************** *** 171,175 **** def on_menuToolsLogAdd_command(self, event): ! vstring = string.split(self.components.versionString.text, '.') template = {} template['name'] = self.components.projectName.text --- 169,175 ---- def on_menuToolsLogAdd_command(self, event): ! vstring = [self.project.get('Project', 'majorversion')] ! vstring.append((self.project.get('Project', 'minorversion'))) ! vstring.append((self.project.get('Project', 'fixnumber'))) template = {} template['name'] = self.components.projectName.text *************** *** 274,281 **** txt += 'version of standaloneBuilder.' bull = dialog.alertDialog(self, txt, title) - def on_menuHelpAbout_command(self, event): dlg = HTMLHelp(self) dlg.showModal() dlg.destroy() --- 274,281 ---- txt += 'version of standaloneBuilder.' bull = dialog.alertDialog(self, txt, title) def on_menuHelpAbout_command(self, event): dlg = HTMLHelp(self) + #dlg = newHelp(self) dlg.showModal() dlg.destroy() *************** *** 312,316 **** dlg.ShowModal() dlg.Destroy() ! if self.components.projectName.text != '': if self.cfg.get('ConfigData', 'buildtool') != 'pyInstaller': self.components.specBtn.enabled = False --- 312,316 ---- dlg.ShowModal() dlg.Destroy() ! if self.components.projectName.text != '' and self.project.get('Project', 'status') == 'open': if self.cfg.get('ConfigData', 'buildtool') != 'pyInstaller': self.components.specBtn.enabled = False *************** *** 329,339 **** def on_iconBtn_mouseClick(self, event): title = 'Select icon' - basepath = os.path.join(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text) - #basepath = os.path.join(basepath, self.components.projectIcon.text) wildcard = "Icon files (*.ico)|*.ico;*.ICO|All files (*.*)|*.*" old = self.components.projectIcon.text ! result = dialog.openFileDialog(self, title, basepath, '', wildcard=wildcard) if result.accepted: ! rpath = self.getRelativePath(basepath, result.paths[0]) if rpath != old: self.components.projectIcon.text = rpath --- 329,337 ---- def on_iconBtn_mouseClick(self, event): title = 'Select icon' wildcard = "Icon files (*.ico)|*.ico;*.ICO|All files (*.*)|*.*" old = self.components.projectIcon.text ! result = dialog.openFileDialog(self, title, self.components.baseDir.text, '', wildcard=wildcard) if result.accepted: ! rpath = self.getRelativePath(self.components.baseDir.text, result.paths[0]) if rpath != old: self.components.projectIcon.text = rpath *************** *** 356,361 **** def on_mainScriptBtn_mouseClick(self, event): title = 'Select main script file' ! basepath = os.path.join(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text) old = self.components.mainScript.text wildcard = "Script files (*.py)|*.py;*.PY" --- 354,362 ---- def on_mainScriptBtn_mouseClick(self, event): + # the main script for the project ought to reside in the project + # base directory,, but there's probably no good reason to enforce + # this, other than to save me some coding effort... :-( title = 'Select main script file' ! basepath = self.components.baseDir.text old = self.components.mainScript.text wildcard = "Script files (*.py)|*.py;*.PY" *************** *** 375,386 **** def on_EditMainScript_command(self, event): ! editor = self.cfg.get('ConfigData', 'codeeditor') ! item = self.pathJoin(self.components.mainScript.text) ! item = os.path.join(self.components.baseDir.text, item) ! item = os.path.join(self.cfg.get('ConfigData', 'projects'), item) ! if sys.platform.startswith('win'): ! os.system('python "' + editor + '" "' + item + '"') ! else: ! os.system('"' + editor + '" "' + item + '"') def on_addScript_command(self, event): --- 376,388 ---- def on_EditMainScript_command(self, event): ! if self.components.mainScript.text != '': ! editor = self.cfg.get('ConfigData', 'codeeditor') ! item = self.pathJoin(self.components.mainScript.text) ! item = os.path.join(self.components.baseDir.text, item) ! item = os.path.join(self.cfg.get('ConfigData', 'projects'), item) ! if sys.platform.startswith('win'): ! os.system('python "' + editor + '" "' + item + '"') ! else: ! os.system('"' + editor + '" "' + item + '"') def on_addScript_command(self, event): *************** *** 535,539 **** def on_editChgLog_command(self, event): # edit changelog, create it if it doesn't exist ! vstring = string.split(self.components.versionString.text, '.') template = {} template['name'] = self.components.projectName.text --- 537,543 ---- def on_editChgLog_command(self, event): # edit changelog, create it if it doesn't exist ! vstring = [(self.project.get('Project', 'majorversion'))] ! vstring.append((self.project.get('Project', 'minorversion'))) ! vstring.append((self.project.get('Project', 'fixnumber'))) template = {} template['name'] = self.components.projectName.text *************** *** 579,591 **** spec = self.components.projectName.text + '.spec' spec = os.path.join(basedir, spec) - cmd = '"' + editor + '" "' + spec + '"' - if sys.platform.startswith('win'): - if editor.endswith('.py'): - os.system('python "' + editor + '" "' + spec + '"') - else: - os.system('"' + editor + '" "' + spec + '"') - else: - os.system(editor + ' ' + spec) def on_editInnoFile_command(self, event): editor = self.cfg.get('ConfigData', 'texteditor') --- 583,599 ---- spec = self.components.projectName.text + '.spec' spec = os.path.join(basedir, spec) + if not os.path.exists(spec): + title = 'Warning' + txt = 'Spec file %s was not found\n\nWould you like to (re)build it now?' % spec + result = dialog.messageDialog(self, wrap_string(txt, 60), title, wx.ICON_EXCLAMATION | wx.YES_NO | wx.YES_DEFAULT) + if result.accepted: + self.buildSpecFile() + else: + return + + msg = open(spec).read() + result = dialog.scrolledMessageDialog(self, msg, 'pyInstaller spec file [%s]' % spec, size=wx.Size(768, 576)) + def on_editInnoFile_command(self, event): editor = self.cfg.get('ConfigData', 'texteditor') *************** *** 593,603 **** spec = self.components.projectName.text + '.iss' spec = os.path.join(basedir, spec) ! if sys.platform.startswith('win'): ! if editor.endswith('.py'): ! os.system('python "' + editor + '" "' + spec + '"') else: ! os.system('"' + editor + '" "' + spec + '"') ! else: ! os.system(editor + ' ' + spec) def on_runMainScript_command(self, event): --- 601,616 ---- spec = self.components.projectName.text + '.iss' spec = os.path.join(basedir, spec) ! ! if not os.path.exists(spec): ! title = 'Warning' ! txt = 'Inno setup file %s was not found\n\nWould you like to (re)build it now?' % spec ! result = dialog.messageDialog(self, wrap_string(txt, 60), title, wx.ICON_EXCLAMATION | wx.YES_NO | wx.YES_DEFAULT) ! if result.accepted: ! self.buildInnoFile() else: ! return ! ! msg = open(spec).read() ! result = dialog.scrolledMessageDialog(self, msg, 'Inno Setup file [%s]' % spec, size=wx.Size(768, 576)) def on_runMainScript_command(self, event): *************** *** 689,694 **** self.outputWindow.components.importError.enabled = False self.outputWindow.components.importError.visible = False ! self.outputWindow.components.txt1a.visible = False # rebuilding spec file ! self.outputWindow.components.txt1b.visible = False # done self.outputWindow.components.txt2a.visible = False # rebuilding versioninfo file self.outputWindow.components.txt2b.visible = False # done --- 702,709 ---- self.outputWindow.components.importError.enabled = False self.outputWindow.components.importError.visible = False ! self.outputWindow.components.importError.enabled = False ! self.outputWindow.components.importError.visible = False ! self.outputWindow.components.clipBoardBtn.visible = False ! self.outputWindow.components.clipBoardBtn.visible = False self.outputWindow.components.txt2a.visible = False # rebuilding versioninfo file self.outputWindow.components.txt2b.visible = False # done *************** *** 702,705 **** --- 717,722 ---- # delete all transient files from previous rebuilds basedir = str(os.path.join(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text)) + #print 'using [%s] as basedir' % basedir + #bull = raw_input() versionfile = os.path.join(basedir, 'versioninfo.txt') innofile = self.components.projectName.text + '.iss' *************** *** 866,876 **** def checkResourceFile(self, path): ! # when adding a script, see if there is a matching resource file root, ext = os.path.splitext(path) script = os.path.basename(path) ! resfile = root + '.rsrc.py' ! if os.path.isfile(resfile): ! # is it already in the list of resource files? ! if not os.path.basename(resfile) in self.components.resList.items: txt = '%s has a matching PythonCard resource file. Would you like to also' % (script) txt += ' add the resource file to your project?' --- 883,910 ---- def checkResourceFile(self, path): ! # when adding a script, see if there is a matching resource file - if ! # a script is added which resides outside the main project directory, ! # then we will need to store the full path to the resource file. I'm ! # making the assumption here that the resource file will always reside ! # in the same directory as the script it relates to - if this changes ! # in a future release of PythonCard, then this logic will break... :-( root, ext = os.path.splitext(path) script = os.path.basename(path) ! ! resfile = self.getRelativePath(self.components.baseDir.text, root + '.rsrc.py') ! ! if os.path.isabs(resfile): ! fullPath = resfile ! else: ! fullPath = os.path.join(self.components.baseDir.text, resfile) ! ! # at this point, resfile will be either 'blah.rsrc.py' in the case where ! # the script is within the current project base directory, or something ! # like 'C:\Some\random\path\blah.rsrc.py' if it lives outside the ! # project base directory. in either case, we have to use the absolute ! # path name to check for the existence of the file ! if os.path.isfile(fullPath): ! # resource exists, is it already in the list of resource files? ! if not resfile in self.components.resList.items: txt = '%s has a matching PythonCard resource file. Would you like to also' % (script) txt += ' add the resource file to your project?' *************** *** 879,883 **** if result.accepted: x = self.components.resList.items ! x.append(os.path.basename(resfile)) x.sort() self.components.resList.items = x --- 913,917 ---- if result.accepted: x = self.components.resList.items ! x.append(resfile) x.sort() self.components.resList.items = x *************** *** 960,965 **** --- 994,1001 ---- def getRelativePath(self, root, path): # remove the root part of an absolute path + #print 'getRelativePath: root=[%s], path=[%s]' % (root, path) retPath = string.replace(path, root, '') if retPath[0] == os.sep: retPath = retPath[1:] + #print 'getRelativePath: returning [%s]' % retPath #bull = raw_input() return retPath *************** *** 973,976 **** --- 1009,1014 ---- else: # Windows needs to put the config file in C:\Program Files\PM\pm.ini + # this is a bad thing on WindowsXP and won't be allowed at all once + # Vista is released... self.HOMEDIR = os.path.dirname(sys.argv[0]) self.CONFIG = 'standaloneBuilder.ini' *************** *** 1004,1007 **** --- 1042,1046 ---- if btool == 'py2exe': + self.components.specBtn.enabled = False try: from distutils.core import setup as wibble *************** *** 1084,1088 **** self.components.projectDesc.text = wizResult.projectDesc self.components.mainScript.text = '' - self.components.versionString.text = '0.1.1' self.components.scriptList.items = [] self.components.resList.items = [] --- 1123,1126 ---- *************** *** 1095,1098 **** --- 1133,1139 ---- # add in the remainder of the project default properties + self.project.set('Project', 'majorversion', '0') + self.project.set('Project', 'minorversion', '1') + self.project.set('Project', 'fixnumber', '1') self.project.set('Project', 'build', '1') self.project.set('Project', 'docfilespath', 'doc') *************** *** 1112,1116 **** self.project.set('Project', 'status', 'open') ! self.project.set('Project', 'applicence', 'doc,gpl.txt') x = os.path.join('build', '%s.iss' % self.components.projectName.text) --- 1153,1157 ---- self.project.set('Project', 'status', 'open') ! self.project.set('Project', 'applicence', os.path.normpath('doc/gpl.txt')) x = os.path.join('build', '%s.iss' % self.components.projectName.text) *************** *** 1120,1127 **** self.project.set('Project', 'specfile', x) ! self.project.set('Otherfiles', '0', os.path.join('doc', 'about.html')) ! self.project.set('Otherfiles', '1', os.path.join('doc', 'author.html')) ! self.project.set('Otherfiles', '2', os.path.join('doc', 'gpl.txt')) ! self.project.set('Otherfiles', '3', os.path.join('doc', 'gpl.html')) self.project.set('Otherfiles', '4', 'changelog.txt') self.project.set('Otherfiles', '5', 'readme.txt') --- 1161,1168 ---- self.project.set('Project', 'specfile', x) ! self.project.set('Otherfiles', '0', os.path.normpath('doc/about.html')) ! self.project.set('Otherfiles', '1', os.path.normpath('doc/author.html')) ! self.project.set('Otherfiles', '2', os.path.normpath('doc/gpl.txt')) ! self.project.set('Otherfiles', '3', os.path.normpath('doc/gpl.html')) self.project.set('Otherfiles', '4', 'changelog.txt') self.project.set('Otherfiles', '5', 'readme.txt') *************** *** 1172,1176 **** # build a tarball for a Linux system # create a top level directory for the stuff to go in ! vstring = self.components.versionString.text tdir = self.project.get('Project', 'name') tdir += '-' + vstring --- 1213,1219 ---- # build a tarball for a Linux system # create a top level directory for the stuff to go in ! vstring = self.project.get('Project', 'majorversion') ! vstring += '.' + self.project.get('Project', 'minorversion') ! vstring += '.' + self.project.get('Project', 'fixnumber') tdir = self.project.get('Project', 'name') tdir += '-' + vstring *************** *** 1234,1237 **** --- 1277,1286 ---- # if we're building from a PythonCard application, check that the # main script includes imports of the required PythonCard components + ### TODO ############################################################### + # # + # make this work properly for a non-PythonCard project - it should # + # return impFound=True if there are no PythonCard resource files in # + # the project # + ######################################################################## imps = {} impline = 'from PythonCard.components import ' *************** *** 1562,1566 **** inno = [] ! basedir = os.path.join(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text) innofile = self.components.projectName.text + '.iss' --- 1611,1615 ---- inno = [] ! basedir = self.components.baseDir.text innofile = self.components.projectName.text + '.iss' *************** *** 1700,1704 **** # first confirm what the new version number will be ! vstring = self.components.versionString.text dlg = versionDialog(self, vstring) if dlg.ShowModal() != wx.ID_OK: return 0 --- 1749,1755 ---- # first confirm what the new version number will be ! vstring = self.project.get('Project', 'majorversion') ! vstring += '.' + self.project.get('Project', 'minorversion') ! vstring += '.' + self.project.get('Project', 'fixnumber') dlg = versionDialog(self, vstring) if dlg.ShowModal() != wx.ID_OK: return 0 *************** *** 1739,1743 **** self.project.set('Project', 'build', '1') self.project.set('Project', 'status', 'open') - self.components.versionString.text = vstring[0] + '.' + vstring[1] + '.' + vstring[2] self.documentChanged = True self.updateStatusBar() --- 1790,1793 ---- *************** *** 1827,1846 **** except: pass - - vstring = string.split(self.components.versionString.text, '.') - self.project.set('Project', 'majorversion', str(vstring[0])) - self.project.set('Project', 'minorversion', str(vstring[1])) - self.project.set('Project', 'fixnumber', str(vstring[2])) - self.project.set('Project', 'name', self.components.projectName.text) # set the project basepath, we need to split off the top level projects # folder as defined in prefs ! base = self.getRelativePath(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text) ! base = self.pathSplit(base) ! self.project.set('Project', 'basepath', base) self.project.set('Project', 'projectdesc', self.components.projectDesc.text) ! self.project.set('Project', 'mainscript', self.pathSplit(self.components.mainScript.text)) ! self.project.set('Project', 'iconfile', self.pathSplit(self.components.projectIcon.text)) self.project.set('Project', 'innoscript', '%s.iss' % self.components.projectName.text) self.project.set('Project', 'specfile', '%s.spec' % self.components.projectName.text) --- 1877,1894 ---- except: pass # set the project basepath, we need to split off the top level projects # folder as defined in prefs ! self.project.set('Project', 'name', self.components.projectName.text) + if sys.platform.startswith('win'): + self.project.set('Project', 'winbasepath', self.components.baseDir.text) + elif sys.platform.startswith('linux'): + self.project.set('Project', 'linuxbasepath', self.components.baseDir.text) + else: + self.project.set('Project', 'basepath', self.components.baseDir.text) self.project.set('Project', 'projectdesc', self.components.projectDesc.text) ! self.project.set('Project', 'mainscript', self.components.mainScript.text) ! self.project.set('Project', 'iconfile', self.components.projectIcon.text) self.project.set('Project', 'innoscript', '%s.iss' % self.components.projectName.text) self.project.set('Project', 'specfile', '%s.spec' % self.components.projectName.text) *************** *** 1854,1858 **** cnt = 0 for item in self.components.scriptList.items: ! self.project.set('Scripts', str(cnt), self.pathSplit(item)) cnt += 1 --- 1902,1906 ---- cnt = 0 for item in self.components.scriptList.items: ! self.project.set('Scripts', str(cnt), item) cnt += 1 *************** *** 1865,1869 **** cnt = 0 for item in self.components.resList.items: ! self.project.set('ResourceFiles', str(cnt), self.pathSplit(item)) cnt += 1 --- 1913,1917 ---- cnt = 0 for item in self.components.resList.items: ! self.project.set('ResourceFiles', str(cnt), item) cnt += 1 *************** *** 1876,1880 **** cnt = 0 for item in self.components.otherList.items: ! self.project.set('Otherfiles', str(cnt), self.pathSplit(item)) cnt += 1 --- 1924,1928 ---- cnt = 0 for item in self.components.otherList.items: ! self.project.set('Otherfiles', str(cnt), item) cnt += 1 *************** *** 1886,1890 **** cnt = 0 for item in self.components.pixmapList.items: ! self.project.set('Pixmaps', str(cnt), self.pathSplit(item)) cnt += 1 --- 1934,1938 ---- cnt = 0 for item in self.components.pixmapList.items: ! self.project.set('Pixmaps', str(cnt), item) cnt += 1 *************** *** 1895,1911 **** def updateStatusBar(self): ! string = self.components.projectName.text string += '-' ! string += self.components.versionString.text string += ' (Build ' + self.project.get('Project', 'build') + ')' string += ' - Release status: %s' % self.project.get('Project', 'status') ! mod = '' ! if self.documentChanged: mod = ' *' if self.documentPath is not None: ! self.SetTitle(self.startTitle + ' - [' + os.path.split(self.documentPath)[-1] + mod + ']') else: ! self.SetTitle(self.startTitle + ' - [Untitled' + mod + ']') self.statusBar.text = string try: wx.Yield() --- 1943,1968 ---- def updateStatusBar(self): ! vstring = (self.project.get('Project', 'majorversion')) +'.' ! vstring += (self.project.get('Project', 'minorversion')) + '.' ! vstring += (self.project.get('Project', 'fixnumber')) ! ! string = ' ' + self.components.projectName.text string += '-' ! string += vstring string += ' (Build ' + self.project.get('Project', 'build') + ')' string += ' - Release status: %s' % self.project.get('Project', 'status') ! ! if self.documentChanged: ! self.components.saveBtn.enabled = True ! else: ! self.components.saveBtn.enabled = False ! if self.documentPath is not None: ! self.SetTitle(self.startTitle + ' - [' + os.path.split(self.documentPath)[-1] + ']') else: ! self.SetTitle(self.startTitle + ' - [Untitled]') self.statusBar.text = string + try: wx.Yield() *************** *** 1915,1919 **** def createProject(self): # create all the folders and other gubbins ! basepath = os.path.join(self.cfg.get('ConfigData', 'projects'), self.pathJoin(self.project.get('Project', 'basepath'))) try: --- 1972,1988 ---- def createProject(self): # create all the folders and other gubbins ! if sys.platform.startswith('win'): ! try: ! basepath = self.project.get('Project', 'winbasepath') ! except ConfigParser.NoOptionError: ! basepath = self.project.get('Project', 'basepath') ! elif sys.platform.startswith('linux'): ! try: ! basepath = self.project.get('Project', 'linuxbasepath') ! except ConfigParser.NoOptionError: ! basepath = self.project.get('Project', 'basepath') ! else: ! basepath = self.project.get('Project', 'basepath') ! #basepath = os.path.join(self.cfg.get('ConfigData', 'projects'), self.pathJoin(self.project.get('Project', 'basepath'))) try: *************** *** 2070,2082 **** def Project2UI(self): - vstring = (self.project.get('Project', 'majorversion')) +'.' - vstring += (self.project.get('Project', 'minorversion')) + '.' - vstring += (self.project.get('Project', 'fixnumber')) - self.components.versionString.text = vstring self.components.projectName.text = self.project.get('Project', 'name') ! self.components.baseDir.text = self.pathJoin(self.project.get('Project', 'basepath')) self.components.projectDesc.text = self.project.get('Project', 'projectdesc') ! self.components.mainScript.text = self.pathJoin(self.project.get('Project', 'mainscript')) ! self.components.projectIcon.text = self.pathJoin(self.project.get('Project', 'iconfile')) self.components.scriptList.items = self.sectionOutput('Scripts') self.components.resList.items = self.sectionOutput('ResourceFiles') --- 2139,2160 ---- def Project2UI(self): self.components.projectName.text = self.project.get('Project', 'name') ! ! if sys.platform.startswith('win'): ! try: ! self.components.baseDir.text = self.project.get('Project', 'winbasepath') ! except ConfigParser.NoOptionError: ! self.components.baseDir.text = self.project.get('Project', 'basepath') ! elif sys.platform.startswith('linux'): ! try: ! self.components.baseDir.text = self.project.get('Project', 'linuxbasepath') ! except ConfigParser.NoOptionError: ! self.components.baseDir.text = self.project.get('Project', 'basepath') ! else: ! self.components.baseDir.text = self.project.get('Project', 'basepath') ! self.components.projectDesc.text = self.project.get('Project', 'projectdesc') ! self.components.mainScript.text = self.project.get('Project', 'mainscript') ! self.components.projectIcon.text = self.project.get('Project', 'iconfile') self.components.scriptList.items = self.sectionOutput('Scripts') self.components.resList.items = self.sectionOutput('ResourceFiles') *************** *** 2099,2107 **** break else: if prefix is not None: item = os.path.join(prefix, item) if fd is None: ! list.append(self.pathJoin(item)) else: ! fd.write(self.pathJoin(item) + '\n') cnt += 1 --- 2177,2186 ---- break else: + item = os.path... [truncated message content] |