From: Phil E. <l2...@us...> - 2005-09-09 12:32:18
|
Update of /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6191 Modified Files: standaloneBuilder.py standaloneBuilder.rsrc.py Added Files: standaloneBuilder.gtk.rsrc.py Log Message: Bug fix to project save routine, and add a button to allow editing of the main script Index: standaloneBuilder.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder/standaloneBuilder.rsrc.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** standaloneBuilder.rsrc.py 5 May 2005 12:50:24 -0000 1.5 --- standaloneBuilder.rsrc.py 9 Sep 2005 12:32:08 -0000 1.6 *************** *** 1,530 **** ! {'application':{'type':'Application', ! 'name':'Template', ! 'backgrounds': [ ! {'type':'Background', ! 'name':'standaloneBuilder', ! 'title':'PythonCard standaloneBuilder', ! 'size':(800, 594), ! 'statusBar':1, ! ! 'menubar': {'type':'MenuBar', [...1146 lines suppressed...] ! {'type':'StaticText', ! 'name':'StaticText7', ! 'position':(15, 95), ! 'labelSpecified':0, ! 'nameSpecified':0, ! 'text':'Base directory', ! }, ! ! {'type':'StaticText', ! 'name':'StaticText6', ! 'position':(15, 65), ! 'labelSpecified':0, ! 'nameSpecified':0, ! 'text':'Name', ! }, ! ! ] # end components ! } # end background ! ] # end backgrounds ! } } --- NEW FILE: standaloneBuilder.gtk.rsrc.py --- {'application':{'type':'Application', 'name':'Template', 'backgrounds': [ {'type':'Background', 'name':'standaloneBuilder', 'title':u'PythonCard standaloneBuilder', 'size':(800, 610), 'statusBar':1, 'menubar': {'type':'MenuBar', 'menus': [ {'type':'Menu', 'name':'menuFile', 'label':'&File', 'items': [ {'type':'MenuItem', 'name':'menuFileNew', 'label':'&New\tCtrl+N', 'command':'newBtn', }, {'type':'MenuItem', 'name':'menuFileOpen', 'label':'&Open\tCtrl+O', }, {'type':'MenuItem', 'name':'menuFileSave', 'label':'&Save\tCtrl+S', }, {'type':'MenuItem', 'name':'menuFileSaveAs', 'label':'Save &As...', }, {'type':'MenuItem', 'name':'fileSep2', 'label':'-', }, {'type':'MenuItem', 'name':'menuFileExit', 'label':'E&xit\tAlt+X', }, ] }, {'type':'Menu', 'name':'Edit', 'label':'&Edit', 'items': [ {'type':'MenuItem', 'name':'menuEditUndo', 'label':'&Undo\tCtrl+Z', }, {'type':'MenuItem', 'name':'menuEditRedo', 'label':'&Redo\tCtrl+Y', }, {'type':'MenuItem', 'name':'editSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuEditCut', 'label':'Cu&t\tCtrl+X', }, {'type':'MenuItem', 'name':'menuEditCopy', 'label':'&Copy\tCtrl+C', }, {'type':'MenuItem', 'name':'menuEditPaste', 'label':'&Paste\tCtrl+V', }, {'type':'MenuItem', 'name':'editSep2', 'label':'-', }, {'type':'MenuItem', 'name':'menuEditClear', 'label':'Cle&ar\tDel', }, {'type':'MenuItem', 'name':'menuEditSelectAll', 'label':'Select A&ll\tCtrl+A', }, ] }, {'type':'Menu', 'name':'menoTools', 'label':'&Tools', 'items': [ {'type':'MenuItem', 'name':'menuToolsLogAdd', 'label':'A&dd changelog entry\tShift++', 'command':'menuToolsLogAdd', }, {'type':'MenuItem', 'name':'menuToolsLogEdit', 'label':'E&dit Changelog\tCtrl+E', 'command':'menuToolsLogEdit', }, {'type':'MenuItem', 'name':'toolSep1', 'label':'-', }, {'type':'MenuItem', 'name':'menuToolsRebuild', 'label':'R&ebuild\tCtrl+R', }, {'type':'MenuItem', 'name':'menuToolsRelease', 'label':'M&ake release\tCtrl+M', }, ] }, {'type':'Menu', 'name':'menuHelp', 'label':'&Help', 'items': [ {'type':'MenuItem', 'name':'menuHelpAbout', 'label':'&About ...', 'command':'doHelpAbout', }, ] }, ] }, 'strings': { u'testString':u'This is a test string', }, 'components': [ {'type':'Button', 'name':'mainScriptEditBtn', 'position':(375, 120), 'size':(52, 25), 'actionBindings':{}, 'font':{'faceName': u'Sans', 'size': 8}, 'label':'Edit...', 'toolTip':'Edit the main script', }, {'type':'StaticText', 'name':'versionString', 'position':(560, 125), 'actionBindings':{}, 'text':'n/a', }, {'type':'ImageButton', 'name':'newBtn', 'position':(5, 5), 'size':(38, 38), 'actionBindings':{}, 'backgroundColor':(255, 255, 255), 'border':'3d', 'command':'newBtn', 'file':'pixmaps/new.png', 'toolTip':'Create a new project', 'userdata':'frozen', }, {'type':'ImageButton', 'name':'openBtn', 'position':(40, 5), 'size':(38, 38), 'actionBindings':{}, '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':(38, 38), 'actionBindings':{}, 'backgroundColor':(255, 255, 255), 'border':'3d', 'command':'saveBtn', 'file':'pixmaps/save.png', 'toolTip':'Save the current project', 'userdata':'frozen', }, {'type':'ImageButton', 'name':'prefsBtn', 'position':(705, 5), 'size':(38, 38), 'actionBindings':{}, 'backgroundColor':(255, 255, 255), 'border':'3d', 'command':'prefsBtn', 'file':'pixmaps/prefs.png', 'toolTip':'standaloneBuilder preferences', 'userdata':'frozen', }, {'type':'ImageButton', 'name':'quitBtn', 'position':(750, 5), 'size':(38, 38), 'actionBindings':{}, 'backgroundColor':(255, 255, 255), 'border':'3d', 'command':'quitBtn', 'file':'pixmaps/exit.png', 'toolTip':'Quit the program', 'userdata':'frozen', }, {'type':'TextField', 'name':'projectName', 'position':(95, 60), 'size':(250, -1), 'actionBindings':{}, }, {'type':'TextField', 'name':'projectIcon', 'position':(500, 60), 'size':(250, -1), 'actionBindings':{}, }, {'type':'Button', 'name':'iconBtn', 'position':(755, 60), 'size':(25, 25), 'actionBindings':{}, 'label':'...', }, {'type':'TextField', 'name':'baseDir', 'position':(95, 90), 'size':(250, -1), 'actionBindings':{}, }, {'type':'Button', 'name':'baseDirBtn', 'position':(350, 90), 'size':(25, 25), 'actionBindings':{}, 'label':'...', }, {'type':'TextField', 'name':'projectDesc', 'position':(500, 90), 'size':(250, -1), 'actionBindings':{}, }, {'type':'TextField', 'name':'mainScript', 'position':(95, 120), 'size':(250, -1), 'actionBindings':{}, }, {'type':'Button', 'name':'mainScriptBtn', 'position':(350, 120), 'size':(25, 25), 'actionBindings':{}, 'label':'...', }, {'type':'StaticBox', 'name':'StaticBox2', 'position':(5, 165), 'size':(380, 160), 'actionBindings':{}, 'label':'Script files:', }, {'type':'List', 'name':'scriptList', 'position':(15, 180), 'size':(360, 100), 'actionBindings':{}, 'items':[], }, {'type':'Button', 'name':'scriptAddBtn', 'position':(15, 285), 'actionBindings':{}, 'label':'Add...', }, {'type':'Button', 'name':'scriptDelBtn', 'position':(100, 285), 'actionBindings':{}, 'label':'Remove', }, {'type':'Button', 'name':'scriptEditBtn', 'position':(185, 285), 'actionBindings':{}, 'label':'Edit...', }, {'type':'Button', 'name':'scriptDelAllBtn', 'position':(295, 285), 'actionBindings':{}, 'label':'Clear all', }, {'type':'StaticBox', 'name':'StaticBox3', 'position':(405, 165), 'size':(380, 160), 'actionBindings':{}, 'label':'Resource files:', }, {'type':'List', 'name':'resList', 'position':(415, 180), 'size':(360, 100), 'actionBindings':{}, 'items':[], }, {'type':'Button', 'name':'resAddBtn', 'position':(415, 285), 'actionBindings':{}, 'label':'Add..', }, {'type':'Button', 'name':'resDelBtn', 'position':(500, 285), 'actionBindings':{}, 'label':'Remove', }, {'type':'Button', 'name':'resEditBtn', 'position':(585, 285), 'actionBindings':{}, 'label':'Edit...', }, {'type':'Button', 'name':'resDelAllBtn', 'position':(695, 285), 'actionBindings':{}, 'label':'Clear all', }, {'type':'StaticBox', 'name':'StaticBox4', 'position':(5, 325), 'size':(380, 160), 'actionBindings':{}, 'label':'Pixmap files:', }, {'type':'List', 'name':'pixmapList', 'position':(15, 340), 'size':(360, 100), 'actionBindings':{}, 'items':[], }, {'type':'Button', 'name':'pixmapAddBtn', 'position':(15, 445), 'actionBindings':{}, 'label':'Add...', }, {'type':'Button', 'name':'pixmapDelBtn', 'position':(100, 445), 'actionBindings':{}, 'label':'Remove', }, {'type':'Button', 'name':'pixmapEditBtn', 'position':(185, 445), 'actionBindings':{}, 'label':'Edit...', }, {'type':'Button', 'name':'pixmapDelAllBtn', 'position':(295, 445), 'actionBindings':{}, 'label':'Clear all', }, {'type':'StaticBox', 'name':'StaticBox5', 'position':(405, 325), 'size':(380, 160), 'actionBindings':{}, 'label':'Other files:', }, {'type':'List', 'name':'otherList', 'position':(415, 340), 'size':(360, 100), 'actionBindings':{}, 'items':[], }, {'type':'Button', 'name':'docAddBtn', 'position':(415, 445), 'actionBindings':{}, 'label':'Add...', }, {'type':'Button', 'name':'docDelBtn', 'position':(500, 445), 'actionBindings':{}, 'label':'Remove', }, {'type':'Button', 'name':'docEditBtn', 'position':(585, 445), 'actionBindings':{}, 'label':'Edit...', }, {'type':'Button', 'name':'docDelAllBtn', 'position':(695, 445), 'actionBindings':{}, 'label':'Clear all', }, {'type':'Button', 'name':'propertiesBtn', 'position':(15, 490), 'size':(85, -1), 'actionBindings':{}, 'label':'Properties...', 'toolTip':'Change your projects properties', }, {'type':'Button', 'name':'changelogBtn', 'position':(100, 490), 'size':(85, -1), 'actionBindings':{}, 'command':'changeLogBtn', 'label':'Changelog...', 'toolTip':'Edit the changelog file', }, {'type':'Button', 'name':'readmeBtn', 'position':(100, 525), 'actionBindings':{}, 'label':'README...', 'toolTip':'Edit the README file', }, {'type':'Button', 'name':'specBtn', 'position':(185, 490), 'actionBindings':{}, 'label':'Spec file...', 'toolTip':'Edit the applications spec file', }, {'type':'Button', 'name':'innoBtn', 'position':(185, 525), 'size':(85, -1), 'actionBindings':{}, 'label':'Inno script...', 'toolTip':'Edit the Inno setup script for your application', }, {'type':'Button', 'name':'runBtn', 'position':(270, 490), 'actionBindings':{}, 'label':'Run...', 'toolTip':'Run the application', }, {'type':'Button', 'name':'rebuildBtn', 'position':(695, 490), 'actionBindings':{}, 'label':'Rebuild', 'toolTip':'Rebuild the standalone version of your application', 'userdata':'frozen', }, {'type':'Button', 'name':'releaseBtn', 'position':(695, 525), 'actionBindings':{}, 'label':'Release', 'toolTip':'Make a release of your finished application', 'userdata':'frozen', }, {'type':'StaticBox', 'name':'StaticBox1', 'position':(5, 45), 'size':(780, 115), 'actionBindings':{}, 'label':'Project:', }, {'type':'StaticText', 'name':'StaticText5', 'position':(15, 125), 'actionBindings':{}, 'text':'Main script', }, {'type':'StaticText', 'name':'StaticText4', 'position':(420, 95), 'actionBindings':{}, 'text':'Description', }, {'type':'StaticText', 'name':'StaticText9', 'position':(430, 65), 'actionBindings':{}, 'text':'Icon (Win)', }, {'type':'StaticText', 'name':'StaticText8', 'position':(500, 125), 'actionBindings':{}, 'text':'Version', }, {'type':'StaticText', 'name':'StaticText7', 'position':(15, 95), 'actionBindings':{}, 'text':'Directory', }, {'type':'StaticText', 'name':'StaticText6', 'position':(15, 65), 'actionBindings':{}, 'text':'Name', }, ] # end components } # end background ] # end backgrounds } } Index: standaloneBuilder.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder/standaloneBuilder.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** standaloneBuilder.py 12 May 2005 19:34:04 -0000 1.12 --- standaloneBuilder.py 9 Sep 2005 12:32:08 -0000 1.13 *************** *** 250,253 **** --- 250,261 ---- self.documentChanged = True self.updateStatusBar() + + def on_mainScriptEditBtn_mouseClick(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) + print editor + ' ' + item + os.system(editor + ' ' + item) def on_scriptAddBtn_mouseClick(self, event): *************** *** 325,329 **** def on_pixmapAddBtn_mouseClick(self, event): ! # add a resource file to the project title = 'Select pixmap file' basepath = os.path.join(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text) --- 333,337 ---- def on_pixmapAddBtn_mouseClick(self, event): ! # add a pixmap file to the project title = 'Select pixmap file' basepath = os.path.join(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text) *************** *** 1284,1288 **** self.project.set('Project', 'fixnumber', str(vstring[2])) self.project.set('Project', 'name', self.components.projectName.text) ! self.project.set('Project', 'basepath', self.getRelativePath(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text)) self.project.set('Project', 'projectdesc', self.components.projectDesc.text) self.project.set('Project', 'mainscript', self.pathSplit(self.components.mainScript.text)) --- 1292,1296 ---- self.project.set('Project', 'fixnumber', str(vstring[2])) self.project.set('Project', 'name', self.components.projectName.text) ! self.project.set('Project', 'basepath', self.getRelativePath(self.cfg.get('ConfigData', 'projects'), self.pathSplit(self.components.baseDir.text))) self.project.set('Project', 'projectdesc', self.components.projectDesc.text) self.project.set('Project', 'mainscript', self.pathSplit(self.components.mainScript.text)) |