mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 04:31:09 +00:00
Add macos test build on release tag
This commit is contained in:
parent
a06c0703a7
commit
330b1352fb
6 changed files with 61 additions and 5 deletions
38
.github/workflows/macos.yml
vendored
Normal file
38
.github/workflows/macos.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
name: Build macos application
|
||||||
|
run-name: macos
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
jobs:
|
||||||
|
build64:
|
||||||
|
runs-on: macos-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- env: macos
|
||||||
|
steps:
|
||||||
|
- name: Install build libraries
|
||||||
|
run: |
|
||||||
|
brew update
|
||||||
|
brew install sdl2 openal-soft make ffmpeg molten-vk
|
||||||
|
brew upgrade
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Build Release code
|
||||||
|
run: |
|
||||||
|
make
|
||||||
|
- name: Create release package
|
||||||
|
run: |
|
||||||
|
# copy docs
|
||||||
|
cp -rv stuff/mapfixes/* LICENSE README.md doc release/
|
||||||
|
# create archive
|
||||||
|
mkdir yquake2remaster-${{matrix.env}}-${{github.ref_name}}
|
||||||
|
cp -rv release/* yquake2remaster-${{matrix.env}}-${{github.ref_name}}
|
||||||
|
zip -9r yquake2remaster-${{matrix.env}}-${{github.ref_name}}.zip yquake2remaster-${{matrix.env}}-${{github.ref_name}}
|
||||||
|
- name: Upload Release Asset
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
yquake2remaster-${{matrix.env}}-${{github.ref_name}}.zip
|
4
.github/workflows/windows.yml
vendored
4
.github/workflows/windows.yml
vendored
|
@ -64,7 +64,7 @@ jobs:
|
||||||
cp -rv release/* yquake2remaster-${{matrix.env}}-${{github.ref_name}}
|
cp -rv release/* yquake2remaster-${{matrix.env}}-${{github.ref_name}}
|
||||||
zip -9r yquake2remaster-${{matrix.env}}-${{github.ref_name}}.zip yquake2remaster-${{matrix.env}}-${{github.ref_name}}
|
zip -9r yquake2remaster-${{matrix.env}}-${{github.ref_name}}.zip yquake2remaster-${{matrix.env}}-${{github.ref_name}}
|
||||||
- name: Upload Release Asset
|
- name: Upload Release Asset
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
yquake2remaster-${{matrix.env}}-${{github.ref_name}}.zip
|
yquake2remaster-${{matrix.env}}-${{github.ref_name}}.zip
|
||||||
|
@ -122,7 +122,7 @@ jobs:
|
||||||
cp -rv release/* yquake2remaster-${{matrix.env}}-${{github.ref_name}}
|
cp -rv release/* yquake2remaster-${{matrix.env}}-${{github.ref_name}}
|
||||||
zip -9r yquake2remaster-${{matrix.env}}-${{github.ref_name}}.zip yquake2remaster-${{matrix.env}}-${{github.ref_name}}
|
zip -9r yquake2remaster-${{matrix.env}}-${{github.ref_name}}.zip yquake2remaster-${{matrix.env}}-${{github.ref_name}}
|
||||||
- name: Upload Release Asset
|
- name: Upload Release Asset
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
yquake2remaster-${{matrix.env}}-${{github.ref_name}}.zip
|
yquake2remaster-${{matrix.env}}-${{github.ref_name}}.zip
|
||||||
|
|
14
Makefile
14
Makefile
|
@ -743,6 +743,15 @@ ref_gl4:
|
||||||
release/ref_gl4.dll : GLAD_INCLUDE = -Isrc/client/refresh/gl4/glad/include
|
release/ref_gl4.dll : GLAD_INCLUDE = -Isrc/client/refresh/gl4/glad/include
|
||||||
release/ref_gl4.dll : LDFLAGS += -shared
|
release/ref_gl4.dll : LDFLAGS += -shared
|
||||||
|
|
||||||
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
||||||
|
|
||||||
|
ref_gl4:
|
||||||
|
@echo "===> Building ref_gl4.dylib"
|
||||||
|
$(MAKE) release/ref_gl4.dylib
|
||||||
|
|
||||||
|
release/ref_gl4.dylib : GLAD_INCLUDE = -Isrc/client/refresh/gl4/glad/include
|
||||||
|
release/ref_gl4.dylib : LDFLAGS += -shared
|
||||||
|
|
||||||
else # not Windows or Darwin - macOS doesn't support OpenGL 4.6
|
else # not Windows or Darwin - macOS doesn't support OpenGL 4.6
|
||||||
|
|
||||||
ref_gl4:
|
ref_gl4:
|
||||||
|
@ -1469,7 +1478,10 @@ release/ref_gl4.dll : $(REFGL4_OBJS)
|
||||||
@echo "===> LD $@"
|
@echo "===> LD $@"
|
||||||
${Q}$(CC) $(LDFLAGS) $(REFGL4_OBJS) $(LDLIBS) $(DLL_SDLLDFLAGS) -o $@
|
${Q}$(CC) $(LDFLAGS) $(REFGL4_OBJS) $(LDLIBS) $(DLL_SDLLDFLAGS) -o $@
|
||||||
$(Q)strip $@
|
$(Q)strip $@
|
||||||
|
else ifeq ($(YQ2_OSTYPE), Darwin)
|
||||||
|
release/ref_gl4.dylib : $(REFGL4_OBJS)
|
||||||
|
@echo "===> LD $@"
|
||||||
|
${Q}$(CC) $(LDFLAGS) $(REFGL4_OBJS) $(LDLIBS) $(SDLLDFLAGS) -o $@
|
||||||
else
|
else
|
||||||
release/ref_gl4.so : $(REFGL4_OBJS)
|
release/ref_gl4.so : $(REFGL4_OBJS)
|
||||||
@echo "===> LD $@"
|
@echo "===> LD $@"
|
||||||
|
|
|
@ -329,7 +329,7 @@ The build dependencies can be installed with:
|
||||||
* On Solaris/Illumos: `pkg install sdl2 openal curl`
|
* On Solaris/Illumos: `pkg install sdl2 openal curl`
|
||||||
* On Haiku: `pkgman libsdl2_devel openal_devel curl_devel`
|
* On Haiku: `pkgman libsdl2_devel openal_devel curl_devel`
|
||||||
* On MacOS the dependencies can be installed with Homebrew (from
|
* On MacOS the dependencies can be installed with Homebrew (from
|
||||||
https://brew.sh): `brew install sdl2 openal-soft`
|
https://brew.sh): `brew install sdl2 openal-soft make ffmpeg molten-vk`
|
||||||
|
|
||||||
Other distributions or platforms often have package named similar to the
|
Other distributions or platforms often have package named similar to the
|
||||||
Debian or FreeBSD packages.
|
Debian or FreeBSD packages.
|
||||||
|
|
|
@ -67,8 +67,8 @@ int crosshair_width, crosshair_height;
|
||||||
extern cvar_t *cl_showfps;
|
extern cvar_t *cl_showfps;
|
||||||
extern cvar_t *crosshair_scale;
|
extern cvar_t *crosshair_scale;
|
||||||
extern cvar_t *cl_showspeed;
|
extern cvar_t *cl_showspeed;
|
||||||
extern float GetPlayerSpeed();
|
|
||||||
|
|
||||||
|
float GetPlayerSpeed(float* speed, float* speedxy);
|
||||||
void SCR_TimeRefresh_f(void);
|
void SCR_TimeRefresh_f(void);
|
||||||
void SCR_Loading_f(void);
|
void SCR_Loading_f(void);
|
||||||
|
|
||||||
|
|
|
@ -240,7 +240,11 @@ int GL4_PrepareForWindow(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4);
|
||||||
|
#if !defined(__APPLE__)
|
||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 6);
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 6);
|
||||||
|
#else
|
||||||
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||||
|
|
||||||
|
@ -359,6 +363,7 @@ int GL4_InitContext(void* win)
|
||||||
}
|
}
|
||||||
else if (GLVersion.major < 4 || (GLVersion.major == 4 && GLVersion.minor < 6))
|
else if (GLVersion.major < 4 || (GLVersion.major == 4 && GLVersion.minor < 6))
|
||||||
{
|
{
|
||||||
|
#if !defined(__APPLE__)
|
||||||
if ((!gl_version_override->value) ||
|
if ((!gl_version_override->value) ||
|
||||||
(GLVersion.major < gl_version_override->value))
|
(GLVersion.major < gl_version_override->value))
|
||||||
{
|
{
|
||||||
|
@ -368,6 +373,7 @@ int GL4_InitContext(void* win)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
R_Printf(PRINT_ALL, "%s(): Warning: glad only got GL version %d.%d.\n"
|
R_Printf(PRINT_ALL, "%s(): Warning: glad only got GL version %d.%d.\n"
|
||||||
"Some functionality could be broken.\n",
|
"Some functionality could be broken.\n",
|
||||||
|
|
Loading…
Reference in a new issue