diff --git a/README.md b/README.md index f67c6fcc..9b88f18d 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,11 @@ a network interface as well. Both client and server are written in Qt, supportin Chat with the Cockatrice developers on Gitter. Come here to talk about the application, features, or just to hang out. For support regarding specific servers, please contact that server's admin or forum for support rather than asking here. -[![Gitter chat](https://badges.gitter.im/Daenyth/Cockatrice.png)](https://gitter.im/Daenyth/Cockatrice) +[![Gitter chat](https://badges.gitter.im/Cockatrice/Cockatrice.png)](https://gitter.im/Cockatrice/Cockatrice) # Building -[![Build Status](https://travis-ci.org/Daenyth/Cockatrice.svg?branch=master)](https://travis-ci.org/Daenyth/Cockatrice) +[![Build Status](https://travis-ci.org/Cockatrice/Cockatrice.svg?branch=master)](https://travis-ci.org/Cockatrice/Cockatrice) Dependencies: diff --git a/cockatrice/CMakeLists.txt b/cockatrice/CMakeLists.txt index af031ab0..b127e414 100644 --- a/cockatrice/CMakeLists.txt +++ b/cockatrice/CMakeLists.txt @@ -242,6 +242,13 @@ endif() if(UNIX) if(APPLE) + set(MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME}") + set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.cockatrice.${PROJECT_NAME}") + set(MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_NAME}-${PROJECT_VERSION}") + set(MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME}) + set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION}) + set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}) + INSTALL(TARGETS cockatrice BUNDLE DESTINATION ./) INSTALL(FILES ${cockatrice_QM} DESTINATION ./cockatrice.app/Contents/Resources/translations) else() diff --git a/cockatrice/src/carddatabase.cpp b/cockatrice/src/carddatabase.cpp index cdacf008..f34a0725 100644 --- a/cockatrice/src/carddatabase.cpp +++ b/cockatrice/src/carddatabase.cpp @@ -101,6 +101,14 @@ QString PictureToLoad::getSetName() const return QString(""); } +CardSet *PictureToLoad::getCurrentSet() const +{ + if (setIndex < sortedSets.size()) + return sortedSets[setIndex]; + else + return 0; +} + PictureLoader::PictureLoader(const QString &__picsPath, bool _picDownload, bool _picDownloadHq, QObject *parent) : QObject(parent), _picsPath(__picsPath), picDownload(_picDownload), picDownloadHq(_picDownloadHq), @@ -134,15 +142,17 @@ void PictureLoader::processLoadQueue() PictureToLoad ptl = loadQueue.takeFirst(); mutex.unlock(); + QString setName = ptl.getSetName(); + QString correctedCardname = ptl.getCard()->getCorrectedName(); + qDebug() << "Trying to load picture (set: " << setName << " card: " << correctedCardname << ")"; + //The list of paths to the folders in which to search for images - QList picsPaths = QList() << _picsPath + "/CUSTOM/" + ptl.getCard()->getCorrectedName(); + QList picsPaths = QList() << _picsPath + "/CUSTOM/" + correctedCardname; - - QString setName=ptl.getSetName(); if(!setName.isEmpty()) { - picsPaths << _picsPath + "/" + setName + "/" + ptl.getCard()->getCorrectedName() - << _picsPath + "/downloadedPics/" + setName + "/" + ptl.getCard()->getCorrectedName(); + picsPaths << _picsPath + "/" + setName + "/" + correctedCardname + << _picsPath + "/downloadedPics/" + setName + "/" + correctedCardname; } QImage image; @@ -154,12 +164,14 @@ void PictureLoader::processLoadQueue() for (int i = 0; i < picsPaths.length() && !found; i ++) { imgReader.setFileName(picsPaths.at(i)); if (imgReader.read(&image)) { + qDebug() << "Picture found on disk (set: " << setName << " card: " << correctedCardname << ")"; emit imageLoaded(ptl.getCard(), image); found = true; break; } imgReader.setFileName(picsPaths.at(i) + ".full"); if (imgReader.read(&image)) { + qDebug() << "Picture.full found on disk (set: " << setName << " card: " << correctedCardname << ")"; emit imageLoaded(ptl.getCard(), image); found = true; } @@ -167,24 +179,32 @@ void PictureLoader::processLoadQueue() if (!found) { if (picDownload) { + qDebug() << "Picture NOT found, trying to download (set: " << setName << " card: " << correctedCardname << ")"; cardsToDownload.append(ptl); if (!downloadRunning) startNextPicDownload(); } else { if (ptl.nextSet()) + { + qDebug() << "Picture NOT found and download disabled, moving to next set (newset: " << setName << " card: " << correctedCardname << ")"; + mutex.lock(); loadQueue.prepend(ptl); - else + mutex.unlock(); + } else { + qDebug() << "Picture NOT found, download disabled, no more sets to try: BAILING OUT (oldset: " << setName << " card: " << correctedCardname << ")"; emit imageLoaded(ptl.getCard(), QImage()); + } } } } } -QString PictureLoader::getPicUrl(CardInfo *card) +QString PictureLoader::getPicUrl() { if (!picDownload) return QString(""); - CardSet *set = card->getPreferredSet(); + CardInfo *card = cardBeingDownloaded.getCard(); + CardSet *set=cardBeingDownloaded.getCurrentSet(); QString picUrl = QString(""); // if sets have been defined for the card, they can contain custom picUrls @@ -204,17 +224,19 @@ QString PictureLoader::getPicUrl(CardInfo *card) return picUrl; } - // otherwise, fallback to the default url - picUrl = picDownloadHq ? settingsCache->getPicUrlHq() : settingsCache->getPicUrl(); - picUrl.replace("!name!", QUrl::toPercentEncoding(card->getCorrectedName())); + // if a card has a muid, use the default url; if not, use the fallback + int muid = set ? muid = card->getMuId(set->getShortName()) : 0; + if(muid) + picUrl = picDownloadHq ? settingsCache->getPicUrlHq() : settingsCache->getPicUrl(); + else + picUrl = picDownloadHq ? settingsCache->getPicUrlHqFallback() : settingsCache->getPicUrlFallback(); + picUrl.replace("!name!", QUrl::toPercentEncoding(card->getCorrectedName())); + picUrl.replace("!cardid!", QUrl::toPercentEncoding(QString::number(muid))); if (set) { picUrl.replace("!setcode!", QUrl::toPercentEncoding(set->getShortName())); picUrl.replace("!setname!", QUrl::toPercentEncoding(set->getLongName())); } - int muid = card->getPreferredMuId(); - if (muid) - picUrl.replace("!cardid!", QUrl::toPercentEncoding(QString::number(muid))); if (picUrl.contains("!name!") || picUrl.contains("!setcode!") || @@ -239,19 +261,33 @@ void PictureLoader::startNextPicDownload() cardBeingDownloaded = cardsToDownload.takeFirst(); - QString picUrl = getPicUrl(cardBeingDownloaded.getCard()); + QString picUrl = getPicUrl(); if (picUrl.isEmpty()) { - qDebug() << "No url for" << cardBeingDownloaded.getCard()->getName(); - cardBeingDownloaded = 0; downloadRunning = false; - return; + picDownloadFailed(); + } else { + QUrl url(picUrl); + + QNetworkRequest req(url); + qDebug() << "starting picture download:" << cardBeingDownloaded.getCard()->getName() << "Url:" << req.url(); + networkManager->get(req); } +} - QUrl url(picUrl); - - QNetworkRequest req(url); - qDebug() << "starting picture download:" << cardBeingDownloaded.getCard()->getName() << "Url:" << req.url(); - networkManager->get(req); +void PictureLoader::picDownloadFailed() +{ + if (cardBeingDownloaded.nextSet()) + { + qDebug() << "Picture NOT found, download failed, moving to next set (newset: " << cardBeingDownloaded.getSetName() << " card: " << cardBeingDownloaded.getCard()->getCorrectedName() << ")"; + mutex.lock(); + loadQueue.prepend(cardBeingDownloaded); + mutex.unlock(); + emit startLoadQueue(); + } else { + qDebug() << "Picture NOT found, download failed, no more sets to try: BAILING OUT (oldset: " << cardBeingDownloaded.getSetName() << " card: " << cardBeingDownloaded.getCard()->getCorrectedName() << ")"; + cardBeingDownloaded = 0; + emit imageLoaded(cardBeingDownloaded.getCard(), QImage()); + } } void PictureLoader::picDownloadFinished(QNetworkReply *reply) @@ -288,21 +324,9 @@ void PictureLoader::picDownloadFinished(QNetworkReply *reply) } emit imageLoaded(cardBeingDownloaded.getCard(), testImage); - } else if (cardBeingDownloaded.getHq()) { - qDebug() << "HQ: received invalid picture. URL:" << reply->request().url(); - cardBeingDownloaded.setHq(false); - cardsToDownload.prepend(cardBeingDownloaded); } else { - qDebug() << "LQ: received invalid picture. URL:" << reply->request().url(); - if (cardBeingDownloaded.nextSet()) { - cardBeingDownloaded.setHq(true); - mutex.lock(); - loadQueue.prepend(cardBeingDownloaded); - mutex.unlock(); - emit startLoadQueue(); - } else - emit imageLoaded(cardBeingDownloaded.getCard(), QImage()); - } + picDownloadFailed(); + } reply->deleteLater(); startNextPicDownload(); @@ -497,21 +521,6 @@ void CardInfo::updatePixmapCache() emit pixmapUpdated(); } -CardSet* CardInfo::getPreferredSet() -{ - if(sets.isEmpty()) - return 0; - SetList sortedSets = sets; - sortedSets.sortByKey(); - return sortedSets.first(); -} - -int CardInfo::getPreferredMuId() -{ - CardSet *set = getPreferredSet(); - return set ? muIds[set->getShortName()] : 0; -} - QString CardInfo::simplifyName(const QString &name) { QString simpleName(name); diff --git a/cockatrice/src/carddatabase.h b/cockatrice/src/carddatabase.h index cbb25f3e..af5a16f1 100644 --- a/cockatrice/src/carddatabase.h +++ b/cockatrice/src/carddatabase.h @@ -53,6 +53,7 @@ private: public: PictureToLoad(CardInfo *_card = 0, bool _hq = true); CardInfo *getCard() const { return card; } + CardSet *getCurrentSet() const; QString getSetName() const; bool nextSet(); bool getHq() const { return hq; } @@ -70,7 +71,7 @@ private: PictureToLoad cardBeingDownloaded; bool picDownload, picDownloadHq, downloadRunning, loadQueueRunning; void startNextPicDownload(); - QString getPicUrl(CardInfo* card); + QString getPicUrl(); public: PictureLoader(const QString &__picsPath, bool _picDownload, bool _picDownloadHq, QObject *parent = 0); ~PictureLoader(); @@ -80,6 +81,7 @@ public: void loadImage(CardInfo *card); private slots: void picDownloadFinished(QNetworkReply *reply); + void picDownloadFailed(); public slots: void processLoadQueue(); signals: @@ -163,8 +165,6 @@ public: void clearPixmapCache(); void clearPixmapCacheMiss(); void imageLoaded(const QImage &image); - CardSet *getPreferredSet(); - int getPreferredMuId(); /** * Simplify a name to have no punctuation and lowercase all letters, for diff --git a/cockatrice/src/dlg_creategame.cpp b/cockatrice/src/dlg_creategame.cpp index fc62df7d..65b340bb 100644 --- a/cockatrice/src/dlg_creategame.cpp +++ b/cockatrice/src/dlg_creategame.cpp @@ -56,7 +56,12 @@ void DlgCreateGame::sharedCtor() onlyBuddiesCheckBox = new QCheckBox(tr("Only &buddies can join")); onlyRegisteredCheckBox = new QCheckBox(tr("Only ®istered users can join")); if (room && room->getUserInfo()->user_level() & ServerInfo_User::IsRegistered) + { onlyRegisteredCheckBox->setChecked(true); + } else { + onlyBuddiesCheckBox->setEnabled(false); + onlyRegisteredCheckBox->setEnabled(false); + } QGridLayout *joinRestrictionsLayout = new QGridLayout; joinRestrictionsLayout->addWidget(passwordLabel, 0, 0); diff --git a/cockatrice/src/settingscache.cpp b/cockatrice/src/settingscache.cpp index 5821d352..8374bdb5 100644 --- a/cockatrice/src/settingscache.cpp +++ b/cockatrice/src/settingscache.cpp @@ -25,6 +25,8 @@ SettingsCache::SettingsCache() picDownloadHq = settings->value("personal/picturedownloadhq", false).toBool(); picUrl = settings->value("personal/picUrl", PIC_URL_DEFAULT).toString(); picUrlHq = settings->value("personal/picUrlHq", PIC_URL_HQ_DEFAULT).toString(); + picUrlFallback = settings->value("personal/picUrlFallback", PIC_URL_FALLBACK).toString(); + picUrlHqFallback = settings->value("personal/picUrlHqFallback", PIC_URL_HQ_FALLBACK).toString(); mainWindowGeometry = settings->value("interface/main_window_geometry").toByteArray(); notificationsEnabled = settings->value("interface/notificationsenabled", true).toBool(); @@ -153,6 +155,18 @@ void SettingsCache::setPicUrlHq(const QString &_picUrlHq) settings->setValue("personal/picUrlHq", picUrlHq); } +void SettingsCache::setPicUrlFallback(const QString &_picUrlFallback) +{ + picUrlFallback = _picUrlFallback; + settings->setValue("personal/picUrlFallback", picUrlFallback); +} + +void SettingsCache::setPicUrlHqFallback(const QString &_picUrlHqFallback) +{ + picUrlHqFallback = _picUrlHqFallback; + settings->setValue("personal/picUrlHqFallback", picUrlHqFallback); +} + void SettingsCache::setNotificationsEnabled(int _notificationsEnabled) { notificationsEnabled = _notificationsEnabled; diff --git a/cockatrice/src/settingscache.h b/cockatrice/src/settingscache.h index b222a58b..3b1908a9 100644 --- a/cockatrice/src/settingscache.h +++ b/cockatrice/src/settingscache.h @@ -4,7 +4,9 @@ #include #define PIC_URL_DEFAULT "http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=!cardid!&type=card" +#define PIC_URL_FALLBACK "http://mtgimage.com/set/!setcode!/!name!.jpg" #define PIC_URL_HQ_DEFAULT "http://mtgimage.com/multiverseid/!cardid!.jpg" +#define PIC_URL_HQ_FALLBACK "http://mtgimage.com/set/!setcode!/!name!.jpg" class QSettings; @@ -57,6 +59,8 @@ private: bool ignoreUnregisteredUsers; QString picUrl; QString picUrlHq; + QString picUrlFallback; + QString picUrlHqFallback; bool attemptAutoConnect; public: SettingsCache(); @@ -93,6 +97,8 @@ public: bool getIgnoreUnregisteredUsers() const { return ignoreUnregisteredUsers; } QString getPicUrl() const { return picUrl; } QString getPicUrlHq() const { return picUrlHq; } + QString getPicUrlFallback() const { return picUrlFallback; } + QString getPicUrlHqFallback() const { return picUrlHqFallback; } void copyPath(const QString &src, const QString &dst); bool getAutoConnect() const { return attemptAutoConnect; } public slots: @@ -129,6 +135,8 @@ public slots: void setIgnoreUnregisteredUsers(bool _ignoreUnregisteredUsers); void setPicUrl(const QString &_picUrl); void setPicUrlHq(const QString &_picUrlHq); + void setPicUrlFallback(const QString &_picUrlFallback); + void setPicUrlHqFallback(const QString &_picUrlHqFallback); void setAutoConnect(const bool &_autoConnect); }; diff --git a/cockatrice/src/tab_deck_editor.cpp b/cockatrice/src/tab_deck_editor.cpp index 01520acf..7d9b34d8 100644 --- a/cockatrice/src/tab_deck_editor.cpp +++ b/cockatrice/src/tab_deck_editor.cpp @@ -365,7 +365,7 @@ void TabDeckEditor::updateCardInfoRight(const QModelIndex ¤t, const QModel void TabDeckEditor::updateSearch(const QString &search) { - databaseDisplayModel->setCardNameBeginning(search); + databaseDisplayModel->setCardName(search); QModelIndexList sel = databaseView->selectionModel()->selectedRows(); if (sel.isEmpty() && databaseDisplayModel->rowCount()) databaseView->selectionModel()->setCurrentIndex(databaseDisplayModel->index(0, 0), QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); diff --git a/cockatrice/translations/cockatrice_fr.ts b/cockatrice/translations/cockatrice_fr.ts index 8828b2b9..31aa65da 100644 --- a/cockatrice/translations/cockatrice_fr.ts +++ b/cockatrice/translations/cockatrice_fr.ts @@ -43,48 +43,48 @@ Path to hand background: - Chemin pour les images de fond de main: + Chemin vers l'image de fond de la zone de main: Path to stack background: - Chemin pour les images de fond de pile: + Chemin vers l'image de fond de la pile: Path to table background: - Chemin pour les images d'arrière-plan: + Chemin vers l'image de fond de la zone de jeu: Path to player info background: - Chemin pour les images de fond d'affichage d'informations: + Chemin vers l'image de fond d'informations joueur: Path to picture of card back: - Chemin pour les images de dos des cartes: - + Chemin vers l'image de dos des cartes: + Hand background: - + Image de fond de la zone de main: Stack background: - + Image de fond de la pile: Table background: - + Image de fond de la zone de jeu: Player info background: - + Image de fond de la zone d'informations joueur: Card back: - + Dos de carte: @@ -104,7 +104,7 @@ Display hand horizontally (wastes space) - Montrer la main horizontalement + Afficher la main horizontalement (perte d'espace) @@ -124,7 +124,7 @@ Zone view layout - Voir disposition de la zone + Disposition de la zone d'aperçu @@ -151,60 +151,60 @@ Please enter the duration of the ban (in minutes). Enter 0 for an indefinite ban. - Entrez la durée de temps du ban (en minutes). -Entrez 0 pour une durée illimitée du ban. + Entrez la durée de temps de blocage (en minutes). +Entrez 0 pour un blocage permanent. ban &user name - + bloquer &nom d'utilisateur ban &IP address - + bloquer &adresse IP Ban type - + Type du blocage &permanent ban - + &blocage permanent &temporary ban - + &blocage temporaire &Days: - + &Jours: &Hours: - + &Heures: &Minutes: - + &Minutes: Duration of the ban - + Durée du blocage Please enter the reason for the ban. This is only saved for moderators and cannot be seen by the banned person. - Veuillez expliquer la raison du ban. -Cette information ne sera consultable que par les modérateurs. + Veuillez expliquer la raison du blocage. +Cette information sera consultable uniquement par les modérateurs. @@ -229,12 +229,12 @@ Cette information ne sera consultable que par les modérateurs. Error - Erreur + Érreur You have to select a name-based or IP-based ban, or both. - + Vous devez choisir un blocage à partir du nom ou de l'IP, ou des deux. @@ -369,6 +369,12 @@ Cette information ne sera consultable que par les modérateurs. &Clone &Copier une carte + &Copier une carte + + + + Ctrl+H + Ctrl+H &Attach to card... @@ -384,16 +390,16 @@ Cette information ne sera consultable que par les modérateurs. Set &P/T... - Fixer &F/E... + Définir &F/E... &Draw arrow... &Tracer une flèche... - - &Power / toughness - F&orce / Endurance + + &Power / Toughness + &Force / Endurance &Increase power @@ -445,7 +451,7 @@ Cette information ne sera consultable que par les modérateurs. Set &power and toughness... - Fi&xer la force et l'endurance... + Dé&finir la force et l'endurance... Ctrl+P @@ -477,7 +483,7 @@ Cette information ne sera consultable que par les modérateurs. &Set counters (%1)... - &Fixer marqueurs (%1)... + &Définir marqueurs (%1)... &top of library @@ -497,7 +503,7 @@ Cette information ne sera consultable que par les modérateurs. &exile - &exiler + &exile @@ -2230,7 +2236,7 @@ Would you like to change your database location setting? Italian: - + Italien: @@ -5714,6 +5720,12 @@ Entrez 0 pour une durée illimitée du ban. &Commentaires: + + Hash: + Empreinte: + + + &Update prices Mettre à &jour les prix diff --git a/oracle/CMakeLists.txt b/oracle/CMakeLists.txt index c14b0cf6..344488b3 100644 --- a/oracle/CMakeLists.txt +++ b/oracle/CMakeLists.txt @@ -111,6 +111,13 @@ endif() if(UNIX) if(APPLE) + set(MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME}") + set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.cockatrice.${PROJECT_NAME}") + set(MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_NAME}-${PROJECT_VERSION}") + set(MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME}) + set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION}) + set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}) + INSTALL(TARGETS oracle BUNDLE DESTINATION ./) else() # Assume linux diff --git a/oracle/src/oraclewizard.cpp b/oracle/src/oraclewizard.cpp index 79ad5414..b9a13eee 100644 --- a/oracle/src/oraclewizard.cpp +++ b/oracle/src/oraclewizard.cpp @@ -103,17 +103,21 @@ LoadSetsPage::LoadSetsPage(QWidget *parent) urlRadioButton->setChecked(true); + urlButton = new QPushButton(tr("Restore default url"), this); + connect(urlButton, SIGNAL(clicked()), this, SLOT(actRestoreDefaultUrl())); + fileButton = new QPushButton(tr("Choose file..."), this); connect(fileButton, SIGNAL(clicked()), this, SLOT(actLoadSetsFile())); QGridLayout *layout = new QGridLayout(this); layout->addWidget(urlRadioButton, 0, 0); layout->addWidget(urlLineEdit, 0, 1); - layout->addWidget(fileRadioButton, 1, 0); - layout->addWidget(fileLineEdit, 1, 1); - layout->addWidget(fileButton, 2, 1, Qt::AlignRight); - layout->addWidget(progressLabel, 3, 0); - layout->addWidget(progressBar, 3, 1); + layout->addWidget(urlButton, 1, 1, Qt::AlignRight); + layout->addWidget(fileRadioButton, 2, 0); + layout->addWidget(fileLineEdit, 2, 1); + layout->addWidget(fileButton, 3, 1, Qt::AlignRight); + layout->addWidget(progressLabel, 4, 0); + layout->addWidget(progressBar, 4, 1); connect(&watcher, SIGNAL(finished()), this, SLOT(importFinished())); @@ -128,6 +132,11 @@ void LoadSetsPage::initializePage() progressBar->hide(); } +void LoadSetsPage::actRestoreDefaultUrl() +{ + urlLineEdit->setText(ALLSETS_URL); +} + void LoadSetsPage::actLoadSetsFile() { QFileDialog dialog(this, tr("Load sets file")); diff --git a/oracle/src/oraclewizard.h b/oracle/src/oraclewizard.h index 6e6a6ea8..f3255f8e 100644 --- a/oracle/src/oraclewizard.h +++ b/oracle/src/oraclewizard.h @@ -63,6 +63,7 @@ private: QRadioButton *fileRadioButton; QLineEdit *urlLineEdit; QLineEdit *fileLineEdit; + QPushButton *urlButton; QPushButton *fileButton; QLabel *progressLabel; QProgressBar * progressBar; @@ -72,6 +73,7 @@ private: QFuture future; private slots: void actLoadSetsFile(); + void actRestoreDefaultUrl(); void actDownloadProgressSetsFile(qint64 received, qint64 total); void actDownloadFinishedSetsFile(); void importFinished(); diff --git a/servatrice/CMakeLists.txt b/servatrice/CMakeLists.txt index 83fc7900..4f407658 100644 --- a/servatrice/CMakeLists.txt +++ b/servatrice/CMakeLists.txt @@ -108,6 +108,13 @@ endif() # install rules if(UNIX) if(APPLE) + set(MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME}") + set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.cockatrice.${PROJECT_NAME}") + set(MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_NAME}-${PROJECT_VERSION}") + set(MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME}) + set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION}) + set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}) + INSTALL(TARGETS servatrice BUNDLE DESTINATION ./) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/servatrice.ini.example DESTINATION ./servatrice.app/Contents/Resources/) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/servatrice.sql DESTINATION ./servatrice.app/Contents/Resources/) diff --git a/servatrice/src/server_logger.cpp b/servatrice/src/server_logger.cpp index 1a1e4bed..4896852a 100644 --- a/servatrice/src/server_logger.cpp +++ b/servatrice/src/server_logger.cpp @@ -50,7 +50,7 @@ void ServerLogger::logMessage(QString message, void *caller) callerString = QString::number((qulonglong) caller, 16) + " "; //filter out all log entries based on values in configuration file - bool shouldWeWriteLog = settingsCache->value("server/writelog").toBool(); + bool shouldWeWriteLog = settingsCache->value("server/writelog",1).toBool(); QString logFilters = settingsCache->value("server/logfilters").toString(); QStringList listlogFilters = logFilters.split(",", QString::SkipEmptyParts); bool shouldWeSkipLine = false;