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"
38
38
links { " rt" }
39
39
40
40
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
+ }
42
50
43
51
if GLIBC_COMPAT then
44
52
filter { " system:linux" }
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ namespace lua
42
42
43
43
inline void Push (lua_State* L, bool value) { lua_pushboolean (L, value); }
44
44
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); }
46
46
47
47
inline void Push (lua_State* L, const char * value) { lua_pushstring (L, value); }
48
48
Original file line number Diff line number Diff line change 1
1
#! /bin/bash -e
2
2
3
3
# Set variable defaults
4
+ : ${BUILD_OS:= linux}
4
5
: ${BUILD_ARCHITECTURE:= x64}
5
6
: ${BUILD_CONFIG:= release}
6
7
21
22
# Read script arguments
22
23
while [ $# -gt 0 ]; do
23
24
case " $1 " in
25
+ --os=* ) BUILD_OS=" ${1#* =} " ;;
24
26
--arch=* ) BUILD_ARCHITECTURE=" ${1#* =} " ;;
25
27
--config=* ) BUILD_CONFIG=" ${1#* =} " ;;
26
28
* )
@@ -58,6 +60,7 @@ case $BUILD_ARCHITECTURE in
58
60
exit 1
59
61
esac
60
62
63
+ echo " OS = $BUILD_OS "
61
64
echo " CONFIG = $CONFIG "
62
65
echo " AR = ${AR:= ar} "
63
66
echo " CC = ${CC:= gcc} "
@@ -69,9 +72,9 @@ rm -Rf Bin/
69
72
70
73
# Generate Makefiles
71
74
if [[ -n " $GCC_PREFIX " ]]; then
72
- $PREMAKE5 --gccprefix=" $GCC_PREFIX " gmake
75
+ $PREMAKE5 --gccprefix=" $GCC_PREFIX " --os= " $BUILD_OS " gmake
73
76
else
74
- $PREMAKE5 gmake
77
+ $PREMAKE5 --os= " $BUILD_OS " gmake
75
78
fi
76
79
77
80
# 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