Add the Windows CHICKEN 6 build and release scripts.
Upstream does not ship a Windows binary, so this tree fetches a release tarball, applies the MinGW patches, and publishes a UCRT64 prefix. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
47
build.sh
Normal file
47
build.sh
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
# Configure, build, and install into work/prefix. Run from a UCRT64 shell.
|
||||
set -eu
|
||||
|
||||
root=$(CDPATH= cd -- "$(dirname "$0")" && pwd)
|
||||
src="$root/work/src"
|
||||
prefix=$(cygpath -m "$root/work/prefix")
|
||||
|
||||
if [ ! -f "$src/configure" ]; then
|
||||
echo "no sources in work/src; run: .\\ck.ps1 fetch-sources" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "${MSYSTEM:-}" in
|
||||
UCRT64|MINGW64|CLANG64) ;;
|
||||
*)
|
||||
echo "build.sh needs an MSYS2 MinGW shell (UCRT64)." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
machine=$(gcc -dumpmachine)
|
||||
case "$machine" in
|
||||
*mingw*) ;;
|
||||
*)
|
||||
echo "gcc targets ${machine}. Install the UCRT64 toolchain." >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# The generated posixwin.c is what this tarball compiles. Keep it newer
|
||||
# than posixwin.scm so make does not try to regenerate it.
|
||||
if [ -f "$src/posixwin.c" ]; then
|
||||
touch "$src/posixwin.c"
|
||||
fi
|
||||
|
||||
jobs=$(nproc 2>/dev/null || echo 1)
|
||||
(
|
||||
cd "$src"
|
||||
./configure --prefix "$prefix" --platform mingw
|
||||
make -j"$jobs"
|
||||
make install
|
||||
)
|
||||
|
||||
export PATH="$(cygpath -u "$prefix")/bin:${PATH}"
|
||||
echo "installed $prefix"
|
||||
csc -version
|
||||
Reference in New Issue
Block a user