Update of /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19502 Modified Files: changelog.txt customDialogs.py helpAbout.rsrc.py outputWindow.gtk.rsrc.py prefsDialog.gtk.rsrc.py propertiesDialog.gtk.rsrc.py propertiesDialog.rsrc.py readme.txt standaloneBuilder.gtk.rsrc.py standaloneBuilder.py standaloneBuilder.rsrc.py Added Files: buildDialog.rsrc.py helpAbout.gtk.rsrc.py helpManual.rsrc.py Log Message: Fixes and enhancements for standaloneBuilder v0.3.1, see changelog file for full details Index: standaloneBuilder.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder/standaloneBuilder.rsrc.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** standaloneBuilder.rsrc.py 3 Nov 2006 14:56:25 -0000 1.8 --- standaloneBuilder.rsrc.py 24 Oct 2007 00:51:18 -0000 1.9 *************** *** 1,586 **** ! {'application':{'type':'Application', ! 'name':'Template', ! 'backgrounds': [ ! {'type':'Background', ! 'name':'standaloneBuilder', ! 'title':u'PythonCard standaloneBuilder', ! 'size':(800, 590), ! 'statusBar':1, ! ! 'menubar': {'type':'MenuBar', [...1148 lines suppressed...] ! }, ! ! {'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:', ! }, ! ! ] # end components ! } # end background ! ] # end backgrounds ! } } Index: propertiesDialog.gtk.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder/propertiesDialog.gtk.rsrc.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** propertiesDialog.gtk.rsrc.py 12 May 2006 16:26:20 -0000 1.1 --- propertiesDialog.gtk.rsrc.py 24 Oct 2007 00:51:18 -0000 1.2 *************** *** 3,147 **** 'title':'Project properties', 'position':(468, 29), ! 'size':(450, 385), 'components': [ {'type':'TextField', 'name':'buildPath', ! 'position':(130, 5), 'size':(265, -1), - 'actionBindings':{}, }, {'type':'Button', 'name':'buildPathBtn', ! 'position':(400, 5), 'size':(25, 22), ! 'actionBindings':{}, ! 'label':'...', }, {'type':'TextField', 'name':'distPath', ! 'position':(130, 40), 'size':(265, -1), - 'actionBindings':{}, }, {'type':'Button', 'name':'distPathBtn', ! 'position':(400, 40), 'size':(25, 22), ! 'actionBindings':{}, ! 'label':'...', }, {'type':'TextField', 'name':'pixmapsPath', ! 'position':(130, 75), 'size':(265, -1), - 'actionBindings':{}, }, {'type':'Button', 'name':'pixmapsPathBtn', ! 'position':(400, 75), 'size':(25, 22), ! 'actionBindings':{}, ! 'label':'...', }, {'type':'TextField', 'name':'tarballPath', ! 'position':(130, 110), 'size':(265, -1), - 'actionBindings':{}, }, {'type':'Button', 'name':'tarballsPathBtn', ! 'position':(400, 110), 'size':(25, 22), ! 'actionBindings':{}, ! 'label':'...', }, {'type':'TextField', 'name':'appPublisher', ! 'position':(130, 145), 'size':(265, -1), - 'actionBindings':{}, }, {'type':'TextField', 'name':'appURL', ! 'position':(130, 180), 'size':(265, -1), - 'actionBindings':{}, }, {'type':'TextField', 'name':'appLicence', ! 'position':(130, 215), 'size':(265, -1), - 'actionBindings':{}, }, {'type':'Button', 'name':'appLicenceBtn', ! 'position':(400, 215), 'size':(25, 22), ! 'actionBindings':{}, ! 'label':'...', }, {'type':'Choice', 'name':'buildType', ! 'position':(125, 250), 'size':(140, -1), - 'actionBindings':{}, 'items':[u'Single file', u'Single directory'], ! 'stringSelection':'Single directory', }, {'type':'CheckBox', 'name':'asciiChk', ! 'position':(120, 285), ! 'actionBindings':{}, ! 'label':'No encoding', }, {'type':'CheckBox', 'name':'consoleChk', ! 'position':(250, 285), ! 'actionBindings':{}, ! 'label':'Console', }, {'type':'CheckBox', 'name':'compressChk', ! 'position':(345, 285), ! 'actionBindings':{}, ! 'label':'Compress', }, {'type':'CheckBox', 'name':'striplibsChk', ! 'position':(120, 305), ! 'actionBindings':{}, ! 'label':'Strip libs (Linux)', }, {'type':'CheckBox', 'name':'optimizeChk', ! 'position':(250, 305), ! 'actionBindings':{}, ! 'label':'Optimize', }, {'type':'CheckBox', 'name':'debugChk', ! 'position':(345, 305), ! 'actionBindings':{}, ! 'label':'Debug', }, --- 3,135 ---- 'title':'Project properties', 'position':(468, 29), ! 'size':(470, 405), 'components': [ + {'type':'CheckBox', + 'name':'runInno', + 'position':(150, 335), + 'size':(279, -1), + 'label':u'Run Inno Setup automatically (Windows)', + }, + {'type':'TextField', 'name':'buildPath', ! 'position':(155, 15), 'size':(265, -1), }, {'type':'Button', 'name':'buildPathBtn', ! 'position':(425, 15), 'size':(25, 22), ! 'label':u'...', }, {'type':'TextField', 'name':'distPath', ! 'position':(155, 50), 'size':(265, -1), }, {'type':'Button', 'name':'distPathBtn', ! 'position':(425, 50), 'size':(25, 22), ! 'label':u'...', }, {'type':'TextField', 'name':'pixmapsPath', ! 'position':(155, 85), 'size':(265, -1), }, {'type':'Button', 'name':'pixmapsPathBtn', ! 'position':(425, 85), 'size':(25, 22), ! 'label':u'...', }, {'type':'TextField', 'name':'tarballPath', ! 'position':(155, 120), 'size':(265, -1), }, {'type':'Button', 'name':'tarballsPathBtn', ! 'position':(425, 120), 'size':(25, 22), ! 'label':u'...', }, {'type':'TextField', 'name':'appPublisher', ! 'position':(155, 155), 'size':(265, -1), }, {'type':'TextField', 'name':'appURL', ! 'position':(155, 190), 'size':(265, -1), }, {'type':'TextField', 'name':'appLicence', ! 'position':(155, 225), 'size':(265, -1), }, {'type':'Button', 'name':'appLicenceBtn', ! 'position':(425, 225), 'size':(25, 22), ! 'label':u'...', }, {'type':'Choice', 'name':'buildType', ! 'position':(155, 260), 'size':(140, -1), 'items':[u'Single file', u'Single directory'], ! 'stringSelection':u'Single directory', }, {'type':'CheckBox', 'name':'asciiChk', ! 'position':(150, 295), ! 'label':u'No encoding', }, {'type':'CheckBox', 'name':'consoleChk', ! 'position':(280, 295), ! 'label':u'Console', }, {'type':'CheckBox', 'name':'compressChk', ! 'position':(375, 295), ! 'label':u'Compress', }, {'type':'CheckBox', 'name':'striplibsChk', ! 'position':(150, 315), ! 'label':u'Strip libs (Linux)', }, {'type':'CheckBox', 'name':'optimizeChk', ! 'position':(280, 315), ! 'label':u'Optimize', }, {'type':'CheckBox', 'name':'debugChk', ! 'position':(375, 315), ! 'label':u'Debug', }, *************** *** 149,155 **** 'id':5100, 'name':'btnOK', ! 'position':(270, 340), ! 'actionBindings':{}, ! 'label':'OK', }, --- 137,142 ---- 'id':5100, 'name':'btnOK', ! 'position':(285, 370), ! 'label':u'OK', }, *************** *** 157,226 **** 'id':5101, 'name':'btnCancel', ! 'position':(355, 340), ! 'actionBindings':{}, ! 'label':'Cancel', }, {'type':'StaticText', 'name':'StaticText9', ! 'position':(25, 220), ! 'actionBindings':{}, ! 'text':'App licence file', }, {'type':'StaticText', 'name':'StaticText8', ! 'position':(20, 185), ! 'actionBindings':{}, ! 'text':'Application URL', }, {'type':'StaticText', 'name':'StaticText7', ! 'position':(30, 150), ! 'actionBindings':{}, ! 'text':'App publisher', }, {'type':'StaticText', 'name':'StaticText6', ! 'position':(30, 285), ! 'actionBindings':{}, ! 'text':'Build options', }, {'type':'StaticText', 'name':'StaticText5', ! 'position':(15, 255), ! 'actionBindings':{}, ! 'text':'Deployment type', }, {'type':'StaticText', 'name':'StaticText4', ! 'position':(15, 115), ! 'actionBindings':{}, ! 'text':'Tarballs directory', }, {'type':'StaticText', 'name':'StaticText3', ! 'position':(15, 80), ! 'actionBindings':{}, ! 'text':'Pixmaps directory', }, {'type':'StaticText', 'name':'StaticText2', ! 'position':(5, 45), ! 'actionBindings':{}, ! 'text':'Distribution directory', }, {'type':'StaticText', 'name':'StaticText1', ! 'position':(30, 10), ! 'actionBindings':{}, ! 'text':'Build directory', }, --- 144,204 ---- 'id':5101, 'name':'btnCancel', ! 'position':(375, 370), ! 'label':u'Cancel', }, {'type':'StaticText', 'name':'StaticText9', ! 'position':(50, 230), ! 'text':u'App licence file', }, {'type':'StaticText', 'name':'StaticText8', ! 'position':(45, 195), ! 'text':u'Application URL', }, {'type':'StaticText', 'name':'StaticText7', ! 'position':(55, 160), ! 'text':u'App publisher', }, {'type':'StaticText', 'name':'StaticText6', ! 'position':(60, 300), ! 'text':u'Build options', }, {'type':'StaticText', 'name':'StaticText5', ! 'position':(35, 265), ! 'text':u'Deployment type', }, {'type':'StaticText', 'name':'StaticText4', ! 'position':(35, 125), ! 'text':u'Tarballs directory', }, {'type':'StaticText', 'name':'StaticText3', ! 'position':(25, 90), ! 'size':(118, -1), ! 'text':u'Pixmaps directory', }, {'type':'StaticText', 'name':'StaticText2', ! 'position':(10, 55), ! 'text':u'Distribution directory', }, {'type':'StaticText', 'name':'StaticText1', ! 'position':(50, 20), ! 'text':u'Build directory', }, --- NEW FILE: helpAbout.gtk.rsrc.py --- {'type':'CustomDialog', 'name':'dlgAbout', 'title':'About standaloneBuilder:', 'position':(129, 133), 'size':(520, 360), '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':(500, 235), }, {'type':'Button', 'id':5100, 'name':'btnOK', 'position':(425, 310), 'label':u'Close', }, ] # end components } # end CustomDialog --- NEW FILE: helpManual.rsrc.py --- {'type':'CustomDialog', 'name':'standaloneBuilder Manual', 'title':'PythonCard standaloneBuilder Tool - Online Manual', 'position':(129, 133), 'size':(1000, 700), 'components': [ {'type':'HtmlWindow', 'name':'HtmlWindow', 'position':(4, 7), 'size':(983, 641), 'backgroundColor':(255, 255, 255), }, ] # end components } # end CustomDialog Index: outputWindow.gtk.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder/outputWindow.gtk.rsrc.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** outputWindow.gtk.rsrc.py 12 May 2006 16:26:20 -0000 1.1 --- outputWindow.gtk.rsrc.py 24 Oct 2007 00:51:18 -0000 1.2 *************** *** 10,18 **** 'components': [ {'type':'TextArea', 'name':'importError', 'position':(10, 10), 'size':(375, 205), - 'actionBindings':{}, 'editable':False, 'enabled':False, --- 10,68 ---- 'components': [ + {'type':'StaticText', + 'name':'txt8b', + 'position':(200, 60), + 'enabled':False, + 'font':{'style': 'bold', 'faceName': u'Sans', 'family': 'sansSerif', 'size': 10}, + 'text':u'Done', + 'visible':False, + }, + + {'type':'StaticText', + 'name':'txt8a', + 'position':(10, 60), + 'enabled':False, + 'text':u'Creating tarball:', + 'visible':False, + }, + + {'type':'StaticText', + 'name':'txt7b', + 'position':(200, 35), + 'enabled':False, + 'font':{'style': 'bold', 'faceName': u'Sans', 'family': 'sansSerif', 'size': 10}, + 'text':u'Done', + 'visible':False, + }, + + {'type':'StaticText', + 'name':'txt7a', + 'position':(10, 35), + 'enabled':False, + 'text':u'Creating manifest:', + 'visible':False, + }, + + {'type':'StaticText', + 'name':'txt6b', + 'position':(200, 10), + 'enabled':False, + 'font':{'style': 'bold', 'faceName': u'Sans', 'family': 'sansSerif', 'size': 10}, + 'text':u'Done', + 'visible':False, + }, + + {'type':'StaticText', + 'name':'txt6a', + 'position':(10, 10), + 'enabled':False, + 'text':u'Creating temp directories:', + 'visible':False, + }, + {'type':'TextArea', 'name':'importError', 'position':(10, 10), 'size':(375, 205), 'editable':False, 'enabled':False, *************** *** 22,29 **** {'type':'Button', 'name':'clipBoardBtn', ! 'position':(95, 225), ! 'actionBindings':{}, ! 'label':'Clipboard', ! 'toolTip':'Click here to copy the PythonCard component imports line to the Windows clipboard', }, --- 72,78 ---- {'type':'Button', 'name':'clipBoardBtn', ! 'position':(100, 225), ! 'label':u'Clipboard', ! 'toolTip':u'Click here to copy the PythonCard component imports line to the Windows clipboard', }, *************** *** 31,36 **** 'name':'closeBtn', 'position':(10, 225), ! 'actionBindings':{}, ! 'label':'Close', }, --- 80,84 ---- 'name':'closeBtn', 'position':(10, 225), ! 'label':u'Close', }, *************** *** 38,43 **** 'name':'txt5', 'position':(10, 90), ! 'actionBindings':{}, ! 'text':'Returned messages:', }, --- 86,91 ---- 'name':'txt5', 'position':(10, 90), ! 'size':(132, -1), ! 'text':u'Returned messages:', }, *************** *** 46,50 **** 'position':(10, 105), 'size':(375, 110), - 'actionBindings':{}, }, --- 94,97 ---- *************** *** 52,57 **** 'name':'txt4c', 'position':(145, 70), ! 'actionBindings':{}, ! 'text':'please wait...', 'visible':False, }, --- 99,103 ---- 'name':'txt4c', 'position':(145, 70), ! 'text':u'please wait...', 'visible':False, }, *************** *** 60,66 **** 'name':'txt4b', 'position':(145, 70), - 'actionBindings':{}, 'font':{'style': 'bold', 'faceName': 'Verdana', 'family': 'sansSerif', 'size': 8}, ! 'text':'Done', 'visible':False, }, --- 106,111 ---- 'name':'txt4b', 'position':(145, 70), 'font':{'style': 'bold', 'faceName': 'Verdana', 'family': 'sansSerif', 'size': 8}, ! 'text':u'Done', 'visible':False, }, *************** *** 69,74 **** 'name':'txt4a', 'position':(10, 70), ! 'actionBindings':{}, ! 'text':'Rebuilding distributable:', 'visible':False, }, --- 114,118 ---- 'name':'txt4a', 'position':(10, 70), ! 'text':u'Rebuilding distributable:', 'visible':False, }, *************** *** 77,82 **** 'name':'txt3c', 'position':(145, 50), ! 'actionBindings':{}, ! 'text':'please wait...', 'visible':False, }, --- 121,125 ---- 'name':'txt3c', 'position':(145, 50), ! 'text':u'please wait...', 'visible':False, }, *************** *** 85,91 **** 'name':'txt3b', 'position':(145, 50), - 'actionBindings':{}, 'font':{'style': 'bold', 'faceName': 'Verdana', 'family': 'sansSerif', 'size': 8}, ! 'text':'Done', 'visible':False, }, --- 128,133 ---- 'name':'txt3b', 'position':(145, 50), 'font':{'style': 'bold', 'faceName': 'Verdana', 'family': 'sansSerif', 'size': 8}, ! 'text':u'Done', 'visible':False, }, *************** *** 94,99 **** 'name':'txt3a', 'position':(10, 50), ! 'actionBindings':{}, ! 'text':'Rebuilding application:', 'visible':False, }, --- 136,140 ---- 'name':'txt3a', 'position':(10, 50), ! 'text':u'Rebuilding application:', 'visible':False, }, *************** *** 102,108 **** 'name':'txt2b', 'position':(145, 30), - 'actionBindings':{}, 'font':{'style': 'bold', 'faceName': 'Verdana', 'family': 'sansSerif', 'size': 8}, ! 'text':'Done', 'visible':False, }, --- 143,148 ---- 'name':'txt2b', 'position':(145, 30), 'font':{'style': 'bold', 'faceName': 'Verdana', 'family': 'sansSerif', 'size': 8}, ! 'text':u'Done', 'visible':False, }, *************** *** 111,116 **** 'name':'txt2a', 'position':(10, 30), ! 'actionBindings':{}, ! 'text':'Rebuilding versioninfo file:', 'visible':False, }, --- 151,155 ---- 'name':'txt2a', 'position':(10, 30), ! 'text':u'Rebuilding versioninfo file:', 'visible':False, }, *************** *** 119,125 **** 'name':'txt1b', 'position':(145, 10), - 'actionBindings':{}, 'font':{'style': 'bold', 'faceName': 'Verdana', 'family': 'sansSerif', 'size': 8}, ! 'text':'Done', 'visible':False, }, --- 158,163 ---- 'name':'txt1b', 'position':(145, 10), 'font':{'style': 'bold', 'faceName': 'Verdana', 'family': 'sansSerif', 'size': 8}, ! 'text':u'Done', 'visible':False, }, *************** *** 128,133 **** 'name':'txt1a', 'position':(10, 10), ! 'actionBindings':{}, ! 'text':'Rebuilding spec file:', 'visible':False, }, --- 166,170 ---- 'name':'txt1a', 'position':(10, 10), ! 'text':u'Rebuilding spec file:', 'visible':False, }, --- NEW FILE: buildDialog.rsrc.py --- {'type':'CustomDialog', 'name':'buildType', 'title':'Select Linux build type', 'position':(169, 114), 'size':(260, 145), 'components': [ {'type':'RadioGroup', 'name':'buildType', 'position':(95, 15), 'size':(158, 80), 'items':['Tarball only', 'Full binary'], 'label':u'Select build type', 'layout':'vertical', 'max':1, 'stringSelection':u'Tarball only', }, {'type':'Image', 'name':'Image1', 'position':(0, 5), 'size':(80, 96), 'file':u'pixmaps/tuxlogo.png', }, {'type':'Button', 'id':5100, 'name':'btnOK', 'position':(9, 110), 'default':1, 'label':u'OK', }, {'type':'Button', 'id':5101, 'name':'btnCancel', 'position':(100, 110), 'label':u'Cancel', }, ] # end components } # end CustomDialog Index: customDialogs.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder/customDialogs.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** customDialogs.py 3 Nov 2006 14:56:25 -0000 1.7 --- customDialogs.py 24 Oct 2007 00:51:18 -0000 1.8 *************** *** 102,105 **** --- 102,124 ---- arg.append(os.path.join(dirname,item)) + class buildType(CustomDialog): + """Select the build type required on Linux platforms""" + + def __init__(self, aBg): + path = os.path.join(aBg.application.applicationDirectory, 'buildDialog') + aDialogRsrc = resource.ResourceFile(model.internationalResourceName(path)).getResource() + CustomDialog.__init__(self, aBg, aDialogRsrc) + self.parent = aBg + + def getType(self): + bType = self.components.buildType.stringSelection + return bType + + def on_btnOK_mouseClick(self, event): + event.Skip() + + def on_btnCancel_mouseClick(self, event): + event.Skip() + class versionDialog(CustomDialog): """Displays a dialog for the next release version number""" *************** *** 128,131 **** --- 147,160 ---- def on_btnCancel_mouseClick(self, event): event.Skip() + + class helpManual(CustomDialog): + """Displays an HTML based about box""" + + def __init__(self, aBg, pageName=None): + path = os.path.join(aBg.application.applicationDirectory, 'helpManual') + aDialogRsrc = resource.ResourceFile(model.internationalResourceName(path)).getResource() + CustomDialog.__init__(self, aBg, aDialogRsrc) + self.parent = aBg + self.components.HtmlWindow.text = pageName class HTMLHelp(CustomDialog): *************** *** 137,141 **** CustomDialog.__init__(self, aBg, aDialogRsrc) self.parent = aBg ! self.components.notebook.SetSize((660,270)) bgval = self.GetBackgroundColour() --- 166,177 ---- CustomDialog.__init__(self, aBg, aDialogRsrc) self.parent = aBg ! self.components.notebook.SetSize((505,240)) ! ! if sys.platform.startswith('win32'): ! fontSize = 2 ! else: ! fontSize = 2 ! ! if links is None: links = ['doc/about.html', 'doc/author.html', 'doc/license.html'] bgval = self.GetBackgroundColour() *************** *** 145,151 **** 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) --- 181,188 ---- aboutPanel = wx.Panel(self.components.notebook, -1) aboutPanelHtmlWindow = wx.html.HtmlWindow(aboutPanel, -1) ! aboutPanelHtmlWindow.SetSize((495,210)) aboutPanelHtmlWindow.SetPosition((1,1)) ! pText = open(links[0]).read() % locals() ! aboutPanelHtmlWindow.SetPage(pText) aboutPanelHtmlWindow.SetBackgroundColour(bgval) self.components.notebook.AddPage(aboutPanel, 'About', True) *************** *** 153,159 **** 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) --- 190,197 ---- authorPanel = wx.Panel(self.components.notebook, -1) authorPanelHtmlWindow = wx.html.HtmlWindow(authorPanel, -1) ! authorPanelHtmlWindow.SetSize((495,210)) authorPanelHtmlWindow.SetPosition((1,1)) ! pText = open(links[1]).read() % locals() ! authorPanelHtmlWindow.SetPage(pText) authorPanelHtmlWindow.SetBackgroundColour(bgval) self.components.notebook.AddPage(authorPanel, 'Author', False) *************** *** 161,167 **** 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) --- 199,206 ---- licensePanel = wx.Panel(self.components.notebook, -1) licensePanelHtmlWindow = wx.html.HtmlWindow(licensePanel, -1) ! licensePanelHtmlWindow.SetSize((495,210)) licensePanelHtmlWindow.SetPosition((1,1)) ! pText = open(links[2]).read() % locals() ! licensePanelHtmlWindow.SetPage(pText) licensePanelHtmlWindow.SetBackgroundColour(bgval) self.components.notebook.AddPage(licensePanel, 'License', False) *************** *** 531,534 **** --- 570,574 ---- #except: # pass + self.components.runInno.checked = self.parent.project.getboolean('Project', 'autoRunInnoSetup') def on_buildPathBtn_mouseClick(self, event): *************** *** 611,614 **** --- 651,656 ---- else: self.parent.project.set('Project', 'onedir', '0') + self.parent.project.set('Project', 'autoRunInnoSetup', str(int(self.components.runInno.checked))) + if self.parent.project != old: self.parent.documentChanged = True event.Skip() Index: standaloneBuilder.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/standaloneBuilder/standaloneBuilder.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** standaloneBuilder.py 28 Jul 2007 23:12:00 -0000 1.17 --- standaloneBuilder.py 24 Oct 2007 00:51:18 -0000 1.18 *************** *** 35,44 **** import time import pprint # pythoncard imports import wx - # KEA 2007-07-28 - # unused... - #from wxPython.html import wxHtmlEasyPrinting from PythonCard import dialog, model, util from PythonCard.templates.dialogs import runOptionsDialog --- 35,42 ---- import time import pprint + import re # pythoncard imports import wx from PythonCard import dialog, model, util from PythonCard.templates.dialogs import runOptionsDialog *************** *** 48,63 **** import outputWindow ! from PythonCard.components import button, checkbox, choice, image, imagebutton, list, notebook, spinner, staticbox, statictext, textarea, textfield - # KEA 2007-07-28 - # updated for wx package organization # temporary hack until we get it working properly under MacOS if wx.Platform == '__WXMAC__': ! app = wx.PySimpleApp() title = 'Sorry!' ! frame = wx.Frame(None, -1, title) message = 'standaloneBuilder currently does not work properly under MacOS. This shortcoming will ' message += 'be fixed in a future release.\n\nClick OK to exit.' ! dialog = wx.MessageDialog(frame, wrap_string(message, 52), title, wx.ICON_EXCLAMATION | wx.OK) dialog.ShowModal() dialog.Destroy() --- 46,60 ---- import outputWindow ! from PythonCard.components import button, checkbox, choice, htmlwindow, image, imagebutton, list, notebook, radiogroup, spinner, staticbox, statictext, textarea, textfield # temporary hack until we get it working properly under MacOS if wx.Platform == '__WXMAC__': ! from wxPython.wx import wxPySimpleApp, wxFrame, wxMessageDialog, wxICON_EXCLAMATION, wxOK, wxVERSION_STRING ! app = wxPySimpleApp() title = 'Sorry!' ! frame = wxFrame(None, -1, title) message = 'standaloneBuilder currently does not work properly under MacOS. This shortcoming will ' message += 'be fixed in a future release.\n\nClick OK to exit.' ! dialog = wxMessageDialog(frame, wrap_string(message, 52), title, wxICON_EXCLAMATION | wxOK) dialog.ShowModal() dialog.Destroy() *************** *** 81,84 **** --- 78,83 ---- else: import commands + + debug = False # imports required by mcmillan installer *************** *** 143,150 **** def on_close(self, event): ! if self.doExit(): event.Skip() def on_menuFileExit_command(self, event): self.close() ########################################################################## --- 142,154 ---- def on_close(self, event): ! if self.doExit(): ! if debug: print 'on_close: calling event.Skip()' ! event.Skip() ! if debug: print 'on_close: back from event.Skip()' def on_menuFileExit_command(self, event): + if debug: print 'menuFileExit' self.close() + if debug: print 'menuFileExit done' ########################################################################## *************** *** 156,163 **** if self.documentPath is None: dir = os.path.join(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text) ! if sys.platform.startswith('win'): ! filename = '%s.pmr' % self.components.projectName.text ! else: ! filename = 'Untitled.pmr' else: dir = os.path.dirname(self.documentPath) --- 160,164 ---- if self.documentPath is None: dir = os.path.join(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text) ! filename = '%s.pmr' % self.components.projectName.text else: dir = os.path.dirname(self.documentPath) *************** *** 273,280 **** def on_menuHelpManual_command(self, event): ! title = 'Sorry!' ! txt = 'Online manual functionality will be implemented in a future ' ! txt += 'version of standaloneBuilder.' ! bull = dialog.alertDialog(self, txt, title) def on_menuHelpAbout_command(self, event): --- 274,285 ---- def on_menuHelpManual_command(self, event): ! #title = 'Sorry!' ! #txt = 'Online manual functionality will be implemented in a future ' ! #txt += 'version of standaloneBuilder.' ! #bull = dialog.alertDialog(self, txt, title) ! manual = 'doc/standaloneBuilder.html' ! dlg = helpManual(self, manual) ! dlg.showModal() ! dlg.destroy() def on_menuHelpAbout_command(self, event): *************** *** 333,340 **** 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 --- 338,349 ---- title = 'Select icon' wildcard = "Icon files (*.ico)|*.ico;*.ICO|All files (*.*)|*.*" + basepath = self.components.baseDir.text + if not os.path.isabs(basepath): + basepath = os.path.join(self.cfg.get('ConfigData', 'projects'), basepath) old = self.components.projectIcon.text ! result = dialog.openFileDialog(self, title, basepath, '', wildcard=wildcard) if result.accepted: ! rpath = self.getRelativePath(basepath, result.paths[0]) ! #rpath = result.paths[0] if rpath != old: self.components.projectIcon.text = rpath *************** *** 362,365 **** --- 371,376 ---- title = 'Select main script file' basepath = self.components.baseDir.text + if not os.path.isabs(basepath): + basepath = os.path.join(self.cfg.get('ConfigData', 'projects'), basepath) old = self.components.mainScript.text wildcard = "Script files (*.py)|*.py;*.PY" *************** *** 610,614 **** 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 --- 621,625 ---- result = dialog.messageDialog(self, wrap_string(txt, 60), title, wx.ICON_EXCLAMATION | wx.YES_NO | wx.YES_DEFAULT) if result.accepted: ! self.buildInnoFile() ### FIXME ### this fails unless the project has been built once already else: return *************** *** 648,653 **** # code plus associated files if sys.platform.startswith('linux') or sys.platform.startswith('freebsd'): ! self.rebuildLinux() ! return 0 impFound, impLine = self.checkImports() --- 659,669 ---- # code plus associated files if sys.platform.startswith('linux') or sys.platform.startswith('freebsd'): ! dlg = buildType(self) ! dlg.ShowModal() ! bType = dlg.getType() ! dlg.Destroy() ! if bType != 'Full binary': ! self.rebuildLinux() ! return 0 impFound, impLine = self.checkImports() *************** *** 720,725 **** # 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' --- 736,739 ---- *************** *** 751,756 **** pass ! self.recursiveDirDelete(os.path.join(basedir, 'build')) ! self.recursiveDirDelete(os.path.join(basedir, 'dist')) # window for progress marks and output messages --- 765,770 ---- pass ! if not self.recursiveDirDelete(os.path.join(basedir, 'build')): return ! if not self.recursiveDirDelete(os.path.join(basedir, 'dist')): return # window for progress marks and output messages *************** *** 798,801 **** --- 812,824 ---- self.outputWindow.Update() + # if the flag is set, run the Inno complier automatically + runInno = self.project.getboolean('Project', 'autoRunInnoSetup') + if not runInno: + # display yes/no prompt + title = 'Please confirm' + msg = 'Rebuild complete - run Inno compiler?' + result = dialog.messageDialog(self, wrap_string(msg, 60), title, wx.ICON_EXCLAMATION | wx.YES_NO | wx.YES_DEFAULT) + runInno = result.accepted + # rebuild the Inno script file self.outputWindow.components.txt4a.visible = True # rebuilding distributable *************** *** 803,813 **** self.outputWindow.Update() self.outputWindow.Refresh() ! if allokay: self.buildInnoFile() # rebuild the distributable - #self.buildDistFile() self.outputWindow.components.txt4c.visible = False self.outputWindow.components.txt4b.visible = True # done ! if allokay: self.buildInstaller() #self.outputWindow.Update() --- 826,835 ---- self.outputWindow.Update() self.outputWindow.Refresh() ! if allokay and runInno: self.buildInnoFile() # rebuild the distributable self.outputWindow.components.txt4c.visible = False self.outputWindow.components.txt4b.visible = True # done ! if allokay and runInno: self.buildInstaller() #self.outputWindow.Update() *************** *** 815,819 **** #self.outputWindow.Raise() else: ! self.outputWindow.components.txt4b.text = '*** ERROR ***' # rebuilding distributable # if the project is not frozen, increment the build number to finish --- 837,841 ---- #self.outputWindow.Raise() else: ! if not allokay: self.outputWindow.components.txt4b.text = '*** ERROR ***' # rebuilding distributable # if the project is not frozen, increment the build number to finish *************** *** 877,887 **** ############################################################################## def recursiveDirDelete(self, path=None): ! # recursively delete a sub directory ! if path is None: return ! if not os.path.isdir(path): return for root, dirs, files in os.walk(path, topdown=False): for name in files: os.unlink (os.path.join(root, name)) for name in dirs: os.rmdir(os.path.join(root, name)) ! os.rmdir(path) def checkResourceFile(self, path): --- 899,930 ---- ############################################################################## def recursiveDirDelete(self, path=None): ! # recursively delete a sub directory - I'll do a better job of the ! # error checkiing in the next release... ! ! #if path is None or not os.path.isdir(path): ! # title = 'Build error!' ! # txt = 'Internal error: invalid directory passed to recursiveDirDelete' ! # txt += ' function - name given was %s' % path ! # bull = dialog.alertDialog(self, wrap_string(txt, 60), title) ! # return False ! ! for root, dirs, files in os.walk(path, topdown=False): for name in files: os.unlink (os.path.join(root, name)) for name in dirs: os.rmdir(os.path.join(root, name)) ! ! try: ! os.rmdir(path) ! except: ! pass ! #OSError, estring: ! #if estring.startwith'[ ! #title = 'Build error!' ! #txt = 'Internal error: recursiveDirDelete failed to delete %s' % path ! #txt += '\n\nError returned was %s' % estring ! #bull = dialog.alertDialog(self, wrap_string(txt, 60), title) ! #return False ! ! return True def checkResourceFile(self, path): *************** *** 995,1005 **** return args ! 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 --- 1038,1049 ---- return args ! def getRelativePath(self, root, path, debug=False): # remove the root part of an absolute path ! root = root + os.sep ! if debug: print 'getRelativePath: root=[%s], path=[%s]' % (root, path) retPath = string.replace(path, root, '') ! #if retPath[0] == os.sep: retPath = retPath[1:] ! if debug: print 'getRelativePath: returning [%s]' % retPath ! if debug: bull = raw_input() return retPath *************** *** 1079,1096 **** def doExit(self): if self.documentChanged: save = self.saveChanges() if save == wx.ID_CANCEL: ! return 0 elif save == wx.ID_NO: ! return 1 else: if self.documentPath is None: ! return self.on_menuFileSaveAs_select(None) else: self.saveFile(self.documentPath) ! return 1 ! else: ! return 1 def saveFile(self, path): --- 1123,1144 ---- def doExit(self): + bull = True if self.documentChanged: save = self.saveChanges() if save == wx.ID_CANCEL: ! bull = False # was 0 elif save == wx.ID_NO: ! bull = True # was 1 else: if self.documentPath is None: ! bull = self.on_menuFileSaveAs_select(None) else: self.saveFile(self.documentPath) ! bull = True # was 1 ! #else: ! # return True # was 1 ! ! if debug: print 'doExit: returning [%s]' % bull ! return bull def saveFile(self, path): *************** *** 1106,1109 **** --- 1154,1158 ---- except: pass + if debug: print 'saveFile: exiting' def saveChanges(self): *************** *** 1112,1117 **** else: filename = self.documentPath ! msg = "The text in the %s file has changed.\n\nDo you want to save the changes?" % filename ! result = dialog.messageDialog(self, msg, 'textEditor', wx.ICON_EXCLAMATION | wx.YES_NO | wx.CANCEL) return result.returned --- 1161,1167 ---- else: filename = self.documentPath ! msg = "Project details have been changed.\n\nDo you want to save these changes?" ! result = dialog.messageDialog(self, msg, 'Project has changed', wx.ICON_EXCLAMATION | wx.YES_NO | wx.CANCEL) ! if debug: print 'saveChanges: returning [%s]' % result.returned return result.returned *************** *** 1155,1158 **** --- 1205,1209 ---- self.project.set('Project', 'appurl', '') self.project.set('Project', 'status', 'open') + self.project.set('Project', 'autoRunInnoSetup', '1') self.project.set('Project', 'applicence', os.path.normpath('doc/gpl.txt')) *************** *** 1177,1181 **** for comp in self.components.keys(): ! self.components[comp].enabled = 1 def delItem(self, items, selected): --- 1228,1232 ---- for comp in self.components.keys(): ! self.components[comp].enabled = True def delItem(self, items, selected): *************** *** 1216,1219 **** --- 1267,1284 ---- # build a tarball for a Linux system # create a top level directory for the stuff to go in + self.outputWindow.clearLines() + for comp in self.outputWindow.components.keys(): + self.outputWindow.components[comp].enabled = False + self.outputWindow.components[comp].visible = False + self.outputWindow.components.closeBtn.enabled = True + self.outputWindow.components.closeBtn.visible = True + self.outputWindow.components.returnedText.enabled = True + self.outputWindow.components.returnedText.visible = True + self.outputWindow.components.txt5.enabled = True + self.outputWindow.components.txt5.visible = True + self.outputWindow.Show() + self.outputWindow.components.txt6a.enabled = True # creating temporary directories + self.outputWindow.components.txt6a.visible = True + vstring = self.project.get('Project', 'majorversion') vstring += '.' + self.project.get('Project', 'minorversion') *************** *** 1229,1239 **** try: cmd = 'rm -rf %s' % tdir ! os.system(cmd) ! #os.removedirs(tdir) except: pass os.mkdir(tdir) # write everything out to a 'manifest.in' file basedir = os.path.join(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text) manifestfile = os.path.join(basedir, 'manifest.in') --- 1294,1307 ---- try: cmd = 'rm -rf %s' % tdir ! os.system(cmd) except: pass os.mkdir(tdir) + self.outputWindow.components.txt6b.enabled = True # done + self.outputWindow.components.txt6b.visible = True # write everything out to a 'manifest.in' file + self.outputWindow.components.txt7a.enabled = True # creating manifest + self.outputWindow.components.txt7a.visible = True basedir = os.path.join(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text) manifestfile = os.path.join(basedir, 'manifest.in') *************** *** 1256,1262 **** --- 1324,1334 ---- fd.close() + self.outputWindow.components.txt7b.enabled = True # done + self.outputWindow.components.txt7b.visible = True # use cpio to copy everything listed in manifest.in into the temp # directory just created + self.outputWindow.components.txt8a.enabled = True # creating tarball + self.outputWindow.components.txt8a.visible = True cmd = "cd %s; cat manifest.in|cpio -vdump %s" % (basedir, topdir) os.system(cmd) *************** *** 1270,1293 **** pass tb = os.path.join(tb, tarball) ! cmd = "cd %s; tar -zcvf %s %s > /dev/null 2>&1" % (basedir, tb, topdir) ! os.system(cmd) # remove the temporary directory when done cmd = "cd %s; rm -rf %s" % (basedir, topdir) os.system(cmd) def checkImports(self): # 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 ' basedir = os.path.join(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text) for res in self.components.resList.items: fullpath = str(os.path.join(basedir, res)) --- 1342,1386 ---- pass tb = os.path.join(tb, tarball) ! cmd = "cd %s; tar -zcvf %s %s" % (basedir, tb, topdir) ! self.outputWindow.Show() ! #os.system(cmd) ! stin, stout, sterr = os.popen3(cmd) ! stin.close() ! result = stout.readline() ! while result: ! self.outputWindow.addLine(result) ! self.outputWindow.Update() ! self.outputWindow.Refresh() ! result = stout.readline() ! stout.close() ! result = sterr.readline() ! while result: ! self.outputWindow.addLine(result) ! self.outputWindow.Update() ! self.outputWindow.Refresh() ! result = sterr.readline() ! sterr.close() # remove the temporary directory when done cmd = "cd %s; rm -rf %s" % (basedir, topdir) os.system(cmd) + self.outputWindow.components.txt8b.enabled = True # done + self.outputWindow.components.txt8b.visible = True + tbSize = self.commaSplit(str(os.stat(tb)[6])) + self.outputWindow.addLine('tarball size is %s bytes' % tbSize) + self.outputWindow.Update() + self.outputWindow.Refresh() def checkImports(self): # if we're building from a PythonCard application, check that the ! # main script includes imports of the required PythonCard components. ! # for a non-PythonCard project, i.e. a project with no defined resource ! # file, just return True imps = {} impline = 'from PythonCard.components import ' basedir = os.path.join(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text) + if len(self.components.resList.items) == 0: return (True, None) + for res in self.components.resList.items: fullpath = str(os.path.join(basedir, res)) *************** *** 1317,1321 **** line = fd.readline() while line: ! if line == impline + '\n': impFound = True break --- 1410,1414 ---- line = fd.readline() while line: ! if line == impline + '\n' or line == impline + '\r\n': impFound = True break *************** *** 1343,1351 **** # make sure we have a setup.py script in the current directory setupScript = os.path.join(basedir, 'setup.py') ! if not os.path.exists(setupScript): ! fd = open(setupScript, 'w') ! fd.write(self.setupCode) ! fd.close() specfile = os.path.join(basedir, self.components.projectName.text + '.spec') --- 1436,1446 ---- # make sure we have a setup.py script in the current directory + # it gets re-written every time, ,just in case someone decides + # to delete it... setupScript = os.path.join(basedir, 'setup.py') ! #if not os.path.exists(setupScript): ! fd = open(setupScript, 'w') ! fd.write(self.setupCode) ! fd.close() specfile = os.path.join(basedir, self.components.projectName.text + '.spec') *************** *** 1380,1387 **** # add in all the pixmap files ! pixmap = self.project.get('Project', 'pixmapspath') ! tmp = (str(pixmap), []) ! for pix in self.components.pixmapList.items: tmp[1].append(str(os.path.join(pixmap, pix))) ! data_files.append(tmp) # now process everything in the 'other files' list that lives in its --- 1475,1483 ---- # add in all the pixmap files ! if len(self.components.pixmapList.items) > 0: ! pixmap = self.project.get('Project', 'pixmapspath') ! tmp = (str(pixmap), []) ! for pix in self.components.pixmapList.items: tmp[1].append(str(os.path.join(pixmap, pix))) ! data_files.append(tmp) # now process everything in the 'other files' list that lives in its *************** *** 1427,1430 **** --- 1523,1531 ---- else: buildOpts['buildType'] = 'windows' + + # add a flag to denote that a single-file build is required + if not self.project.getboolean('Project', 'onedir'): + buildOpts['singlefile'] = 1 + pprint.pprint(buildOpts, fd) fd.close() *************** *** 1479,1484 **** spec = [] spec.append("p = '%s%s' # defines project root directory" % (basedir, os.sep)) ! spec.append("a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'),") ! spec.append(" os.path.join(HOMEPATH,'support\\useUnicode.py'),") spec.append(" p + '%s']," % self.components.mainScript.text) spec.append(" pathex=['%s'])" % self.cfg.get('ConfigData', 'installerpath')) --- 1580,1585 ---- spec = [] spec.append("p = '%s%s' # defines project root directory" % (basedir, os.sep)) ! spec.append("a = Analysis([os.path.join(HOMEPATH,'support/_mountzlib.py'),") ! spec.append(" os.path.join(HOMEPATH,'support/useUnicode.py'),") spec.append(" p + '%s']," % self.components.mainScript.text) spec.append(" pathex=['%s'])" % self.cfg.get('ConfigData', 'installerpath')) *************** *** 1571,1575 **** basedir = os.path.join(self.cfg.get('ConfigData', 'projects'), self.components.baseDir.text) versionfile = os.path.join(str(basedir), 'versioninfo.txt') - #bull = raw_input('should now have [%s]' % versionfile) fd = open(versionfile, 'w') --- 1672,1675 ---- *************** *** 1579,1582 **** --- 1679,1685 ---- def buildApplication(self): # run the pyInstaller build script and capture the output + + # a single file build with pyInstaller requires a '-D' flag to be + # added to the command line if sys.platform.startswith('win'): cmd = 'python ' + GetShortPathName(self.cfg.get('ConfigData', 'installerpath')) *************** *** 1587,1590 **** --- 1690,1694 ---- specfile = os.path.join(basedir, self.components.projectName.text + '.spec') # possible bug??? cmd += ' "' + specfile + '" -o "' + os.path.join(basedir, self.pathJoin(self.project.get('Project','buildfilespath'))) + '"' + if debug: print cmd stin, stout, sterr = os.popen3(cmd) stin.close() *************** *** 1611,1618 **** def buildInnoFile(self): ! # rebuild the Inno Setup spec file inno = [] basedir = self.components.baseDir.text innofile = self.components.projectName.text + '.iss' --- 1715,1725 ---- def buildInnoFile(self): ! # rebuild the Inno Setup spec file - this does not actually run Inno ! # setup, it just builds the spec file that Inno uses later on inno = [] basedir = self.components.baseDir.text + if not os.path.isabs(basedir): + basedir = os.path.join(self.cfg.get('ConfigData', 'projects'), basedir) innofile = self.components.projectName.text + '.iss' *************** *** 1669,1672 **** --- 1776,1782 ---- outputDir = os.path.join(basedir, self.pathJoin(self.project.get('Project', 'distfilespath'))) + if not os.path.exists(outputDir): + pass + for f in os.listdir(outputDir): fullname = os.path.join(outputDir, f) *************** *** 1893,1897 **** 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) --- 2003,2010 ---- self.project.set('Project', 'projectdesc', self.components.projectDesc.text) self.project.set('Project', 'mainscript', self.components.mainScript.text) ! if self.components.projectIcon.text != '': ! self.project.set('Project', 'iconfile', os.path.normpath(self.components.projectIcon.text)) ! else: ! self.project.set('Project', 'iconfile', '') self.project.set('Project', 'innoscript', '%s.iss' % self.components.projectName.text) self.project.set('Project', 'specfile', '%s.spec' % self.components.projectName.text) *************** *** 2148,2163 **** 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') --- 2261,2286 ---- self.components.baseDir.text = self.project.get('Project', 'winbasepath') except ConfigParser.NoOptionError: ! try: ! self.components.baseDir.text = self.project.get('Project', 'basepath') ! except ConfigParser.NoOptionError: ! self.components.baseDir.text = 'abc123' elif sys.platform.startswith('linux'): try: self.components.baseDir.text = self.project.get('Project', 'linuxbasepath') except ConfigParser.NoOptionError: ! try: ! self.components.baseDir.text = self.project.get('Project', 'basepath') ! except ConfigParser.NoOptionError: ! self.components.baseDir.text = 'abc123' else: ! try: ! self.components.baseDir.text = self.project.get('Project', 'basepath') ! except ConfigParser.NoOptionError: ! self.components.baseDir.text = 'abc123' self.components.projectDesc.text = self.project.get('Project', 'projectdesc') self.components.mainScript.text = self.project.get('Project', 'mainscript') ! self.components.projectIcon.text = os.path.normpath(self.project.get('Project', 'iconfile')) ! if self.components.projectIcon.text == '.': self.components.projectIcon.text = '' self.components.scriptList.items = self.sectionOutput('Scripts') self.components.resList.items = self.sectionOutput('ResourceFiles') *************** *** 2241,2245 **** if not os.path.isabs(basePath): basePath = os.path.join(self.cfg.get('ConfigData', 'projects'), basePath) ! if not os.path.exists(basePath): title = 'Invalid project path' --- 2364,2368 ---- if not os.path.isabs(basePath): basePath = os.path.join(self.cfg.get('ConfigData', 'projects'), basePath) ! if not os.path.exists(basePath): title = 'Invalid project path' *************** *** 2257,2260 **** --- 2380,2391 ---- pstatus = self.project.get('Project', 'status') + # default to running Inno Setup automatically if not otherwise specified + # in the project file + try: + bull = self.project.getboolean('Project', 'autoRunInnoSetup') + except ConfigParser.NoOptionError: + self.project.set('Project', 'autoRunInnoSetup', '1') + self.documentChanged = True + if pstatus == 'frozen': title = 'Frozen project' *************** *** 2327,2330 **** --- 2458,2474 ---- self.updateStatusBar() + #print self.components.scriptList.enabled + #self.Update() + #bull = raw_input('stopping for a rest... ') + + # handy little function to comma seperate thousands in a number - got this from + # ASPN web site...http://aspn.ActiveState.com/ASPN/Cookbook/Python/Recipe/146461 + def commaSplit(self, amount): + orig = amount + new = re.sub("^(-?\d+)(\d{3})", '\g<1>,\g<2>', amount) + if orig == new: + return new + else: + return... [truncated message content] |