mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-21 06:42:41 -08:00
Compare commits
19 Commits
2022-05-09
...
2022-09-01
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
235adbbdf1 | ||
|
|
40c88fe385 | ||
|
|
54b7943d17 | ||
|
|
2f100f2ba3 | ||
|
|
b5305aa5e4 | ||
|
|
a2624e36f3 | ||
|
|
540511befd | ||
|
|
014e73d569 | ||
|
|
e2c256db5b | ||
|
|
28aa473362 | ||
|
|
b79506fbcf | ||
|
|
afbd7252ac | ||
|
|
3e5b7cd392 | ||
|
|
77622095d5 | ||
|
|
8ee71300a2 | ||
|
|
d79971edbc | ||
|
|
273ebb22e4 | ||
|
|
6b86e4d463 | ||
|
|
a8e1dc3b18 |
@@ -1,21 +0,0 @@
|
||||
FROM fedora:34
|
||||
|
||||
RUN dnf install -y \
|
||||
@development-tools \
|
||||
ccache \
|
||||
cmake \
|
||||
desktop-file-utils \
|
||||
file \
|
||||
gcc-c++ \
|
||||
git \
|
||||
hicolor-icon-theme \
|
||||
libappstream-glib \
|
||||
mariadb-devel \
|
||||
protobuf-devel \
|
||||
qt5-{qttools,qtsvg,qtmultimedia,qtwebsockets}-devel \
|
||||
rpm-build \
|
||||
sqlite-devel \
|
||||
wget \
|
||||
xz-devel \
|
||||
zlib-devel \
|
||||
&& dnf clean all
|
||||
@@ -1,24 +0,0 @@
|
||||
FROM ubuntu:impish
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ccache \
|
||||
clang-format \
|
||||
cmake \
|
||||
file \
|
||||
g++ \
|
||||
git \
|
||||
liblzma-dev \
|
||||
libmariadb-dev-compat \
|
||||
libprotobuf-dev \
|
||||
libqt5multimedia5-plugins \
|
||||
libqt5sql5-mysql \
|
||||
libqt5svg5-dev \
|
||||
libqt5websockets5-dev \
|
||||
protobuf-compiler \
|
||||
qtmultimedia5-dev \
|
||||
qttools5-dev \
|
||||
qttools5-dev-tools \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
@@ -1,35 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Read arguments
|
||||
while [[ $# != 0 ]]; do
|
||||
case "$1" in
|
||||
'--')
|
||||
shift
|
||||
;;
|
||||
'--arch')
|
||||
shift
|
||||
if [[ $# == 0 ]]; then
|
||||
echo "::error file=$0::--arch expects an argument"
|
||||
exit 3
|
||||
fi
|
||||
OS_ARCH="$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "::error file=$0::unrecognized option: $1"
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
set -e
|
||||
|
||||
OPEN_SSL_VERSION="1.1.1n"
|
||||
DEST_PATH="C:\OpenSSL-Win$OS_ARCH"
|
||||
|
||||
curl -JLSs "https://github.com/CristiFati/Prebuilt-Binaries/raw/master/OpenSSL/v1.1.1/OpenSSL-$OPEN_SSL_VERSION-Win-pc0$OS_ARCH.zip" -o OpenSSL.zip
|
||||
unzip -q "OpenSSL.zip"
|
||||
rm "OpenSSL.zip"
|
||||
mv "OpenSSL\OpenSSL\\$OPEN_SSL_VERSION" "$DEST_PATH"
|
||||
rm -r "OpenSSL"
|
||||
echo "Installed OpenSSL v$OPEN_SSL_VERSION to $DEST_PATH"
|
||||
@@ -10,10 +10,10 @@ if ! git merge-base origin/master HEAD; then
|
||||
git fetch --unshallow
|
||||
fi
|
||||
|
||||
# Check formatting using clangify
|
||||
echo "Checking your code using clang-format..."
|
||||
# Check formatting using format.sh
|
||||
echo "Checking your code using clang-format/cmake-format..."
|
||||
|
||||
diff="$(./clangify.sh --diff --cf-version --branch origin/master)"
|
||||
diff="$(./format.sh --diff --cmake --cf-version --branch origin/master)"
|
||||
err=$?
|
||||
|
||||
case $err in
|
||||
@@ -24,7 +24,7 @@ case $err in
|
||||
*** ***
|
||||
*** Your code does not comply with our style guide. ***
|
||||
*** ***
|
||||
*** Please correct it or run the "clangify.sh" script. ***
|
||||
*** Please correct it or run the "format.sh" script. ***
|
||||
*** Then commit and push those changes to this branch. ***
|
||||
*** Check our CONTRIBUTING.md file for more details. ***
|
||||
*** ***
|
||||
@@ -32,12 +32,14 @@ case $err in
|
||||
*** ***
|
||||
***********************************************************
|
||||
|
||||
Used clang-format version:
|
||||
Used version:
|
||||
${diff%%
|
||||
----------
|
||||
*}
|
||||
|
||||
The following changes should be made:
|
||||
${diff#*
|
||||
----------
|
||||
}
|
||||
|
||||
Exiting...
|
||||
@@ -62,8 +64,6 @@ EOM
|
||||
;;
|
||||
|
||||
*)
|
||||
echo ""
|
||||
echo "Something went wrong in our formatting checks: clangify returned $err" >&2
|
||||
echo ""
|
||||
echo "Something went wrong in our formatting checks: format.sh returned $err" >&2
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -9,17 +9,16 @@ include different targets -->
|
||||
<pre>
|
||||
<b>Pre-compiled binaries we serve:</b>
|
||||
- <kbd>Windows 7/8/10/11 (32-bit)</kbd>
|
||||
- <kbd>Windows 7/8/10/11 (64-bit)</kbd>
|
||||
- <kbd>Windows 7/8 (64-bit)</kbd>
|
||||
- <kbd>Windows 10/11 (64-bit)</kbd>
|
||||
- <kbd>macOS 10.14</kbd> ("Mojave")
|
||||
- <kbd>macOS 10.15</kbd> ("Catalina")
|
||||
- <kbd>macOS 11.0</kbd> ("Big Sur")
|
||||
- <kbd>macOS 11.0+</kbd> ("Big Sur")
|
||||
- <kbd>Ubuntu 18.04</kbd> ("Bionic Beaver")
|
||||
- <kbd>Ubuntu 20.04</kbd> ("Focal Fossa")
|
||||
- <kbd>Ubuntu 21.10</kbd> ("Impish Indri")
|
||||
- <kbd>Ubuntu 22.04</kbd> ("Jammy Jellyfish")
|
||||
- <kbd>Debian 10</kbd> ("Buster")
|
||||
- <kbd>Debian 11</kbd> ("Bullseye")
|
||||
- <kbd>Fedora 34</kbd>
|
||||
- <kbd>Fedora 35</kbd>
|
||||
- <kbd>Fedora 36</kbd>
|
||||
<kbd>We are also packaged in Arch Linux's official community repository, courtesy of @FFY00</kbd></i>
|
||||
@@ -29,7 +28,6 @@ include different targets -->
|
||||
|
||||
## General Notes
|
||||
|
||||
<!-- --REPLACE-WITH-RELEASE-TITLE-- should be placed here by the ci -->
|
||||
We're pleased to announce the newest official release: <kbd>--REPLACE-WITH-RELEASE-TITLE--</kbd>
|
||||
|
||||
We hope you enjoy the changes made and we have listed all changes, with their corresponding tickets, since the last version of Cockatrice was released for your convenience.
|
||||
|
||||
@@ -102,5 +102,8 @@
|
||||
"decisions. See the documentation for more information."
|
||||
],
|
||||
"layout_passes": {}
|
||||
},
|
||||
"markup": {
|
||||
"enable_markup": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
12
.github/CONTRIBUTING.md
vendored
12
.github/CONTRIBUTING.md
vendored
@@ -41,8 +41,8 @@ albeit slightly less active.
|
||||
|
||||
We use a separate job on the CI to check your code for formatting issues. If
|
||||
your pull request failed the test, you can check the output on the checks tab.
|
||||
It's the first job called "linter", you can click the "Run clangify" step to
|
||||
see the output of the test.
|
||||
It's the first job called "linter", you can click the "Check code formatting"
|
||||
step to see the output of the test.
|
||||
|
||||
The message will look like this:
|
||||
```
|
||||
@@ -50,7 +50,7 @@ The message will look like this:
|
||||
*** ***
|
||||
*** Your code does not comply with our style guide. ***
|
||||
*** ***
|
||||
*** Please correct it or run the "clangify.sh" script. ***
|
||||
*** Please correct it or run the "format.sh" script. ***
|
||||
*** Then commit and push those changes to this branch. ***
|
||||
*** Check our CONTRIBUTING.md file for more details. ***
|
||||
*** ***
|
||||
@@ -81,9 +81,9 @@ The handy tool `clang-format` can format your code for you, it is available for
|
||||
almost any environment. A special `.clang-format` configuration file is
|
||||
included in the project and is used to format your code.
|
||||
|
||||
We've also included a bash script, `clangify.sh`, that will use clang-format to
|
||||
format all files in your pr in one go. Use `./clangify.sh --help` to show a
|
||||
full help page.
|
||||
We've also included a bash script, `format.sh`, that will use clang-format to
|
||||
format all files in your pr in one go. Use `./format.sh --help` to show a full
|
||||
help page.
|
||||
|
||||
To run clang-format on a single source file simply use the command
|
||||
`clang-format -i <filename>` to format it in place. (Some systems install
|
||||
|
||||
70
.github/workflows/desktop-build.yml
vendored
70
.github/workflows/desktop-build.yml
vendored
@@ -91,10 +91,6 @@ jobs:
|
||||
- distro: Debian11
|
||||
package: DEB
|
||||
|
||||
- distro: Fedora34
|
||||
package: RPM
|
||||
test: skip # gtest does not compile for some reason
|
||||
|
||||
- distro: Fedora35
|
||||
package: RPM
|
||||
test: skip
|
||||
@@ -109,10 +105,6 @@ jobs:
|
||||
package: DEB
|
||||
test: skip # UbuntuFocal has a broken qt for debug builds
|
||||
|
||||
- distro: UbuntuImpish
|
||||
package: DEB
|
||||
test: skip
|
||||
|
||||
- distro: UbuntuJammy
|
||||
package: DEB
|
||||
|
||||
@@ -295,19 +287,32 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- arch: 32
|
||||
vcpkg_default_triplet: x86
|
||||
qt_version: '5.15.2'
|
||||
- target: Win-32bit
|
||||
bit: 32
|
||||
arch: x86
|
||||
cmake_generator_platform: Win32
|
||||
qt_version: 5.15.*
|
||||
qt_arch: msvc2019
|
||||
- arch: 64
|
||||
vcpkg_default_triplet: x64
|
||||
qt_version: '6.3.0'
|
||||
qt_tools: "tools_openssl_x86"
|
||||
|
||||
- target: Win7+-64bit
|
||||
bit: 64
|
||||
arch: x64
|
||||
cmake_generator_platform: x64
|
||||
qt_version: 5.15.*
|
||||
qt_arch: msvc2019_64
|
||||
qt_tools: "tools_openssl_x64"
|
||||
|
||||
- target: Win10+-64bit
|
||||
bit: 64
|
||||
arch: x64
|
||||
cmake_generator_platform: x64
|
||||
qt_version: 6.3.*
|
||||
qt_arch: msvc2019_64
|
||||
qt_tools: "tools_openssl_x64"
|
||||
qt_modules: "qt5compat qtmultimedia qtwebsockets"
|
||||
|
||||
name: Windows (${{matrix.arch}}-bit)
|
||||
name: ${{matrix.target}}
|
||||
needs: configure
|
||||
runs-on: windows-2019
|
||||
env:
|
||||
@@ -323,52 +328,39 @@ jobs:
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Restore Qt ${{matrix.qt_version}} (${{matrix.arch}}-bit) from cache
|
||||
id: cache-qt
|
||||
uses: actions/cache@v1 # Intentionally v1, based on jurplel documentation
|
||||
with:
|
||||
key: ${{runner.os}}-QtCache-${{matrix.qt_version}}-${{matrix.arch}}
|
||||
path: '${{github.workspace}}/../Qt'
|
||||
|
||||
- name: Install Qt ${{matrix.qt_version}} (${{matrix.arch}}-bit)
|
||||
- name: Install Qt ${{matrix.qt_version}} for ${{matrix.target}}
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
cached: ${{steps.cache-qt.outputs.cache-hit}}
|
||||
cache: true
|
||||
setup-python: false
|
||||
version: ${{matrix.qt_version}}
|
||||
arch: win${{matrix.arch}}_${{matrix.qt_arch}}
|
||||
arch: win${{matrix.bit}}_${{matrix.qt_arch}}
|
||||
tools: ${{matrix.qt_tools}}
|
||||
modules: ${{matrix.qt_modules}}
|
||||
|
||||
- name: Run vcpkg
|
||||
uses: lukka/run-vcpkg@v10.2
|
||||
with:
|
||||
runVcpkgInstall: true
|
||||
appendedCacheKey: ${{matrix.arch}}-bit
|
||||
appendedCacheKey: ${{matrix.bit}}-bit
|
||||
env:
|
||||
VCPKG_DEFAULT_TRIPLET: '${{matrix.vcpkg_default_triplet}}-windows'
|
||||
VCPKG_DEFAULT_TRIPLET: '${{matrix.arch}}-windows'
|
||||
VCPKG_DISABLE_METRICS: 1
|
||||
|
||||
- name: Install OpenSSL (${{matrix.arch}}-bit)
|
||||
shell: bash
|
||||
run: .ci/download_openssl.sh --arch ${{matrix.arch}}
|
||||
|
||||
- name: Build Cockatrice (${{matrix.arch}}-bit)
|
||||
- name: Build Cockatrice
|
||||
id: build
|
||||
shell: bash
|
||||
env:
|
||||
PACKAGE_SUFFIX: '-win${{matrix.arch}}'
|
||||
PACKAGE_SUFFIX: '-${{matrix.target}}'
|
||||
CMAKE_GENERATOR: '${{env.CMAKE_GENERATOR}}'
|
||||
CMAKE_GENERATOR_PLATFORM: '${{matrix.cmake_generator_platform}}'
|
||||
QTDIR: '${{github.workspace}}\Qt\${{matrix.qt_version}}\win${{matrix.arch}}_${{matrix.qt_arch}}'
|
||||
QTDIR: '${{github.workspace}}\Qt\${{matrix.qt_version}}\win${{matrix.bit}}_${{matrix.qt_arch}}'
|
||||
run: .ci/compile.sh --server --release --test --package --parallel 2
|
||||
|
||||
- name: Setup tmate session
|
||||
if: ${{ failure() }}
|
||||
uses: mxschmitt/action-tmate@v3
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Windows-${{matrix.arch}}bit-installer
|
||||
name: ${{matrix.target}}-installer
|
||||
path: ${{steps.build.outputs.path}}
|
||||
if-no-files-found: error
|
||||
|
||||
|
||||
10
.github/workflows/desktop-lint.yml
vendored
10
.github/workflows/desktop-lint.yml
vendored
@@ -8,8 +8,8 @@ on:
|
||||
- '.github/workflows/web-*.yml'
|
||||
|
||||
jobs:
|
||||
clang-format:
|
||||
runs-on: ubuntu-latest
|
||||
format:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -17,12 +17,12 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 20 # should be enough to find merge base
|
||||
|
||||
- name: Install clang-format
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends clang-format
|
||||
sudo apt-get install -y --no-install-recommends clang-format cmake-format
|
||||
|
||||
- name: Run clangify
|
||||
- name: Check code formatting
|
||||
shell: bash
|
||||
run: ./.ci/lint_cpp.sh
|
||||
|
||||
381
CMakeLists.txt
381
CMakeLists.txt
@@ -27,31 +27,49 @@ option(TEST "build tests" OFF)
|
||||
|
||||
# Default to "Release" build type
|
||||
# User-provided value for CMAKE_BUILD_TYPE must be checked before the PROJECT() call
|
||||
IF(DEFINED CMAKE_BUILD_TYPE)
|
||||
SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Type of build")
|
||||
ELSE()
|
||||
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Type of build")
|
||||
ENDIF()
|
||||
if(DEFINED CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE
|
||||
${CMAKE_BUILD_TYPE}
|
||||
CACHE STRING "Type of build"
|
||||
)
|
||||
else()
|
||||
set(CMAKE_BUILD_TYPE
|
||||
Release
|
||||
CACHE STRING "Type of build"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(USE_CCACHE)
|
||||
find_program(CCACHE_PROGRAM ccache)
|
||||
if(CCACHE_PROGRAM)
|
||||
# Support Unix Makefiles and Ninja
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
MESSAGE(STATUS "Found CCache ${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
find_program(CCACHE_PROGRAM ccache)
|
||||
if(CCACHE_PROGRAM)
|
||||
# Support Unix Makefiles and Ninja
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
message(STATUS "Found CCache ${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# Use vcpkg toolchain on Windows
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||
CACHE STRING "Vcpkg toolchain file")
|
||||
# Qt path set by user or env var
|
||||
if (QTDIR OR DEFINED ENV{QTDIR} OR DEFINED ENV{QTDIR32} OR DEFINED ENV{QTDIR64})
|
||||
else()
|
||||
set(QTDIR "" CACHE PATH "Path to Qt (e.g. C:/Qt/5.7/msvc2015_64)")
|
||||
message(WARNING "QTDIR variable is missing. Please set this variable to specify path to Qt (e.g. C:/Qt/5.7/msvc2015_64)")
|
||||
endif()
|
||||
# Use vcpkg toolchain on Windows
|
||||
set(CMAKE_TOOLCHAIN_FILE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||
CACHE STRING "Vcpkg toolchain file"
|
||||
)
|
||||
# Qt path set by user or env var
|
||||
if(QTDIR
|
||||
OR DEFINED ENV{QTDIR}
|
||||
OR DEFINED ENV{QTDIR32}
|
||||
OR DEFINED ENV{QTDIR64}
|
||||
)
|
||||
|
||||
else()
|
||||
set(QTDIR
|
||||
""
|
||||
CACHE PATH "Path to Qt (e.g. C:/Qt/5.7/msvc2015_64)"
|
||||
)
|
||||
message(
|
||||
WARNING "QTDIR variable is missing. Please set this variable to specify path to Qt (e.g. C:/Qt/5.7/msvc2015_64)"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# A project name is needed for CPack
|
||||
@@ -60,11 +78,14 @@ project("Cockatrice" VERSION 2.8.1)
|
||||
|
||||
# Set release name if not provided via env/cmake var
|
||||
if(NOT DEFINED GIT_TAG_RELEASENAME)
|
||||
set(GIT_TAG_RELEASENAME "Prismatic Bridge")
|
||||
set(GIT_TAG_RELEASENAME "Prismatic Bridge")
|
||||
endif()
|
||||
|
||||
# Use c++17 for all targets
|
||||
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ ISO Standard")
|
||||
set(CMAKE_CXX_STANDARD
|
||||
17
|
||||
CACHE STRING "C++ ISO Standard"
|
||||
)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
# Set conventional loops
|
||||
@@ -81,130 +102,136 @@ include(createversionfile)
|
||||
|
||||
# Define a proper install path
|
||||
if(UNIX)
|
||||
if(APPLE)
|
||||
# macOS
|
||||
# Due to the special bundle structure ignore
|
||||
# the prefix eventually set by the user.
|
||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/release)
|
||||
if(APPLE)
|
||||
# macOS
|
||||
# Due to the special bundle structure ignore
|
||||
# the prefix eventually set by the user.
|
||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/release)
|
||||
|
||||
# Force ccache usage if available
|
||||
get_property(RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
|
||||
if(RULE_LAUNCH_COMPILE)
|
||||
MESSAGE(STATUS "Force enabling CCache usage under macOS")
|
||||
# Set up wrapper scripts
|
||||
configure_file("${COCKATRICE_CMAKE_PATH}/launch-c.in" launch-c)
|
||||
configure_file("${COCKATRICE_CMAKE_PATH}/launch-cxx.in" launch-cxx)
|
||||
execute_process(COMMAND chmod a+rx
|
||||
"${CMAKE_BINARY_DIR}/launch-c"
|
||||
"${CMAKE_BINARY_DIR}/launch-cxx")
|
||||
# Force ccache usage if available
|
||||
get_property(RULE_LAUNCH_COMPILE GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
|
||||
if(RULE_LAUNCH_COMPILE)
|
||||
message(STATUS "Force enabling CCache usage under macOS")
|
||||
# Set up wrapper scripts
|
||||
configure_file("${COCKATRICE_CMAKE_PATH}/launch-c.in" launch-c)
|
||||
configure_file("${COCKATRICE_CMAKE_PATH}/launch-cxx.in" launch-cxx)
|
||||
execute_process(COMMAND chmod a+rx "${CMAKE_BINARY_DIR}/launch-c" "${CMAKE_BINARY_DIR}/launch-cxx")
|
||||
|
||||
# Set Xcode project attributes to route compilation through our scripts
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CC "${CMAKE_BINARY_DIR}/launch-c")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CXX "${CMAKE_BINARY_DIR}/launch-cxx")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_LD "${CMAKE_BINARY_DIR}/launch-c")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "${CMAKE_BINARY_DIR}/launch-cxx")
|
||||
endif()
|
||||
else()
|
||||
# Linux / BSD
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
#fix package build
|
||||
if(PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX ${PREFIX})
|
||||
else()
|
||||
set(CMAKE_INSTALL_PREFIX /usr/local)
|
||||
endif()
|
||||
endif()
|
||||
# Set Xcode project attributes to route compilation through our scripts
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CC "${CMAKE_BINARY_DIR}/launch-c")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CXX "${CMAKE_BINARY_DIR}/launch-cxx")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_LD "${CMAKE_BINARY_DIR}/launch-c")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_LDPLUSPLUS "${CMAKE_BINARY_DIR}/launch-cxx")
|
||||
endif()
|
||||
else()
|
||||
# Linux / BSD
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
#fix package build
|
||||
if(PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX ${PREFIX})
|
||||
else()
|
||||
set(CMAKE_INSTALL_PREFIX /usr/local)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
elseif(WIN32)
|
||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/rundir/${CMAKE_BUILD_TYPE})
|
||||
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/rundir/${CMAKE_BUILD_TYPE})
|
||||
endif()
|
||||
|
||||
# Define proper compilation flags
|
||||
IF(MSVC)
|
||||
# Visual Studio: Maximum optimization, disable warning C4251, establish C++17 compatibility
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "/Ox /MD /wd4251 /Zc:__cplusplus /std:c++17 /permissive-")
|
||||
# Generate complete debugging information
|
||||
#set(CMAKE_CXX_FLAGS_DEBUG "/Zi")
|
||||
ELSEIF (CMAKE_COMPILER_IS_GNUCXX)
|
||||
# linux/gcc, bsd/gcc, windows/mingw
|
||||
include(CheckCXXCompilerFlag)
|
||||
if(MSVC)
|
||||
# Visual Studio: Maximum optimization, disable warning C4251, establish C++17 compatibility
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "/Ox /MD /wd4251 /Zc:__cplusplus /std:c++17 /permissive-")
|
||||
# Generate complete debugging information
|
||||
#set(CMAKE_CXX_FLAGS_DEBUG "/Zi")
|
||||
elseif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# linux/gcc, bsd/gcc, windows/mingw
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-s -O2")
|
||||
if(WARNING_AS_ERROR)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -O0 -Wall -Wextra -Werror")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -O0 -Wall -Wextra")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-s -O2")
|
||||
if(WARNING_AS_ERROR)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -O0 -Wall -Wextra -Werror")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -O0 -Wall -Wextra")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17")
|
||||
endif()
|
||||
|
||||
set(ADDITIONAL_DEBUG_FLAGS
|
||||
-Wcast-align
|
||||
-Wmissing-declarations
|
||||
-Wno-long-long
|
||||
-Wno-error=extra
|
||||
-Wno-error=delete-non-virtual-dtor
|
||||
-Wno-error=sign-compare
|
||||
-Wno-error=missing-declarations
|
||||
)
|
||||
|
||||
foreach(FLAG ${ADDITIONAL_DEBUG_FLAGS})
|
||||
check_cxx_compiler_flag("${FLAG}" CXX_HAS_WARNING_${FLAG})
|
||||
if(CXX_HAS_WARNING_${FLAG})
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FLAG}")
|
||||
endif()
|
||||
|
||||
IF(APPLE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17")
|
||||
ENDIF()
|
||||
|
||||
set(ADDITIONAL_DEBUG_FLAGS -Wcast-align -Wmissing-declarations -Wno-long-long -Wno-error=extra -Wno-error=delete-non-virtual-dtor -Wno-error=sign-compare -Wno-error=missing-declarations)
|
||||
|
||||
FOREACH(FLAG ${ADDITIONAL_DEBUG_FLAGS})
|
||||
CHECK_CXX_COMPILER_FLAG("${FLAG}" CXX_HAS_WARNING_${FLAG})
|
||||
IF(CXX_HAS_WARNING_${FLAG})
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${FLAG}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
ELSE()
|
||||
# other: osx/llvm, bsd/llvm
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
||||
if(WARNING_AS_ERROR)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra -Werror")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra")
|
||||
endif()
|
||||
ENDIF()
|
||||
endforeach()
|
||||
else()
|
||||
# other: osx/llvm, bsd/llvm
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
||||
if(WARNING_AS_ERROR)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra -Werror")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wextra")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# GNU systems need to define the Mersenne exponent for the RNG to compile w/o warning
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
ADD_DEFINITIONS("-DSFMT_MEXP=19937")
|
||||
ENDIF()
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
add_definitions("-DSFMT_MEXP=19937")
|
||||
endif()
|
||||
|
||||
FIND_PACKAGE(Threads REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
# Determine 32 or 64 bit build
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(_lib_suffix 64)
|
||||
set(_lib_suffix 64)
|
||||
else()
|
||||
set(_lib_suffix 32)
|
||||
set(_lib_suffix 32)
|
||||
endif()
|
||||
|
||||
if(DEFINED QTDIR${_lib_suffix})
|
||||
list(APPEND CMAKE_PREFIX_PATH "${QTDIR${_lib_suffix}}")
|
||||
list(APPEND CMAKE_PREFIX_PATH "${QTDIR${_lib_suffix}}")
|
||||
elseif(DEFINED QTDIR)
|
||||
list(APPEND CMAKE_PREFIX_PATH "${QTDIR}")
|
||||
list(APPEND CMAKE_PREFIX_PATH "${QTDIR}")
|
||||
elseif(DEFINED ENV{QTDIR${_lib_suffix}})
|
||||
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR${_lib_suffix}}")
|
||||
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR${_lib_suffix}}")
|
||||
elseif(DEFINED ENV{QTDIR})
|
||||
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR}")
|
||||
list(APPEND CMAKE_PREFIX_PATH "$ENV{QTDIR}")
|
||||
endif()
|
||||
|
||||
MESSAGE(STATUS "Update Translations: ${UPDATE_TRANSLATIONS}")
|
||||
message(STATUS "Update Translations: ${UPDATE_TRANSLATIONS}")
|
||||
|
||||
include(FindQtRuntime)
|
||||
|
||||
set(CMAKE_AUTOMOC TRUE)
|
||||
|
||||
# Find other needed libraries
|
||||
FIND_PACKAGE(Protobuf REQUIRED)
|
||||
IF(NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
|
||||
MESSAGE(FATAL_ERROR "No protoc command found!")
|
||||
ELSE()
|
||||
MESSAGE(STATUS "Found Protobuf ${Protobuf_VERSION} at: ${Protobuf_LIBRARIES}")
|
||||
ENDIF()
|
||||
find_package(Protobuf REQUIRED)
|
||||
if(NOT EXISTS "${Protobuf_PROTOC_EXECUTABLE}")
|
||||
message(FATAL_ERROR "No protoc command found!")
|
||||
else()
|
||||
message(STATUS "Found Protobuf ${Protobuf_VERSION} at: ${Protobuf_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
#Find OpenSSL
|
||||
IF(WIN32)
|
||||
FIND_PACKAGE(Win32SslRuntime)
|
||||
ENDIF()
|
||||
if(WIN32)
|
||||
find_package(Win32SslRuntime)
|
||||
endif()
|
||||
|
||||
#Find VCredist
|
||||
IF(MSVC)
|
||||
FIND_PACKAGE(VCredistRuntime)
|
||||
ENDIF()
|
||||
if(MSVC)
|
||||
find_package(VCredistRuntime)
|
||||
endif()
|
||||
|
||||
# Package builder
|
||||
set(CPACK_PACKAGE_CONTACT "Zach Halpern <zach@cockatrice.us>")
|
||||
@@ -218,95 +245,93 @@ set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_VERSION_FILENAME}")
|
||||
|
||||
if(UNIX)
|
||||
if(APPLE)
|
||||
set(CPACK_GENERATOR DragNDrop ${CPACK_GENERATOR})
|
||||
set(CPACK_GENERATOR "DragNDrop")
|
||||
set(CPACK_DMG_FORMAT "UDBZ")
|
||||
set(CPACK_DMG_VOLUME_NAME "${PROJECT_NAME}")
|
||||
set(CPACK_SYSTEM_NAME "OSX")
|
||||
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/cockatrice/resources/appicon.icns")
|
||||
if(APPLE)
|
||||
set(CPACK_GENERATOR DragNDrop ${CPACK_GENERATOR})
|
||||
set(CPACK_GENERATOR "DragNDrop")
|
||||
set(CPACK_DMG_FORMAT "UDBZ")
|
||||
set(CPACK_DMG_VOLUME_NAME "${PROJECT_NAME}")
|
||||
set(CPACK_SYSTEM_NAME "OSX")
|
||||
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/cockatrice/resources/appicon.icns")
|
||||
else()
|
||||
# linux
|
||||
if(CPACK_GENERATOR STREQUAL "RPM")
|
||||
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
||||
set(CPACK_RPM_MAIN_COMPONENT "cockatrice")
|
||||
if(Qt6_FOUND)
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "protobuf, qt6-qttools, qt6-qtsvg, qt6-qtmultimedia")
|
||||
elseif(Qt5_FOUND)
|
||||
set(CPACK_RPM_PACKAGE_REQUIRES "protobuf, qt5-qttools, qt5-qtsvg, qt5-qtmultimedia")
|
||||
endif()
|
||||
set(CPACK_RPM_PACKAGE_GROUP "Amusements/Games")
|
||||
set(CPACK_RPM_PACKAGE_URL "http://github.com/Cockatrice/Cockatrice")
|
||||
# stop directories from making package conflicts
|
||||
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
|
||||
/usr/share/applications
|
||||
/usr/share/icons
|
||||
/usr/share/icons/hicolor
|
||||
/usr/share/icons/hicolor/48x48
|
||||
/usr/share/icons/hicolor/48x48/apps
|
||||
/usr/share/icons/hicolor/scalable
|
||||
/usr/share/icons/hicolor/scalable/apps
|
||||
)
|
||||
else()
|
||||
# linux
|
||||
IF(CPACK_GENERATOR STREQUAL "RPM")
|
||||
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
||||
set(CPACK_RPM_MAIN_COMPONENT "cockatrice")
|
||||
IF(Qt6_FOUND)
|
||||
SET(CPACK_RPM_PACKAGE_REQUIRES "protobuf, qt6-qttools, qt6-qtsvg, qt6-qtmultimedia")
|
||||
ELSEIF(Qt5_FOUND)
|
||||
SET(CPACK_RPM_PACKAGE_REQUIRES "protobuf, qt5-qttools, qt5-qtsvg, qt5-qtmultimedia")
|
||||
ENDIF()
|
||||
set(CPACK_RPM_PACKAGE_GROUP "Amusements/Games")
|
||||
set(CPACK_RPM_PACKAGE_URL "http://github.com/Cockatrice/Cockatrice")
|
||||
# stop directories from making package conflicts
|
||||
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
|
||||
/usr/share/applications
|
||||
/usr/share/icons
|
||||
/usr/share/icons/hicolor
|
||||
/usr/share/icons/hicolor/48x48
|
||||
/usr/share/icons/hicolor/48x48/apps
|
||||
/usr/share/icons/hicolor/scalable
|
||||
/usr/share/icons/hicolor/scalable/apps)
|
||||
ELSE()
|
||||
set(CPACK_GENERATOR DEB)
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION "games")
|
||||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://github.com/Cockatrice/Cockatrice")
|
||||
IF(Qt6_FOUND)
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt6multimedia6, libqt6svg6, qt6-qpa-plugins")
|
||||
ELSEIF(Qt5_FOUND)
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5multimedia5-plugins, libqt5svg5")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
set(CPACK_GENERATOR DEB)
|
||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION "games")
|
||||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://github.com/Cockatrice/Cockatrice")
|
||||
if(Qt6_FOUND)
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt6multimedia6, libqt6svg6, qt6-qpa-plugins")
|
||||
elseif(Qt5_FOUND)
|
||||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt5multimedia5-plugins, libqt5svg5")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
elseif(WIN32)
|
||||
set(CPACK_GENERATOR NSIS ${CPACK_GENERATOR})
|
||||
if("${CMAKE_GENERATOR_PLATFORM}" MATCHES "(x64)")
|
||||
set(TRICE_IS_64_BIT 1)
|
||||
else()
|
||||
set(TRICE_IS_64_BIT 0)
|
||||
endif()
|
||||
set(CPACK_GENERATOR NSIS ${CPACK_GENERATOR})
|
||||
if("${CMAKE_GENERATOR_PLATFORM}" MATCHES "(x64)")
|
||||
set(TRICE_IS_64_BIT 1)
|
||||
else()
|
||||
set(TRICE_IS_64_BIT 0)
|
||||
endif()
|
||||
|
||||
# Configure file with custom definitions for NSIS.
|
||||
configure_file(
|
||||
"${COCKATRICE_CMAKE_PATH}/NSIS.definitions.nsh.in"
|
||||
"${PROJECT_BINARY_DIR}/NSIS.definitions.nsh"
|
||||
)
|
||||
# Configure file with custom definitions for NSIS.
|
||||
configure_file("${COCKATRICE_CMAKE_PATH}/NSIS.definitions.nsh.in" "${PROJECT_BINARY_DIR}/NSIS.definitions.nsh")
|
||||
|
||||
# include vcredist into the package; NSIS will take care of running it
|
||||
if(VCREDISTRUNTIME_FOUND)
|
||||
INSTALL(FILES "${VCREDISTRUNTIME_FILE}" DESTINATION ./)
|
||||
endif()
|
||||
# include vcredist into the package; NSIS will take care of running it
|
||||
if(VCREDISTRUNTIME_FOUND)
|
||||
install(FILES "${VCREDISTRUNTIME_FILE}" DESTINATION ./)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
|
||||
add_subdirectory(common)
|
||||
if(WITH_SERVER)
|
||||
add_subdirectory(servatrice)
|
||||
SET(CPACK_INSTALL_CMAKE_PROJECTS "Servatrice;Servatrice;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
||||
add_subdirectory(servatrice)
|
||||
set(CPACK_INSTALL_CMAKE_PROJECTS "Servatrice;Servatrice;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
||||
endif()
|
||||
|
||||
if(WITH_CLIENT)
|
||||
add_subdirectory(cockatrice)
|
||||
SET(CPACK_INSTALL_CMAKE_PROJECTS "Cockatrice;Cockatrice;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
||||
add_subdirectory(cockatrice)
|
||||
set(CPACK_INSTALL_CMAKE_PROJECTS "Cockatrice;Cockatrice;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
||||
endif()
|
||||
|
||||
if(WITH_ORACLE)
|
||||
add_subdirectory(oracle)
|
||||
SET(CPACK_INSTALL_CMAKE_PROJECTS "Oracle;Oracle;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
||||
add_subdirectory(oracle)
|
||||
set(CPACK_INSTALL_CMAKE_PROJECTS "Oracle;Oracle;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
||||
endif()
|
||||
|
||||
if(WITH_DBCONVERTER)
|
||||
add_subdirectory(dbconverter)
|
||||
SET(CPACK_INSTALL_CMAKE_PROJECTS "Dbconverter;Dbconverter;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
||||
add_subdirectory(dbconverter)
|
||||
set(CPACK_INSTALL_CMAKE_PROJECTS "Dbconverter;Dbconverter;ALL;/" ${CPACK_INSTALL_CMAKE_PROJECTS})
|
||||
endif()
|
||||
|
||||
if(TEST)
|
||||
include(CTest)
|
||||
add_subdirectory(tests)
|
||||
include(CTest)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
if(Qt6Found AND Qt6_VERSION_MINOR GREATER_EQUAL 3)
|
||||
# Qt6.3+ requires project finalization to support translations
|
||||
qt6_finalize_project()
|
||||
if(Qt6_FOUND AND Qt6_VERSION_MINOR GREATER_EQUAL 3)
|
||||
# Qt6.3+ requires project finalization to support translations
|
||||
qt6_finalize_project()
|
||||
endif()
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<br><pre>
|
||||
<b>To get started, ⇢ [view our webpage](https://cockatrice.github.io/)</b><br>
|
||||
<b>To get support or suggest changes ⇢ [file an issue](https://github.com/Cockatrice/Cockatrice/issues) ([How?](https://github.com/Cockatrice/Cockatrice/wiki/How-to-Create-a-GitHub-Ticket-Regarding-Cockatrice))</b>
|
||||
<b>To help with development, see how to [get involved](#get-involved-)</b>
|
||||
<b>To help with development, see how to [get involved](#get-involved--)</b>
|
||||
</pre><br>
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
# Find a compatible Qt version Inputs: WITH_SERVER, WITH_CLIENT, WITH_ORACLE, WITH_DBCONVERTER, FORCE_USE_QT5 Optional
|
||||
# Input: QT6_DIR -- Hint as to where Qt6 lives on the system Optional Input: QT5_DIR -- Hint as to where Qt5 lives on
|
||||
# the system Output: COCKATRICE_QT_VERSION_NAME -- Example values: Qt5, Qt6 Outputs: SERVATRICE_QT_MODULES,
|
||||
# COCKATRICE_QT_MODULES, ORACLE_QT_MODULES, DBCONVERTER_QT_MODULES, TEST_QT_MODULES
|
||||
# Find a compatible Qt version
|
||||
# Inputs: WITH_SERVER, WITH_CLIENT, WITH_ORACLE, WITH_DBCONVERTER, FORCE_USE_QT5
|
||||
# Optional Input: QT6_DIR -- Hint as to where Qt6 lives on the system
|
||||
# Optional Input: QT5_DIR -- Hint as to where Qt5 lives on the system
|
||||
# Output: COCKATRICE_QT_VERSION_NAME -- Example values: Qt5, Qt6
|
||||
# Output: SERVATRICE_QT_MODULES
|
||||
# Output: COCKATRICE_QT_MODULES
|
||||
# Output: ORACLE_QT_MODULES
|
||||
# Output: DBCONVERTER_QT_MODULES
|
||||
# Output: TEST_QT_MODULES
|
||||
|
||||
set(REQUIRED_QT_COMPONENTS Core)
|
||||
if(WITH_SERVER)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Find the OpenSSL runtime libraries (.dll) for Windows that will be needed by Qt in order to access https urls.
|
||||
# Find the OpenSSL runtime libraries (.dll) for Windows that
|
||||
# will be needed by Qt in order to access https urls.
|
||||
if(NOT DEFINED WIN32 OR NOT ${WIN32})
|
||||
message(STATUS "Non-Windows device trying to execute FindWin32SslRuntime, skipping")
|
||||
return()
|
||||
@@ -7,8 +8,10 @@ endif()
|
||||
if("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "x64")
|
||||
message(STATUS "Looking for OpenSSL for ${CMAKE_GENERATOR_PLATFORM}")
|
||||
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
|
||||
set(_OPENSSL_ROOT_PATHS "$ENV{VCPKG_PACKAGES_DIR}/x64-windows/bin" "C:/OpenSSL-Win64/bin" "C:/OpenSSL-Win64"
|
||||
"C:/Tools/vcpkg/installed/x64-windows/bin" "${_programfiles}/OpenSSL-Win64"
|
||||
set(_OPENSSL_ROOT_PATHS
|
||||
"$ENV{VCPKG_PACKAGES_DIR}/x64-windows/bin" "C:/OpenSSL-Win64/bin" "C:/OpenSSL-Win64"
|
||||
"C:/Tools/vcpkg/installed/x64-windows/bin" "${_programfiles}/OpenSSL-Win64"
|
||||
"D:/a/Cockatrice/Qt/Tools/OpenSSL/Win_x64/bin"
|
||||
)
|
||||
unset(_programfiles)
|
||||
elseif("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "Win32")
|
||||
@@ -22,6 +25,7 @@ elseif("${CMAKE_GENERATOR_PLATFORM}" STREQUAL "Win32")
|
||||
"C:/Tools/vcpkg/installed/x86-windows/bin"
|
||||
"${_programfiles}/OpenSSL"
|
||||
"${_programfiles}/OpenSSL-Win32"
|
||||
"D:/a/Cockatrice/Qt/Tools/OpenSSL/Win_x86/bin"
|
||||
)
|
||||
unset(_programfiles)
|
||||
endif()
|
||||
|
||||
@@ -71,7 +71,9 @@ function(get_tag_name commit)
|
||||
string(REPLACE "\n" "" GIT_TAG "${GIT_TAG}")
|
||||
message(STATUS "Commit is a release or prerelease, git tag: ${GIT_TAG}")
|
||||
|
||||
# Extract information from tag: YYYY-MM-DD-Release-MAJ.MIN.PATCH YYYY-MM-DD-Development-MAJ.MIN.PATCH-beta.X
|
||||
# Extract information from tag:
|
||||
# YYYY-MM-DD-Release-MAJ.MIN.PATCH
|
||||
# YYYY-MM-DD-Development-MAJ.MIN.PATCH-beta.X
|
||||
string(REPLACE "-" ";" GIT_TAG_EXPLODED "${GIT_TAG}")
|
||||
string(REPLACE "." ";" GIT_TAG_EXPLODED "${GIT_TAG_EXPLODED}")
|
||||
|
||||
@@ -131,8 +133,10 @@ function(get_tag_name commit)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Label 7 = Stable release 8 = Dev release, first beta so only "beta" attached 9 = Dev release, subsequent beta so
|
||||
# "beta.N" attached (N>=2)
|
||||
# Label
|
||||
# 7 = Stable release
|
||||
# 8 = Dev release, first beta so only "beta" attached
|
||||
# 9 = Dev release, subsequent beta so "beta.N" attached (N>=2)
|
||||
if(${GIT_TAG_LISTCOUNT} EQUAL 8)
|
||||
list(GET GIT_TAG_EXPLODED 7 GIT_TAG_LABEL)
|
||||
elseif(${GIT_TAG_LISTCOUNT} EQUAL 9)
|
||||
|
||||
14
cmakeify.sh
14
cmakeify.sh
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# go to the project root directory, this file should be located in the project root directory
|
||||
cd "${BASH_SOURCE%/*}/" || exit 2 # could not find path, this could happen with special links etc.
|
||||
|
||||
# CMake-Format
|
||||
cmake_format_cmd="cmake-format"
|
||||
|
||||
if ! hash $cmake_format_cmd 2>/dev/null; then
|
||||
echo "could not find $cmake_format_cmd, skipping" >&2
|
||||
return
|
||||
fi
|
||||
|
||||
$cmake_format_cmd -i cmake/*.cmake */CMakeLists.txt CMakeLists.txt
|
||||
@@ -361,7 +361,7 @@ Data = Resources\")
|
||||
endif()
|
||||
|
||||
if(Qt6LinguistTools_FOUND)
|
||||
# Qt6 Translations happen after the executable is built up
|
||||
#Qt6 Translations happen after the executable is built up
|
||||
if(UPDATE_TRANSLATIONS)
|
||||
qt6_add_translations(
|
||||
cockatrice
|
||||
|
||||
@@ -138,8 +138,8 @@ void ArrowItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
}
|
||||
|
||||
QList<QGraphicsItem *> colliding = scene()->items(event->scenePos());
|
||||
for (int i = 0; i < colliding.size(); ++i) {
|
||||
if (qgraphicsitem_cast<CardItem *>(colliding[i])) {
|
||||
for (QGraphicsItem *item : colliding) {
|
||||
if (qgraphicsitem_cast<CardItem *>(item)) {
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
@@ -205,8 +205,8 @@ void ArrowDragItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
}
|
||||
update();
|
||||
|
||||
for (int i = 0; i < childArrows.size(); ++i) {
|
||||
childArrows[i]->mouseMoveEvent(event);
|
||||
for (ArrowDragItem *child : childArrows) {
|
||||
child->mouseMoveEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,8 +251,9 @@ void ArrowDragItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
}
|
||||
delArrow();
|
||||
|
||||
for (int i = 0; i < childArrows.size(); ++i)
|
||||
childArrows[i]->mouseReleaseEvent(event);
|
||||
for (ArrowDragItem *child : childArrows) {
|
||||
child->mouseReleaseEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
ArrowAttachItem::ArrowAttachItem(ArrowTarget *_startItem)
|
||||
@@ -260,6 +261,11 @@ ArrowAttachItem::ArrowAttachItem(ArrowTarget *_startItem)
|
||||
{
|
||||
}
|
||||
|
||||
void ArrowAttachItem::addChildArrow(ArrowAttachItem *childArrow)
|
||||
{
|
||||
childArrows.append(childArrow);
|
||||
}
|
||||
|
||||
void ArrowAttachItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
if (!startItem)
|
||||
@@ -295,9 +301,13 @@ void ArrowAttachItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
updatePath();
|
||||
}
|
||||
update();
|
||||
|
||||
for (ArrowAttachItem *child : childArrows) {
|
||||
child->mouseMoveEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
void ArrowAttachItem::mouseReleaseEvent(QGraphicsSceneMouseEvent * /*event*/)
|
||||
void ArrowAttachItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
if (!startItem)
|
||||
return;
|
||||
@@ -319,4 +329,8 @@ void ArrowAttachItem::mouseReleaseEvent(QGraphicsSceneMouseEvent * /*event*/)
|
||||
}
|
||||
|
||||
delArrow();
|
||||
|
||||
for (ArrowAttachItem *child : childArrows) {
|
||||
child->mouseReleaseEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,8 +85,12 @@ protected:
|
||||
class ArrowAttachItem : public ArrowItem
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
QList<ArrowAttachItem *> childArrows;
|
||||
|
||||
public:
|
||||
ArrowAttachItem(ArrowTarget *_startItem);
|
||||
void addChildArrow(ArrowAttachItem *childArrow);
|
||||
|
||||
protected:
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
|
||||
@@ -675,9 +675,10 @@ CardRelation::CardRelation(const QString &_name,
|
||||
bool _doesAttach,
|
||||
bool _isCreateAllExclusion,
|
||||
bool _isVariableCount,
|
||||
int _defaultCount)
|
||||
int _defaultCount,
|
||||
bool _isPersistent)
|
||||
: name(_name), doesAttach(_doesAttach), isCreateAllExclusion(_isCreateAllExclusion),
|
||||
isVariableCount(_isVariableCount), defaultCount(_defaultCount)
|
||||
isVariableCount(_isVariableCount), defaultCount(_defaultCount), isPersistent(_isPersistent)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -458,13 +458,15 @@ private:
|
||||
bool isCreateAllExclusion;
|
||||
bool isVariableCount;
|
||||
int defaultCount;
|
||||
bool isPersistent;
|
||||
|
||||
public:
|
||||
explicit CardRelation(const QString &_name = QString(),
|
||||
bool _doesAttach = false,
|
||||
bool _isCreateAllExclusion = false,
|
||||
bool _isVariableCount = false,
|
||||
int _defaultCount = 1);
|
||||
int _defaultCount = 1,
|
||||
bool _isPersistent = false);
|
||||
|
||||
inline const QString &getName() const
|
||||
{
|
||||
@@ -490,5 +492,9 @@ public:
|
||||
{
|
||||
return defaultCount;
|
||||
}
|
||||
bool getIsPersistent() const
|
||||
{
|
||||
return isPersistent;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -185,6 +185,7 @@ void CockatriceXml4Parser::loadCardsFromXml(QXmlStreamReader &xml)
|
||||
bool attach = false;
|
||||
bool exclude = false;
|
||||
bool variable = false;
|
||||
bool persistent = false;
|
||||
int count = 1;
|
||||
QXmlStreamAttributes attrs = xml.attributes();
|
||||
QString cardName = xml.readElementText(QXmlStreamReader::IncludeChildElements);
|
||||
@@ -211,7 +212,11 @@ void CockatriceXml4Parser::loadCardsFromXml(QXmlStreamReader &xml)
|
||||
exclude = true;
|
||||
}
|
||||
|
||||
auto *relation = new CardRelation(cardName, attach, exclude, variable, count);
|
||||
if (attrs.hasAttribute("persistent")) {
|
||||
persistent = true;
|
||||
}
|
||||
|
||||
auto *relation = new CardRelation(cardName, attach, exclude, variable, count, persistent);
|
||||
if (xmlName == "reverse-related") {
|
||||
reverseRelatedCards << relation;
|
||||
} else {
|
||||
@@ -294,7 +299,9 @@ static QXmlStreamWriter &operator<<(QXmlStreamWriter &xml, const CardInfoPtr &in
|
||||
if (i->getIsCreateAllExclusion()) {
|
||||
xml.writeAttribute("exclude", "exclude");
|
||||
}
|
||||
|
||||
if (i->getIsPersistent()) {
|
||||
xml.writeAttribute("persistent", "persistent");
|
||||
}
|
||||
if (i->getIsVariable()) {
|
||||
if (1 == i->getDefaultCount()) {
|
||||
xml.writeAttribute("count", "x");
|
||||
@@ -318,6 +325,9 @@ static QXmlStreamWriter &operator<<(QXmlStreamWriter &xml, const CardInfoPtr &in
|
||||
xml.writeAttribute("exclude", "exclude");
|
||||
}
|
||||
|
||||
if (i->getIsPersistent()) {
|
||||
xml.writeAttribute("persistent", "persistent");
|
||||
}
|
||||
if (i->getIsVariable()) {
|
||||
if (1 == i->getDefaultCount()) {
|
||||
xml.writeAttribute("count", "x");
|
||||
|
||||
@@ -286,15 +286,36 @@ void CardItem::drawArrow(const QColor &arrowColor)
|
||||
scene()->addItem(arrow);
|
||||
arrow->grabMouse();
|
||||
|
||||
QListIterator<QGraphicsItem *> itemIterator(scene()->selectedItems());
|
||||
while (itemIterator.hasNext()) {
|
||||
CardItem *c = qgraphicsitem_cast<CardItem *>(itemIterator.next());
|
||||
if (!c || (c == this))
|
||||
for (const auto &item : scene()->selectedItems()) {
|
||||
CardItem *card = qgraphicsitem_cast<CardItem *>(item);
|
||||
if (card == nullptr || card == this)
|
||||
continue;
|
||||
if (c->getZone() != zone)
|
||||
if (card->getZone() != zone)
|
||||
continue;
|
||||
|
||||
ArrowDragItem *childArrow = new ArrowDragItem(arrowOwner, c, arrowColor);
|
||||
ArrowDragItem *childArrow = new ArrowDragItem(arrowOwner, card, arrowColor);
|
||||
scene()->addItem(childArrow);
|
||||
arrow->addChildArrow(childArrow);
|
||||
}
|
||||
}
|
||||
|
||||
void CardItem::drawAttachArrow()
|
||||
{
|
||||
if (static_cast<TabGame *>(owner->parent())->getSpectator())
|
||||
return;
|
||||
|
||||
auto *arrow = new ArrowAttachItem(this);
|
||||
scene()->addItem(arrow);
|
||||
arrow->grabMouse();
|
||||
|
||||
for (const auto &item : scene()->selectedItems()) {
|
||||
CardItem *card = qgraphicsitem_cast<CardItem *>(item);
|
||||
if (card == nullptr)
|
||||
continue;
|
||||
if (card->getZone() != zone)
|
||||
continue;
|
||||
|
||||
ArrowAttachItem *childArrow = new ArrowAttachItem(card);
|
||||
scene()->addItem(childArrow);
|
||||
arrow->addChildArrow(childArrow);
|
||||
}
|
||||
@@ -332,19 +353,19 @@ void CardItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
createDragItem(id, event->pos(), event->scenePos(), facedown || forceFaceDown);
|
||||
dragItem->grabMouse();
|
||||
|
||||
QList<QGraphicsItem *> sel = scene()->selectedItems();
|
||||
int j = 0;
|
||||
for (int i = 0; i < sel.size(); i++) {
|
||||
CardItem *c = static_cast<CardItem *>(sel.at(i));
|
||||
if ((c == this) || (c->getZone() != zone))
|
||||
int childIndex = 0;
|
||||
for (const auto &item : scene()->selectedItems()) {
|
||||
CardItem *card = static_cast<CardItem *>(item);
|
||||
if ((card == this) || (card->getZone() != zone))
|
||||
continue;
|
||||
++j;
|
||||
++childIndex;
|
||||
QPointF childPos;
|
||||
if (zone->getHasCardAttr())
|
||||
childPos = c->pos() - pos();
|
||||
childPos = card->pos() - pos();
|
||||
else
|
||||
childPos = QPointF(j * CARD_WIDTH / 2, 0);
|
||||
CardDragItem *drag = new CardDragItem(c, c->getId(), childPos, c->getFaceDown() || forceFaceDown, dragItem);
|
||||
childPos = QPointF(childIndex * CARD_WIDTH / 2, 0);
|
||||
CardDragItem *drag =
|
||||
new CardDragItem(card, card->getId(), childPos, card->getFaceDown() || forceFaceDown, dragItem);
|
||||
drag->setPos(dragItem->pos() + childPos);
|
||||
scene()->addItem(drag);
|
||||
}
|
||||
|
||||
@@ -157,6 +157,7 @@ public:
|
||||
CardDragItem *createDragItem(int _id, const QPointF &_pos, const QPointF &_scenePos, bool faceDown);
|
||||
void deleteDragItem();
|
||||
void drawArrow(const QColor &arrowColor);
|
||||
void drawAttachArrow();
|
||||
void playCard(bool faceDown);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -272,16 +272,11 @@ void DeckViewCardContainer::rearrangeItems(const QList<QPair<int, int>> &rowsAnd
|
||||
{
|
||||
currentRowsAndCols = rowsAndCols;
|
||||
|
||||
int totalCols = 0, totalRows = 0;
|
||||
qreal yUntilNow = separatorY + paddingY;
|
||||
qreal x = (qreal)getCardTypeTextWidth();
|
||||
for (int i = 0; i < rowsAndCols.size(); ++i) {
|
||||
const int tempRows = rowsAndCols[i].first;
|
||||
const int tempCols = rowsAndCols[i].second;
|
||||
totalRows += tempRows;
|
||||
if (tempCols > totalCols)
|
||||
totalCols = tempCols;
|
||||
|
||||
QList<QString> cardTypeList = cardsByType.uniqueKeys();
|
||||
QList<DeckViewCard *> row = cardsByType.values(cardTypeList[i]);
|
||||
std::sort(row.begin(), row.end(), DeckViewCardContainer::sortCardsByName);
|
||||
|
||||
@@ -60,6 +60,11 @@ bool KeySignals::eventFilter(QObject * /*object*/, QEvent *event)
|
||||
if (kevent->modifiers() & Qt::ShiftModifier)
|
||||
emit onShiftS();
|
||||
|
||||
break;
|
||||
case Qt::Key_C:
|
||||
if (kevent->modifiers() & Qt::ControlModifier)
|
||||
emit onCtrlC();
|
||||
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
|
||||
@@ -20,6 +20,7 @@ signals:
|
||||
void onCtrlAltLBracket();
|
||||
void onCtrlAltRBracket();
|
||||
void onShiftS();
|
||||
void onCtrlC();
|
||||
|
||||
protected:
|
||||
virtual bool eventFilter(QObject *, QEvent *event);
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
#include "thememanager.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QScreen>
|
||||
#include <QCryptographicHash>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
@@ -19,6 +18,7 @@
|
||||
#include <QPainter>
|
||||
#include <QPixmapCache>
|
||||
#include <QRegularExpression>
|
||||
#include <QScreen>
|
||||
#include <QSet>
|
||||
#include <QSvgRenderer>
|
||||
#include <QThread>
|
||||
@@ -573,7 +573,7 @@ void PictureLoader::getPixmap(QPixmap &pixmap, CardInfoPtr card, QSize size)
|
||||
// load the image and create a copy of the correct size
|
||||
QPixmap bigPixmap;
|
||||
if (QPixmapCache::find(key, &bigPixmap)) {
|
||||
QScreen * screen = qApp->primaryScreen();
|
||||
QScreen *screen = qApp->primaryScreen();
|
||||
int dpr = screen->devicePixelRatio();
|
||||
pixmap = bigPixmap.scaled(size * dpr, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
pixmap.setDevicePixelRatio(dpr);
|
||||
|
||||
@@ -1655,8 +1655,9 @@ void Player::actCreateAllRelatedCards()
|
||||
for (CardRelation *cardRelationAll : relatedCards) {
|
||||
if (!cardRelationAll->getDoesAttach() && !cardRelationAll->getIsVariable()) {
|
||||
dbName = cardRelationAll->getName();
|
||||
bool persistent = cardRelationAll->getIsPersistent();
|
||||
for (int i = 0; i < cardRelationAll->getDefaultCount(); ++i) {
|
||||
createCard(sourceCard, dbName);
|
||||
createCard(sourceCard, dbName, false, persistent);
|
||||
}
|
||||
++tokensTypesCreated;
|
||||
if (tokensTypesCreated == 1) {
|
||||
@@ -1669,8 +1670,9 @@ void Player::actCreateAllRelatedCards()
|
||||
for (CardRelation *cardRelationNotExcluded : nonExcludedRelatedCards) {
|
||||
if (!cardRelationNotExcluded->getDoesAttach() && !cardRelationNotExcluded->getIsVariable()) {
|
||||
dbName = cardRelationNotExcluded->getName();
|
||||
bool persistent = cardRelationNotExcluded->getIsPersistent();
|
||||
for (int i = 0; i < cardRelationNotExcluded->getDefaultCount(); ++i) {
|
||||
createCard(sourceCard, dbName);
|
||||
createCard(sourceCard, dbName, false, persistent);
|
||||
}
|
||||
++tokensTypesCreated;
|
||||
if (tokensTypesCreated == 1) {
|
||||
@@ -1698,6 +1700,7 @@ bool Player::createRelatedFromRelation(const CardItem *sourceCard, const CardRel
|
||||
return false;
|
||||
}
|
||||
QString dbName = cardRelation->getName();
|
||||
bool persistent = cardRelation->getIsPersistent();
|
||||
if (cardRelation->getIsVariable()) {
|
||||
bool ok;
|
||||
dialogSemaphore = true;
|
||||
@@ -1708,23 +1711,23 @@ bool Player::createRelatedFromRelation(const CardItem *sourceCard, const CardRel
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < count; ++i) {
|
||||
createCard(sourceCard, dbName);
|
||||
createCard(sourceCard, dbName, false, persistent);
|
||||
}
|
||||
} else if (cardRelation->getDefaultCount() > 1) {
|
||||
for (int i = 0; i < cardRelation->getDefaultCount(); ++i) {
|
||||
createCard(sourceCard, dbName);
|
||||
createCard(sourceCard, dbName, false, persistent);
|
||||
}
|
||||
} else {
|
||||
if (cardRelation->getDoesAttach()) {
|
||||
createAttachedCard(sourceCard, dbName);
|
||||
createAttachedCard(sourceCard, dbName, persistent);
|
||||
} else {
|
||||
createCard(sourceCard, dbName);
|
||||
createCard(sourceCard, dbName, false, persistent);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void Player::createCard(const CardItem *sourceCard, const QString &dbCardName, bool attach)
|
||||
void Player::createCard(const CardItem *sourceCard, const QString &dbCardName, bool attach, bool persistent)
|
||||
{
|
||||
CardInfoPtr cardInfo = db->getCard(dbCardName);
|
||||
|
||||
@@ -1758,7 +1761,7 @@ void Player::createCard(const CardItem *sourceCard, const QString &dbCardName, b
|
||||
} else {
|
||||
cmd.set_annotation("");
|
||||
}
|
||||
cmd.set_destroy_on_zone_change(true);
|
||||
cmd.set_destroy_on_zone_change(!persistent);
|
||||
cmd.set_target_zone(sourceCard->getZone()->getName().toStdString());
|
||||
cmd.set_x(gridPoint.x());
|
||||
cmd.set_y(gridPoint.y());
|
||||
@@ -1770,9 +1773,9 @@ void Player::createCard(const CardItem *sourceCard, const QString &dbCardName, b
|
||||
sendGameCommand(cmd);
|
||||
}
|
||||
|
||||
void Player::createAttachedCard(const CardItem *sourceCard, const QString &dbCardName)
|
||||
void Player::createAttachedCard(const CardItem *sourceCard, const QString &dbCardName, bool persistent)
|
||||
{
|
||||
createCard(sourceCard, dbCardName, true);
|
||||
createCard(sourceCard, dbCardName, true, persistent);
|
||||
}
|
||||
|
||||
void Player::actSayMessage()
|
||||
@@ -3186,9 +3189,7 @@ void Player::actAttach()
|
||||
return;
|
||||
}
|
||||
|
||||
auto *arrow = new ArrowAttachItem(card);
|
||||
scene()->addItem(arrow);
|
||||
arrow->grabMouse();
|
||||
card->drawAttachArrow();
|
||||
}
|
||||
|
||||
void Player::actUnattach()
|
||||
@@ -3197,10 +3198,15 @@ void Player::actUnattach()
|
||||
return;
|
||||
}
|
||||
|
||||
Command_AttachCard cmd;
|
||||
cmd.set_start_zone(game->getActiveCard()->getZone()->getName().toStdString());
|
||||
cmd.set_card_id(game->getActiveCard()->getId());
|
||||
sendGameCommand(cmd);
|
||||
QList<const ::google::protobuf::Message *> commandList;
|
||||
for (QGraphicsItem *item : scene()->selectedItems()) {
|
||||
auto *card = static_cast<CardItem *>(item);
|
||||
auto *cmd = new Command_AttachCard;
|
||||
cmd->set_start_zone(card->getZone()->getName().toStdString());
|
||||
cmd->set_card_id(card->getId());
|
||||
commandList.append(cmd);
|
||||
}
|
||||
sendGameCommand(prepareGameCommand(commandList));
|
||||
}
|
||||
|
||||
void Player::actCardCounterTrigger()
|
||||
|
||||
@@ -285,8 +285,9 @@ private:
|
||||
bool allCards);
|
||||
void addRelatedCardActions(const CardItem *card, QMenu *cardMenu);
|
||||
void addRelatedCardView(const CardItem *card, QMenu *cardMenu);
|
||||
void createCard(const CardItem *sourceCard, const QString &dbCardName, bool attach = false);
|
||||
void createAttachedCard(const CardItem *sourceCard, const QString &dbCardName);
|
||||
void
|
||||
createCard(const CardItem *sourceCard, const QString &dbCardName, bool attach = false, bool persistent = false);
|
||||
void createAttachedCard(const CardItem *sourceCard, const QString &dbCardName, bool persistent = false);
|
||||
bool createRelatedFromRelation(const CardItem *sourceCard, const CardRelation *cardRelation);
|
||||
|
||||
QRectF bRect;
|
||||
|
||||
@@ -541,10 +541,9 @@ void RemoteClient::ping()
|
||||
}
|
||||
}
|
||||
|
||||
int keepalive = SettingsCache::instance().getKeepAlive();
|
||||
int maxTime = timeRunning - lastDataReceived;
|
||||
emit maxPingTime(maxTime, maxTimeout);
|
||||
if (maxTime >= (keepalive * maxTimeout)) {
|
||||
if (maxTime >= maxTimeout) {
|
||||
disconnectFromServer();
|
||||
emit serverTimeout();
|
||||
} else {
|
||||
|
||||
@@ -89,7 +89,7 @@ private slots:
|
||||
void submitForgotPasswordChallengeResponse(const Response &response);
|
||||
|
||||
private:
|
||||
static const int maxTimeout = 10;
|
||||
static const int maxTimeout = 5;
|
||||
int timeRunning, lastDataReceived;
|
||||
QByteArray inputBuffer;
|
||||
bool messageInProgress;
|
||||
|
||||
@@ -18,7 +18,7 @@ QString SettingsCache::getDataPath()
|
||||
if (isPortableBuild)
|
||||
return qApp->applicationDirPath() + "/data";
|
||||
else
|
||||
return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
|
||||
return QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation);
|
||||
}
|
||||
|
||||
QString SettingsCache::getSettingsPath()
|
||||
@@ -181,7 +181,7 @@ SettingsCache::SettingsCache()
|
||||
updateReleaseChannel = settings->value("personal/updatereleasechannel", 0).toInt();
|
||||
|
||||
lang = settings->value("personal/lang").toString();
|
||||
keepalive = settings->value("personal/keepalive", 5).toInt();
|
||||
keepalive = settings->value("personal/keepalive", 3).toInt();
|
||||
|
||||
// tip of the day settings
|
||||
showTipsOnStartup = settings->value("tipOfDay/showTips", true).toBool();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#define DEFAULT_THEME_NAME "Default"
|
||||
#define TEST_SOUND_FILENAME "player_join"
|
||||
|
||||
SoundEngine::SoundEngine(QObject *parent) : QObject(parent), player(0)
|
||||
SoundEngine::SoundEngine(QObject *parent) : QObject(parent), player(nullptr)
|
||||
{
|
||||
ensureThemeDirectoryExists();
|
||||
connect(&SettingsCache::instance(), SIGNAL(soundThemeChanged()), this, SLOT(themeChangedSlot()));
|
||||
@@ -30,7 +30,7 @@ SoundEngine::~SoundEngine()
|
||||
void SoundEngine::soundEnabledChanged()
|
||||
{
|
||||
if (SettingsCache::instance().getSoundEnabled()) {
|
||||
qDebug("SoundEngine: enabling sound");
|
||||
qDebug() << "SoundEngine: enabling sound with" << audioData.size() << "sounds";
|
||||
if (!player) {
|
||||
player = new QMediaPlayer;
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
@@ -39,11 +39,11 @@ void SoundEngine::soundEnabledChanged()
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
qDebug("SoundEngine: disabling sound");
|
||||
qDebug() << "SoundEngine: disabling sound";
|
||||
if (player) {
|
||||
player->stop();
|
||||
player->deleteLater();
|
||||
player = 0;
|
||||
player = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,28 +54,17 @@ void SoundEngine::playSound(QString fileName)
|
||||
return;
|
||||
}
|
||||
|
||||
// still playing the previous sound?
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
if (player->playbackState() == QMediaPlayer::PlaybackState::PlayingState) {
|
||||
#else
|
||||
if (player->state() == QMediaPlayer::PlayingState) {
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if (!audioData.contains(fileName)) {
|
||||
return;
|
||||
}
|
||||
|
||||
qDebug() << "playing" << fileName;
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
player->audioOutput()->setVolume(SettingsCache::instance().getMasterVolume());
|
||||
player->stop();
|
||||
int volumeSliderValue = SettingsCache::instance().getMasterVolume();
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
player->audioOutput()->setVolume(qreal(volumeSliderValue) / 100);
|
||||
player->setSource(QUrl::fromLocalFile(audioData[fileName]));
|
||||
#else
|
||||
player->setVolume(SettingsCache::instance().getMasterVolume());
|
||||
player->stop();
|
||||
player->setVolume(volumeSliderValue);
|
||||
player->setMedia(QUrl::fromLocalFile(audioData[fileName]));
|
||||
#endif
|
||||
player->play();
|
||||
@@ -137,50 +126,29 @@ void SoundEngine::themeChangedSlot()
|
||||
|
||||
audioData.clear();
|
||||
|
||||
static const QStringList fileNames = QStringList()
|
||||
// Phases
|
||||
<< "untap_step"
|
||||
<< "upkeep_step"
|
||||
<< "draw_step"
|
||||
<< "main_1"
|
||||
<< "start_combat"
|
||||
<< "attack_step"
|
||||
<< "block_step"
|
||||
<< "damage_step"
|
||||
<< "end_combat"
|
||||
<< "main_2"
|
||||
<< "end_step"
|
||||
// Game Actions
|
||||
<< "draw_card"
|
||||
<< "play_card"
|
||||
<< "tap_card"
|
||||
<< "untap_card"
|
||||
<< "shuffle"
|
||||
<< "roll_dice"
|
||||
<< "life_change"
|
||||
// Player
|
||||
<< "player_join"
|
||||
<< "player_leave"
|
||||
<< "player_disconnect"
|
||||
<< "player_reconnect"
|
||||
<< "player_concede"
|
||||
// Spectator
|
||||
<< "spectator_join"
|
||||
<< "spectator_leave"
|
||||
// Buddy
|
||||
<< "buddy_join"
|
||||
<< "buddy_leave"
|
||||
// Chat & UI
|
||||
<< "chat_mention"
|
||||
<< "all_mention"
|
||||
<< "private_message";
|
||||
static const QStringList extensions = {".wav", ".mp3", ".ogg"};
|
||||
static const QStringList fileNames = {
|
||||
// Phases
|
||||
"untap_step", "upkeep_step", "draw_step", "main_1", "start_combat", "attack_step", "block_step", "damage_step",
|
||||
"end_combat", "main_2", "end_step",
|
||||
// Game Actions
|
||||
"draw_card", "play_card", "tap_card", "untap_card", "shuffle", "roll_dice", "life_change",
|
||||
// Player
|
||||
"player_join", "player_leave", "player_disconnect", "player_reconnect", "player_concede",
|
||||
// Spectator
|
||||
"spectator_join", "spectator_leave",
|
||||
// Buddy
|
||||
"buddy_join", "buddy_leave",
|
||||
// Chat & UI
|
||||
"chat_mention", "all_mention", "private_message"};
|
||||
|
||||
for (int i = 0; i < fileNames.size(); ++i) {
|
||||
if (!dir.exists(fileNames[i] + ".wav"))
|
||||
continue;
|
||||
|
||||
QFile file(dir.filePath(fileNames[i] + ".wav"));
|
||||
audioData.insert(fileNames[i], file.fileName());
|
||||
for (const QString &extension : extensions) {
|
||||
for (const QString &name : fileNames) {
|
||||
QFile file(dir.filePath(name + extension));
|
||||
if (file.exists()) {
|
||||
audioData.insert(name, file.fileName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
soundEnabledChanged();
|
||||
|
||||
@@ -394,6 +394,7 @@ void TabDeckEditor::createCentralFrame()
|
||||
connect(&searchKeySignals, SIGNAL(onCtrlAltLBracket()), this, SLOT(actDecrementCardFromSideboard()));
|
||||
connect(&searchKeySignals, SIGNAL(onCtrlAltEnter()), this, SLOT(actAddCardToSideboard()));
|
||||
connect(&searchKeySignals, SIGNAL(onCtrlEnter()), this, SLOT(actAddCardToSideboard()));
|
||||
connect(&searchKeySignals, SIGNAL(onCtrlC()), this, SLOT(copyDatabaseCellContents()));
|
||||
connect(help, &QAction::triggered, this, &TabDeckEditor::showSearchSyntaxHelp);
|
||||
|
||||
databaseModel = new CardDatabaseModel(db, true, this);
|
||||
@@ -1073,6 +1074,12 @@ void TabDeckEditor::actDecrementCardFromSideboard()
|
||||
decrementCardHelper(DECK_ZONE_SIDE);
|
||||
}
|
||||
|
||||
void TabDeckEditor::copyDatabaseCellContents()
|
||||
{
|
||||
QVariant data = databaseView->selectionModel()->currentIndex().data();
|
||||
QApplication::clipboard()->setText(data.toString());
|
||||
}
|
||||
|
||||
void TabDeckEditor::actIncrement()
|
||||
{
|
||||
const QModelIndex ¤tIndex = deckView->selectionModel()->currentIndex();
|
||||
|
||||
@@ -80,6 +80,7 @@ private slots:
|
||||
void actDecrement();
|
||||
void actDecrementCard();
|
||||
void actDecrementCardFromSideboard();
|
||||
void copyDatabaseCellContents();
|
||||
|
||||
void saveDeckRemoteFinished(const Response &r);
|
||||
void filterViewCustomContextMenu(const QPoint &point);
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="406"/>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Error</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="406"/>
|
||||
<source>Could not create themes directory at '%1'.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>No se pudo crear directorio de temas en '%1'.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="412"/>
|
||||
@@ -45,7 +45,7 @@
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="414"/>
|
||||
<source>Open themes folder</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Abrir carpeta de temas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="416"/>
|
||||
@@ -165,7 +165,7 @@ Se almacenará unicamente para moderadores y no podrá ser visto por la persona
|
||||
<message>
|
||||
<location filename="../src/userlist.cpp" line="104"/>
|
||||
<source>Redact all messages from this user in all rooms</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Redactar todos los mensajes de este usuario en todas las salas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/userlist.cpp" line="106"/>
|
||||
@@ -326,7 +326,7 @@ Se almacenará unicamente para moderadores y no podrá ser visto por la persona
|
||||
<message>
|
||||
<location filename="../src/cardfilter.cpp" line="35"/>
|
||||
<source>Mana Value</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Valor de maná</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/cardfilter.cpp" line="37"/>
|
||||
@@ -580,12 +580,12 @@ Se almacenará unicamente para moderadores y no podrá ser visto por la persona
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="564"/>
|
||||
<source>Add New URL</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Añadir URL</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="572"/>
|
||||
<source>Remove URL</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Borrar URL</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="712"/>
|
||||
@@ -804,7 +804,7 @@ Se almacenará unicamente para moderadores y no podrá ser visto por la persona
|
||||
<message>
|
||||
<location filename="../src/dlg_connect.cpp" line="97"/>
|
||||
<source>Reset Password</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Reiniciar Contraseña</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_connect.cpp" line="101"/>
|
||||
@@ -937,7 +937,7 @@ Se almacenará unicamente para moderadores y no podrá ser visto por la persona
|
||||
<message>
|
||||
<location filename="../src/dlg_creategame.cpp" line="88"/>
|
||||
<source>Create game as spectator</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Crear una partida como espectador</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_creategame.cpp" line="95"/>
|
||||
@@ -1135,7 +1135,7 @@ Para eliminar tu avatar actual, confirma sin elegir una nueva imagen.</translati
|
||||
<message>
|
||||
<location filename="../src/dlg_edit_password.cpp" line="64"/>
|
||||
<source>Your password is too short.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Su contraseña es muy corta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_edit_password.cpp" line="67"/>
|
||||
@@ -1272,32 +1272,32 @@ Asegúrese de habilitar la edición 'Fichas' en la opción "Mante
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="20"/>
|
||||
<source>no limit</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>sin límite</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="21"/>
|
||||
<source>5 minutes</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>5 minutos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="22"/>
|
||||
<source>10 minutes</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>10 minutos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="23"/>
|
||||
<source>30 minutes</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>30 minutos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="24"/>
|
||||
<source>1 hour</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>1 hora</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="25"/>
|
||||
<source>2 hours</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>2 horas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="27"/>
|
||||
@@ -1307,12 +1307,12 @@ Asegúrese de habilitar la edición 'Fichas' en la opción "Mante
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="30"/>
|
||||
<source>Show &full games</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Mostrar &partidas completas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="33"/>
|
||||
<source>Show games &that have started</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Mostrar partidas &ya comenzadas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="36"/>
|
||||
@@ -1327,7 +1327,7 @@ Asegúrese de habilitar la edición 'Fichas' en la opción "Mante
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="47"/>
|
||||
<source>&Newer than:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>&Más nuevo que:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="52"/>
|
||||
@@ -1372,27 +1372,27 @@ Asegúrese de habilitar la edición 'Fichas' en la opción "Mante
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="120"/>
|
||||
<source>Show games only if &spectators can watch</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Mostrar partidas solo si &espectadores pueden ver</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="124"/>
|
||||
<source>Show spectator password p&rotected games</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Mostrar contraseña de espectador para juegos p&rotegidos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="126"/>
|
||||
<source>Show only if spectators can ch&at</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Mostrar solo si los espectadores pueden ha&blar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="128"/>
|
||||
<source>Show only if spectators can see &hands</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Mostrar solo si los espectadores pueden ver &manos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="138"/>
|
||||
<source>Spectators</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Espectadores</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_filter_games.cpp" line="171"/>
|
||||
@@ -1405,17 +1405,17 @@ Asegúrese de habilitar la edición 'Fichas' en la opción "Mante
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordchallenge.cpp" line="31"/>
|
||||
<source>Reset Password Challenge Warning</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Reiniciar contraseña de desafíos con advertencia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordchallenge.cpp" line="32"/>
|
||||
<source>A problem has occurred. Please try to request a new password again.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Ha ocurrido un problema. Por favor intenta solicitar una nueva contraseña.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordchallenge.cpp" line="37"/>
|
||||
<source>Enter the information of the server and the account you'd like to request a new password for.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Introduce la información del servidor y de la cuenta para la que deseas solicitar una nueva contraseña.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordchallenge.cpp" line="40"/>
|
||||
@@ -1440,12 +1440,12 @@ Asegúrese de habilitar la edición 'Fichas' en la opción "Mante
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordchallenge.cpp" line="89"/>
|
||||
<source>Reset Password Challenge</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Reiniciar contraseña de desafío</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordchallenge.cpp" line="97"/>
|
||||
<source>Reset Password Challenge Error</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Error al reiniciar contraseña de desafío</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordchallenge.cpp" line="97"/>
|
||||
@@ -1458,7 +1458,7 @@ Asegúrese de habilitar la edición 'Fichas' en la opción "Mante
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordrequest.cpp" line="30"/>
|
||||
<source>Enter the information of the server you'd like to request a new password for.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Introduce la información del servidor para la que deseas solicitar una nueva contraseña.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordrequest.cpp" line="33"/>
|
||||
@@ -1478,12 +1478,12 @@ Asegúrese de habilitar la edición 'Fichas' en la opción "Mante
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordrequest.cpp" line="66"/>
|
||||
<source>Reset Password Request</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Error al reiniciar la petición para una contraseña</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordrequest.cpp" line="74"/>
|
||||
<source>Reset Password Error</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Error al reiniciar la contraseña</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordrequest.cpp" line="74"/>
|
||||
@@ -1496,17 +1496,17 @@ Asegúrese de habilitar la edición 'Fichas' en la opción "Mante
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordreset.cpp" line="31"/>
|
||||
<source>Reset Password Warning</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Reinicia la contraseña de advertencia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordreset.cpp" line="32"/>
|
||||
<source>A problem has occurred. Please try to request a new password again.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Ha ocurrido un problema. Por favor intenta solicitar de nuevo una nueva contraseña.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordreset.cpp" line="36"/>
|
||||
<source>Enter the received token and the new password in order to set your new password.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Introduce el token recibido y la nueva contraseña para establecer tu nueva contraseña.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordreset.cpp" line="39"/>
|
||||
@@ -1537,7 +1537,7 @@ Asegúrese de habilitar la edición 'Fichas' en la opción "Mante
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordreset.cpp" line="104"/>
|
||||
<source>Reset Password</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Reiniciar contraseña</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordreset.cpp" line="112"/>
|
||||
@@ -1550,7 +1550,7 @@ Asegúrese de habilitar la edición 'Fichas' en la opción "Mante
|
||||
<location filename="../src/dlg_forgotpasswordreset.cpp" line="122"/>
|
||||
<location filename="../src/dlg_forgotpasswordreset.cpp" line="131"/>
|
||||
<source>Reset Password Error</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Error al reiniciar contraseña</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordreset.cpp" line="117"/>
|
||||
@@ -1565,12 +1565,12 @@ Asegúrese de habilitar la edición 'Fichas' en la opción "Mante
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordreset.cpp" line="128"/>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Error</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordreset.cpp" line="128"/>
|
||||
<source>Your password is too short.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Tu contraseña es demasiado corta.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_forgotpasswordreset.cpp" line="131"/>
|
||||
@@ -1617,7 +1617,8 @@ Asegúrese de habilitar la edición 'Fichas' en la opción "Mante
|
||||
<location filename="../src/dlg_register.cpp" line="18"/>
|
||||
<source>Enter your information and the information of the server you'd like to register to.
|
||||
Your email will be used to verify your account.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Introduce tu información y la información del servidor en el que deseas registrarte.
|
||||
Tu correo electrónico se utilizará para verificar tu cuenta.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_register.cpp" line="22"/>
|
||||
@@ -1685,7 +1686,7 @@ Your email will be used to verify your account.</source>
|
||||
<message>
|
||||
<location filename="../src/dlg_register.cpp" line="361"/>
|
||||
<source>Your password is too short.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Tu contraseña es demasiado corta.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_register.cpp" line="364"/>
|
||||
@@ -1751,7 +1752,11 @@ Normalmente esto se soluciona volviendo a ejecutar oracle para actualizar tu bas
|
||||
Please file a ticket at https://github.com/Cockatrice/Cockatrice/issues with your cards.xml attached
|
||||
|
||||
Would you like to change your database location setting?</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Tu base de datos de cartas no terminó de cargarse
|
||||
|
||||
Por favor, envía un ticket en https://github.com/Cockatrice/Cockatrice/issues con tus cartas.xml anexadas
|
||||
|
||||
¿Te gustaría cambiar la configuración de la ubicación de tu base de datos?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="1384"/>
|
||||
@@ -1778,7 +1783,11 @@ Would you like to change your database location setting?</source>
|
||||
Please file a ticket at https://github.com/Cockatrice/Cockatrice/issues
|
||||
|
||||
Would you like to change your database location setting?</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Estado de carga de la base de datos de cartas desconocido
|
||||
|
||||
Por favor, envía un ticket en https://github.com/Cockatrice/Cockatrice/issues
|
||||
|
||||
¿Te gustaría cambiar la configuración de la ubicación de tu base de datos?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="1400"/>
|
||||
@@ -1881,7 +1890,7 @@ Would you like to change your database location setting?</source>
|
||||
<message>
|
||||
<location filename="../src/dlg_update.cpp" line="55"/>
|
||||
<source>Check for Client Updates</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Comprobar actualizaciones del cliente</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_update.cpp" line="63"/>
|
||||
@@ -2154,24 +2163,24 @@ You may have to build from source yourself.</source>
|
||||
<message>
|
||||
<location filename="../src/gamesmodel.cpp" line="48"/>
|
||||
<source>>1 day</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>>1 day</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../src/gamesmodel.cpp" line="57"/>
|
||||
<source>%1%2 hr</source>
|
||||
<comment>short age in hours</comment>
|
||||
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
|
||||
<translation><numerusform>%1%2 hora</numerusform><numerusform>%1%2 horas</numerusform><numerusform>%1%2 horas</numerusform></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/gamesmodel.cpp" line="59"/>
|
||||
<source>new</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>nuevo</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../src/gamesmodel.cpp" line="62"/>
|
||||
<source>%1%2 min</source>
|
||||
<comment>short age in minutes</comment>
|
||||
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
|
||||
<translation><numerusform>%1%2 min</numerusform><numerusform>%1%2 min</numerusform><numerusform>%1%2 min</numerusform></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/gamesmodel.cpp" line="158"/>
|
||||
@@ -2255,12 +2264,12 @@ You may have to build from source yourself.</source>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="145"/>
|
||||
<source>Reset all paths</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Reiniciar todos los caminos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="147"/>
|
||||
<source>All paths have been reset</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Todos los caminos se han reiniciado</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="203"/>
|
||||
@@ -2315,7 +2324,7 @@ You may have to build from source yourself.</source>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="294"/>
|
||||
<source>Custom database directory:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Directorio de base de datos personalizado:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="295"/>
|
||||
@@ -2413,6 +2422,8 @@ Reason for shutdown: %1</source>
|
||||
Todas las partidas en curso se cerraran.
|
||||
Motivo para el apagado: %1</numerusform><numerusform>El servidor será reiniciado en %n minuto(s).
|
||||
Todas las partidas en curso se cerraran.
|
||||
Motivo para el apagado: %1</numerusform><numerusform>El servidor será reiniciado en %n minuto(s).
|
||||
Todas las partidas en curso se cerraran.
|
||||
Motivo para el apagado: %1</numerusform></translation>
|
||||
</message>
|
||||
<message>
|
||||
@@ -2843,7 +2854,7 @@ La versión local es %1, la versión remota es %2.</translation>
|
||||
<message>
|
||||
<location filename="../src/window_main.cpp" line="637"/>
|
||||
<source>&Restore password...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>&Restaurar contraseña...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/window_main.cpp" line="638"/>
|
||||
@@ -2919,12 +2930,12 @@ La versión local es %1, la versión remota es %2.</translation>
|
||||
<message>
|
||||
<location filename="../src/window_main.cpp" line="659"/>
|
||||
<source>Check for Card Updates...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Comprobar actualizaciones de cartas...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/window_main.cpp" line="660"/>
|
||||
<source>View &Debug Log</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Ver &registro de debugs</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/window_main.cpp" line="888"/>
|
||||
@@ -2995,6 +3006,8 @@ Do you want to enable it/them?</source>
|
||||
Código de set: %1
|
||||
¿Quieres habilitarlo? </numerusform><numerusform>%n nuevos sets de cartas han sido encontrados en la base de datos.
|
||||
Códigos de sets: %1
|
||||
¿Quieres habilitarlos?</numerusform><numerusform>%n nuevos sets de cartas han sido encontrados en la base de datos.
|
||||
Códigos de sets: %1
|
||||
¿Quieres habilitarlos?</numerusform></translation>
|
||||
</message>
|
||||
<message>
|
||||
@@ -3113,7 +3126,7 @@ Cockatrice está recargando la base de datos de cartas.</translation>
|
||||
<location filename="../src/window_main.cpp" line="1336"/>
|
||||
<location filename="../src/window_main.cpp" line="1345"/>
|
||||
<source>Reset Password</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Reiniciar contraseña</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/window_main.cpp" line="1327"/>
|
||||
@@ -3226,12 +3239,12 @@ Cockatrice está recargando la base de datos de cartas.</translation>
|
||||
<message>
|
||||
<location filename="../src/messagelogwidget.cpp" line="157"/>
|
||||
<source>%1 can now look at top card %2 at any time.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>%1 ahora puede ver la carta superior de %2 en cualquier momento.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/messagelogwidget.cpp" line="158"/>
|
||||
<source>%1 no longer can look at top card %2 at any time.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>%1 ya no puede ver la carta superior de %2 en cualquier momento.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/messagelogwidget.cpp" line="165"/>
|
||||
@@ -3331,7 +3344,7 @@ Cockatrice está recargando la base de datos de cartas.</translation>
|
||||
<message>
|
||||
<location filename="../src/messagelogwidget.cpp" line="328"/>
|
||||
<source>%1 puts %2 into play%3 face down.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>%1 pone %2 en juego %3 bocabajo.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/messagelogwidget.cpp" line="330"/>
|
||||
@@ -3361,7 +3374,7 @@ Cockatrice está recargando la base de datos de cartas.</translation>
|
||||
<message>
|
||||
<location filename="../src/messagelogwidget.cpp" line="342"/>
|
||||
<source>%1 puts %2%3 onto the bottom of their library.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>%1 pone %2%3 al fondo de su biblioteca.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/messagelogwidget.cpp" line="344"/>
|
||||
@@ -3386,7 +3399,7 @@ Cockatrice está recargando la base de datos de cartas.</translation>
|
||||
<message numerus="yes">
|
||||
<location filename="../src/messagelogwidget.cpp" line="371"/>
|
||||
<source>%1 draws %2 card(s).</source>
|
||||
<translation><numerusform>%1 roba %2 carta(s).</numerusform><numerusform>%1 roba %2 c</numerusform></translation>
|
||||
<translation><numerusform>%1 roba %2 carta(s).</numerusform><numerusform>%1 roba %2 c</numerusform><numerusform>%1 roba %2 c</numerusform></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/messagelogwidget.cpp" line="380"/>
|
||||
@@ -3397,7 +3410,7 @@ Cockatrice está recargando la base de datos de cartas.</translation>
|
||||
<location filename="../src/messagelogwidget.cpp" line="385"/>
|
||||
<source>%1 is looking at the top %3 card(s) %2.</source>
|
||||
<comment>top card for singular, top %3 cards for plural</comment>
|
||||
<translation><numerusform>%1 está mirando la primera carta %2.</numerusform><numerusform>%1 está mirando las primeras %3 cartas %2.</numerusform></translation>
|
||||
<translation><numerusform>%1 está mirando la primera carta %2.</numerusform><numerusform>%1 está mirando las primeras %3 cartas %2.</numerusform><numerusform>%1 está mirando las primeras %3 cartas %2.</numerusform></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/messagelogwidget.cpp" line="396"/>
|
||||
@@ -3452,7 +3465,7 @@ Cockatrice está recargando la base de datos de cartas.</translation>
|
||||
<message numerus="yes">
|
||||
<location filename="../src/messagelogwidget.cpp" line="455"/>
|
||||
<source>%1 shuffles their deck and draws a new hand of %2 card(s).</source>
|
||||
<translation><numerusform>%1 barajea su mazo y roba una nueva mano de %2 carta(s).</numerusform><numerusform>%1 barajea su mazo y roba una nueva mano de %2 carta(s)</numerusform></translation>
|
||||
<translation><numerusform>%1 barajea su mazo y roba una nueva mano de %2 carta(s).</numerusform><numerusform>%1 barajea su mazo y roba una nueva mano de %2 carta(s)</numerusform><numerusform>%1 barajea su mazo y roba una nueva mano de %2 carta(s)</numerusform></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/messagelogwidget.cpp" line="460"/>
|
||||
@@ -3479,7 +3492,7 @@ Cockatrice está recargando la base de datos de cartas.</translation>
|
||||
<location filename="../src/messagelogwidget.cpp" line="498"/>
|
||||
<source>%1 card(s)</source>
|
||||
<comment>a card for singular, %1 cards for plural</comment>
|
||||
<translation><numerusform>%1 carta(s)</numerusform><numerusform>%1 cars</numerusform></translation>
|
||||
<translation><numerusform>%1 carta(s)</numerusform><numerusform>%1 cars</numerusform><numerusform>%1 cars</numerusform></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/messagelogwidget.cpp" line="506"/>
|
||||
@@ -3579,17 +3592,17 @@ Cockatrice está recargando la base de datos de cartas.</translation>
|
||||
<message numerus="yes">
|
||||
<location filename="../src/messagelogwidget.cpp" line="617"/>
|
||||
<source>red counter(s)</source>
|
||||
<translation><numerusform>contador rojo</numerusform><numerusform>contadores rojos</numerusform></translation>
|
||||
<translation><numerusform>contador rojo</numerusform><numerusform>contadores rojos</numerusform><numerusform>contadores rojos</numerusform></translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../src/messagelogwidget.cpp" line="620"/>
|
||||
<source>yellow counter(s)</source>
|
||||
<translation><numerusform>contador amarillo</numerusform><numerusform>contadores amarillos</numerusform></translation>
|
||||
<translation><numerusform>contador amarillo</numerusform><numerusform>contadores amarillos</numerusform><numerusform>contadores amarillos</numerusform></translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../src/messagelogwidget.cpp" line="623"/>
|
||||
<source>green counter(s)</source>
|
||||
<translation><numerusform>contador verde</numerusform><numerusform>contadores verdes</numerusform></translation>
|
||||
<translation><numerusform>contador verde</numerusform><numerusform>contadores verdes</numerusform><numerusform>contadores verdes</numerusform></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/messagelogwidget.cpp" line="642"/>
|
||||
@@ -3698,17 +3711,17 @@ Cockatrice está recargando la base de datos de cartas.</translation>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="860"/>
|
||||
<source>Add New Message</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Añadir nuevo mensaje</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="864"/>
|
||||
<source>Edit Message</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Editar mensaje</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="868"/>
|
||||
<source>Remove Message</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Borrar mensaje</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_settings.cpp" line="953"/>
|
||||
@@ -3804,7 +3817,7 @@ Cockatrice está recargando la base de datos de cartas.</translation>
|
||||
<message>
|
||||
<location filename="../src/game_specific_terms.h" line="31"/>
|
||||
<source>Mana Value</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Valor de maná</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/game_specific_terms.h" line="33"/>
|
||||
@@ -4376,12 +4389,12 @@ Cockatrice está recargando la base de datos de cartas.</translation>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="2707"/>
|
||||
<source>Which position should this card be placed:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>En qué posición debería esta carta estar colocada:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="2707"/>
|
||||
<source>(max. %1)</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>(max. %1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="1120"/>
|
||||
@@ -4412,82 +4425,82 @@ Cockatrice está recargando la base de datos de cartas.</translation>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="731"/>
|
||||
<source>Reveal &top cards to...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Mostrar &cartas de la parte superior...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="732"/>
|
||||
<source>&Top of library...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>&Parte superior de la biblioteca...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="733"/>
|
||||
<source>&Bottom of library...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>&Fondo de la biblioteca...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="735"/>
|
||||
<source>&Always look at top card</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Siempre mirar la carta superior</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="736"/>
|
||||
<source>&Open deck in deck editor</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Abrir baraja en el editor de barajas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="744"/>
|
||||
<source>&Play top card</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Jugar carta de la parte superior</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="752"/>
|
||||
<source>&Draw bottom card</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Robar carta del fondo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="753"/>
|
||||
<source>D&raw bottom cards...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Robar cartas del fondo...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="754"/>
|
||||
<source>&Play bottom card</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Jugar carta del fondo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="755"/>
|
||||
<source>Play bottom card &face down</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Jugar carta del fondo boca abajo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="756"/>
|
||||
<source>Move bottom card to grave&yard</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Mover carta del fondo al cementerio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="757"/>
|
||||
<source>Move bottom card to e&xile</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Mover carta del fondo al exilio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="758"/>
|
||||
<source>Move bottom cards to &graveyard...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Mover cartas del fondo al cementerio...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="759"/>
|
||||
<source>Move bottom cards to &exile...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Mover cartas del fondo al exilio...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="760"/>
|
||||
<source>Put bottom card on &top</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Poner carta del fondo en la parte superior</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="781"/>
|
||||
<source>Selec&ted cards</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Cartas seleccionadas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="1250"/>
|
||||
@@ -4497,17 +4510,17 @@ Cockatrice está recargando la base de datos de cartas.</translation>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="1361"/>
|
||||
<source>Move bottom cards to grave</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Mover cartas del fondo al cementerio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="1393"/>
|
||||
<source>Move bottom cards to exile</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Mover cartas del fondo al exilio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="1454"/>
|
||||
<source>Draw bottom cards</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Robar cartas del fondo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/player.cpp" line="1528"/>
|
||||
@@ -5312,7 +5325,7 @@ Do you want to save the changes?</source>
|
||||
<message>
|
||||
<location filename="../src/tab_deck_editor.cpp" line="805"/>
|
||||
<source>Could not save remote deck</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>No se pudo guardar la baraja remota</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/tab_deck_editor.cpp" line="827"/>
|
||||
@@ -5387,12 +5400,12 @@ Por favor, comprueba que tienes permisos de escritura en el directorio e intént
|
||||
<location filename="../src/tab_deck_storage.cpp" line="187"/>
|
||||
<location filename="../src/tab_deck_storage.cpp" line="219"/>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Error</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/tab_deck_storage.cpp" line="187"/>
|
||||
<source>Invalid deck file</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Archivo de baraja inválido</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/tab_deck_storage.cpp" line="194"/>
|
||||
@@ -5414,7 +5427,7 @@ Por favor, introduce un nombre:</translation>
|
||||
<message>
|
||||
<location filename="../src/tab_deck_storage.cpp" line="219"/>
|
||||
<source>Failed to upload deck to server</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Fallo al subir baraja al servidor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/tab_deck_storage.cpp" line="235"/>
|
||||
@@ -5622,12 +5635,12 @@ Por favor, introduce un nombre:</translation>
|
||||
<message>
|
||||
<location filename="../src/tab_game.cpp" line="1209"/>
|
||||
<source>A player has joined game #%1</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Un jugador se ha unido a la partida #%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/tab_game.cpp" line="1210"/>
|
||||
<source>%1 has joined the game</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>%1 se ha unido a la partida</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/tab_game.cpp" line="1221"/>
|
||||
@@ -5909,7 +5922,7 @@ Cuando más información introduzcas, más específicos serán los resultados.</
|
||||
<message>
|
||||
<location filename="../src/tab_replays.cpp" line="200"/>
|
||||
<source>Folder download is not yet supported. Please download replays individually.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>La descarga de carpetas aún no es compatible. Descarga las repeticiones individualmente.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/tab_replays.cpp" line="268"/>
|
||||
@@ -5988,22 +6001,22 @@ Cuando más información introduzcas, más específicos serán los resultados.</
|
||||
<message>
|
||||
<location filename="../src/tab_server.cpp" line="210"/>
|
||||
<source>Failed to join the server room: it doesn't exist on the server.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Fallo al unirse a la sala del servidor: no existe en el servidor.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/tab_server.cpp" line="215"/>
|
||||
<source>The server thinks you are in the server room but your client is unable to display it. Try restarting your client.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>El servidor cree que estás en la sala del servidor pero tu cliente es incapaz de mostrarlo. Intenta reiniciar tu cliente.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/tab_server.cpp" line="220"/>
|
||||
<source>You do not have the required permission to join this server room.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>No tienes los permisos requeridos para unirte a esta sala del servidor.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/tab_server.cpp" line="225"/>
|
||||
<source>Failed to join the server room due to an unknown error: %1.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Fallo al unirse a la sala del servidor debido a un error desconocido: %1.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -6256,7 +6269,7 @@ Por favor, absténgase de realizar de nuevo esta actividad o se tomarán medidas
|
||||
<message>
|
||||
<location filename="../src/user_context_menu.cpp" line="70"/>
|
||||
<source>Promote user to &judge</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Usuario promovido a &juez</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/user_context_menu.cpp" line="71"/>
|
||||
@@ -6352,7 +6365,7 @@ Por favor, absténgase de realizar de nuevo esta actividad o se tomarán medidas
|
||||
<message>
|
||||
<location filename="../src/user_context_menu.cpp" line="336"/>
|
||||
<source>Remove this user's messages</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Borrar mensajes de este usuario</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -6416,7 +6429,7 @@ Por favor, absténgase de realizar de nuevo esta actividad o se tomarán medidas
|
||||
<message>
|
||||
<location filename="../src/userinfobox.cpp" line="309"/>
|
||||
<source>The entered password does not match your account.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>La contraseña introducida no coincide con tu cuenta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/userinfobox.cpp" line="302"/>
|
||||
@@ -6447,46 +6460,46 @@ Por favor, absténgase de realizar de nuevo esta actividad o se tomarán medidas
|
||||
<message>
|
||||
<location filename="../src/userinfobox.cpp" line="66"/>
|
||||
<source>User Information</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Información de usuario</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/userinfobox.cpp" line="73"/>
|
||||
<source>Real Name:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Nombre real:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/userinfobox.cpp" line="75"/>
|
||||
<source>User Level:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Nivel de usuario:</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../src/userinfobox.cpp" line="150"/>
|
||||
<source>%n Year(s), </source>
|
||||
<comment>amount of years (only shown if more than 0)</comment>
|
||||
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
|
||||
<translation><numerusform>%n año,</numerusform><numerusform>%n años,</numerusform><numerusform>%n año(s),</numerusform></translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../src/userinfobox.cpp" line="153"/>
|
||||
<source>%10%n Day(s) %20</source>
|
||||
<comment>amount of years (if more than 0), amount of days, date in local short format</comment>
|
||||
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
|
||||
<translation><numerusform>%10%n día %20</numerusform><numerusform>%10%n días %20</numerusform><numerusform>%10%n días %20</numerusform></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/userinfobox.cpp" line="211"/>
|
||||
<source>Enter Password</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Introducir contraseña</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/userinfobox.cpp" line="212"/>
|
||||
<source>Password verification is required in order to change your email address</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Se requiere verificación de la contraseña para cambiar tu dirección de correo electrónico</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/userinfobox.cpp" line="253"/>
|
||||
<location filename="../src/userinfobox.cpp" line="314"/>
|
||||
<location filename="../src/userinfobox.cpp" line="337"/>
|
||||
<source>An error occurred while trying to update your user information.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Un error ha ocurrido mientras intentaba actualizarse tu información de usuario.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/userinfobox.cpp" line="306"/>
|
||||
@@ -6620,7 +6633,7 @@ Por favor, absténgase de realizar de nuevo esta actividad o se tomarán medidas
|
||||
<message>
|
||||
<location filename="../src/userlist.cpp" line="142"/>
|
||||
<source>Redact all messages from this user in all rooms</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Redactar todos los mensajes de este usuario en todas las salas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/userlist.cpp" line="144"/>
|
||||
@@ -6719,23 +6732,23 @@ Por favor, absténgase de realizar de nuevo esta actividad o se tomarán medidas
|
||||
<message>
|
||||
<location filename="../src/dlg_manage_sets.cpp" line="132"/>
|
||||
<source>Use CTRL+A to select all sets in the view.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Usa CTRL+A para seleccionar todas las colecciones aquí mostradas.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_manage_sets.cpp" line="133"/>
|
||||
<source>Only cards in enabled sets will appear in the card list of the deck editor.</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Solo las cartas en las colecciones permitidas aparecerán en la lista de cartas del editor de mazos.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_manage_sets.cpp" line="134"/>
|
||||
<source>Image priority is decided in the following order:</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>La prioridad de las imágenes es decidida en el siguiente orden:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_manage_sets.cpp" line="135"/>
|
||||
<source>first the CUSTOM Folder (%1), then the Enabled Sets in this dialog (Top to Bottom)</source>
|
||||
<comment>%1 is a link to the wiki</comment>
|
||||
<translation type="unfinished"/>
|
||||
<translation>primero la Carpeta PERSONALIZADA (%1), luego las Ediciones Habilitadas en este mensaje (de Arriba a Abajo)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/dlg_manage_sets.cpp" line="134"/>
|
||||
@@ -7210,17 +7223,17 @@ Por favor, absténgase de realizar de nuevo esta actividad o se tomarán medidas
|
||||
<message>
|
||||
<location filename="../src/shortcutssettings.h" line="335"/>
|
||||
<source>Add Other Counter</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Añadir otro contador</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/shortcutssettings.h" line="338"/>
|
||||
<source>Remove Other Counter</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Borrar otro contador</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/shortcutssettings.h" line="341"/>
|
||||
<source>Set Other Counters...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Colocar otros contadores...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/shortcutssettings.h" line="344"/>
|
||||
@@ -7494,12 +7507,12 @@ Por favor, absténgase de realizar de nuevo esta actividad o se tomarán medidas
|
||||
<message>
|
||||
<location filename="../src/shortcutssettings.h" line="524"/>
|
||||
<source>Draw Bottom Card</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Robar carta de la parte inferior</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/shortcutssettings.h" line="527"/>
|
||||
<source>Draw Multiple Cards from Bottom...</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Robar múltiples cartas de la parte inferior...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/shortcutssettings.h" line="530"/>
|
||||
@@ -7559,7 +7572,7 @@ Por favor, absténgase de realizar de nuevo esta actividad o se tomarán medidas
|
||||
<message>
|
||||
<location filename="../src/shortcutssettings.h" line="562"/>
|
||||
<source>Always Look At Top Card</source>
|
||||
<translation type="unfinished"/>
|
||||
<translation>Mirar siempre la carta superior</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/shortcutssettings.h" line="565"/>
|
||||
|
||||
@@ -26,7 +26,7 @@ void FeatureSet::initalizeFeatureList(QMap<QString, bool> &featureList)
|
||||
featureList.insert("idle_client", false);
|
||||
featureList.insert("forgot_password", false);
|
||||
featureList.insert("websocket", false);
|
||||
//featureList.insert("hashed_password_login", false);
|
||||
// featureList.insert("hashed_password_login", false);
|
||||
// These are temp to force users onto a newer client
|
||||
featureList.insert("2.7.0_min_version", false);
|
||||
featureList.insert("2.8.0_min_version", false);
|
||||
|
||||
@@ -17,15 +17,16 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||
***************************************************************************/
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#include "mocks.h"
|
||||
#include "version_string.h"
|
||||
|
||||
#include <QCommandLineParser>
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QFileInfo>
|
||||
#include <QtGlobal>
|
||||
#include <QDebug>
|
||||
|
||||
#include "version_string.h"
|
||||
#include "mocks.h"
|
||||
#include "main.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@@ -44,8 +45,7 @@ int main(int argc, char *argv[])
|
||||
QString oldDbPath;
|
||||
QString newDbPath;
|
||||
QStringList args = parser.positionalArguments();
|
||||
if (args.count() == 2)
|
||||
{
|
||||
if (args.count() == 2) {
|
||||
oldDbPath = QFileInfo(args.at(0)).absoluteFilePath();
|
||||
newDbPath = QFileInfo(args.at(1)).absoluteFilePath();
|
||||
} else {
|
||||
|
||||
@@ -7,14 +7,16 @@
|
||||
class CardDatabaseConverter : public CardDatabase
|
||||
{
|
||||
public:
|
||||
LoadStatus loadCardDatabase(const QString &path) {
|
||||
return CardDatabase::loadCardDatabase(path);
|
||||
}
|
||||
LoadStatus loadCardDatabase(const QString &path)
|
||||
{
|
||||
return CardDatabase::loadCardDatabase(path);
|
||||
}
|
||||
|
||||
bool saveCardDatabase(const QString &fileName) {
|
||||
CockatriceXml4Parser parser;
|
||||
return parser.saveToFile(sets, cards, fileName);
|
||||
}
|
||||
bool saveCardDatabase(const QString &fileName)
|
||||
{
|
||||
CockatriceXml4Parser parser;
|
||||
return parser.saveToFile(sets, cards, fileName);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,26 +41,21 @@ QString SettingsCache::getSafeConfigFilePath(QString /* configEntry */, QString
|
||||
return defaultPath;
|
||||
}
|
||||
SettingsCache::SettingsCache()
|
||||
: settings{new QSettings("global.ini", QSettings::IniFormat, this)},
|
||||
shortcutsSettings{nullptr},
|
||||
cardDatabaseSettings{new CardDatabaseSettings("", this)},
|
||||
serversSettings{nullptr},
|
||||
messageSettings{nullptr},
|
||||
gameFiltersSettings{nullptr},
|
||||
layoutsSettings{nullptr},
|
||||
downloadSettings{nullptr}
|
||||
: settings{new QSettings("global.ini", QSettings::IniFormat, this)}, shortcutsSettings{nullptr},
|
||||
cardDatabaseSettings{new CardDatabaseSettings("", this)}, serversSettings{nullptr}, messageSettings{nullptr},
|
||||
gameFiltersSettings{nullptr}, layoutsSettings{nullptr}, downloadSettings{nullptr}
|
||||
{
|
||||
}
|
||||
void SettingsCache::setUseTearOffMenus(bool /* _useTearOffMenus */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setKnownMissingFeatures(const QString &/* _knownMissingFeatures */)
|
||||
void SettingsCache::setKnownMissingFeatures(const QString & /* _knownMissingFeatures */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setCardInfoViewMode(const int /* _viewMode */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setHighlightWords(const QString &/* _highlightWords */)
|
||||
void SettingsCache::setHighlightWords(const QString & /* _highlightWords */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setMasterVolume(int /* _masterVolume */)
|
||||
@@ -81,40 +76,40 @@ void SettingsCache::setShowMentionPopups(const int /* _showMentionPopus */)
|
||||
void SettingsCache::setRoomHistory(const int /* _roomHistory */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setLang(const QString &/* _lang */)
|
||||
void SettingsCache::setLang(const QString & /* _lang */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setShowTipsOnStartup(bool /* _showTipsOnStartup */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setSeenTips(const QList<int> &/* _seenTips */)
|
||||
void SettingsCache::setSeenTips(const QList<int> & /* _seenTips */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setDeckPath(const QString &/* _deckPath */)
|
||||
void SettingsCache::setDeckPath(const QString & /* _deckPath */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setReplaysPath(const QString &/* _replaysPath */)
|
||||
void SettingsCache::setReplaysPath(const QString & /* _replaysPath */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setThemesPath(const QString &/* _themesPath */)
|
||||
void SettingsCache::setThemesPath(const QString & /* _themesPath */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setPicsPath(const QString &/* _picsPath */)
|
||||
void SettingsCache::setPicsPath(const QString & /* _picsPath */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setCardDatabasePath(const QString &/* _cardDatabasePath */)
|
||||
void SettingsCache::setCardDatabasePath(const QString & /* _cardDatabasePath */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setCustomCardDatabasePath(const QString &/* _customCardDatabasePath */)
|
||||
void SettingsCache::setCustomCardDatabasePath(const QString & /* _customCardDatabasePath */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setSpoilerDatabasePath(const QString &/* _spoilerDatabasePath */)
|
||||
void SettingsCache::setSpoilerDatabasePath(const QString & /* _spoilerDatabasePath */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTokenDatabasePath(const QString &/* _tokenDatabasePath */)
|
||||
void SettingsCache::setTokenDatabasePath(const QString & /* _tokenDatabasePath */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setThemeName(const QString &/* _themeName */)
|
||||
void SettingsCache::setThemeName(const QString & /* _themeName */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setPicDownload(int /* _picDownload */)
|
||||
@@ -141,7 +136,7 @@ void SettingsCache::setStartingHandSize(int /* _startingHandSize */)
|
||||
void SettingsCache::setAnnotateTokens(int /* _annotateTokens */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTabGameSplitterSizes(const QByteArray &/* _tabGameSplitterSizes */)
|
||||
void SettingsCache::setTabGameSplitterSizes(const QByteArray & /* _tabGameSplitterSizes */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setDisplayCardNames(int /* _displayCardNames */)
|
||||
@@ -171,10 +166,10 @@ void SettingsCache::setChatMentionForeground(int /* _chatMentionForeground */)
|
||||
void SettingsCache::setChatHighlightForeground(int /* _chatHighlightForeground */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setChatMentionColor(const QString &/* _chatMentionColor */)
|
||||
void SettingsCache::setChatMentionColor(const QString & /* _chatMentionColor */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setChatHighlightColor(const QString &/* _chatHighlightColor */)
|
||||
void SettingsCache::setChatHighlightColor(const QString & /* _chatHighlightColor */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setZoneViewSortByName(int /* _zoneViewSortByName */)
|
||||
@@ -189,7 +184,7 @@ void SettingsCache::setZoneViewPileView(int /* _zoneViewPileView */)
|
||||
void SettingsCache::setSoundEnabled(int /* _soundEnabled */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setSoundThemeName(const QString &/* _soundThemeName */)
|
||||
void SettingsCache::setSoundThemeName(const QString & /* _soundThemeName */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setIgnoreUnregisteredUsers(int /* _ignoreUnregisteredUsers */)
|
||||
@@ -198,19 +193,19 @@ void SettingsCache::setIgnoreUnregisteredUsers(int /* _ignoreUnregisteredUsers *
|
||||
void SettingsCache::setIgnoreUnregisteredUserMessages(int /* _ignoreUnregisteredUserMessages */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setMainWindowGeometry(const QByteArray &/* _mainWindowGeometry */)
|
||||
void SettingsCache::setMainWindowGeometry(const QByteArray & /* _mainWindowGeometry */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setTokenDialogGeometry(const QByteArray &/* _tokenDialogGeometry */)
|
||||
void SettingsCache::setTokenDialogGeometry(const QByteArray & /* _tokenDialogGeometry */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setPixmapCacheSize(const int /* _pixmapCacheSize */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setClientID(const QString &/* _clientID */)
|
||||
void SettingsCache::setClientID(const QString & /* _clientID */)
|
||||
{
|
||||
}
|
||||
void SettingsCache::setClientVersion(const QString &/* _clientVersion */)
|
||||
void SettingsCache::setClientVersion(const QString & /* _clientVersion */)
|
||||
{
|
||||
}
|
||||
QStringList SettingsCache::getCountries() const
|
||||
@@ -273,7 +268,7 @@ void PictureLoader::clearPixmapCache(CardInfoPtr /* card */)
|
||||
|
||||
SettingsCache *settingsCache;
|
||||
|
||||
SettingsCache& SettingsCache::instance()
|
||||
SettingsCache &SettingsCache::instance()
|
||||
{
|
||||
return *settingsCache;
|
||||
}
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script will run clang-format on all modified, non-3rd-party C++/Header files.
|
||||
# Optionally runs cmake-format on all modified cmake files.
|
||||
# Uses clang-format cmake-format git diff find
|
||||
# Never, ever, should this receive a path with a newline in it. Don't bother proofing it for that.
|
||||
|
||||
set -o pipefail
|
||||
|
||||
# go to the project root directory, this file should be located in the project root directory
|
||||
olddir="$PWD"
|
||||
cd "${BASH_SOURCE%/*}/" || exit 2 # could not find path, this could happen with special links etc.
|
||||
|
||||
# defaults
|
||||
include=("common" \
|
||||
"cockatrice/src" \
|
||||
"dbconverter/src" \
|
||||
"oracle/src" \
|
||||
"servatrice/src" \
|
||||
"tests")
|
||||
@@ -22,22 +27,30 @@ exclude=("servatrice/src/smtp" \
|
||||
exts=("cpp" "h" "proto")
|
||||
cf_cmd="clang-format"
|
||||
branch="origin/master"
|
||||
cmakefile="CMakeLists.txt"
|
||||
cmakedir="cmake/.*\\.cmake"
|
||||
cmakeinclude=("cmake/gtest-CMakeLists.txt.in")
|
||||
color="--"
|
||||
|
||||
# parse options
|
||||
while [[ $@ ]]; do
|
||||
while [[ $* ]]; do
|
||||
case "$1" in
|
||||
'-b'|'--branch')
|
||||
branch=$2
|
||||
set_branch=1
|
||||
shift 2
|
||||
;;
|
||||
'--cmake')
|
||||
do_cmake=1
|
||||
shift
|
||||
;;
|
||||
'-c'|'--color-diff')
|
||||
color=" --color=always"
|
||||
mode=diff
|
||||
color="--color=always"
|
||||
mode="diff"
|
||||
shift
|
||||
;;
|
||||
'-d'|'--diff')
|
||||
mode=diff
|
||||
mode="diff"
|
||||
shift
|
||||
;;
|
||||
'-h'|'--help')
|
||||
@@ -49,7 +62,6 @@ If <dir>s are given, all source files in those directories of the project root
|
||||
path are formatted. To only format changed files in these directories use the
|
||||
--branch option in combination. <dir> has to be a path relative to the project
|
||||
root path or a full path inside $PWD.
|
||||
. can not be specified as a dir, if you really want to format everything use */.
|
||||
|
||||
USAGE: $0 [option] [--branch <git branch or object>] [<dir> ...]
|
||||
|
||||
@@ -68,6 +80,9 @@ OPTIONS:
|
||||
When not comparing to a branch, git will not be used at all and every
|
||||
source file in the entire project will be parsed.
|
||||
|
||||
--cmake
|
||||
Use cmake-format to format cmake files as well.
|
||||
|
||||
-c, --color-diff
|
||||
Display a colored diff. Implies --diff.
|
||||
Only available on systems which support 'diff --color'.
|
||||
@@ -94,22 +109,25 @@ EXIT CODES:
|
||||
3 if clang-format could not be found.
|
||||
|
||||
EXAMPLES:
|
||||
$0 --test \$PWD || echo "code requires formatting"
|
||||
Tests if the source files in the current directory are correctly
|
||||
formatted and prints an error message if formatting is required.
|
||||
|
||||
$0 --branch $USER/patch-2 ${include[0]}
|
||||
Formats all changed files compared to the git branch "$USER/patch-2"
|
||||
in the directory ${include[0]}.
|
||||
|
||||
$0 --test . || echo "code requires formatting"
|
||||
Tests if the source files in the current directory are correctly
|
||||
formatted and prints an error message if formatting is required.
|
||||
|
||||
$0 --cmake --branch "" ""
|
||||
Unconditionally format all cmake files and no source files.
|
||||
EOM
|
||||
exit 0
|
||||
;;
|
||||
'-n'|'--names')
|
||||
mode=name
|
||||
mode="name"
|
||||
shift
|
||||
;;
|
||||
'-t'|'--test')
|
||||
mode=code
|
||||
mode="code"
|
||||
shift
|
||||
;;
|
||||
'--cf-version')
|
||||
@@ -117,20 +135,28 @@ EOM
|
||||
shift
|
||||
;;
|
||||
'--')
|
||||
dashdash=1
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
if next_dir=$(cd "$1" && pwd); then
|
||||
if [[ ${next_dir#$PWD/} == /* ]]; then
|
||||
echo "error in parsing arguments of $0: $next_dir is not in $PWD" >&2
|
||||
exit 2 # input error
|
||||
elif ! [[ $set_include ]]; then
|
||||
if [[ ! $dashdash && $1 =~ ^-- ]]; then
|
||||
echo "error in parsing arguments of $0: $1 is an unrecognized option" >&2
|
||||
exit 2 # input error
|
||||
fi
|
||||
if [[ ! $1 ]] || next_dir=$(cd "$olddir" && cd -- "$1" && pwd); then
|
||||
if ! [[ $set_include ]]; then
|
||||
include=() # remove default includes
|
||||
set_include=1
|
||||
fi
|
||||
include+=("${next_dir#$PWD/}")
|
||||
if [[ $1 ]]; then
|
||||
if [[ $next_dir != $PWD/* ]]; then
|
||||
echo "error in parsing arguments of $0: $next_dir is not in $PWD" >&2
|
||||
exit 2 # input error
|
||||
fi
|
||||
include+=("$next_dir")
|
||||
fi
|
||||
else
|
||||
echo "error in parsing arguments of $0: $PWD/$1 is not a directory" >&2
|
||||
echo "error in parsing arguments of $0: $1 is not a directory" >&2
|
||||
exit 2 # input error
|
||||
fi
|
||||
if ! [[ $set_branch ]]; then
|
||||
@@ -153,37 +179,93 @@ if ! hash $cf_cmd 2>/dev/null; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# check availability of cmake-format
|
||||
if [[ $do_cmake ]] && ! hash cmake-format 2>/dev/null; then
|
||||
echo "could not find cmake-format" >&2
|
||||
exit 3
|
||||
fi
|
||||
|
||||
if [[ $branch ]]; then
|
||||
# get all dirty files through git
|
||||
if ! base=$(git merge-base ${branch} HEAD); then
|
||||
if ! base=$(git merge-base "$branch" HEAD); then
|
||||
echo "could not find git merge base" >&2
|
||||
exit 2 # input error
|
||||
fi
|
||||
declare -a reg
|
||||
for ex in ${exts[@]}; do
|
||||
reg+=(${include[@]/%/.*\\.$ex\$})
|
||||
mapfile -t basenames < <(git diff --diff-filter=d --name-only "$base")
|
||||
names=()
|
||||
for ex in "${exts[@]}"; do
|
||||
for path in "${include[@]}"; do
|
||||
for name in "${basenames[@]}"; do
|
||||
rx="^$path/.*\\.$ex$"
|
||||
if [[ $name =~ $rx ]]; then
|
||||
names+=("$name")
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
names=$(git diff --diff-filter=d --name-only $base | grep ${reg[@]/#/-e ^})
|
||||
if [[ $do_cmake ]]; then
|
||||
cmake_names=()
|
||||
for name in "${basenames[@]}"; do
|
||||
dirrx="^$cmakedir$"
|
||||
filerx="(^|/)$cmakefile$"
|
||||
if [[ $name =~ $dirrx || $name =~ $filerx ]]; then
|
||||
cmake_names+=("$name")
|
||||
fi
|
||||
for include in "${cmakeinclude[@]}"; do
|
||||
if [[ $name == "$include" ]]; then
|
||||
cmake_names+=("$name")
|
||||
fi
|
||||
done
|
||||
done
|
||||
fi
|
||||
else
|
||||
names=$(find ${include[@]} -type f -false ${exts[@]/#/-o -name *\\.})
|
||||
exts_o=()
|
||||
for ext in "${exts[@]}"; do
|
||||
exts_o+=(-o -name "*\\.$ext")
|
||||
done
|
||||
unset "exts_o[0]" # remove first -o
|
||||
mapfile -t names < <(find "${include[@]}" -type f "${exts_o[@]}")
|
||||
if [[ $do_cmake ]]; then
|
||||
mapfile -t cmake_names < <(find . -maxdepth 2 -type f -name "$cmakefile" -o -path "./${cmakedir/.}")
|
||||
cmake_names+=("${cmakeinclude[@]}")
|
||||
fi
|
||||
fi
|
||||
|
||||
# filter excludes
|
||||
names=$(<<<"$names" grep -v ${exclude[@]/#/-e ^})
|
||||
|
||||
if ! [[ $names ]]; then
|
||||
exit 0 # nothing to format means format is successful!
|
||||
fi
|
||||
for path in "${exclude[@]}"; do
|
||||
for i in "${!names[@]}"; do
|
||||
rx="^$path/"
|
||||
if [[ ${names[$i]} =~ $rx ]]; then
|
||||
unset "names[$i]"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
# optionally print version
|
||||
[[ $print_version ]] && $cf_cmd -version
|
||||
if [[ $print_version ]]; then
|
||||
$cf_cmd -version
|
||||
[[ $do_cmake ]] && echo "cmake-format $(cmake-format --version)"
|
||||
echo "----------"
|
||||
fi
|
||||
|
||||
if [[ ! ${cmake_names[*]} ]]; then
|
||||
unset do_cmake
|
||||
fi
|
||||
if [[ ! ( ${names[*]} || $do_cmake ) ]]; then
|
||||
exit 0 # nothing to format means format is successful!
|
||||
fi
|
||||
|
||||
# format
|
||||
case $mode in
|
||||
diff)
|
||||
declare -i code=0
|
||||
for name in ${names[@]}; do
|
||||
if ! $cf_cmd "$name" | diff "$name" - -p $color; then
|
||||
for name in "${names[@]}"; do
|
||||
if ! $cf_cmd "$name" | diff "$name" - -p "$color"; then
|
||||
code=1
|
||||
fi
|
||||
done
|
||||
for name in "${cmake_names[@]}"; do
|
||||
if ! cmake-format "$name" | diff "$name" - -p "$color"; then
|
||||
code=1
|
||||
fi
|
||||
done
|
||||
@@ -191,20 +273,34 @@ case $mode in
|
||||
;;
|
||||
name)
|
||||
declare -i code=0
|
||||
for name in ${names[@]}; do
|
||||
for name in "${names[@]}"; do
|
||||
if ! $cf_cmd "$name" | diff "$name" - -q >/dev/null; then
|
||||
echo "$name"
|
||||
code=1
|
||||
fi
|
||||
done
|
||||
for name in "${cmake_names[@]}"; do
|
||||
if ! cmake-format "$name" --check; then
|
||||
echo "$name"
|
||||
code=1
|
||||
fi
|
||||
done
|
||||
exit $code
|
||||
;;
|
||||
code)
|
||||
for name in ${names[@]}; do
|
||||
for name in "${names[@]}"; do
|
||||
$cf_cmd "$name" | diff "$name" - -q >/dev/null || exit 1
|
||||
done
|
||||
for name in "${cmake_names[@]}"; do
|
||||
cmake-format "$name" --check || exit 1
|
||||
done
|
||||
;;
|
||||
*)
|
||||
$cf_cmd -i $names
|
||||
if [[ "${names[*]}" ]]; then
|
||||
$cf_cmd -i "${names[@]}"
|
||||
fi
|
||||
if [[ $do_cmake ]]; then
|
||||
cmake-format -i "${cmake_names[@]}"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -253,7 +253,7 @@ Translations = Resources/translations\")
|
||||
endif()
|
||||
|
||||
if(Qt6LinguistTools_FOUND)
|
||||
# Qt6 Translations happen after the executable is built up
|
||||
#Qt6 Translations happen after the executable is built up
|
||||
if(UPDATE_TRANSLATIONS)
|
||||
qt6_add_translations(
|
||||
oracle
|
||||
|
||||
@@ -793,7 +793,6 @@ UnZip::ErrorCode UnzipPrivate::inflateFile(
|
||||
|
||||
// extract data
|
||||
qint64 read;
|
||||
quint64 tot = 0;
|
||||
|
||||
/* Allocate inflate state */
|
||||
z_stream zstr;
|
||||
@@ -826,7 +825,6 @@ UnZip::ErrorCode UnzipPrivate::inflateFile(
|
||||
decryptBytes(*keys, buffer1, read);
|
||||
|
||||
cur++;
|
||||
tot += read;
|
||||
|
||||
zstr.avail_in = (uInt) read;
|
||||
zstr.next_in = (Bytef*) buffer1;
|
||||
|
||||
@@ -45,6 +45,6 @@ QString SettingsCache::guessConfigurationPath()
|
||||
return guessFileName;
|
||||
#endif
|
||||
|
||||
guessFileName = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/" + fileName;
|
||||
guessFileName = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/" + fileName;
|
||||
return guessFileName;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "smtpclient.h"
|
||||
|
||||
#include "settingscache.h"
|
||||
#include "smtp/qxtsmtp.h"
|
||||
|
||||
|
||||
@@ -31,7 +31,8 @@ if(NOT GTEST_FOUND)
|
||||
# Add gtest directly to our build
|
||||
add_subdirectory(${CMAKE_BINARY_DIR}/gtest-src ${CMAKE_BINARY_DIR}/gtest-build EXCLUDE_FROM_ALL)
|
||||
|
||||
# Add the gtest include directory, since gtest doesn't add that dependency to its gtest target
|
||||
# Add the gtest include directory, since gtest
|
||||
# doesn't add that dependency to its gtest target
|
||||
target_include_directories(gtest INTERFACE "$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/gtest-src/include>")
|
||||
|
||||
set(GTEST_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/gtest-src/include")
|
||||
|
||||
34
webclient/package-lock.json
generated
34
webclient/package-lock.json
generated
@@ -1960,7 +1960,7 @@
|
||||
"@protobufjs/aspromise": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
|
||||
"integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78="
|
||||
"integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ=="
|
||||
},
|
||||
"@protobufjs/base64": {
|
||||
"version": "1.1.2",
|
||||
@@ -1975,12 +1975,12 @@
|
||||
"@protobufjs/eventemitter": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
|
||||
"integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A="
|
||||
"integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q=="
|
||||
},
|
||||
"@protobufjs/fetch": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
|
||||
"integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=",
|
||||
"integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
|
||||
"requires": {
|
||||
"@protobufjs/aspromise": "^1.1.1",
|
||||
"@protobufjs/inquire": "^1.1.0"
|
||||
@@ -1989,27 +1989,27 @@
|
||||
"@protobufjs/float": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
|
||||
"integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E="
|
||||
"integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ=="
|
||||
},
|
||||
"@protobufjs/inquire": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
|
||||
"integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik="
|
||||
"integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q=="
|
||||
},
|
||||
"@protobufjs/path": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
|
||||
"integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0="
|
||||
"integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA=="
|
||||
},
|
||||
"@protobufjs/pool": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
|
||||
"integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q="
|
||||
"integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw=="
|
||||
},
|
||||
"@protobufjs/utf8": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
|
||||
"integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA="
|
||||
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
|
||||
},
|
||||
"@rollup/plugin-babel": {
|
||||
"version": "5.3.1",
|
||||
@@ -2474,9 +2474,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/long": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz",
|
||||
"integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w=="
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz",
|
||||
"integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA=="
|
||||
},
|
||||
"@types/material-ui": {
|
||||
"version": "0.21.12",
|
||||
@@ -4530,9 +4530,9 @@
|
||||
}
|
||||
},
|
||||
"dexie": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/dexie/-/dexie-3.2.1.tgz",
|
||||
"integrity": "sha512-Y8oz3t2XC9hvjkP35B5I8rUkKKwM36GGRjWQCMjzIYScg7W+GHKDXobSYswkisW7CxL1/tKQtggMDsiWqDUc1g=="
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/dexie/-/dexie-3.2.2.tgz",
|
||||
"integrity": "sha512-q5dC3HPmir2DERlX+toCBbHQXW5MsyrFqPFcovkH9N2S/UW/H3H5AWAB6iEOExeraAu+j+zRDG+zg/D7YhH0qg=="
|
||||
},
|
||||
"didyoumean": {
|
||||
"version": "1.2.2",
|
||||
@@ -9054,9 +9054,9 @@
|
||||
}
|
||||
},
|
||||
"protobufjs": {
|
||||
"version": "6.11.2",
|
||||
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.2.tgz",
|
||||
"integrity": "sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw==",
|
||||
"version": "6.11.3",
|
||||
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz",
|
||||
"integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==",
|
||||
"requires": {
|
||||
"@protobufjs/aspromise": "^1.1.2",
|
||||
"@protobufjs/base64": "^1.1.2",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"@testing-library/jest-dom": "^5.16.2",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"crypto-js": "^4.1.1",
|
||||
"dexie": "^3.2.1",
|
||||
"dexie": "^3.2.2",
|
||||
"final-form": "^4.20.6",
|
||||
"final-form-set-field-touched": "^1.0.1",
|
||||
"i18next": "^21.6.13",
|
||||
@@ -18,7 +18,7 @@
|
||||
"jquery": "^3.6.0",
|
||||
"lodash": "^4.17.21",
|
||||
"prop-types": "^15.8.1",
|
||||
"protobufjs": "^6.11.2",
|
||||
"protobufjs": "^6.11.3",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-final-form": "^6.5.8",
|
||||
|
||||
Reference in New Issue
Block a user