Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,26 @@ jobs:
run: python -m pip install cython-lint
- name: cython-lint
run: cython-lint .

catalog-am-sync:
name: catalog.am and manifest.json are up to date
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@v7
- name: Setup Python
uses: actions/setup-python@v7
with:
python-version: "3.14"
- name: Install pygambit (editable, picks up catalog/games directly)
run: |
python -m pip install -v -e ".[doc]"
pip install "gtdraw @ git+https://github.com/gambitproject/gtdraw.git@main"
- name: Regenerate catalog/catalog.am and catalog/games/manifest.json
run: python catalog/build.py --build --skip-table
- name: Fail if catalog.am or manifest.json is out of sync with catalog/games
run: |
if ! git diff --exit-code -- catalog/catalog.am catalog/games/manifest.json; then
echo "::error::catalog/catalog.am or catalog/games/manifest.json is out of sync with catalog/games. Run 'python catalog/build.py --build' and commit the result."
exit 1
fi
8 changes: 6 additions & 2 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@ jobs:
run: |
mkdir installer
cp gambit* installer
"${WIX}bin/candle" -arch x64 build_support/msw/gambit.wxs
"${WIX}bin/light" -ext WixUIExtension gambit.wixobj
cp -r catalog/games installer/catalog
"${WIX}bin/heat" dir installer/catalog -cg CatalogFiles -gg -scom -sreg -sfrag -srd \
-dr CATALOGFOLDER -var var.CatalogSourceDir -out build_support/msw/catalog.wxs
"${WIX}bin/candle" -arch x64 -dCatalogSourceDir=installer/catalog \
build_support/msw/gambit.wxs build_support/msw/catalog.wxs
"${WIX}bin/light" -ext WixUIExtension -out gambit.msi gambit.wixobj catalog.wixobj
- uses: actions/upload-artifact@v7
with:
name: artifact-msw
Expand Down
14 changes: 8 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ Gambit.app/*
Gambit.app/*
*.ipynb_checkpoints
doc/**/*.ef
catalog/doc/**/*.ef
build_support/msw/gambit.wxs
build_support/osx/Info.plist
src/pygambit/catalog
doc/catalog_table.rst
catalog/img/**/*.pdf
catalog/img/**/*.png
catalog/img/**/*.tex
catalog/img/**/*.ef
catalog/img/**/*.svg
catalog/doc/_table.rst
catalog/doc/_build
catalog/games/img/**/*.pdf
catalog/games/img/**/*.png
catalog/games/img/**/*.tex
catalog/games/img/**/*.ef
catalog/games/img/**/*.svg
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ build:
- pdf2svg
jobs:
post_install:
# Required by the tutorials (jupyter_tikz game-tree rendering), not by the catalog —
# the catalog is now built as its own separate RTD project (see catalog/doc/).
- pip install "gtdraw @ git+https://github.com/gambitproject/gtdraw.git@main"
# Create RST for catalog table in docs
- $READTHEDOCS_VIRTUALENV_PATH/bin/python build_support/catalog/update.py

python:
install:
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
recursive-include src/core *.cc *.h
recursive-include src/games *.cc *.h *.imp
recursive-include src/solvers *.cc *.h *.imp
recursive-include catalog *
recursive-include catalog/games *
include src/gambit.h
include src/games.h
include src/solvers.h
Expand Down
30 changes: 26 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##

include build_support/catalog/catalog.am
include catalog/catalog.am

EXTRA_DIST = \
build_support/GAMBIT_VERSION \
Expand Down Expand Up @@ -357,6 +357,16 @@ endif

if WITH_GUI
bin_PROGRAMS = gambit

# Install the games catalog alongside the GUI so its catalog browser can find it via
# wxStandardPaths::GetDataDir() (see src/gui/catalogdata.cc). Only the GUI build needs
# this; a CLI-only build has nothing that reads it.
install-data-local:
$(MKDIR_P) $(DESTDIR)$(pkgdatadir)/catalog
cp -r $(top_srcdir)/catalog/games/. $(DESTDIR)$(pkgdatadir)/catalog/

uninstall-local:
rm -rf $(DESTDIR)$(pkgdatadir)/catalog
endif

# Define VERSION for all C++ compilations and set include paths
Expand Down Expand Up @@ -386,12 +396,16 @@ gambit_SOURCES = \
src/gui/analysis.h \
src/gui/app.cc \
src/gui/app.h \
src/gui/catalogdata.cc \
src/gui/catalogdata.h \
src/gui/editlabel.cc \
src/gui/editlabel.h \
src/gui/edittext.cc \
src/gui/edittext.h \
src/gui/dlabout.cc \
src/gui/dlabout.h \
src/gui/dlcatalog.cc \
src/gui/dlcatalog.h \
src/gui/dleditmove.cc \
src/gui/dleditmove.h \
src/gui/dleditnode.cc \
Expand Down Expand Up @@ -454,7 +468,9 @@ gambit_SOURCES = \

# Add wxWidgets compilation flags for the GUI program
gambit_CXXFLAGS = $(AM_CXXFLAGS) $(WX_CXXFLAGS)
gambit_CPPFLAGS = $(AM_CPPFLAGS) $(WX_CXXFLAGS)
# GAMBIT_SRCDIR lets the GUI find catalog/games in a developer's own checkout when
# running straight out of the build tree, without needing any packaging step.
gambit_CPPFLAGS = $(AM_CPPFLAGS) $(WX_CXXFLAGS) -DGAMBIT_SRCDIR=\"$(abs_top_srcdir)\"

gambit_LDADD_LIBS = libbimatrix.a libliap.a libhomotopy.a libgtracer.a \
libsimpdiv.a libenumpoly.a libgames.a libcore.a
Expand All @@ -479,6 +495,7 @@ osx-bundle:
-mkdir Gambit.app/Contents/Resources
cp build_support/osx/Info.plist Gambit.app/Contents
cp ${top_srcdir}/build_support/osx/gambit.icns Gambit.app/Contents/Resources/gambit.icns
cp -r ${top_srcdir}/catalog/games Gambit.app/Contents/Resources/catalog
echo -n 'APPL????' > Gambit.app/Contents/PkgInfo
cp gambit Gambit.app/Contents/MacOS/gambit
cp ${bin_PROGRAMS} Gambit.app/Contents/MacOS
Expand All @@ -489,8 +506,13 @@ osx-dmg: osx-bundle
msw-msi:
-mkdir installer
cp gambit* installer
candle build_support/msw/gambit.wxs
light -ext WixUIExtension gambit.wixobj
-rm -rf installer/catalog
cp -r ${top_srcdir}/catalog/games installer/catalog
heat dir installer/catalog -cg CatalogFiles -gg -scom -sreg -sfrag -srd \
-dr CATALOGFOLDER -var var.CatalogSourceDir -out build_support/msw/catalog.wxs
candle -arch x64 -dCatalogSourceDir=installer/catalog \
build_support/msw/gambit.wxs build_support/msw/catalog.wxs
light -ext WixUIExtension -out gambit.msi gambit.wixobj catalog.wixobj

clang-tidy:
clang-tidy ${top_srcdir}/src/core/*.cc ${top_srcdir}/src/games/*.cc ${top_srcdir}/src/games/*/*.cc ${top_srcdir}/src/solvers/*/*.cc -- --std=c++20 -I ${top_srcdir}/src -DVERSION=\"$(VERSION)\" -Wall -Wsign-compare -Wunreachable-code -Wextra-semi -Wdouble-promotion
53 changes: 0 additions & 53 deletions build_support/catalog/catalog.am

This file was deleted.

9 changes: 8 additions & 1 deletion build_support/msw/gambit.wxs.in
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="ApplicationRootDirectory" Name="Gambit"/>
<Directory Id="ApplicationRootDirectory" Name="Gambit">
<!-- Populated by heat.exe harvesting installer\catalog into the
CatalogFiles component group (referenced below); see the
"windows" job in .github/workflows/tools.yml for the exact
heat/candle/light invocation. -->
<Directory Id="CATALOGFOLDER" Name="catalog"/>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="Gambit"/>
Expand Down Expand Up @@ -105,6 +111,7 @@
<ComponentRef Id="Gambit.exe"/>
<ComponentRef Id="Gambit.copying"/>
<ComponentRef Id="ApplicationShortcut"/>
<ComponentGroupRef Id="CatalogFiles"/>
</Feature>
</Product>
</Wix>
33 changes: 33 additions & 0 deletions catalog/.readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: 2

# This config file is for a SEPARATE ReadTheDocs project from the main Gambit docs
# (which use the root-level .readthedocs.yml). Setting it up requires creating a second
# project in the ReadTheDocs dashboard for this same GitHub repo, configured to use this
# file instead of the root one — that dashboard step is not something a git commit can do.

sphinx:
configuration: catalog/doc/conf.py

formats: all

build:
os: ubuntu-22.04
tools:
python: "3.14"
apt_packages:
- libgmp-dev
- texlive-full
- imagemagick
- pdf2svg
jobs:
post_install:
- pip install "gtdraw @ git+https://github.com/gambitproject/gtdraw.git@main"
# Regenerate catalog/doc/_table.rst (and the game images) from the current catalog.
- $READTHEDOCS_VIRTUALENV_PATH/bin/python catalog/build.py

python:
install:
- method: pip
path: "."
extra_requirements:
- doc
1 change: 1 addition & 0 deletions catalog/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
Loading
Loading