Skip to content

Commit 8fe7081

Browse files
authored
Merge pull request #448 from rtcwmp-com/develop
1.4.0.3 Release
2 parents db8df0e + 006499e commit 8fe7081

File tree

5 files changed

+75
-5
lines changed

5 files changed

+75
-5
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
3+
argv=("$@")
4+
if [ -z "${argv[0]}" ]
5+
then
6+
echo "Usage: $0 <docker git image: rtcwpro/rtcwpro> <branch name>"
7+
exit 1
8+
fi
9+
10+
RTCWPRO_SRC=$(dirname `pwd`)
11+
12+
13+
# build the files from github branch (these are baked into the image)
14+
docker build \
15+
--build-arg BRANCH="${argv[1]}" \
16+
-t ${argv[0]}:${argv[1]} \
17+
-f dockerfiles/rtcwpro-compile-18 ./dockerfiles
18+
19+
# build the files from the local volume inside the container
20+
# artifacts go to <repo>/build/
21+
docker run -it \
22+
-v $RTCWPRO_SRC:/home/compile/code \
23+
--workdir /home/compile/code/src \
24+
${argv[0]}:${argv[1]} \
25+
make all
26+
27+
rm -rf $RTCWPRO_SRC/build/objs
28+
29+
mv $RTCWPRO_SRC/build/rtcwpro/rtcwpro_bin.pk3 $RTCWPRO_SRC/build/rtcwpro/rtcwpro_bin-$(date +%Y%m%d).pk3
30+
mv $RTCWPRO_SRC/build/rtcwpro/rtcwpro_assets.pk3 $RTCWPRO_SRC/build/rtcwpro/rtcwpro_assets-$(date +%Y%m%d).pk3
31+
mv $RTCWPRO_SRC/build/rtcwpro/rtcwpro_models.pk3 $RTCWPRO_SRC/build/rtcwpro/rtcwpro_models-$(date +%Y%m%d).pk3
32+
mv $RTCWPRO_SRC/build/rtcwpro/rtcwpro_xhairs.pk3 $RTCWPRO_SRC/build/rtcwpro/rtcwpro_xhairs-$(date +%Y%m%d).pk3
33+
34+
# load a shell into the image
35+
#docker run -it -v /var/run/docker.sock:/var/run/docker.sock \
36+
#-v $(dirname `pwd`):/home/compile/code \
37+
#--workdir /home/compile/code/src \
38+
#snappas/rtcwpro:develop /bin/bash
39+
40+
41+
#bash build-image-git-server.sh ${argv[0]} ${argv[1]}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM ubuntu:18.04
2+
3+
ARG BRANCH
4+
ENV BRANCH=${BRANCH}
5+
6+
ENV DEBIAN_FRONTEND noninteractive
7+
8+
RUN useradd -ms /bin/bash compile
9+
10+
RUN dpkg --add-architecture i386 && \
11+
apt-get update && \
12+
apt-get -y upgrade && \
13+
apt-get install -y wget libc6:i386 zip \
14+
unzip git gdb-multiarch gcc cmake perl curl gcc-multilib g++-multilib \
15+
autoconf libtool nasm mingw-w64 mingw-w64-tools g++ \
16+
libgl-dev libsdl2-dev:i386 clang-tools-10 lld-10
17+
18+
RUN ln -s /usr/bin/clang-10 /usr/bin/clang && \
19+
ln -s /usr/bin/clang-cl-10 /usr/bin/clang-cl && \
20+
ln -s /usr/bin/llvm-lib-10 /usr/bin/llvm-lib && \
21+
ln -s /usr/bin/lld-link-10 /usr/bin/lld-link && \
22+
ln -s /usr/bin/llvm-rc-10 /usr/bin/llvm-rc
23+
24+
RUN mkdir /output
25+
RUN chown compile:compile /output
26+
27+
USER compile
28+
WORKDIR /home/compile

fetch-dependencies.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ make -j
8383
make install
8484

8585
autoreconf -i
86-
CFLAGS="-m32" ./configure --prefix=${JANSSON_DIR}/build-win --target=i686-w64-mingw32 --host=i686-w64-mingw32
86+
CFLAGS="-m32" LDFLAGS="-static-libgcc -static-libstdc++" ./configure --prefix=${JANSSON_DIR}/build-win --target=i686-w64-mingw32 --host=i686-w64-mingw32
8787
make -j
8888
make install
8989
cd $JANSSON_DIR
90-
cd build-win
90+
cd build-win/bin
9191
gendef libjansson-4.dll
9292
i686-w64-mingw32-dlltool -d libjansson-4.def -l libjansson-4.lib
9393
fi
@@ -141,13 +141,13 @@ mkdir build-win
141141
cd build
142142
CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 cmake -G"Unix Makefiles" ..
143143
make -j
144-
cp ../*.h .
144+
cp ../src/*.h .
145145

146146
cd ../build-win
147147
echo "${CMAKEMINGW}" > toolchain.cmake
148148
cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=./toolchain.cmake -DCMAKE_INSTALL_PREFIX=${LIBJPEG_DIR}/build-win ..
149149
LDFLAGS="-static -static-libgcc -static-libstdc++" make -j
150-
cp ../*.h .
150+
cp ../src/*.h .
151151
gendef libjpeg-62.dll
152152
i686-w64-mingw32-dlltool -d libjpeg-62.def -l libjpeg-62.lib
153153
fi

src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ dependencies:
77
mkdir -p ../build
88
cp ../deps/libjpeg-turbo/build-win/libjpeg-62.dll ../build
99
cp ../deps/curl-win/curl/bin/libcurl.dll ../build
10+
cp ../deps/jansson/build-win/bin/libjansson-4.dll ../build
1011

1112
binaries:
1213
mkdir -p ../build/rtcwpro

src/unix/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ client: NASM := nasm
125125
client: CFLAGS := $(CFLAGSREL) -m32 -DBOTLIB -DDLL_ONLY -I../../deps/libunwind/build/include/ -I../../deps/curl/build/include/ -I../../deps/libjpeg-turbo/build/
126126
client: CPPFLAGS := $(CFLAGS)
127127
client: LDFLAGS := \
128-
-m32 -ldl -lm -lstdc++ -lSDL2 -lc
128+
-m32 -ldl -lm -lstdc++ -lSDL2 -lc -pthread
129129
client: $(CLOBJS)
130130
$(CC) -g -o wolfMP.x86 $(CLOBJS) ../../deps/libunwind/build/lib/libunwind.a ../../deps/curl/build/lib/libcurl.a ../../deps/openssl/build/lib/libssl.a ../../deps/openssl/build/lib/libcrypto.a ../../deps/libjpeg-turbo/build/libturbojpeg.a $(LDFLAGS)
131131
#strip -s wolfMP.x86

0 commit comments

Comments
 (0)