Skip to content

Commit bffee21

Browse files
committed
Backport support for wxWidgets 3.3, bump minimum to 3.2.
This updates to support wxWidgets 3.3. This amounts to replacing an obsolete version of the `wxDropTarget` constructor with a version that also works under 3.2. This also bumps the minimum wxWidgets version to 3.2 from 3.1. Finally, this backports and updates GitHub actions for the 16.2.x branch: * Adds the action that builds the OSX GUI binary with static linkage; * Updates versions used for OSX test builds, and removes outdated references to wxWidgets 3.1; * Updates the version of the checkout action.
1 parent 0340314 commit bffee21

9 files changed

Lines changed: 62 additions & 31 deletions

File tree

.github/workflows/lint.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: clang-format
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v5
1313
- name: Run clang-format style check for C/C++
1414
uses: jidicula/clang-format-action@v4.11.0
1515
with:
@@ -21,19 +21,12 @@ jobs:
2121
runs-on: ubuntu-latest
2222
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v5
2525
- name: Install dependencies
2626
run: |
2727
sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
28-
sudo apt-add-repository 'deb https://repos.codelite.org/wx3.1.5/ubuntu/ focal universe'
2928
sudo apt-get update
30-
sudo apt-get install -y automake autoconf clang-tidy
31-
sudo apt-get install -y libwxbase3.1-0-unofficial \
32-
libwxbase3.1unofficial-dev \
33-
libwxgtk3.1-0-unofficial \
34-
libwxgtk3.1unofficial-dev \
35-
wx3.1-headers \
36-
wx-common
29+
sudo apt-get install -y automake autoconf libwxgtk3.2-dev clang-tidy
3730
- run: aclocal
3831
- run: automake --add-missing
3932
- run: autoconf
@@ -44,14 +37,14 @@ jobs:
4437
runs-on: ubuntu-latest
4538
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
4639
steps:
47-
- uses: actions/checkout@v4
40+
- uses: actions/checkout@v5
4841
- uses: chartboost/ruff-action@v1
4942

5043
flake8:
5144
runs-on: ubuntu-latest
5245
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
5346
steps:
54-
- uses: actions/checkout@v4
47+
- uses: actions/checkout@v5
5548
- uses: actions/setup-python@v5
5649
with:
5750
python-version: "3.12"
@@ -61,7 +54,7 @@ jobs:
6154
runs-on: ubuntu-latest
6255
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
6356
steps:
64-
- uses: actions/checkout@v4
57+
- uses: actions/checkout@v5
6558
- name: Setup Python
6659
uses: actions/setup-python@v5
6760
with:

.github/workflows/osxbinary.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: MacOS static GUI binary
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
schedule:
8+
- cron: '0 6 * * 4'
9+
10+
jobs:
11+
macos-13:
12+
runs-on: macos-13
13+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
14+
steps:
15+
- uses: actions/checkout@v5
16+
- name: Install dependencies
17+
run: |
18+
brew install automake autoconf
19+
curl -L -O https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.8/wxWidgets-3.2.8.tar.bz2
20+
tar xjf wxWidgets-3.2.8.tar.bz2
21+
cd wxWidgets-3.2.8
22+
mkdir build-release
23+
cd build-release
24+
../configure --disable-shared --disable-sys-libs
25+
make -j4
26+
sudo make install
27+
- run: aclocal
28+
- run: automake --add-missing
29+
- run: autoconf
30+
- run: ./configure
31+
- run: make
32+
- run: sudo make install
33+
- run: make osx-dmg
34+
- uses: actions/upload-artifact@v4
35+
with:
36+
name: artifact-osx-13
37+
path: "*.dmg"

.github/workflows/python.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
python-version: ['3.8', '3.12']
1414

1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717
- name: Set up Python ${{ matrix.python-version }}
1818
uses: actions/setup-python@v5
1919
with:
@@ -40,7 +40,7 @@ jobs:
4040
python-version: ['3.12']
4141

4242
steps:
43-
- uses: actions/checkout@v4
43+
- uses: actions/checkout@v5
4444
- name: Set up Python ${{ matrix.python-version }}
4545
uses: actions/setup-python@v5
4646
with:

.github/workflows/tools.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ jobs:
99
runs-on: ubuntu-latest
1010
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v5
1313
- name: Install dependencies
1414
run: |
1515
sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
16-
sudo apt-add-repository 'deb https://repos.codelite.org/wx3.1.5/ubuntu/ focal universe'
1716
sudo apt-get update
18-
sudo apt-get install -y automake autoconf
19-
sudo apt-get install -y libwxgtk3.2-dev
17+
sudo apt-get install -y automake autoconf libwxgtk3.2-dev
2018
- name: Configure build with autotools
2119
run: |
2220
aclocal
@@ -38,13 +36,13 @@ jobs:
3836
runs-on: macos-latest
3937
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
4038
steps:
41-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@v5
4240
- name: Install dependencies
43-
run: brew install automake autoconf wxwidgets@3.2
41+
run: brew install automake autoconf wxwidgets
4442
- run: aclocal
4543
- run: automake --add-missing
4644
- run: autoconf
47-
- run: ./configure --with-wx-config=wx-config-3.2
45+
- run: ./configure
4846
- run: make
4947
- run: sudo make install
5048
- run: make osx-dmg
@@ -60,7 +58,7 @@ jobs:
6058
run:
6159
shell: msys2 {0}
6260
steps:
63-
- uses: actions/checkout@v4
61+
- uses: actions/checkout@v5
6462
- uses: msys2/setup-msys2@v2
6563
with:
6664
install: mingw-w64-x86_64-toolchain make automake autoconf

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: windows-latest
1313

1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1616
- name: Set up Python
1717
uses: actions/setup-python@v5
1818
with:

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
- `Game.copy_tree` and `Game.move_tree` implementations reversed the roles of the
77
`src` and `dest` nodes (#499)
88

9+
### Changed
10+
- For graphical interface, added support for wxWidgets 3.3; require minimum of wxWidgets 3.2.
11+
912
## [16.2.1] - 2025-01-06
1013

1114
### Fixed

src/gui/efgdisplay.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ void gbtEfgDisplay::OnMouseMotion(wxMouseEvent &p_event)
866866
// Copy subtree
867867
wxBitmap bitmap(tree_xpm);
868868
#if defined(__WXMSW__) or defined(__WXMAC__)
869-
wxImage image = bitmap.ConvertToImage();
869+
const auto image = wxCursor(bitmap.ConvertToImage());
870870
#else
871871
wxIcon image;
872872
image.CopyFromBitmap(bitmap);
@@ -881,7 +881,7 @@ void gbtEfgDisplay::OnMouseMotion(wxMouseEvent &p_event)
881881
// This should be the pawn icon!
882882
wxBitmap bitmap(move_xpm);
883883
#if defined(__WXMSW__) or defined(__WXMAC__)
884-
wxImage image = bitmap.ConvertToImage();
884+
const auto image = wxCursor(bitmap.ConvertToImage());
885885
#else
886886
wxIcon image;
887887
image.CopyFromBitmap(bitmap);
@@ -896,7 +896,7 @@ void gbtEfgDisplay::OnMouseMotion(wxMouseEvent &p_event)
896896
// Move subtree
897897
wxBitmap bitmap(tree_xpm);
898898
#if defined(__WXMSW__) or defined(__WXMAC__)
899-
wxImage image = bitmap.ConvertToImage();
899+
const auto image = wxCursor(bitmap.ConvertToImage());
900900
#else
901901
wxIcon image;
902902
image.CopyFromBitmap(bitmap);
@@ -915,7 +915,7 @@ void gbtEfgDisplay::OnMouseMotion(wxMouseEvent &p_event)
915915
if (node && node->GetOutcome()) {
916916
wxBitmap bitmap = MakeOutcomeBitmap();
917917
#if defined(__WXMSW__) or defined(__WXMAC__)
918-
wxImage image = bitmap.ConvertToImage();
918+
const auto image = wxCursor(bitmap.ConvertToImage());
919919
#else
920920
wxIcon image;
921921
image.CopyFromBitmap(bitmap);

src/gui/efgpanel.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ void gbtTreePlayerIcon::OnLeftClick(wxMouseEvent &)
201201
wxBitmap bitmap(person_xpm);
202202

203203
#if defined(__WXMSW__) or defined(__WXMAC__)
204-
wxImage image = bitmap.ConvertToImage();
204+
const auto image = wxCursor(bitmap.ConvertToImage());
205205
#else
206206
wxIcon image;
207207
image.CopyFromBitmap(bitmap);
@@ -460,7 +460,7 @@ void gbtTreeChanceIcon::OnLeftClick(wxMouseEvent &)
460460
wxBitmap bitmap(dice_xpm);
461461

462462
#if defined(__WXMSW__) or defined(__WXMAC__)
463-
wxImage image = bitmap.ConvertToImage();
463+
const auto image = wxCursor(bitmap.ConvertToImage());
464464
#else
465465
wxIcon image;
466466
image.CopyFromBitmap(bitmap);

src/gui/nfgpanel.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void gbtTablePlayerIcon::OnLeftClick(wxMouseEvent &)
6969
wxBitmap bitmap(person_xpm);
7070

7171
#if defined(__WXMSW__) or defined(__WXMAC__)
72-
wxImage image = bitmap.ConvertToImage();
72+
const auto image = wxCursor(bitmap.ConvertToImage());
7373
#else
7474
wxIcon image;
7575
image.CopyFromBitmap(bitmap);

0 commit comments

Comments
 (0)