From: <ror...@us...> - 2007-07-16 12:09:59
|
Revision: 105 http://roreditor.svn.sourceforge.net/roreditor/?rev=105&view=rev Author: rorthomas Date: 2007-07-16 05:09:58 -0700 (Mon, 16 Jul 2007) Log Message: ----------- * console updater now using gui * updated installer * minor improvements to svngui.py Modified Paths: -------------- trunk/lib/ror/svngui.py trunk/setup.nsi trunk/update.py Modified: trunk/lib/ror/svngui.py =================================================================== --- trunk/lib/ror/svngui.py 2007-07-16 05:59:08 UTC (rev 104) +++ trunk/lib/ror/svngui.py 2007-07-16 12:09:58 UTC (rev 105) @@ -12,10 +12,11 @@ import wx, os, os.path class svnUpdate(): - def __init__(self): + def __init__(self, restartApp=True): self.pr = wx.ProgressDialog("Updating ...", "Updating ...", style = wx.PD_SMOOTH | wx.PD_ELAPSED_TIME | wx.PD_ESTIMATED_TIME | wx.PD_REMAINING_TIME) self.pr.Show() self.changes = 0 + self.restartApp = restartApp svn.svnupdate(self.notify) self.showfinished() self.pr.Hide() @@ -34,10 +35,16 @@ dlg.ShowModal() dlg.Destroy() elif self.changes > 2: - dlg = wx.MessageDialog(self.pr, "Update finished!\nThe Application now restarts itself!", "Info", wx.OK | wx.ICON_INFORMATION) - dlg.ShowModal() - dlg.Destroy() - self.restart() + if self.restartApp: + dlg = wx.MessageDialog(self.pr, "Update finished!\nThe Application now restarts itself!", "Info", wx.OK | wx.ICON_INFORMATION) + dlg.ShowModal() + dlg.Destroy() + self.restart() + else: + dlg = wx.MessageDialog(self.pr, "Update finished!", "Info", wx.OK | wx.ICON_INFORMATION) + dlg.ShowModal() + dlg.Destroy() + def notify(self, event_dict): self.changes += 1 Modified: trunk/setup.nsi =================================================================== --- trunk/setup.nsi 2007-07-16 05:59:08 UTC (rev 104) +++ trunk/setup.nsi 2007-07-16 12:09:58 UTC (rev 105) @@ -47,9 +47,15 @@ ; Instfiles page !insertmacro MUI_PAGE_INSTFILES ; Finish page -!define MUI_FINISHPAGE_RUN "$INSTDIR\rortoolkit.bat" -!define MUI_FINISHPAGE_RUN_PARAMETERS "" +;!define MUI_FINISHPAGE_RUN "$INSTDIR\rortoolkit.bat" +;!define MUI_FINISHPAGE_RUN_PARAMETERS "" #!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Example.file" + +!define MUI_FINISHPAGE_NOAUTOCLOSE +!define MUI_FINISHPAGE_RUN +!define MUI_FINISHPAGE_RUN_NOTCHECKED +!define MUI_FINISHPAGE_RUN_TEXT "Update and start (Can take some time)" +!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchPostInstallation" !insertmacro MUI_PAGE_FINISH ; Uninstaller pages @@ -74,7 +80,8 @@ Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" OutFile "RoRToolkitSetup.exe" -InstallDir "$PROGRAMFILES\RoRToolkit" +;InstallDir "$PROGRAMFILES\RoRToolkit" +InstallDir "c:\rortoolkit" ShowInstDetails show ShowUnInstDetails show @@ -160,7 +167,25 @@ Banner::destroy FunctionEnd +Function InstallPyParsing + InitPluginsDir + File /oname=$PLUGINSDIR\pyparsing-1.4.6.win32.exe "tools\pyparsing-1.4.6.win32.exe" + Banner::show /NOUNLOAD "Installing PyParsing Python Module ..." + ExecWait '"$PLUGINSDIR\pyparsing-1.4.6.win32.exe"' + Delete $PLUGINSDIR\pyparsing-1.4.6.win32.exe + Banner::destroy +FunctionEnd +Function InstallGraphViz + InitPluginsDir + File /oname=$PLUGINSDIR\graphviz-2.12.exe "tools\graphviz-2.12.exe" + Banner::show /NOUNLOAD "Installing Graphviz for Windows ..." + ExecWait '"$PLUGINSDIR\graphviz-2.12.exe"' + Delete $PLUGINSDIR\graphviz-2.12.exe + Banner::destroy +FunctionEnd + + Function .onInit InitPluginsDir File /oname=$PLUGINSDIR\splash.bmp "splash.bmp" @@ -174,20 +199,24 @@ Call CheckForPython SectionEnd -Section "Install DirectX" SEC02 +Section "Install Tools" SEC02 Call InstallDirectX -SectionEnd - -Section "Install PyWin32" SEC03 Call InstallPyWin32 + Call InstallPyParsing + Call InstallGraphViz SectionEnd -Section "Full Installation" SEC04 +Section "Full Installation" SEC03 SetOutPath "$INSTDIR" SetOverwrite try File "/r" "*" SectionEnd +Function "LaunchPostInstallation" + ExecWait '"$INSTDIR\update.bat"' + ExecWait '"$INSTDIR\rortoolkit.bat"' +FunctionEnd + Section -AdditionalIcons SetOutPath $INSTDIR WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" Modified: trunk/update.py =================================================================== --- trunk/update.py 2007-07-16 05:59:08 UTC (rev 104) +++ trunk/update.py 2007-07-16 12:09:58 UTC (rev 105) @@ -2,8 +2,20 @@ def main(): sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "lib")) - import ror.svn - ror.svn.run() + guiVersion = True + if guiVersion: + import wx + + MainApp = wx.PySimpleApp(0) + wx.InitAllImageHandlers() #you may or may not need this + import ror.svngui + gui = ror.svngui.svnUpdate(False) + del gui + else: + #non-gui version: + import ror.svn + ror.svn.run() + if __name__=="__main__": main() \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |