From dd87a06166d5b8a67c955b4c6f4574878f360a05 Mon Sep 17 00:00:00 2001
From: "Silas S. Brown" <ssb22@cam.ac.uk>
Date: Wed, 12 May 2010 14:30:32 +0000
Subject: [PATCH] Gradint update

git-svn-id: http://svn.code.sf.net/p/e-guidedog/code/ssb22/gradint@764 29193198-4895-4776-b068-10539e920549
---
 .../mac/start-gradint.app/espeak-OSX.zip      | Bin 1405940 -> 1405940 bytes
 gradint-build/src/frontend.py                 |  10 ++++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gradint-build/mac/start-gradint.app/espeak-OSX.zip b/gradint-build/mac/start-gradint.app/espeak-OSX.zip
index cf4ad11f2b30ead2529958ce631e1e494159bdbe..234b3eebe41b22c4833d1c8d508ab14306570d57 100644
GIT binary patch
delta 111
zcmezJJoL-+(1sSq7N!>F7M2#)7Pc1l7LFFqEnK1<%t^Uxrb~2i8L&qzdgTqo?fxBH
wK+FxqJV49~#C$-^55xjMEC|FxKrFo7ze7ai6<B*(k*FOrQ0w;PMWVip0AkoGO#lD@

delta 111
zcmezJJoL-+(1sSq7N!>F7M2#)7Pc1l7LFFqEnK1<%oii)PM7H5GGOP5x#<nW?fxBH
wK+FxqJV49~#C$-^55xjMEC|FxKrFo7ze7ai6<B*(k*FOrQ0w;PMWVip03pvP_5c6?

diff --git a/gradint-build/src/frontend.py b/gradint-build/src/frontend.py
index 7b8cd52..715bfc7 100644
--- a/gradint-build/src/frontend.py
+++ b/gradint-build/src/frontend.py
@@ -1346,12 +1346,14 @@ def gui_event_loop():
                 while not fileExists(programFiles+"\\Windows Media Components\\Encoder\\WMCmd.vbs"): time.sleep(1)
           else:
             if getYN("Do you really want to download and compile the LAME MP3 encoder? (this may take a while)"):
-              app.setLabel("Downloading...")
+              app.setLabel("Downloading...") ; worked=0
               while True:
-                if not system("""if which curl >/dev/null 2>/dev/null; then export Curl="curl -L"; else export Curl="wget -O -"; fi; if ! test -e lame*.tar.gz; then if ! $Curl "$($Curl "http://sourceforge.net/project/showfiles.php?group_id=290&package_id=309"|grep tar.gz|head -1|sed -e 's/.*http:/http:/' -e 's/.tar.gz.*/.tar.gz/')" > lame.tar.gz; then rm -f lame.tar.gz; exit 1; fi; fi"""): break
+                if not system("""if which curl >/dev/null 2>/dev/null; then export Curl="curl -L"; else export Curl="wget -O -"; fi; if ! test -e lame*.tar.gz; then if ! $Curl "$($Curl "http://sourceforge.net/project/showfiles.php?group_id=290&package_id=309"|grep tar.gz|head -1|sed -e 's,href="/,href="http://sourceforge.net/,' -e 's/.*http:/http:/' -e 's/.tar.gz.*/.tar.gz/')" > lame.tar.gz; then rm -f lame.tar.gz; exit 1; fi; fi"""):
+                  worked=1 ; break
                 if not getYN("Download failed.  Try again?"): break
-              app.setLabel("Compiling...")
-              if system("""tar -zxvf lame*.tar.gz && cd lame-* && if ./configure && make; then ln -s $(pwd)/frontend/lame ../lame || true; else cd .. ; rm -rf lame*; exit 1; fi"""): app.todo.alert = "Compile failed"
+              if worked:
+                app.setLabel("Compiling...")
+                if system("""tar -zxvf lame*.tar.gz && cd lame-* && if ./configure && make; then ln -s $(pwd)/frontend/lame ../lame || true; else cd .. ; rm -rf lame*; exit 1; fi"""): app.todo.alert = "Compile failed"
           app.todo.set_main_menu = 1
         elif (menu_response=="add" or menu_response=="replace") and not (app.Text1.get() and app.Text2.get()): app.todo.alert="You need to type text in both boxes before adding the word/meaning pair to "+vocabFile
         elif menu_response=="add" and hasattr(app,"vocabList") and (asUnicode(app.Text1.get()),asUnicode(app.Text2.get())) in app.vocabList:
-- 
GitLab