Commit c1ea4602 authored by Ghislain MARY's avatar Ghislain MARY

Handle desktop build.

parent 07a1280d
job-android: variables:
GIT_SUBMODULE_STRATEGY: recursive
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-android:r17b
tags: [ "docker" ]
.linux-ccache-template: &linux-ccache-definition
cache: cache:
key: $CI_JOB_NAME
paths: paths:
- ccache/ - ccache/
...@@ -13,12 +13,21 @@ job-android: ...@@ -13,12 +13,21 @@ job-android:
- export CCACHE_BASEDIR=${PWD} - export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/ccache - export CCACHE_DIR=${PWD}/ccache
.job-android-template: &job-android-definition
tags: [ "docker" ]
<<: *linux-ccache-definition
script: script:
- ccache -s
- sdkmanager - sdkmanager
- mkdir build-android - mkdir -p build-android
- cd build-android - cd build-android
- cmake .. -DLINPHONESDK_PLATFORM=Android -DLINPHONESDK_ANDROID_ARCHS="arm64, armv7, x86, x86_64" - cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=Android -DLINPHONESDK_ANDROID_ARCHS="arm64, armv7, x86, x86_64"
- cmake --build . --target sdk >> build_log.txt 2>&1 - cmake --build . --target sdk -- $ADDITIONAL_BUILD_OPTIONS >> build_log.txt 2>&1
- ccache -s
artifacts: artifacts:
paths: paths:
...@@ -28,24 +37,56 @@ job-android: ...@@ -28,24 +37,56 @@ job-android:
when: always when: always
expire_in: 1 week expire_in: 1 week
job-ios:
tags: [ "macosx" ] job-android-makefile-r16b:
cache: image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-android:r16b
paths: variables:
- ccache/ CMAKE_GENERATOR: Unix Makefiles
ADDITIONAL_BUILD_OPTIONS: -j2
before_script: <<: *job-android-definition
- mkdir -p ccache
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/ccache job-android-ninja-r16b:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-android:r16b
variables:
CMAKE_GENERATOR: Ninja
<<: *job-android-definition
job-android-makefile-r17c:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-android:r17c
variables:
CMAKE_GENERATOR: Unix Makefiles
ADDITIONAL_BUILD_OPTIONS: -j2
<<: *job-android-definition
job-android-ninja-r17c:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-android:r17c
variables:
CMAKE_GENERATOR: Ninja
<<: *job-android-definition
.job-ios-template: &job-ios-definition
tags: [ "macosx" ]
script: script:
- mkdir build-ios - ccache -s
- mkdir -p build-ios
- cd build-ios - cd build-ios
- cmake .. -DLINPHONESDK_PLATFORM=IOS -DLINPHONESDK_IOS_ARCHS="arm64, armv7, i386, x86_64" - cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=IOS -DLINPHONESDK_IOS_ARCHS="arm64, armv7, i386, x86_64"
- cmake --build . --target sdk >> build_log.txt 2>&1 - cmake --build . --target sdk -- $ADDITIONAL_BUILD_OPTIONS >> build_log.txt 2>&1
- ccache -s
artifacts: artifacts:
paths: paths:
...@@ -54,3 +95,227 @@ job-ios: ...@@ -54,3 +95,227 @@ job-ios:
- build-ios/linphone-sdk.podspec - build-ios/linphone-sdk.podspec
when: always when: always
expire_in: 1 week expire_in: 1 week
job-ios-makefile:
variables:
CMAKE_GENERATOR: Unix Makefiles
ADDITIONAL_BUILD_OPTIONS: -j2
<<: *job-ios-definition
job-ios-ninja:
variables:
CMAKE_GENERATOR: Ninja
<<: *job-ios-definition
job-ios-xcode:
variables:
CMAKE_GENERATOR: Xcode
<<: *job-ios-definition
.job-linux-desktop-template: &job-linux-desktop-definition
tags: [ "docker" ]
<<: *linux-ccache-definition
script:
- export CC=$CC
- export CXX=$CXX
- ccache -s
- mkdir -p build-desktop
- cd build-desktop
- cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=Desktop
- cmake --build . --target sdk -- $ADDITIONAL_BUILD_OPTIONS >> build_log.txt 2>&1
- ccache -s
artifacts:
paths:
- build-desktop/build_log.txt
when: always
expire_in: 1 week
job-centos7-makefile-gcc:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: gcc
CXX: g++
<<: *job-linux-desktop-definition
job-debian8-makefile-gcc:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:8
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: gcc
CXX: g++
ADDITIONAL_BUILD_OPTIONS: -j2
<<: *job-linux-desktop-definition
job-debian9-makefile-gcc:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: gcc
CXX: g++
ADDITIONAL_BUILD_OPTIONS: -j2
<<: *job-linux-desktop-definition
job-centos7-ninja-gcc:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
variables:
CMAKE_GENERATOR: Ninja
CC: gcc
CXX: g++
<<: *job-linux-desktop-definition
job-debian8-ninja-gcc:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:8
variables:
CMAKE_GENERATOR: Ninja
CC: gcc
CXX: g++
<<: *job-linux-desktop-definition
job-debian9-ninja-gcc:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
variables:
CMAKE_GENERATOR: Ninja
CC: gcc
CXX: g++
<<: *job-linux-desktop-definition
job-centos7-makefile-clang:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: clang
CXX: clang++
<<: *job-linux-desktop-definition
job-debian8-makefile-clang:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:8
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: clang
CXX: clang++
ADDITIONAL_BUILD_OPTIONS: -j2
<<: *job-linux-desktop-definition
job-debian9-makefile-clang:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
variables:
CMAKE_GENERATOR: Unix Makefiles
CC: clang
CXX: clang++
ADDITIONAL_BUILD_OPTIONS: -j2
<<: *job-linux-desktop-definition
job-centos7-ninja-clang:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos:7
variables:
CMAKE_GENERATOR: Ninja
CC: clang
CXX: clang++
<<: *job-linux-desktop-definition
job-debian8-ninja-clang:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:8
variables:
CMAKE_GENERATOR: Ninja
CC: clang
CXX: clang++
<<: *job-linux-desktop-definition
job-debian9-ninja-clang:
image: gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian:9
variables:
CMAKE_GENERATOR: Ninja
CC: clang
CXX: clang++
<<: *job-linux-desktop-definition
.job-macosx-desktop-template: &job-macosx-desktop-definition
tags: [ "macosx" ]
script:
- ccache -s
- mkdir -p build-desktop
- cd build-desktop
- cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=Desktop
- cmake --build . --target sdk -- $ADDITIONAL_BUILD_OPTIONS >> build_log.txt 2>&1
- ccache -s
artifacts:
paths:
- build-desktop/build_log.txt
when: always
expire_in: 1 week
job-macosx-makefile:
variables:
CMAKE_GENERATOR: Unix Makefiles
ADDITIONAL_BUILD_OPTIONS: -j2
<<: *job-macosx-desktop-definition
job-macosx-ninja:
variables:
CMAKE_GENERATOR: Ninja
<<: *job-macosx-desktop-definition
job-macosx-xcode:
variables:
CMAKE_GENERATOR: Xcode
<<: *job-macosx-desktop-definition
job-windows-vs2015:
tags: [ "windows" ]
script:
- mkdir build-desktop
- cd build-desktop
- cmake .. -G "Visual Studio 14 2015" -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=Release
- cmake --build . --target sdk --config Release
...@@ -43,8 +43,8 @@ if(ENABLE_TUNNEL) ...@@ -43,8 +43,8 @@ if(ENABLE_TUNNEL)
endif() endif()
set(LINPHONESDK_PLATFORM "Android" CACHE STRING "Platform to build") set(LINPHONESDK_PLATFORM "Desktop" CACHE STRING "Platform to build")
set_property(CACHE LINPHONESDK_PLATFORM PROPERTY STRINGS "Android" "IOS") set_property(CACHE LINPHONESDK_PLATFORM PROPERTY STRINGS "Android" "Desktop" "IOS" "UWP")
# TODO: This will be deletable once we get rid of cmake-builder # TODO: This will be deletable once we get rid of cmake-builder
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Meta repository holding all the dependencies to build a full Linphone SDK. Meta repository holding all the dependencies to build a full Linphone SDK.
The currently supported platforms are Android and iOS. The currently supported platforms are Android, iOS, Desktop (Linux, Windows, Mac OS X) and UWP (Universal Windows Platform).
## Building and customizing the SDK ## Building and customizing the SDK
...@@ -11,14 +11,14 @@ The build system is based on CMake, so you need to install it first if you don't ...@@ -11,14 +11,14 @@ The build system is based on CMake, so you need to install it first if you don't
The steps to build the SDK are: The steps to build the SDK are:
1. Create and go inside a directory where the SDK will be built: 1. Create and go inside a directory where the SDK will be built:
`mkdir build-android && cd build-android` `mkdir build-desktop && cd build-desktop`
2. Execute CMake to configure the project: 2. Execute CMake to configure the project:
`cmake ..` `cmake ..`
3. Build the SDK: 3. Build the SDK:
`cmake --build . --target sdk` `cmake --build . --target sdk`
You can pass some options to CMake at the second step to configure the SDK as you want. You can pass some options to CMake at the second step to configure the SDK as you want.
For instance, to build an iOS SDK (the default being Android): For instance, to build an iOS SDK (the default being Desktop):
`cmake .. -DLINPHONESDK_PLATFORM=IOS` `cmake .. -DLINPHONESDK_PLATFORM=IOS`
## Upgrading your SDK ## Upgrading your SDK
...@@ -40,6 +40,7 @@ Some customization are particularly important: ...@@ -40,6 +40,7 @@ Some customization are particularly important:
3. `LINPHONESDK_ANDROID_ARCHS`: A comma-separated list of the architectures for which you want to build the Android Linphone SDK for. 3. `LINPHONESDK_ANDROID_ARCHS`: A comma-separated list of the architectures for which you want to build the Android Linphone SDK for.
4. `LINPHONESDK_IOS_ARCHS`: Same as `LINPHONESDK_ANDROID_ARCHS` but for an iOS build. 4. `LINPHONESDK_IOS_ARCHS`: Same as `LINPHONESDK_ANDROID_ARCHS` but for an iOS build.
5. `LINPHONESDK_IOS_BASE_URL`: The base of the URL that will be used to download the zip file of the SDK. 5. `LINPHONESDK_IOS_BASE_URL`: The base of the URL that will be used to download the zip file of the SDK.
6. `LINPHONESDK_UWP_ARCHS`: Same as `LINPHONESDK_ANDROID_ARCHS` but for an UWP build.
## Licensing: GPL third parties versus non GPL third parties ## Licensing: GPL third parties versus non GPL third parties
......
Subproject commit 7cc7b930af024707b1e7d4a9da4c40c3fa3d4ed7 Subproject commit 67920534d76a61576932fb4d3e11e1b0f5c36c72
Subproject commit d3e747b3d0b3f3098d8dee79d24bef034cf8fd16 Subproject commit 780516e7842af86feb47a977330778f9d16222a8
Subproject commit cfad8fcc28c7cdba69684c8e35846711aaa16775 Subproject commit 99686962ce6fbed6a0faabe0ebba930827d5e1af
Subproject commit b2dda64a8faea3849fb2ab3cf5290dbb5d7ac0b7 Subproject commit 3204b2b08ceabfc64f804c05adca6adcf32d90de
############################################################################
# LinphoneSDKCheckBuildToolsDesktop.cmake
# Copyright (C) 2010-2018 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
include(LinphoneSdkCheckBuildToolsCommon)
############################################################################
# LinphoneSDKCheckBuildToolsUWP.cmake
# Copyright (C) 2010-2018 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
include(LinphoneSdkCheckBuildToolsCommon)
############################################################################
# LinphoneSdkPlatformDesktop.cmake
# Copyright (C) 2010-2018 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
include(LinphoneSdkPlatformCommon)
include(LinphoneSdkCheckBuildToolsDesktop)
set(_cmake_args
"-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/linphone-sdk/desktop"
"-DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/linphone-sdk/desktop"
"-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON"
"-DLINPHONE_BUILDER_WORK_DIR=${CMAKE_BINARY_DIR}/WORK/desktop"
"-DLINPHONE_BUILDER_EXTERNAL_SOURCE_PATH=${CMAKE_SOURCE_DIR}"
"-DLINPHONE_BUILDER_CONFIG_FILE=configs/config-desktop.cmake"
)
linphone_sdk_get_inherited_cmake_args()
linphone_sdk_get_enable_cmake_args()
list(APPEND _cmake_args ${_enable_cmake_args})
if(WIN32)
set(_install_command "${CMAKE_SOURCE_DIR}/cmake/dummy.bat")
else()
set(_install_command "${CMAKE_SOURCE_DIR}/cmake/dummy.sh")
endif()
ExternalProject_Add(sdk
${_ep_depends}
SOURCE_DIR "${CMAKE_SOURCE_DIR}/cmake-builder"
BINARY_DIR "${CMAKE_BINARY_DIR}/desktop"
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
CMAKE_ARGS ${_cmake_args}
CMAKE_CACHE_ARGS ${_inherited_cmake_args}
INSTALL_COMMAND ${_install_command}
)
ExternalProject_Add_Step(sdk force_build
COMMENT "Forcing build for 'desktop'"
DEPENDEES configure
DEPENDERS build
ALWAYS 1
)
############################################################################
# LinphoneSdkPlatformUWP.cmake
# Copyright (C) 2010-2018 Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
############################################################################
include(LinphoneSdkPlatformCommon)
include(LinphoneSdkCheckBuildToolsUWP)
set(LINPHONESDK_UWP_ARCHS "ARM, x64, x86" CACHE STRING "UWP architectures to build for: comma-separated list of values in [ARM, x64, x86]")
linphone_sdk_convert_comma_separated_list_to_cmake_list("${LINPHONESDK_UWP_ARCHS}" _archs)
list(GET _archs 0 _first_arch)
if(LINPHONESDK_PREBUILD_DEPENDENCIES)
set(_ep_depends DEPENDS ${LINPHONESDK_PREBUILD_DEPENDENCIES})
endif()
set(_uwp_build_targets)
foreach(_arch IN LISTS _archs)
set(_cmake_args
"-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/linphone-sdk/uwp-${_arch}"
"-DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/linphone-sdk/uwp-${_arch}"
"-DCMAKE_NO_SYSTEM_FROM_IMPORTED=ON"
"-DLINPHONE_BUILDER_WORK_DIR=${CMAKE_BINARY_DIR}/WORK/uwp-${_arch}"
"-DLINPHONE_BUILDER_EXTERNAL_SOURCE_PATH=${CMAKE_SOURCE_DIR}"
"-DLINPHONE_BUILDER_CONFIG_FILE=configs/config-uwp.cmake"
"-DCMAKE_CROSSCOMPILING=YES"
"-DCMAKE_SYSTEM_NAME=WindowsStore"
"-DCMAKE_SYSTEM_VERSION=10.0"
"-DCMAKE_SYSTEM_PROCESSOR=${_arch}"
"-DCMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD=TRUE"
)
linphone_sdk_get_inherited_cmake_args()
linphone_sdk_get_enable_cmake_args()
list(APPEND _cmake_args ${_enable_cmake_args})
ExternalProject_Add(uwp-${_arch}
${_ep_depends}
SOURCE_DIR "${CMAKE_SOURCE_DIR}/cmake-builder"
BINARY_DIR "${CMAKE_BINARY_DIR}/uwp-${_arch}"
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
CMAKE_ARGS ${_cmake_args}
CMAKE_CACHE_ARGS ${_inherited_cmake_args}
INSTALL_COMMAND "${CMAKE_SOURCE_DIR}/cmake/dummy.sh"
)
ExternalProject_Add_Step(uwp-${_arch} force_build
COMMENT "Forcing build for 'uwp-${_arch}'"
DEPENDEES configure
DEPENDERS build
ALWAYS 1
)
list(APPEND _uwp_build_targets uwp-${_arch})
endforeach()
...@@ -5,7 +5,7 @@ MAINTAINER Ghislain MARY <ghislain.mary@belledonne-communications.com> ...@@ -5,7 +5,7 @@ MAINTAINER Ghislain MARY <ghislain.mary@belledonne-communications.com>
#RUN localedef -i en_US -f UTF-8 en_US.UTF-8 #RUN localedef -i en_US -f UTF-8 en_US.UTF-8
# Define environment # Define environment
ENV ANDROID_NDK r17b ENV ANDROID_NDK r16b
ENV ANDROID_SDK 25.2.5 ENV ANDROID_SDK 25.2.5
ENV ANDROID_HOME /opt/android-sdk-linux ENV ANDROID_HOME /opt/android-sdk-linux
#ENV LANG en_US.UTF-8 #ENV LANG en_US.UTF-8
...@@ -52,5 +52,5 @@ RUN useradd -ms /bin/bash bc && \ ...@@ -52,5 +52,5 @@ RUN useradd -ms /bin/bash bc && \
USER bc USER bc
WORKDIR /home/bc WORKDIR /home/bc
ENV PS1='\[\e[34m\]\u@bc-dev-android-r17b>\[\e[0m\] ' ENV PS1='\[\e[34m\]\u@bc-dev-android-r16b>\[\e[0m\] '
CMD bash CMD bash
FROM debian:stretch
MAINTAINER Ghislain MARY <ghislain.mary@belledonne-communications.com>
#RUN localedef -i en_US -f UTF-8 en_US.UTF-8
# Define environment
ENV ANDROID_NDK r17c
ENV ANDROID_SDK 25.2.5
ENV ANDROID_HOME /opt/android-sdk-linux
#ENV LANG en_US.UTF-8
#ENV LC_ALL en_US.UTF-8
ENV SHELL=/bin/bash
# Install common general tools
RUN apt-get update && \
apt-get install -y curl nano sudo unzip vim wget && \
apt-get clean
# Install development tools
RUN apt-get update && \
apt-get install -y ccache doxygen git make nasm ninja-build openjdk-8-jdk-headless pkg-config python-pystache python-six yasm && \
apt-get clean
# Install CMake (version from the debian repository is too old)
ENV CMAKE3_HOME /opt/cmake3
RUN mkdir $CMAKE3_HOME && \
curl --fail --silent --show-error \
--location https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.tar.gz | \
tar --extract --gzip --no-same-owner --file - --strip-components=1 --directory $CMAKE3_HOME
# Get the Android tools
RUN wget https://dl.google.com/android/repository/tools_r$ANDROID_SDK-linux.zip && \
unzip tools_r$ANDROID_SDK-linux.zip -d $ANDROID_HOME && \
rm -f tools_r$ANDROID_SDK-linux.zip
ENV PATH $ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH
# Get the Android SDK
RUN echo "y" | sdkmanager "platforms;android-28" "build-tools;28.0.0" "extras;android;m2repository" "extras;google;m2repository" "platform-tools" "tools"
# Get the Android NDK
RUN wget http://dl.google.com/android/repository/android-ndk-$ANDROID_NDK-linux-x86_64.zip && \
unzip android-ndk-$ANDROID_NDK-linux-x86_64.zip -d /opt && \
rm -f android-ndk-$ANDROID_NDK-linux-x86_64.zip
ENV ANDROID_NDK_HOME /opt/android-ndk-$ANDROID_NDK
ENV PATH $ANDROID_NDK_HOME:$CMAKE3_HOME/bin/:$PATH
# Configure user bc
RUN useradd -ms /bin/bash bc && \
echo 'bc:cotcot' | chpasswd && \
echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER bc
WORKDIR /home/bc
ENV PS1='\[\e[34m\]\u@bc-dev-android-r17c>\[\e[0m\] '
CMD bash
...@@ -12,7 +12,7 @@ RUN yum install -y epel-release && \ ...@@ -12,7 +12,7 @@ RUN yum install -y epel-release && \
yum clean all yum clean all
# Install development tools # Install development tools
RUN yum install -y ccache clang cmake doxygen gcc-c++ gdb gettext-devel git graphviz libtool make nasm patch pystache python-six python2-pip rpm-build yasm && \ RUN yum install -y ccache clang cmake doxygen gcc-c++ gdb gettext-devel git graphviz libtool make nasm ninja-build patch pystache python-six python2-pip rpm-build yasm && \
curl -o cmake.tar.gz https://cmake.org/files/v3.2/cmake-3.2.3.tar.gz && \ curl -o cmake.tar.gz https://cmake.org/files/v3.2/cmake-3.2.3.tar.gz && \
tar xvzf cmake.tar.gz && rm cmake.tar.gz && cd cmake-3.2.3 && cmake . && make -j5 install && cd .. && rm -rf cmake-3.2.3 && \ tar xvzf cmake.tar.gz && rm cmake.tar.gz && cd cmake-3.2.3 && cmake . && make -j5 install && cd .. && rm -rf cmake-3.2.3 && \
yum erase -y cmake && \ yum erase -y cmake && \
......
...@@ -27,11 +27,22 @@ RUN apt-get update && \ ...@@ -27,11 +27,22 @@ RUN apt-get update && \
apt-get install -y libasound2-dev libavcodec-dev libavutil-dev libbsd-dev libegl1-mesa-dev libglew-dev libgsm1-dev libmbedtls-dev libopus-dev libpulse-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libsrtp2-dev libssl-dev libswscale-dev libturbojpeg0-dev libv4l-dev libvpx-dev libxerces-c-dev libxml2-dev libxv-dev && \ apt-get install -y libasound2-dev libavcodec-dev libavutil-dev libbsd-dev libegl1-mesa-dev libglew-dev libgsm1-dev libmbedtls-dev libopus-dev libpulse-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libsrtp2-dev libssl-dev libswscale-dev libturbojpeg0-dev libv4l-dev libvpx-dev libxerces-c-dev libxml2-dev libxv-dev && \
apt-get clean apt-get clean
# Install qt5
COPY qt-linux-installer-noninteractive.qs .
RUN curl --fail --silent --show-error --location http://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run > qt-installer.run && \
chmod u+x qt-installer.run && \
./qt-installer.run --platform minimal --script qt-linux-installer-noninteractive.qs && \
rm qt-installer.run && \
rm qt-linux-installer-noninteractive.qs
# Configure user bc # Configure user bc
RUN useradd -ms /bin/bash bc && \ RUN useradd -ms /bin/bash bc && \
echo 'bc:cotcot' | chpasswd && \ echo 'bc:cotcot' | chpasswd && \
echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
ENV Qt5_DIR=/opt/Qt/5.11.0/gcc_64/lib/cmake
ENV PATH=$PATH:/opt/Qt/5.11.0/gcc_64/bin
#EXPOSE 22 #EXPOSE 22
EXPOSE 5060/udp EXPOSE 5060/udp
EXPOSE 5060/tcp EXPOSE 5060/tcp
......
FROM microsoft/windowsservercore
RUN @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
# Install build tools
#--params "/GitAndUnixToolsOnPath /NoAutoCrlf /WindowsTerminal /NoShellIntegration /NoCredentialManager /NoGitLfs /SChannel"
RUN choco install git.portable --version 2.18.0 -y; \
choco install doxygen.install -y; \
choco install python2 -y; \
choco install 7zip -y; \
choco install yasm -y; \
choco install visualcpp-build-tools --version 14.0.25420.1 -y
ENV PYTHONIOENCODING="UTF-8"
RUN pip install pystache pip
RUN choco feature enable -n=allowGlobalConfirmation; \
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=""System""'
# Default to PowerShell if no other command specified.
CMD ["powershell.exe", "-NoLogo", "-Exe