From 6c975bbdd5e6e378a0845f155bdbad7e3ad69beb Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 6 Feb 2009 18:37:01 +0900 Subject: [PATCH] fix recording window jiggle, add debug mode to mac build scripts --- ankiqt/ui/sound.py | 2 +- mac/make.sh | 6 ++++-- mac/setup.py | 11 +++++++---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ankiqt/ui/sound.py b/ankiqt/ui/sound.py index c4acdc642..7b3a9b350 100644 --- a/ankiqt/ui/sound.py +++ b/ankiqt/ui/sound.py @@ -20,13 +20,13 @@ def getAudio(parent, string=""): but.setIcon(QIcon(":/icons/media-playback-stop.png")) #but.setIconSize(QSize(32, 32)) mb.addButton(but, QMessageBox.RejectRole) - mb.show() t = time.time() r.start() QApplication.instance().processEvents() while not mb.clickedButton(): txt =_("Recording...
Time: %0.1f") mb.setText(txt % (time.time() - t)) + mb.show() QApplication.instance().processEvents() # ensure at least a second captured saveGeom(mb, "audioRecorder") diff --git a/mac/make.sh b/mac/make.sh index adcfd7d34..3731f2db8 100755 --- a/mac/make.sh +++ b/mac/make.sh @@ -1,8 +1,10 @@ #!/bin/bash cd /Volumes/Two/anki -echo "cleaning up..." -rm -rf build dist +if [ "x$debug" = "x" ]; then + echo "cleaning up..." + rm -rf build dist +fi echo "syncing updates..." rsync -av reflex:Lib/code/libanki --exclude .git --exclude build --exclude dist --delete . rsync -av reflex:Lib/code/ankiqt --exclude .git --exclude build --exclude dist --delete . diff --git a/mac/setup.py b/mac/setup.py index efb6ad460..9c0dcf855 100644 --- a/mac/setup.py +++ b/mac/setup.py @@ -26,14 +26,16 @@ class bdist_dmg(Command): pass def run(self): - self.run_command('py2app') + self.run_command('py2app') + if 'debug' in os.environ: + return # zlib - result = os.spawnvp(os.P_WAIT, 'hdiutil', ( + result = os.spawnvp(os.P_WAIT, 'hdiutil', ( 'hdiutil create -ov -format UDZO ' + '-volname Anki -srcfolder dist ' + '-o Anki.dmg -imagekey zlib-level=9').split()) - if result is not 0: - raise Exception('dmg creation failed %d' % result) + if result is not 0: + raise Exception('dmg creation failed %d' % result) APP = ['ankiqt/ankiqtmac.py'] VERSION = appVersion @@ -56,6 +58,7 @@ PLIST = dict( OPTIONS = { 'argv_emulation': True, 'optimize': 0, + 'alias': 'debug' in os.environ, 'plist': PLIST, 'iconfile': 'ankiqt/mac/anki.icns', "includes": ["sip", "cgi", "encodings", "encodings.utf_8",