File tree Expand file tree Collapse file tree 5 files changed +70
-4
lines changed
Shared/mods/deathmatch/logic/lua Expand file tree Collapse file tree 5 files changed +70
-4
lines changed Original file line number Diff line number Diff line change 1+ FROM jetbrains/teamcity-minimal-agent:latest
2+
3+ # This is important for using apt-get
4+ USER root
5+
6+ # Install cross-build dependencies
7+ RUN apt-get update && \
8+ apt-get install -y --no-install-recommends ca-certificates subversion ncftp \
9+ git autoconf wget make patch cmake clang llvm-dev uuid-dev libssl-dev lzma-dev libxml2-dev python3
10+
11+ # Prepare cross-build environment
12+ ENV MACOSX_DEPLOYMENT_TARGET=10.15 \
13+ PATH="${PATH}:/opt/osxcross/bin" \
14+ OSXCROSS_MP_INC=1
15+
16+ RUN mkdir -p /opt/osxcross && \
17+ git clone https://github.com/tpoechtrager/osxcross.git /opt/osxcross/setup_files && \
18+ cd /opt/osxcross/setup_files && \
19+ wget -P tarballs https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz && \
20+ UNATTENDED=1 TARGET_DIR=/opt/osxcross ./build.sh && \
21+ UNATTENDED=1 ../bin/osxcross-macports install mysql8 libidn2
22+
23+ # Default build configuration
24+ ENV AS_BUILDAGENT=0 \
25+ BUILD_ARCHITECTURE=x64 \
26+ BUILD_CONFIG=release \
27+ AR=x86_64-apple-darwin20.4-ar \
28+ CC=x86_64-apple-darwin20.4-clang \
29+ CXX=x86_64-apple-darwin20.4-clang++
30+
31+ # Set build directory
32+ VOLUME /build
33+ WORKDIR /build
34+
35+ # Copy entrypoint script
36+ COPY utils/docker-entrypoint-osx.sh /docker-entrypoint.sh
37+
38+ # Set entrypoint
39+ ENTRYPOINT /docker-entrypoint.sh
Original file line number Diff line number Diff line change @@ -38,7 +38,15 @@ project "Dbconmy"
3838 links { " rt" }
3939
4040 filter " system:macosx"
41- includedirs { os .findheader (" mysql.h" , " /usr/local/opt/mysql/include/mysql" ) }
41+ includedirs {
42+ os .findheader (" mysql.h" , {
43+ " /usr/local/opt/mysql/include/mysql" ,
44+ " /opt/osxcross/macports/pkgs/opt/local/include/mysql8/mysql" ,
45+ })
46+ }
47+ libdirs {
48+ os .findlib (" libmysqlclient.a" , " /opt/osxcross/macports/pkgs/opt/local/lib/mysql8/mysql" )
49+ }
4250
4351 if GLIBC_COMPAT then
4452 filter { " system:linux" }
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ namespace lua
4242
4343 inline void Push (lua_State* L, bool value) { lua_pushboolean (L, value); }
4444
45- inline void Push (lua_State* L, nullptr_t ) { lua_pushnil (L); }
45+ inline void Push (lua_State* L, std:: nullptr_t ) { lua_pushnil (L); }
4646
4747 inline void Push (lua_State* L, const char * value) { lua_pushstring (L, value); }
4848
Original file line number Diff line number Diff line change 11#! /bin/bash -e
22
33# Set variable defaults
4+ : ${BUILD_OS:= linux}
45: ${BUILD_ARCHITECTURE:= x64}
56: ${BUILD_CONFIG:= release}
67
2122# Read script arguments
2223while [ $# -gt 0 ]; do
2324 case " $1 " in
25+ --os=* ) BUILD_OS=" ${1#* =} " ;;
2426 --arch=* ) BUILD_ARCHITECTURE=" ${1#* =} " ;;
2527 --config=* ) BUILD_CONFIG=" ${1#* =} " ;;
2628 * )
@@ -58,6 +60,7 @@ case $BUILD_ARCHITECTURE in
5860 exit 1
5961esac
6062
63+ echo " OS = $BUILD_OS "
6164echo " CONFIG = $CONFIG "
6265echo " AR = ${AR:= ar} "
6366echo " CC = ${CC:= gcc} "
@@ -69,9 +72,9 @@ rm -Rf Bin/
6972
7073# Generate Makefiles
7174if [[ -n " $GCC_PREFIX " ]]; then
72- $PREMAKE5 --gccprefix=" $GCC_PREFIX " gmake
75+ $PREMAKE5 --gccprefix=" $GCC_PREFIX " --os= " $BUILD_OS " gmake
7376else
74- $PREMAKE5 gmake
77+ $PREMAKE5 --os= " $BUILD_OS " gmake
7578fi
7679
7780# Build!
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # If configurede as a build agent, start Teamcity agent
4+ if [[ $AS_BUILDAGENT = " 1" ]]; then
5+ # https://github.com/JetBrains/teamcity-docker-minimal-agent/blob/master/Dockerfile#L17
6+ exec /run-services.sh
7+ fi
8+
9+ # Manually invoke build process
10+ # So, first make a shallow clone of the repository if it not exists
11+ umask 000
12+ if [ ! -f ./premake5.lua ]; then
13+ git clone --depth=1 https://github.com/multitheftauto/mtasa-blue.git .
14+ fi
15+
16+ ./linux-build.sh --os=macosx --arch=$BUILD_ARCHITECTURE --config=$BUILD_CONFIG
You can’t perform that action at this time.
0 commit comments