-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
27df08e
commit 287ef46
Showing
7 changed files
with
294 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/bin/sh -e | ||
|
||
OPTS_COMMON="--disable-everything \ | ||
--enable-decoder=theora \ | ||
--enable-decoder=vorbis \ | ||
--enable-decoder=idcin \ | ||
--enable-decoder=pcm_* \ | ||
--disable-decoder=pcm_bluray \ | ||
--disable-decoder=pcm_dvd \ | ||
--disable-decoder=pcm_alaw_at \ | ||
--disable-decoder=pcm_mulaw_at \ | ||
--enable-demuxer=ogg \ | ||
--enable-demuxer=idcin \ | ||
--enable-demuxer=wav \ | ||
--enable-parser=vp3 \ | ||
--enable-parser=vorbis \ | ||
--disable-protocols \ | ||
--enable-protocol=file \ | ||
--disable-avdevice \ | ||
--disable-avfilter \ | ||
--disable-postproc \ | ||
--disable-programs \ | ||
--disable-autodetect \ | ||
--disable-network \ | ||
--disable-doc \ | ||
--disable-swscale-alpha \ | ||
--enable-small \ | ||
--disable-pthreads \ | ||
--disable-w32threads" | ||
|
||
config_linux() { | ||
../configure --prefix="$1" $OPTS_COMMON | ||
} | ||
|
||
config_win32() { | ||
../configure \ | ||
--prefix="$1" \ | ||
--cross-prefix=i686-w64-mingw32- \ | ||
--arch=x86 \ | ||
--target-os=mingw32 \ | ||
--extra-cflags='-msse2 -mfpmath=sse' \ | ||
$OPTS_COMMON | ||
} | ||
|
||
config_win64() { | ||
../configure \ | ||
--prefix="$1" \ | ||
--cross-prefix=x86_64-w64-mingw32- \ | ||
--arch=x86 \ | ||
--target-os=mingw64 \ | ||
$OPTS_COMMON | ||
} | ||
|
||
usage() { | ||
echo "Usage: $0 <build type> <prefix>" | ||
exit 1 | ||
} | ||
|
||
if [ -z "$2" ] ; then | ||
usage | ||
fi | ||
|
||
case "$1" in | ||
--win32) | ||
config_win32 "$2" | ||
;; | ||
--win64) | ||
config_win64 "$2" | ||
;; | ||
--linux) | ||
config_linux "$2" | ||
;; | ||
*) | ||
usage | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
#!/bin/sh -ex | ||
|
||
MESON_OPTS_COMMON="--auto-features=enabled --fatal-meson-warnings \ | ||
-Dwerror=true -Dwrap_mode=forcefallback" | ||
|
||
MESON_OPTS="$MESON_OPTS_COMMON \ | ||
-Dgame-build-options=optimization=s,b_lto=true \ | ||
-Dsdl2=disabled -Dwayland=disabled -Dx11=disabled" | ||
|
||
SRC_DIR=`pwd` | ||
CI=$SRC_DIR/.ci | ||
|
||
TMP_DIR=$SRC_DIR/q2pro-build | ||
mkdir $TMP_DIR | ||
|
||
export MESON_PACKAGE_CACHE_DIR=$SRC_DIR/subprojects/packagecache | ||
|
||
### Source ### | ||
|
||
REV=$(git rev-list --count HEAD) | ||
SHA=$(git rev-parse --short HEAD) | ||
VER="r$REV~$SHA" | ||
SRC="q2pro-r$REV" | ||
|
||
cd $TMP_DIR | ||
GIT_DIR=$SRC_DIR/.git git archive --format=tar --prefix=$SRC/ HEAD | tar x | ||
echo "$VER" > $SRC/VERSION | ||
rm -rf $SRC/.gitignore $SRC/.ci $SRC/.github | ||
fakeroot tar czf q2pro-source.tar.gz $SRC | ||
|
||
sed -e "s/##VER##/$VER/" -e "s/##DATE##/`date -R`/" $CI/readme-template.txt > README | ||
sed -e "s/##VER##/$VER/" -e "s/##DATE##/`date -R`/" $CI/readme-template-rr.txt > README.rr | ||
|
||
### FFmpeg ### | ||
|
||
cd $TMP_DIR | ||
git clone --depth=1 https://github.com/FFmpeg/FFmpeg.git ffmpeg | ||
cd ffmpeg | ||
|
||
mkdir build-mingw-32 | ||
cd build-mingw-32 | ||
$CI/configure-ffmpeg.sh --win32 $TMP_DIR/ffmpeg-prefix-32 | ||
make -j4 install | ||
cd .. | ||
|
||
mkdir build-mingw-64 | ||
cd build-mingw-64 | ||
$CI/configure-ffmpeg.sh --win64 $TMP_DIR/ffmpeg-prefix-64 | ||
make -j4 install | ||
cd .. | ||
|
||
### Win32 ### | ||
|
||
export PKG_CONFIG_SYSROOT_DIR="$TMP_DIR/ffmpeg-prefix-32" | ||
export PKG_CONFIG_LIBDIR="$PKG_CONFIG_SYSROOT_DIR/lib/pkgconfig" | ||
|
||
cd $TMP_DIR | ||
meson setup --cross-file $CI/i686-w64-mingw32.txt $MESON_OPTS build-mingw-32 $SRC | ||
cd build-mingw-32 | ||
ninja | ||
i686-w64-mingw32-strip q2pro.exe q2proded.exe gamex86.dll | ||
|
||
unix2dos -k -n ../$SRC/LICENSE LICENSE.txt ../$SRC/doc/client.asciidoc MANUAL.txt ../README README.txt | ||
mkdir baseq2 | ||
cp -a ../$SRC/src/client/ui/q2pro.menu baseq2/ | ||
mv gamex86.dll baseq2/ | ||
|
||
zip -9 ../q2pro-client_win32_x86.zip \ | ||
q2pro.exe \ | ||
LICENSE.txt \ | ||
MANUAL.txt \ | ||
README.txt \ | ||
baseq2/q2pro.menu \ | ||
baseq2/gamex86.dll | ||
|
||
unix2dos -k -n ../$SRC/doc/server.asciidoc MANUAL.txt | ||
zip -9 ../q2pro-server_win32_x86.zip \ | ||
q2proded.exe \ | ||
LICENSE.txt \ | ||
MANUAL.txt \ | ||
README.txt | ||
|
||
### Win64 ### | ||
|
||
export PKG_CONFIG_SYSROOT_DIR="$TMP_DIR/ffmpeg-prefix-64" | ||
export PKG_CONFIG_LIBDIR="$PKG_CONFIG_SYSROOT_DIR/lib/pkgconfig" | ||
|
||
cd $TMP_DIR | ||
meson setup --cross-file $CI/x86_64-w64-mingw32.txt $MESON_OPTS build-mingw-64 $SRC | ||
cd build-mingw-64 | ||
ninja | ||
x86_64-w64-mingw32-strip q2pro.exe q2proded.exe gamex86_64.dll | ||
|
||
unix2dos -k -n ../$SRC/LICENSE LICENSE.txt ../$SRC/doc/client.asciidoc MANUAL.txt ../README README.txt | ||
mkdir baseq2 | ||
cp -a ../$SRC/src/client/ui/q2pro.menu baseq2/ | ||
mv gamex86_64.dll baseq2/ | ||
mv q2pro.exe q2pro64.exe | ||
mv q2proded.exe q2proded64.exe | ||
|
||
zip -9 ../q2pro-client_win64_x64.zip \ | ||
q2pro64.exe \ | ||
LICENSE.txt \ | ||
MANUAL.txt \ | ||
README.txt \ | ||
baseq2/q2pro.menu \ | ||
baseq2/gamex86_64.dll | ||
|
||
unix2dos -k -n ../$SRC/doc/server.asciidoc MANUAL.txt | ||
zip -9 ../q2pro-server_win64_x64.zip \ | ||
q2proded64.exe \ | ||
LICENSE.txt \ | ||
MANUAL.txt \ | ||
README.txt | ||
|
||
### Win64-rerelease ### | ||
|
||
cd $TMP_DIR | ||
git clone https://github.com/skullernet/q2pro-rerelease-dll.git | ||
cd q2pro-rerelease-dll | ||
meson setup --cross-file $CI/x86_64-w64-mingw32.txt $MESON_OPTS_COMMON build-mingw | ||
ninja -C build-mingw | ||
x86_64-w64-mingw32-strip build-mingw/gamex86_64.dll | ||
cd etc | ||
zip -9 ../build-mingw/q2pro.pkz default.cfg q2pro.menu | ||
|
||
cd $TMP_DIR/build-mingw-64 | ||
|
||
mv q2pro64.exe q2pro.exe | ||
cp -a ../q2pro-rerelease-dll/build-mingw/q2pro.pkz baseq2/ | ||
cp -a ../q2pro-rerelease-dll/build-mingw/gamex86_64.dll baseq2/ | ||
unix2dos -k -n ../$SRC/doc/client.asciidoc MANUAL.txt ../README.rr README.txt | ||
|
||
zip -9 ../q2pro-rerelease-client_win64_x64.zip \ | ||
q2pro.exe \ | ||
LICENSE.txt \ | ||
MANUAL.txt \ | ||
README.txt \ | ||
baseq2/q2pro.pkz \ | ||
baseq2/gamex86_64.dll | ||
|
||
### Version ### | ||
|
||
cd $TMP_DIR | ||
echo $VER > version.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Welcome to Q2PRO, an enhanced Quake 2 client and server. | ||
|
||
Version ##VER## has been automatically built ##DATE## | ||
from git master branch. | ||
|
||
Installation: extract this archive into new directory, then create shortcut to | ||
q2pro.exe with the following command line: | ||
|
||
q2pro.exe +set basedir "<path to re-release dir>" +set homedir "." | ||
|
||
For information on using and configuring Q2PRO, refer to MANUAL file. | ||
|
||
Project homepage: https://github.com/skullernet/q2pro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Welcome to Q2PRO, an enhanced Quake 2 client and server. | ||
|
||
Version ##VER## has been automatically built ##DATE## | ||
from git master branch. | ||
|
||
Installation: extract this archive into your Quake 2 directory. | ||
|
||
For information on using and configuring Q2PRO, refer to MANUAL file. | ||
|
||
Project homepage: https://github.com/skullernet/q2pro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: nightly | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
mingw: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: subprojects/packagecache | ||
key: ${{ hashFiles('subprojects/*.wrap') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y gcc-mingw-w64 dos2unix nasm meson ninja-build | ||
- name: Build | ||
run: ./.ci/nightly.sh | ||
|
||
- name: Update release | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release edit nightly -t "Nightly" -n "Latest nightly build `cat q2pro-build/version.txt`." --latest | ||
gh release upload nightly q2pro-build/*.zip q2pro-build/*.tar.gz q2pro-build/version.txt --clobber | ||
- name: Update tag | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
github.rest.git.updateRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: "tags/nightly", | ||
sha: context.sha, | ||
force: true | ||
}) |