mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
mac build scripts, report lame requirement on osx, fix model config button
This commit is contained in:
parent
182c3688e6
commit
b02b2ebff7
4 changed files with 20 additions and 4 deletions
|
@ -602,7 +602,15 @@ class FactEditor(object):
|
||||||
def onRecSound(self):
|
def onRecSound(self):
|
||||||
self.initMedia()
|
self.initMedia()
|
||||||
w = self.focusedEdit()
|
w = self.focusedEdit()
|
||||||
|
try:
|
||||||
file = getAudio(self.parent)
|
file = getAudio(self.parent)
|
||||||
|
except:
|
||||||
|
if sys.platform.startswith("darwin"):
|
||||||
|
ui.utils.showInfo(_('''\
|
||||||
|
Please install <a href="http://www.thalictrum.com/software/lame-3.97.dmg.gz">lame</a>
|
||||||
|
to enable recording.'''), parent=self.parent)
|
||||||
|
return
|
||||||
|
raise
|
||||||
if file:
|
if file:
|
||||||
self._addSound(unicode(file), widget=w)
|
self._addSound(unicode(file), widget=w)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
from PyQt4.QtGui import *
|
from PyQt4.QtGui import *
|
||||||
from PyQt4.QtCore import *
|
from PyQt4.QtCore import *
|
||||||
from operator import attrgetter
|
from operator import attrgetter
|
||||||
import anki
|
import anki, sys
|
||||||
from anki import stdmodels
|
from anki import stdmodels
|
||||||
from anki.models import *
|
from anki.models import *
|
||||||
from ankiqt import ui
|
from ankiqt import ui
|
||||||
|
@ -34,6 +34,7 @@ class ModelChooser(QHBoxLayout):
|
||||||
self.models.setSizePolicy(sizePolicy)
|
self.models.setSizePolicy(sizePolicy)
|
||||||
self.addWidget(self.models)
|
self.addWidget(self.models)
|
||||||
self.edit = QPushButton()
|
self.edit = QPushButton()
|
||||||
|
if not sys.platform.startswith("darwin"):
|
||||||
self.edit.setFixedWidth(32)
|
self.edit.setFixedWidth(32)
|
||||||
self.edit.setIcon(QIcon(":/icons/configure.png"))
|
self.edit.setIcon(QIcon(":/icons/configure.png"))
|
||||||
self.edit.setShortcut(_("Shift+Alt+e"))
|
self.edit.setShortcut(_("Shift+Alt+e"))
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd /Volumes/Two/anki
|
cd /Volumes/Two/anki
|
||||||
|
echo "cleaning up..."
|
||||||
|
rm -rf build dist
|
||||||
echo "syncing updates..."
|
echo "syncing updates..."
|
||||||
rsync -av reflex:Lib/code/libanki --exclude .git --exclude build --exclude dist --delete .
|
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 .
|
rsync -av reflex:Lib/code/ankiqt --exclude .git --exclude build --exclude dist --delete .
|
||||||
|
@ -10,6 +12,9 @@ mkdir -p kakasi
|
||||||
cp -Rvf /usr/local/bin/kakasi kakasi
|
cp -Rvf /usr/local/bin/kakasi kakasi
|
||||||
cp -Rvf /usr/local/share/kakasi/kanwadict kakasi
|
cp -Rvf /usr/local/share/kakasi/kanwadict kakasi
|
||||||
cp -Rvf /usr/local/share/kakasi/itaijidict kakasi
|
cp -Rvf /usr/local/share/kakasi/itaijidict kakasi
|
||||||
|
# echo "updating audio..."
|
||||||
|
# mkdir -p audio
|
||||||
|
# cp -Rvf /usr/local/bin/lamex audio
|
||||||
echo "adding image formats..."
|
echo "adding image formats..."
|
||||||
cp -Rvf imageformats ankiqt
|
cp -Rvf imageformats ankiqt
|
||||||
echo "building..."
|
echo "building..."
|
||||||
|
|
|
@ -42,12 +42,13 @@ DATA_FILES = [
|
||||||
'libanki/anki/locale',
|
'libanki/anki/locale',
|
||||||
'ankiqt/ankiqt/locale',
|
'ankiqt/ankiqt/locale',
|
||||||
'kakasi',
|
'kakasi',
|
||||||
|
#'audio',
|
||||||
'libanki/samples',
|
'libanki/samples',
|
||||||
'ankiqt/imageformats',
|
'ankiqt/imageformats',
|
||||||
'libanki/anki/features/chinese/unihan.db',
|
'libanki/anki/features/chinese/unihan.db',
|
||||||
]
|
]
|
||||||
PLIST = dict(
|
PLIST = dict(
|
||||||
CFBundleIdentifier = 'cx.repose.anki',
|
CFBundleIdentifier = 'net.ichi2.anki',
|
||||||
CFBundleName = 'Anki',
|
CFBundleName = 'Anki',
|
||||||
CFBundleDocumentTypes = [],
|
CFBundleDocumentTypes = [],
|
||||||
CFBundleLocalizations = ['en', 'ja', 'fr', 'de']
|
CFBundleLocalizations = ['en', 'ja', 'fr', 'de']
|
||||||
|
@ -64,6 +65,7 @@ OPTIONS = {
|
||||||
'excludes': ['_gtkagg', '_tkagg', "_wxagg",
|
'excludes': ['_gtkagg', '_tkagg', "_wxagg",
|
||||||
"wx", "_wx",
|
"wx", "_wx",
|
||||||
"Tkconstants", "Tkinter", "tcl", "pygame"],
|
"Tkconstants", "Tkinter", "tcl", "pygame"],
|
||||||
|
#'frameworks': ['libmp3lame.dylib'],
|
||||||
'dylib_excludes': ['libncurses.5.dylib',
|
'dylib_excludes': ['libncurses.5.dylib',
|
||||||
'_wxagg.so',
|
'_wxagg.so',
|
||||||
'_tkagg.so',
|
'_tkagg.so',
|
||||||
|
|
Loading…
Reference in a new issue