Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
run: |
mkdir installer
cp gambit* installer
"${WIX}bin/candle" gambit.wxs
"${WIX}bin/candle" build_support/gambit.wxs
"${WIX}bin/light" -ext WixUIExtension gambit.wixobj
- uses: actions/upload-artifact@v5
with:
Expand Down
10 changes: 5 additions & 5 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
ACLOCAL_AMFLAGS = -I m4

EXTRA_DIST = \
gambit.wxs \
contrib/mac/Info.plist \
build_support/gambit.wxs \
build_support/mac/Info.plist \
contrib/mac/gambit.icns \
src/labenski/README.txt \
src/labenski/art/grab.xpm \
Expand Down Expand Up @@ -373,7 +373,7 @@ bin_PROGRAMS += gambit
endif

# Read version from GAMBIT_VERSION file for use in compilation
GAMBIT_VERSION = $(shell cat $(top_srcdir)/GAMBIT_VERSION)
GAMBIT_VERSION = $(shell cat $(top_srcdir)/build_support/GAMBIT_VERSION)

# Define VERSION for all C++ compilations and set include paths
AM_CPPFLAGS = -I$(top_srcdir)/src -DVERSION=\"$(GAMBIT_VERSION)\"
Expand Down Expand Up @@ -623,7 +623,7 @@ osx-bundle:
-mkdir Gambit.app/Contents
-mkdir Gambit.app/Contents/MacOS
-mkdir Gambit.app/Contents/Resources
cp ${top_srcdir}/contrib/mac/Info.plist Gambit.app/Contents
cp ${top_srcdir}/build_support/mac/Info.plist Gambit.app/Contents
cp ${top_srcdir}/contrib/mac/gambit.icns Gambit.app/Contents/Resources/gambit.icns
echo -n 'APPL????' > Gambit.app/Contents/PkgInfo
cp gambit Gambit.app/Contents/MacOS/gambit
Expand All @@ -639,7 +639,7 @@ osx-dmg: osx-bundle
msw-msi:
-mkdir installer
cp gambit* installer
candle gambit.wxs
candle build_support/gambit.wxs
light -ext WixUIExtension gambit.wixobj

clang-tidy:
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion gambit.wxs.in → build_support/gambit.wxs.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@
<ComponentRef Id="ApplicationShortcut"/>
</Feature>
</Product>
</Wix>
</Wix>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@
</dict>
</array>
</dict>
</plist>
</plist>
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl

AC_INIT([gambit],[m4_esyscmd_s([cat GAMBIT_VERSION])])
AC_INIT([gambit],[m4_esyscmd_s([cat build_support/GAMBIT_VERSION])])
AC_CONFIG_SRCDIR([src/gambit.h])
AM_INIT_AUTOMAKE([subdir-objects foreign])
dnl AC_CONFIG_MACRO_DIR([m4])
Expand Down Expand Up @@ -145,8 +145,8 @@ AC_SUBST(WX_CXXFLAGS)
REZFLAGS=`echo $CXXFLAGS $WX_CXXFLAGS | sed 's/-mthreads//g' | sed 's/-g//g' | sed 's/-O. / /g' | sed 's/-I/--include-dir /g'`
AC_SUBST(REZFLAGS)

GAMBIT_VERSION=`cat GAMBIT_VERSION`
GAMBIT_VERSION=`cat build_support/GAMBIT_VERSION`
AC_SUBST(GAMBIT_VERSION)

AC_CONFIG_FILES([Makefile contrib/mac/Info.plist gambit.wxs])
AC_CONFIG_FILES([Makefile build_support/mac/Info.plist build_support/gambit.wxs])
AC_OUTPUT
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
# built documents.
#

_version_file = pathlib.Path(__file__).parent.parent / "GAMBIT_VERSION"
_version_file = pathlib.Path(__file__).parent.parent / "build_support/GAMBIT_VERSION"
if _version_file.exists():
_full_version = _version_file.read_text().strip()
# The short X.Y version.
Expand Down
4 changes: 2 additions & 2 deletions doc/developer.contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ When making a new release of Gambit, follow these steps:

1. Create a new branch from the latest commit on the ``master`` branch named ``maintX_Y``, where ``X`` is the major version number and ``Y`` is the minor version number of the new release.

2. Update the version number in the ``GAMBIT_VERSION`` file at the root of the repository to ``X.Y.Z``.
2. Update the version number in the ``build_support/GAMBIT_VERSION`` file to ``X.Y.Z``.

All other files will automatically use the updated version number:

- `pyproject.toml` reads from GAMBIT_VERSION file at build time
- `configure.ac` reads from GAMBIT_VERSION file and substitutes into `Info.plist` and `gambit.wxs`
- `configure.ac` reads from GAMBIT_VERSION file and substitutes into `build_support/mac/Info.plist` and `build_support/gambit.wxs`
- `src/pygambit/__init__.py` reads from installed package metadata or GAMBIT_VERSION file
- `doc/conf.py` reads from GAMBIT_VERSION file at documentation build time
- Documentation pages reference the `|release|` substitution variable to automatically reflect the updated version number.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ markers = [
]

[tool.setuptools.dynamic]
version = {file = "GAMBIT_VERSION"}
version = {file = "build_support/GAMBIT_VERSION"}
2 changes: 1 addition & 1 deletion src/pygambit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
except importlib.metadata.PackageNotFoundError:
# Package is not installed, fallback to reading GAMBIT_VERSION file
import pathlib
_version_file = pathlib.Path(__file__).parent.parent.parent / "GAMBIT_VERSION"
_version_file = pathlib.Path(__file__).parent.parent.parent / "build_support/GAMBIT_VERSION"
__version__ = _version_file.read_text().strip() if _version_file.exists() else "unknown"
Loading