mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 16:25:35 +00:00
add scripts & dockerfiles to build on multiple platforms
This commit is contained in:
parent
47e64a7343
commit
00a35a636c
@ -161,8 +161,8 @@ if (UNIX)
|
||||
-Werror=missing-field-initializers
|
||||
-Werror=write-strings
|
||||
-Werror=ctor-dtor-privacy
|
||||
-Werror=switch-enum
|
||||
-Werror=switch-default
|
||||
-Wswitch-enum
|
||||
-Wswitch-default
|
||||
-Werror=old-style-cast
|
||||
-Werror=overloaded-virtual
|
||||
-Werror=overloaded-virtual
|
||||
|
3
scripts/ArchLinux-Dockerfile
Normal file
3
scripts/ArchLinux-Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM archlinux
|
||||
|
||||
RUN pacman -Syu --noconfirm lua53 openssl curl git cmake gcc make zlib boost websocketpp
|
9
scripts/Debian-11-Dockerfile
Normal file
9
scripts/Debian-11-Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM debian:11
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update -y
|
||||
|
||||
RUN apt-get install -y git cmake g++-10 curl libboost1.74-all-dev libssl-dev libz-dev rapidjson-dev liblua5.3 libssl-dev libwebsocketpp-dev libcurl4-openssl-dev
|
||||
|
||||
ENV CXX=g++-10
|
9
scripts/Ubuntu-20.04-Dockerfile
Normal file
9
scripts/Ubuntu-20.04-Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update -y
|
||||
|
||||
RUN apt-get install -y libz-dev rapidjson-dev liblua5.3 libssl-dev libwebsocketpp-dev libcurl4-openssl-dev git make cmake g++
|
||||
|
||||
RUN apt-get install -y libboost1.71-all-dev
|
9
scripts/Ubuntu-22.04-Dockerfile
Normal file
9
scripts/Ubuntu-22.04-Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN apt-get update -y
|
||||
|
||||
RUN apt-get install -y git libz-dev rapidjson-dev liblua5.3 libssl-dev libwebsocketpp-dev libcurl4-openssl-dev cmake g++-10 libboost1.74-all-dev libssl3 curl
|
||||
|
||||
ENV CXX=g++-10
|
18
scripts/build-all.sh
Executable file
18
scripts/build-all.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
printf "enter DSN (optional): "
|
||||
read DSN
|
||||
|
||||
docker build -f Ubuntu-20.04-Dockerfile . -t beammp-server-build:Ubuntu-20.04
|
||||
docker build -f Ubuntu-22.04-Dockerfile . -t beammp-server-build:Ubuntu-22.04
|
||||
docker build -f ArchLinux-Dockerfile . -t beammp-server-build:ArchLinux
|
||||
docker build -f Debian-11-Dockerfile . -t beammp-server-build:Debian-11
|
||||
|
||||
CMD="cd /beammp; cmake . -DGIT_SUBMODULE=OFF -DCMAKE_BUILD_TYPE=Release -DBEAMMP_SECRET_SENTRY_URL=\"${DSN}\" -B /build && make -j -C /build BeamMP-Server"
|
||||
|
||||
docker run -v $(pwd)/..:/beammp -v $(pwd)/../build-ubuntu-20.04:/build -it --rm beammp-server-build:Ubuntu-20.04 bash -c "${CMD}"
|
||||
docker run -v $(pwd)/..:/beammp -v $(pwd)/../build-ubuntu-22.04:/build -it --rm beammp-server-build:Ubuntu-22.04 bash -c "${CMD}"
|
||||
docker run -v $(pwd)/..:/beammp -v $(pwd)/../build-archlinux:/build -it --rm beammp-server-build:ArchLinux bash -c "${CMD}"
|
||||
docker run -v $(pwd)/..:/beammp -v $(pwd)/../build-debian-11:/build -it --rm beammp-server-build:Debian-11 bash -c "${CMD}"
|
5
scripts/install.sh
Executable file
5
scripts/install.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
cmake . -B build -DCMAKE_BUILD_TYPE=Release -DGIT_SUBMODULE=OFF
|
||||
|
||||
make -j -C build BeamMP-Server
|
Loading…
x
Reference in New Issue
Block a user