mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-24 23:36:01 -05:00
Mac fixes
This commit is contained in:
parent
e8844deeef
commit
7faa033855
|
|
@ -104,11 +104,11 @@ int main(int argc, char *argv[])
|
|||
if (!db->getLoadSuccess())
|
||||
if (db->loadCardDatabase(dataDir + "/cards.xml"))
|
||||
settingsCache->setCardDatabasePath(dataDir + "/cards.xml");
|
||||
if (!QDir(settingsCache->getDeckPath()).exists()) {
|
||||
if (!QDir(settingsCache->getDeckPath()).exists() || settingsCache->getDeckPath().isEmpty()) {
|
||||
QDir().mkpath(dataDir + "/decks");
|
||||
settingsCache->setDeckPath(dataDir + "/decks");
|
||||
}
|
||||
if (!QDir(settingsCache->getPicsPath()).exists()) {
|
||||
if (!QDir(settingsCache->getPicsPath()).exists() || settingsCache->getPicsPath().isEmpty()) {
|
||||
QDir().mkpath(dataDir + "/pics");
|
||||
settingsCache->setPicsPath(dataDir + "/pics");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
#include <QXmlStreamReader>
|
||||
#include <QXmlStreamWriter>
|
||||
#include <QVariant>
|
||||
#include <QCryptographicHash>
|
||||
#include "decklist.h"
|
||||
|
|
|
|||
|
|
@ -9,13 +9,15 @@
|
|||
#include <QSet>
|
||||
#include <QMap>
|
||||
|
||||
// Required on Mac. Forward declaration doesn't work. Don't ask why.
|
||||
#include <QtCore/QXmlStreamReader>
|
||||
#include <QtCore/QXmlStreamWriter>
|
||||
|
||||
#include "pb/move_card_to_zone.pb.h"
|
||||
|
||||
class CardDatabase;
|
||||
class QIODevice;
|
||||
class QTextStream;
|
||||
class QXmlStreamReader;
|
||||
class QXmlStreamWriter;
|
||||
|
||||
class InnerDecklistNode;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,17 +3,16 @@
|
|||
FRAMEWORKS="Core Gui Multimedia Network Svg Xml Script"
|
||||
DATE=`date '+%Y%m%d'`
|
||||
#QTDIR="/Users/brukie/QtSDK/Desktop/Qt/474/gcc"
|
||||
QTLIB="/usr/local/Qt4.7/lib"
|
||||
QTPLUGINS="/usr/local/Qt4.7/plugins"
|
||||
QTLIB="/Users/brukie/qt/lib"
|
||||
QTPLUGINS="/Users/brukie/qt/plugins"
|
||||
PROTOBUF="/Users/brukie/protobuf"
|
||||
DIR=cockatrice_mac_$DATE
|
||||
if [ -d $DIR ]; then echo "delete old dir first"; exit 1; fi
|
||||
|
||||
mkdir $DIR
|
||||
|
||||
cp -R cockatrice/cockatrice.app $DIR
|
||||
cp -R oracle/oracle.app $DIR
|
||||
mkdir $DIR/decks
|
||||
mkdir $DIR/pics
|
||||
cp -R build/cockatrice/cockatrice.app $DIR
|
||||
cp -R build/oracle/oracle.app $DIR
|
||||
mkdir $DIR/Frameworks
|
||||
cp -R sounds zonebg $DIR
|
||||
cp -R $QTPLUGINS $DIR/PlugIns
|
||||
|
|
@ -23,7 +22,7 @@ done
|
|||
find $DIR/Frameworks -name '*debug*'|xargs -n 1 rm -f
|
||||
find $DIR/Frameworks -name 'Headers'|xargs -n 1 rm -rf
|
||||
find $DIR/PlugIns -name '*debug*'|xargs -n 1 rm -f
|
||||
|
||||
cp $PROTOBUF/lib/libprotobuf.7.dylib $DIR/Frameworks
|
||||
|
||||
cd $DIR
|
||||
for f in $FRAMEWORKS; do
|
||||
|
|
@ -43,6 +42,9 @@ for f in $FRAMEWORKS; do
|
|||
done
|
||||
done
|
||||
|
||||
install_name_tool -id @executable_path/../../../libprotobuf.7.dylib Frameworks/libprotobuf.7.dylib
|
||||
install_name_tool -change $PROTOBUF/lib/libprotobuf.7.dylib @executable_path/../../../Frameworks/libprotobuf.7.dylib cockatrice.app/Contents/MacOS/cockatrice
|
||||
|
||||
cd ..
|
||||
|
||||
VOL=cockatrice_mac_${DATE}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user