diff --git a/ankiqtmac.py b/ankiqtmac.py deleted file mode 100644 index 81fe4048e..000000000 --- a/ankiqtmac.py +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env python -# hack because py2app barfs on a try block - -import aqt -aqt.run() diff --git a/mac/anki-logo-bg.png b/mac/anki-logo-bg.png deleted file mode 100644 index 84f165653..000000000 Binary files a/mac/anki-logo-bg.png and /dev/null differ diff --git a/mac/anki-logo-bg.svg b/mac/anki-logo-bg.svg deleted file mode 100644 index da3cba296..000000000 --- a/mac/anki-logo-bg.svg +++ /dev/null @@ -1,610 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - Anki - - - - diff --git a/mac/anki.icns b/mac/anki.icns deleted file mode 100644 index ae452c4b4..000000000 Binary files a/mac/anki.icns and /dev/null differ diff --git a/mac/dmg_ds_store b/mac/dmg_ds_store deleted file mode 100644 index 632e1a884..000000000 Binary files a/mac/dmg_ds_store and /dev/null differ diff --git a/mac/make-dmg.sh b/mac/make-dmg.sh deleted file mode 100755 index ed188c9bb..000000000 --- a/mac/make-dmg.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh - -# Makes the DMG with all the nice things already setup. -# Most of the Finder window twiddling is done by an applescript, this just does -# the DMG manipulations. - -# This script should be run with the working directory as the top level (where -# the dist folder appears) - -if [ ! -d "dist" ] -then - echo "This must be run in the same directory as 'dist'." - exit 1 -fi - -if [ -d "/Volues/Anki" ] -then - echo "You already have one Anki mounted, unmount it first!" - exit 1 -fi - -echo --- Configuring 'dist' folder... - -if [ ! -e "dist/Applications" ] -then - ln -s /Applications dist/Applications -fi - -if [ ! -d "dist/.background" ] -then - mkdir dist/.background - cp ankiqt/mac/anki-logo-bg.png dist/.background -fi - -if [ ! -f "dist/.DS_Store" ] -then - cp ankiqt/mac/dmg_ds_store dist/.DS_Store -fi - -echo --- Creating writable DMG... -hdiutil create -attach -ov -format UDRW -volname Anki -srcfolder dist -o Anki-rw.dmg - -RESULT=$? - -if [ $RESULT != 0 ] -then - echo "Creating RW DMG failed! ($RESULT)" - exit 1 -fi - -echo --- Running applescript to configure view settings... -osascript "ankiqt/mac/set-dmg-settings.scpt" - -echo --- Unmounting and converting to RO DMG... -hdiutil detach "/Volumes/Anki" -if [ -d "/Volumes/Anki" ] -then - echo "+++ Waiting for drive to detach..." - sleep 5 - hdiutil detach "/Volumes/Anki" -fi - -if [ -d "/Volumes/Anki" ] -then - echo "!!! Warning: Drive didn't detach cleanly forcing it to detach.." - sleep 5 - hdiutil detach -force "/Volumes/Anki" -fi - -echo --- Making final compressed DMG... - -hdiutil convert "Anki-rw.dmg" -ov -format UDZO -imagekey zlib-level=9 -o Anki.dmg - -RESULT=$? - -rm Anki-rw.dmg - -exit $RESULT diff --git a/mac/make-old.sh b/mac/make-old.sh deleted file mode 100755 index 77057b11d..000000000 --- a/mac/make-old.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -cd /Volumes/Two/anki -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 . -find . -name '*.pyc' -exec rm {} \; -echo "adding image formats..." -rm -rf ankiqt/imageformats -mkdir ankiqt/imageformats -cp -Rvf imageformats/libq{gif,jpeg,svg,tiff}* ankiqt/imageformats -echo "building..." -PYTHONPATH=ankiqt:libanki python ankiqt/mac/setup.py bdist_dmg - diff --git a/mac/make.sh b/mac/make.sh deleted file mode 100755 index e5d182429..000000000 --- a/mac/make.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -rsync -av --delete $c/libanki $c/ankiqt mari:anki/ -ssh mari 'cd anki && ./make.sh && scp Anki.dmg twitch:' diff --git a/mac/make_local.sh b/mac/make_local.sh deleted file mode 100755 index 0a15ad30e..000000000 --- a/mac/make_local.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -PYTHON=/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 - -rsync -av ../lib/ libanki/ -rsync -av ../qt/ ankiqt/ - -if [ "x$debug" = "x" ]; then - echo "cleaning up..." - rm -rf build dist -fi -find . -name '*.pyc' -exec rm {} \; -echo "adding image formats..." -rm -rf ankiqt/imageformats -mkdir ankiqt/imageformats -cp -Rvf /usr/local/Trolltech/Qt-4.7.1/plugins/imageformats/libq{gif,jpeg,svg,tiff}.dylib ankiqt/imageformats -#cp -Rvf /Developer/Applications/Qt/plugins/imageformats/libq{gif,jpeg,svg,tiff}* ankiqt/imageformats -echo "building..." -PYTHONPATH=ankiqt:libanki $PYTHON ankiqt/mac/setup.py bdist_dmg diff --git a/mac/set-dmg-settings.scpt b/mac/set-dmg-settings.scpt deleted file mode 100644 index 83a43e390..000000000 Binary files a/mac/set-dmg-settings.scpt and /dev/null differ diff --git a/mac/setup.py b/mac/setup.py deleted file mode 100644 index ab7770fc5..000000000 --- a/mac/setup.py +++ /dev/null @@ -1,91 +0,0 @@ -""" -Script for building Anki.app (Mac build). -Requires py2app. - -Usage: - python setup.py py2app - python setup.py bdist_dmg -""" - -from setuptools import setup, Command -import os, sys -from ankiqt import appVersion -scriptDir=os.path.split(os.path.dirname(os.path.abspath(sys.argv[0])))[0] -sys.path.append(os.path.join(scriptDir, "../libanki")) - -class bdist_dmg(Command): - - description = "create a Mac disk image (.dmg) binary distribution" - - user_options = [] - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - self.run_command('py2app') - os.system("\ -mkdir -p dist/Anki.app/Contents/Resources/include/python2.7") - os.system("\ -cp /Library/Frameworks/Python.framework/Versions/2.7/include/\ -python2.7/pyconfig.h dist/Anki.app/Contents/Resources/include/\ -python2.7/pyconfig.h") - os.system("\ -chmod a+x dist/Anki.app/Contents/Resources/audio/*") - if 'debug' in os.environ: - return - # make the dmg with the shell script - result = os.system('ankiqt/mac/make-dmg.sh') - if result is not 0: - raise Exception('dmg creation failed %d' % result) - -APP = ['ankiqt/ankiqtmac.py'] -VERSION = appVersion -DATA_FILES = [ -# 'ankiqt', - 'libanki/anki/locale', - 'ankiqt/ankiqt/locale', - 'audio', - 'ankiqt/imageformats', - ] -PLIST = dict( - CFBundleIdentifier = 'net.ichi2.anki', - CFBundleName = 'Anki', - CFBundleDocumentTypes=[dict(CFBundleTypeExtensions=["anki"], - CFBundleTypeName="Anki Deck", - CFBundleTypeRole="Editor", - CFBundleTypeIconFile="anki.icns")], - CFBundleLocalizations = ['en'], - ) -OPTIONS = { - 'argv_emulation': False, - 'optimize': 0, - 'alias': 'debug' in os.environ and os.environ['debug'] == "2", - 'plist': PLIST, - 'iconfile': 'ankiqt/mac/anki.icns', - "includes": ["sip", "cgi", "encodings", "encodings.utf_8", - "encodings.shift_jis", "_multibytecodec", - "PyQt4.QtNetwork", "platform"], - 'packages': ["pysqlite2", "simplejson"], - 'excludes': ['_gtkagg', '_tkagg', "_wxagg", - "wx", "_wx", - "Tkconstants", "Tkinter", "tcl", "pygame"], - #'frameworks': ['libmp3lame.dylib'], - 'dylib_excludes': ['libncurses.5.dylib', - '_wxagg.so', - '_tkagg.so', - '_gtkagg.so', - 'wx.so'], -} - -setup( - app = APP, - version = VERSION, - data_files = DATA_FILES, - options = {'py2app': OPTIONS}, - setup_requires = ['py2app'], - cmdclass = {'bdist_dmg': bdist_dmg}, -) diff --git a/mac/test-old.sh b/mac/test-old.sh deleted file mode 100755 index 151f9d2b6..000000000 --- a/mac/test-old.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -cd /Volumes/Two/anki -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 . -./ankiqt/anki diff --git a/mac/test.sh b/mac/test.sh deleted file mode 100755 index 7ee4c06b6..000000000 --- a/mac/test.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -rsync -av --delete $c/libanki $c/ankiqt mari:anki/ -ssh mari "open anki/ankiqt/anki"