From 864fb5fd366c4eaaa4fd74f1647d5d47e456e6fa Mon Sep 17 00:00:00 2001 From: James Campos Date: Tue, 29 Jan 2013 13:15:06 -0800 Subject: [PATCH 1/5] Create README.md --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 000000000..6630895f4 --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# Cockatrice + +Cockatrice is an open-source multiplatform software for playing card games, +such as Magic: The Gathering, over a network. It is fully client-server based +to prevent any kind of cheating, though it supports single-player games without +a network interface as well. Both client and server are written in Qt 4. + +# License + +Cockatrice is free software, licensed under the GPLv2; see COPYING for details. + +# Building + +Dependencies: + +- [Qt](http://qt-project.org/) + +- [protobuf](http://code.google.com/p/protobuf/) + +- [CMake](http://www.cmake.org/) + +``` +mkdir build +cd build +cmake .. +make +make install +``` From 72b60026f7aec16852c491ee8ad41f1a87b5f068 Mon Sep 17 00:00:00 2001 From: James Campos Date: Tue, 29 Jan 2013 13:34:37 -0800 Subject: [PATCH 2/5] server --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 6630895f4..e167000ca 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,10 @@ Dependencies: - [CMake](http://www.cmake.org/) +The server requires an additional dependency: + +- [libgcrypt](http://www.gnu.org/software/libgcrypt/) + ``` mkdir build cd build @@ -26,3 +30,9 @@ cmake .. make make install ``` + +The following flags can be passed to `cmake`: + +- `-DWITH_SERVER=1` build the server + +- `-DWITHOUT_CLIENT=1` do not build the client From 488726f9a697c13bb76be43ed51d6b11169d6854 Mon Sep 17 00:00:00 2001 From: James Campos Date: Tue, 29 Jan 2013 13:47:54 -0800 Subject: [PATCH 3/5] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index e167000ca..3502fd8a7 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,11 @@ The following flags can be passed to `cmake`: - `-DWITH_SERVER=1` build the server - `-DWITHOUT_CLIENT=1` do not build the client + +# Running + +`oracle` fetches card data + +`cockatrice` is the game client + +`servatrice` is the server From b909047a434a2cff99ccd7a2257ef6d534fdd324 Mon Sep 17 00:00:00 2001 From: Chris Hansen Date: Thu, 7 Feb 2013 12:49:09 -0800 Subject: [PATCH 4/5] Added some paranthases to supress compiler warnings --- cockatrice/src/carddatabasemodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cockatrice/src/carddatabasemodel.cpp b/cockatrice/src/carddatabasemodel.cpp index 67b8404e7..d63f6bdef 100644 --- a/cockatrice/src/carddatabasemodel.cpp +++ b/cockatrice/src/carddatabasemodel.cpp @@ -117,7 +117,7 @@ bool CardDatabaseDisplayModel::filterAcceptsRow(int sourceRow, const QModelIndex { CardInfo const *info = static_cast(sourceModel())->getCard(sourceRow); - if (((isToken == ShowTrue) && !info->getIsToken()) || (isToken == ShowFalse) && info->getIsToken()) + if (((isToken == ShowTrue) && !info->getIsToken()) || ((isToken == ShowFalse) && info->getIsToken())) return false; if (!cardNameBeginning.isEmpty()) From 422f73d4cd36c6603f199f3f5ecf7c6ecce27714 Mon Sep 17 00:00:00 2001 From: Chris Hansen Date: Fri, 8 Feb 2013 20:18:19 -0800 Subject: [PATCH 5/5] Fixed cmake error on mac install --- cockatrice/CMakeLists.txt | 6 +++++- oracle/CMakeLists.txt | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cockatrice/CMakeLists.txt b/cockatrice/CMakeLists.txt index be989d730..70de75a5d 100644 --- a/cockatrice/CMakeLists.txt +++ b/cockatrice/CMakeLists.txt @@ -222,7 +222,11 @@ INCLUDE_DIRECTORIES(${QT_MOBILITY_MULTIMEDIAKIT_INCLUDE_DIR}) ADD_EXECUTABLE(cockatrice WIN32 MACOSX_BUNDLE ${cockatrice_SOURCES} ${cockatrice_QM} ${cockatrice_RESOURCES_RCC} ${cockatrice_HEADERS_MOC}) TARGET_LINK_LIBRARIES(cockatrice cockatrice_common ${QT_LIBRARIES} ${QT_MOBILITY_MULTIMEDIAKIT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) -INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cockatrice DESTINATION bin) +IF (NOT APPLE) + INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cockatrice DESTINATION bin) +ELSE (APPLE) + INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/cockatrice.app DESTINATION bin) +ENDIF (NOT APPLE) if (NOT WIN32 AND NOT APPLE) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/cockatrice.png DESTINATION ${ICONDIR}/hicolor/48x48/apps) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/cockatrice.svg DESTINATION ${ICONDIR}/hicolor/scalable/apps) diff --git a/oracle/CMakeLists.txt b/oracle/CMakeLists.txt index 9f51a16fd..41338903a 100644 --- a/oracle/CMakeLists.txt +++ b/oracle/CMakeLists.txt @@ -22,7 +22,11 @@ INCLUDE_DIRECTORIES(../cockatrice/src) ADD_EXECUTABLE(oracle WIN32 MACOSX_BUNDLE ${oracle_SOURCES} ${oracle_HEADERS_MOC}) TARGET_LINK_LIBRARIES(oracle ${QT_LIBRARIES}) -INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/oracle DESTINATION bin) +IF (NOT APPLE) + INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/oracle DESTINATION bin) +ELSE (APPLE) + INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/oracle.app DESTINATION bin) +ENDIF (NOT APPLE) IF (NOT WIN32 AND NOT APPLE) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/oracle.desktop DESTINATION ${DESKTOPDIR}) ENDIF (NOT WIN32 AND NOT APPLE)