Skip to content

Commit

Permalink
Merge branch 'cutechess:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Claes1981 authored Oct 20, 2024
2 parents 4489e4a + 7800656 commit 807aae0
Show file tree
Hide file tree
Showing 43 changed files with 1,636 additions and 618 deletions.
9 changes: 5 additions & 4 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@ BreakBeforeBraces: Custom
BreakBeforeBinaryOperators: None
BraceWrapping:
AfterClass: true
AfterControlStatement: false
AfterEnum: false
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterStruct: true
AfterUnion: false
BeforeCatch: false
BeforeElse: false
BeforeElse: true
BeforeLambdaBody: true
IndentBraces: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ]
NamespaceIndentation: None
SortIncludes: false
SpaceAfterTemplateKeyword: false
BreakBeforeBinaryOperators: NonAssignment
LambdaBodyIndentation: OuterScope
...
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
qt_version: [5.15.2, 6.5.2]
qt_version: [5.15.2, 6.7.2]
os: [windows-latest, ubuntu-latest, macos-latest]
exclude:
- os: macos-latest
qt_version: 5.15.2
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: install qt 5.x
uses: jurplel/install-qt-action@v3
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt install qtbase5-dev qtbase5-dev-tools libqt5svg5-dev
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +./.lgtm/cpp-queries
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
Expand All @@ -68,7 +69,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -81,6 +82,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt install qtbase5-dev qtbase5-dev-tools libqt5svg5-dev
Expand Down
38 changes: 22 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: set version
run: echo "VERSION=$(cat .version)" >> $GITHUB_ENV
Expand All @@ -32,10 +32,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
qt_version: [6.5.2]
qt_version: [6.7.2]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: install qt 6.x
uses: jurplel/install-qt-action@v3
Expand Down Expand Up @@ -86,16 +86,16 @@ jobs:
ISDIR: 'C:\Program Files (x86)\Inno Setup 6'
strategy:
matrix:
qt_version: [5.15.2]
qt_version: [6.7.2]
os: [windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: install qt 5.x
- name: install qt 6.x
uses: jurplel/install-qt-action@v3
if: startsWith(matrix.qt_version, '5.')
with:
version: ${{ matrix.qt_version }}
modules: 'qt5compat'

- name: build cute chess
run: |
Expand All @@ -121,22 +121,28 @@ jobs:
cp ..\docs\cutechess-engines.json.5.html .
cp ..\docs\cutechess-engines.json.5.txt .
cp "$env:VCDIR\VC\Redist\MSVC\v143\vc_redist.x64.exe" .
cp "$env:Qt5_Dir\bin\Qt5Core.dll" .
cp "$env:Qt5_Dir\bin\Qt5Gui.dll" .
cp "$env:Qt5_Dir\bin\Qt5Svg.dll" .
cp "$env:Qt5_Dir\bin\Qt5PrintSupport.dll" .
cp "$env:Qt5_Dir\bin\Qt5Widgets.dll" .
cp "$env:Qt5_Dir\bin\Qt5ConCurrent.dll" .
cp "$env:Qt6_Dir\bin\Qt6Core.dll" .
cp "$env:Qt6_Dir\bin\Qt6Gui.dll" .
cp "$env:Qt6_Dir\bin\Qt6Svg.dll" .
cp "$env:Qt6_Dir\bin\Qt6PrintSupport.dll" .
cp "$env:Qt6_Dir\bin\Qt6Widgets.dll" .
cp "$env:Qt6_Dir\bin\Qt6ConCurrent.dll" .
cp "$env:Qt6_Dir\bin\Qt6Core5Compat.dll" .
mkdir platforms
cp "$env:Qt5_Dir\plugins\platforms\qwindows.dll" platforms\
cp "$env:Qt6_Dir\plugins\platforms\qwindows.dll" platforms\
mkdir styles
cp "$env:Qt5_Dir\plugins\styles\qwindowsvistastyle.dll" styles\
cp "$env:Qt6_Dir\plugins\styles\qmodernwindowsstyle.dll" styles\
mkdir plugins
mkdir plugins\iconengines
cp "$env:Qt6_Dir\plugins\iconengines\qsvgicon.dll" plugins\iconengines
mkdir plugins\imageformats
cp "$env:Qt6_Dir\plugins\imageformats\qsvg.dll" plugins\imageformats
cd ..
7z a cutechess-$env:VERSION-win64.zip cutechess-$env:VERSION-win64\
- name: create an installer
run: |
& "$env:ISDIR\iscc.exe" /DMyAppVersion=$env:VERSION /DQtLibPath=$env:Qt5_Dir /DMSVCPath=$env:VCDIR /DCuteChessPath=$env:GITHUB_WORKSPACE dist\windows_setup.iss
& "$env:ISDIR\iscc.exe" /DMyAppVersion=$env:VERSION /DQtLibPath=$env:Qt6_Dir /DMSVCPath=$env:VCDIR /DCuteChessPath=$env:GITHUB_WORKSPACE dist\windows_setup.iss
- name: upload zip release asset
uses: actions/upload-release-asset@v1
Expand Down
5 changes: 5 additions & 0 deletions .lgtm/cpp-queries/qlpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: cutechess/cpp-queries
version: 1.0.0
dependencies:
codeql/cpp-all: "*"
extractor: cpp
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.1
1.4.0-beta3
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
All notable changes to Cute Chess will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased

### Added

- Players can have separate time controls (#806)

### Fixed

- Crash when tournament game fails to start (#794)
- Cute Chess specific CodeQL static analysis queries have been re-enabled (#798)

### Changed

- Windows releases are now built with Qt 6 (#802)

## [1.3.1](https://github.com/cutechess/cutechess/releases/tag/v1.3.1) - 2023-07-30

### Added
Expand Down
13 changes: 10 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,16 @@ add_executable(gui
projects/gui/src/gamedatabasemanager.cpp
projects/gui/src/pgndatabase.cpp
projects/gui/src/pathlineedit.cpp
projects/gui/src/timecontroldlg.cpp
projects/gui/src/pairtimecontroldlg.cpp
projects/gui/src/timecontroldlg.cpp
projects/gui/src/timecontrolwidget.cpp
projects/gui/src/pgnimporter.cpp

projects/gui/ui/settingsdlg.ui
projects/gui/ui/engineconfigdlg.ui
projects/gui/ui/timecontroldlg.ui
projects/gui/ui/pairtimecontroldlg.ui
projects/gui/ui/timecontroldlg.ui
projects/gui/ui/timecontrolwidget.ui
projects/gui/ui/engineselectiondlg.ui
projects/gui/ui/importprogressdlg.ui
projects/gui/ui/gamedatabasesearchdlg.ui
Expand Down Expand Up @@ -322,6 +326,9 @@ endif()
install(TARGETS cli DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime)
install(TARGETS gui DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime)
install(FILES dist/linux/cutechess.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications COMPONENT Runtime)
install(FILES projects/gui/res/icons/cutechess_256x256.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/application/256x256/apps/ RENAME cutechess.png COMPONENT Runtime)
install(FILES projects/gui/res/icons/cutechess_64x64.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/64x64/apps/ RENAME cutechess.png COMPONENT Runtime)
install(FILES projects/gui/res/icons/cutechess_128x128.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/128x128/apps/ RENAME cutechess.png COMPONENT Runtime)
install(FILES projects/gui/res/icons/cutechess_256x256.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/256x256/apps/ RENAME cutechess.png COMPONENT Runtime)
install(FILES projects/gui/res/icons/cutechess_512x512.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/512x512/apps/ RENAME cutechess.png COMPONENT Runtime)
install(FILES docs/cutechess-cli.6 DESTINATION ${CMAKE_INSTALL_MANDIR}/man6/ COMPONENT Documentation)
install(FILES docs/cutechess-engines.json.5 DESTINATION ${CMAKE_INSTALL_MANDIR}/man5/ COMPONENT Documentation)
17 changes: 10 additions & 7 deletions dist/windows_setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,17 @@ Source: "{#CuteChessPath}\build\Release\cutechess-cli.exe"; DestDir: "{app}"; Fl
#ifdef MSVC
Source: "{#MSVCPath}\VC\Redist\MSVC\v143\vc_redist.x64.exe"; DestDir: "{app}"; Flags: ignoreversion
#endif
Source: "{#QtLibPath}\bin\Qt5Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#QtLibPath}\bin\Qt5Gui.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#QtLibPath}\bin\Qt5Svg.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#QtLibPath}\bin\Qt5PrintSupport.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#QtLibPath}\bin\Qt5Widgets.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#QtLibPath}\bin\Qt5Concurrent.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#QtLibPath}\bin\Qt6Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#QtLibPath}\bin\Qt6Gui.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#QtLibPath}\bin\Qt6Svg.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#QtLibPath}\bin\Qt6PrintSupport.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#QtLibPath}\bin\Qt6Widgets.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#QtLibPath}\bin\Qt6Concurrent.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#QtLibPath}\bin\Qt6Core5Compat.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#QtLibPath}\plugins\platforms\qwindows.dll"; DestDir: "{app}\platforms"; Flags: ignoreversion
Source: "{#QtLibPath}\plugins\styles\qwindowsvistastyle.dll"; DestDir: "{app}\styles"; Flags: ignoreversion
Source: "{#QtLibPath}\plugins\styles\qmodernwindowsstyle.dll"; DestDir: "{app}\styles"; Flags: ignoreversion
Source: "{#QtLibPath}\plugins\iconengines\qsvgicon.dll"; DestDir: "{app}\plugins\iconengines"; Flags: ignoreversion
Source: "{#QtLibPath}\plugins\imageformats\qsvg.dll"; DestDir: "{app}\plugins\imageformats"; Flags: ignoreversion
Source: "{#CuteChessPath}\COPYING"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#CuteChessPath}\docs\cutechess-cli.6.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#CuteChessPath}\docs\cutechess-cli.6.html"; DestDir: "{app}"; Flags: ignoreversion
Expand Down
2 changes: 2 additions & 0 deletions docs/cutechess-cli.6
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,8 @@ Set the node count limit.
Scale engine timeouts by
.Ar factor .
Only use this option if necessary.
.It Ic debug
Activate debug mode (per protocol, UCI only).
.El
.Sh EXAMPLES
Play ten games between two Sloppy engines with a time control of 40
Expand Down
Loading

0 comments on commit 807aae0

Please sign in to comment.