This commit is contained in:
Manuel Cortez 2015-01-12 10:02:39 -06:00
commit e831098bd2
2 changed files with 23 additions and 20 deletions

View File

@ -24,7 +24,7 @@ var StartMenuFolder
!insertmacro MUI_PAGE_STARTMENU startmenu $StartMenuFolder
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_LINK "Visit TW Blue website"
!define MUI_FINISHPAGE_LINK_LOCATION "http://twblue.com.mx"
!define MUI_FINISHPAGE_LINK_LOCATION "http://twblue.es"
!define MUI_FINISHPAGE_RUN "$INSTDIR\TWBlue.exe"
!define MUI_FINISHPAGE_RUN_PARAMETERS "-i"
!insertmacro MUI_PAGE_FINISH
@ -58,7 +58,7 @@ CreateShortCut "$DESKTOP\TW Blue.lnk" "$INSTDIR\TWBlue.exe" "-i"
!insertmacro MUI_STARTMENU_WRITE_BEGIN startmenu
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\TW Blue.lnk" "$INSTDIR\TWBlue.exe" "-i"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\TW Blue on the web.lnk" "http://twblue.com.mx"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\TW Blue on the web.lnk" "http://twblue.es"
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_END
WriteUninstaller "$INSTDIR\Uninstall.exe"

View File

@ -20,15 +20,13 @@ A twitter accessible, easy of use and cross platform application."""
#
############################################################
import sys
from StringIO import StringIO
#redirect the original stdout and stderr
#stdout=sys.stdout
#stderr=sys.stderr
# Set a StringIO object as stdout and stderr to avoid problems using the installed version.
#sys.stdout = StringIO()
#sys.stderr = StringIO()
import wx
import os
#redirect the original stdout and stderr
stdout=sys.stdout
stderr=sys.stderr
sys.stdout = open(os.path.join(os.getenv("temp"), "stdout.log"), "w")
sys.stderr = open(os.path.join(os.getenv("temp"), "stderr.log"), "w")
import wx
ssmg = None
import gui
import wxLangs
@ -44,17 +42,22 @@ import config
import output
import sound
import languageHandler
#close the memory buffers for stdout and stderr
#sys.stdout.close()
#sys.stderr.close()
#extra variables to control the temporal stdout and stderr, while the final files are opened. We understand that some errors could happen while all outputs are closed, so let's try to avoid it.
stdout_temp=sys.stdout
stderr_temp=sys.stderr
#if it's a binary version
#if hasattr(sys, 'frozen'):
# sys.stderr = open(paths.logs_path("stderr.log"), 'w')
# sys.stdout = open(paths.logs_path("stdout.log"), 'w')
#else:
# sys.stdout=stdout
# sys.stderr=stderr
if hasattr(sys, 'frozen'):
sys.stderr = open(paths.logs_path("stderr.log"), 'w')
sys.stdout = open(paths.logs_path("stdout.log"), 'w')
else:
sys.stdout=stdout
sys.stderr=stderr
#the final log files have been opened succesfully, let's close the temporal files
stdout_temp.close()
stderr_temp.close()
#finally, remove the temporal files. TW Blue doesn't need them anymore, and we will get more free space on the harddrive
os.remove(stdout_temp.name)
os.remove(stderr_temp.name)
#app = wx.App()
app = wx.App(redirect=True, useBestVisual=True, filename=paths.logs_path('tracebacks.log'))
configured = False