mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 15:07:28 +00:00
WIP: still no working MasterServer binary
This commit is contained in:
parent
50221fbd65
commit
9387e88dc0
6
.env.example
Normal file
6
.env.example
Normal file
@ -0,0 +1,6 @@
|
||||
# Full path to the LEGO Universe client
|
||||
CLIENT_PATH=/Users/someuser/LEGO Universe
|
||||
# Can improve build time
|
||||
BUILD_THREADS=10
|
||||
# Updates NET_VERSION in CMakeVariables.txt
|
||||
BUILD_VERSION=171023
|
@ -5,12 +5,13 @@ WORKDIR /build
|
||||
RUN --mount=type=cache,target=/var/cache/apt \
|
||||
echo "Install build dependencies" && \
|
||||
apt update && \
|
||||
apt install gcc cmake zlib1g-dev make build-essential g++ unzip ca-certificates wget -yqq --no-install-recommends && \
|
||||
apt remove -y libmysqlcppconn7v5 libmysqlcppconn-dev && \
|
||||
apt install cmake zlib1g-dev make gcc g++ build-essential unzip ca-certificates wget -yqq --no-install-recommends && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
update-ca-certificates && \
|
||||
wget https://dev.mysql.com/get/Downloads/Connector-C++/libmysqlcppconn9_8.0.27-1debian11_amd64.deb -O /tmp/libmysqlcppconn.deb && \
|
||||
dpkg -i /tmp/libmysqlcppconn.deb && \
|
||||
rm /tmp/libmysqlcppconn.deb
|
||||
wget https://dev.mysql.com/get/Downloads/Connector-C++/libmysqlcppconn9_8.0.27-1debian11_amd64.deb -O /tmp/libmysqlcppconn9_8.0.27-1debian11_amd64.deb && \
|
||||
dpkg -i /tmp/libmysqlcppconn9_8.0.27-1debian11_amd64.deb && \
|
||||
rm -rf /tmp/libmysqlcppconn9_8.0.27-1debian11_amd64.deb
|
||||
|
||||
COPY dAuthServer/ /build/dAuthServer
|
||||
COPY dChatServer/ /build/dChatServer
|
||||
@ -36,7 +37,7 @@ ARG BUILD_VERSION=171022
|
||||
RUN echo "Build server" && \
|
||||
mkdir -p build && \
|
||||
cd build && \
|
||||
sed -i -e "s/171023/${BUILD_VERSION}/g" ../CMakeVariables.txt && \
|
||||
sed -i -e "s/171022/${BUILD_VERSION}/g" ../CMakeVariables.txt && \
|
||||
cmake .. && \
|
||||
make -j $BUILD_THREADS
|
||||
|
||||
@ -54,11 +55,12 @@ COPY --from=build /build/migrations /app/migrations
|
||||
RUN --mount=type=cache,target=/var/cache/apt \
|
||||
apt update && \
|
||||
apt install mariadb-client python3 sqlite3 ca-certificates wget -yqq --no-install-recommends && \
|
||||
apt remove -y libmysqlcppconn7v5 libmysqlcppconn-dev && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
update-ca-certificates && \
|
||||
wget https://dev.mysql.com/get/Downloads/Connector-C++/libmysqlcppconn9_8.0.27-1debian11_amd64.deb -O /tmp/libmysqlcppconn.deb && \
|
||||
dpkg -i /tmp/libmysqlcppconn.deb && \
|
||||
rm /tmp/libmysqlcppconn.deb
|
||||
wget https://dev.mysql.com/get/Downloads/Connector-C++/libmysqlcppconn9_8.0.27-1debian11_amd64.deb -O /tmp/libmysqlcppconn9_8.0.27-1debian11_amd64.deb && \
|
||||
dpkg -i /tmp/libmysqlcppconn9_8.0.27-1debian11_amd64.deb && \
|
||||
rm -rf /tmp/libmysqlcppconn9_8.0.27-1debian11_amd64.deb
|
||||
|
||||
ADD docker/*.py /app/utils/
|
||||
|
||||
|
@ -39,13 +39,22 @@ function update_ini() {
|
||||
sed -i "/^$KEY=/s/=.*/=$NEW_VALUE/" $INI_FILE
|
||||
}
|
||||
|
||||
function update_database_ini_values_for() {
|
||||
INI_FILE=$1
|
||||
update_ini $INI_FILE mysql_host $DATABASE_HOST
|
||||
update_ini $INI_FILE mysql_database $DATABASE
|
||||
update_ini $INI_FILE mysql_username $DATABASE_USER
|
||||
update_ini $INI_FILE mysql_password $USE_DATABASE_PASSWORD
|
||||
}
|
||||
|
||||
function update_ini_values() {
|
||||
update_ini worldconfig.ini mysql_host $DATABASE_HOST
|
||||
update_ini worldconfig.ini mysql_database $DATABASE
|
||||
update_ini worldconfig.ini mysql_username $DATABASE_USER
|
||||
update_ini worldconfig.ini mysql_password $USE_DATABASE_PASSWORD
|
||||
update_ini worldconfig.ini chat_server_port $CHAT_SERVER_PORT
|
||||
update_ini worldconfig.ini max_clients $MAX_CLIENTS
|
||||
|
||||
update_database_ini_values_for masterconfig.ini
|
||||
update_database_ini_values_for authconfig.ini
|
||||
update_database_ini_values_for chatconfig.ini
|
||||
update_database_ini_values_for worldconfig.ini
|
||||
}
|
||||
|
||||
function symlink_client_files() {
|
||||
|
Loading…
Reference in New Issue
Block a user