From 90107663fd3b23fad328ee250a2171d1d7130732 Mon Sep 17 00:00:00 2001 From: "Silas S. Brown" <ssb22@cam.ac.uk> Date: Mon, 28 Jun 2021 09:16:54 +0100 Subject: [PATCH] macOS 11.4 Tk-launch logic --- .../mac/start-gradint.app/Contents/MacOS/start-gradint | 3 ++- gradint-build/src/frontend.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gradint-build/mac/start-gradint.app/Contents/MacOS/start-gradint b/gradint-build/mac/start-gradint.app/Contents/MacOS/start-gradint index e1fe32e..34ea31e 100755 --- a/gradint-build/mac/start-gradint.app/Contents/MacOS/start-gradint +++ b/gradint-build/mac/start-gradint.app/Contents/MacOS/start-gradint @@ -1,7 +1,8 @@ #!/bin/bash export PATH="$PATH:/usr/local/bin" # in case lame etc is there export VERSIONER_PYTHON_PREFER_32_BIT=1 # for Tk patch to work in 10.6 -if test -e /usr/lib/libtk.dylib || test -e /usr/lib/tkConfig.sh || test -e /usr/local/lib/tkConfig.sh; then +export TK_SILENCE_DEPRECATION=1 # 11.4 +if test -e /usr/lib/libtk.dylib || test -e /usr/lib/tkConfig.sh || test -e /usr/local/lib/tkConfig.sh || test -e /usr/bin/tkcon; then # run using only the Tk windows: cd "$(echo $0 | sed -e 's|start-gradint.app/Contents/MacOS/start-gradint.*$||')" exec pythonw gradint.py diff --git a/gradint-build/src/frontend.py b/gradint-build/src/frontend.py index fa6e616..fa8d07f 100644 --- a/gradint-build/src/frontend.py +++ b/gradint-build/src/frontend.py @@ -1666,7 +1666,9 @@ def gui_event_loop(): if not getYN("Download failed. Try again?"): break 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" + 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"""): + if macsound: app.todo.alert = "Compile failed. Check the system has Xcode with command-line license accepted (try running gcc from the Terminal)" # might be asked to run: sudo xcodebuild -license + else: 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 checkIn((asUnicode(app.Text1.get()),asUnicode(app.Text2.get())),app.vocabList): -- GitLab