mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Merge PR #4252: Introduce CMake as build system
This commit is contained in:
commit
54e313481d
@ -1,26 +1,34 @@
|
||||
variables:
|
||||
MUMBLE_ENVIRONMENT_STORE: '$(Agent.ToolsDirectory)/MumbleBuild'
|
||||
MUMBLE_ENVIRONMENT_SOURCE: 'https://dl.mumble.info/build/vcpkg'
|
||||
MUMBLE_ENVIRONMENT_PATH: '$(MUMBLE_ENVIRONMENT_STORE)/$(MUMBLE_ENVIRONMENT_VERSION)'
|
||||
MUMBLE_ENVIRONMENT_TOOLCHAIN: '$(MUMBLE_ENVIRONMENT_PATH)/scripts/buildsystems/vcpkg.cmake'
|
||||
|
||||
jobs:
|
||||
- job: Windows
|
||||
strategy:
|
||||
matrix:
|
||||
MSVC_2015:
|
||||
MUMBLE_QT: qt5
|
||||
MUMBLE_HOST: x86_64-pc-windows-msvc
|
||||
MUMBLE_PUBLISH_INSTALLER: 1
|
||||
MSVC_2015_NO_PCH:
|
||||
MUMBLE_QT: qt5
|
||||
MUMBLE_HOST: x86_64-pc-windows-msvc
|
||||
MUMBLE_NO_PCH: 1
|
||||
pool:
|
||||
vmImage: 'windows-latest'
|
||||
variables:
|
||||
MUMBLE_ENVIRONMENT_VERSION: 'win64-static-1.4.x-2020-05-27-ecb3c64-1151'
|
||||
steps:
|
||||
- script: git submodule --quiet update --init --recursive
|
||||
displayName: 'Fetch submodules'
|
||||
- powershell: |
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
|
||||
choco install 7zip.install -y
|
||||
displayName: 'Install 7-Zip via Chocolatey'
|
||||
- powershell: scripts/azure-pipelines/install-environment.ps1
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"$(MUMBLE_ENVIRONMENT_VERSION)"'
|
||||
path: '$(MUMBLE_ENVIRONMENT_PATH)'
|
||||
displayName: 'Environment storage'
|
||||
- powershell: scripts/azure-pipelines/install-environment_windows.ps1
|
||||
displayName: 'Install build environment'
|
||||
- powershell: scripts/azure-pipelines/build.ps1
|
||||
- script: scripts/azure-pipelines/build_windows.bat
|
||||
displayName: 'Build'
|
||||
- powershell: |
|
||||
cd $(Agent.BuildDirectory)
|
||||
.\Create-Win32InstallerMUI.ps1 -PackageName 'Mumble' -Version '1.4.0'
|
||||
cp *.sha* $(Build.ArtifactStagingDirectory)
|
||||
cp *.msi $(Build.ArtifactStagingDirectory)
|
||||
cp *.pdb $(Build.ArtifactStagingDirectory)
|
||||
displayName: Build installer
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||
@ -42,9 +50,16 @@ jobs:
|
||||
- job: macOS
|
||||
pool:
|
||||
vmImage: 'macOS-latest'
|
||||
variables:
|
||||
MUMBLE_ENVIRONMENT_VERSION: 'macos-static-1.4.x-2020-05-27-ecb3c64-1151'
|
||||
steps:
|
||||
- script: git submodule --quiet update --init --recursive
|
||||
displayName: 'Fetch submodules'
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"$(MUMBLE_ENVIRONMENT_VERSION)"'
|
||||
path: '$(MUMBLE_ENVIRONMENT_PATH)'
|
||||
displayName: 'Environment storage'
|
||||
- script: scripts/azure-pipelines/install-environment_macos.bash
|
||||
displayName: 'Install build environment'
|
||||
- script: scripts/azure-pipelines/build_macos.bash
|
||||
|
||||
18
.cirrus.yml
18
.cirrus.yml
@ -2,10 +2,18 @@ freebsd_instance:
|
||||
image: freebsd-12-1-release-amd64
|
||||
|
||||
freebsd_task:
|
||||
update_script: pkg update && pkg upgrade -y
|
||||
install_script: pkg install -y git pkgconf gmake qt5-qmake qt5-l10n qt5-buildtools qt5-linguisttools qt5-testlib qt5-core qt5-gui qt5-network qt5-sql qt5-svg qt5-widgets qt5-xml qt5-concurrent boost-libs opus libsndfile protobuf ice avahi-libdns speech-dispatcher python
|
||||
pkg_script:
|
||||
- pkg update && pkg upgrade -y
|
||||
- pkg install -y git ninja pkgconf cmake qt5-buildtools qt5-qmake qt5-linguisttools qt5-concurrent qt5-network qt5-xml qt5-sql qt5-svg qt5-testlib boost-libs libsndfile protobuf ice avahi-libdns
|
||||
fetch_submodules_script: git submodule --quiet update --init --recursive
|
||||
build_script:
|
||||
- qmake -recursive CONFIG+="release tests warnings-as-errors no-alsa no-jackaudio no-pulseaudio"
|
||||
- gmake -j $(sysctl -n hw.ncpu)
|
||||
check_script: gmake check
|
||||
- mkdir build && cd build
|
||||
# We disable translations because of a critical issue in "lupdate": it's very slow and keeps CPU usage at 100%.
|
||||
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -Dsymbols=ON -Dtranslations=OFF ..
|
||||
- cmake --build .
|
||||
test_script:
|
||||
- cd build
|
||||
- ctest
|
||||
install_script:
|
||||
- cd build
|
||||
- cmake --install .
|
||||
|
||||
49
.travis.yml
49
.travis.yml
@ -1,30 +1,37 @@
|
||||
sudo: required # Required for apt-get build-dep
|
||||
os: linux
|
||||
dist: bionic
|
||||
language: cpp
|
||||
compiler: gcc
|
||||
|
||||
matrix:
|
||||
jobs:
|
||||
include:
|
||||
- os: linux
|
||||
arch: arm64
|
||||
dist: bionic
|
||||
- arch: arm64
|
||||
env: MUMBLE_HOST=aarch64-linux-gnu
|
||||
- os: linux
|
||||
dist: bionic
|
||||
env: MUMBLE_HOST=x86_64-linux-gnu MUMBLE_NO_PCH=1
|
||||
- os: linux
|
||||
dist: bionic
|
||||
env: MUMBLE_HOST=i686-w64-mingw32 MUMBLE_NO_PCH=1
|
||||
- os: linux
|
||||
dist: bionic
|
||||
env: MUMBLE_HOST=x86_64-w64-mingw32 MUMBLE_NO_PCH=1
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/cmake-3.17.2
|
||||
- arch: amd64
|
||||
env: MUMBLE_HOST=x86_64-linux-gnu
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'deb https://apt.kitware.com/ubuntu/ bionic main'
|
||||
key_url: 'https://apt.kitware.com/keys/kitware-archive-latest.asc'
|
||||
packages:
|
||||
- cmake
|
||||
- arch: amd64
|
||||
env: MUMBLE_HOST=i686-w64-mingw32
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/mxe
|
||||
- arch: amd64
|
||||
env: MUMBLE_HOST=x86_64-w64-mingw32
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/mxe
|
||||
|
||||
before_install:
|
||||
- ./scripts/travis-ci/before_install.bash
|
||||
- ./scripts/travis-ci/before_install.bash
|
||||
|
||||
script:
|
||||
- ./scripts/travis-ci/script.bash
|
||||
|
||||
branches:
|
||||
except:
|
||||
- # Do not build tags that we create when we upload to GitHub Releases
|
||||
- /^(?i:continuous)/
|
||||
- ./scripts/travis-ci/script.bash
|
||||
|
||||
67
3rdparty/celt-0.7.0-build/CMakeLists.txt
vendored
Normal file
67
3rdparty/celt-0.7.0-build/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
set(CELT_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../celt-0.7.0-src")
|
||||
set(LIBCELT_SRC_DIR "${CELT_SRC_DIR}/libcelt")
|
||||
|
||||
if(NOT EXISTS "${CELT_SRC_DIR}/COPYING")
|
||||
message(FATAL_ERROR
|
||||
"${CELT_SRC_DIR} was not found.\n"
|
||||
"Please checkout the submodule:\n"
|
||||
"git submodule update --init --recursive"
|
||||
)
|
||||
endif()
|
||||
|
||||
add_library(celt SHARED)
|
||||
|
||||
set_target_properties(celt PROPERTIES VERSION "0.7.0")
|
||||
|
||||
target_compile_definitions(celt PRIVATE "HAVE_CONFIG_H")
|
||||
|
||||
target_include_directories(celt PUBLIC SYSTEM "${CELT_SRC_DIR}/libcelt")
|
||||
|
||||
if(MSVC)
|
||||
# We include "win32" only for MSVC because MinGW uses the "config.h" for Unix-like systems.
|
||||
target_include_directories(celt PRIVATE SYSTEM BEFORE "${CMAKE_CURRENT_SOURCE_DIR}/win32")
|
||||
else()
|
||||
target_include_directories(celt PRIVATE SYSTEM ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(celt
|
||||
PROPERTIES
|
||||
OUTPUT_NAME "celt0.0.7.0"
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
if(MINGW)
|
||||
# Remove "lib" prefix.
|
||||
set_target_properties(celt PROPERTIES PREFIX "")
|
||||
endif()
|
||||
else()
|
||||
set_target_properties(celt
|
||||
PROPERTIES
|
||||
OUTPUT_NAME "celt0"
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
target_sources(celt PRIVATE
|
||||
"${LIBCELT_SRC_DIR}/bands.c"
|
||||
"${LIBCELT_SRC_DIR}/celt.c"
|
||||
"${LIBCELT_SRC_DIR}/cwrs.c"
|
||||
"${LIBCELT_SRC_DIR}/entcode.c"
|
||||
"${LIBCELT_SRC_DIR}/entdec.c"
|
||||
"${LIBCELT_SRC_DIR}/entenc.c"
|
||||
"${LIBCELT_SRC_DIR}/header.c"
|
||||
"${LIBCELT_SRC_DIR}/kiss_fft.c"
|
||||
"${LIBCELT_SRC_DIR}/kiss_fftr.c"
|
||||
"${LIBCELT_SRC_DIR}/laplace.c"
|
||||
"${LIBCELT_SRC_DIR}/mdct.c"
|
||||
"${LIBCELT_SRC_DIR}/modes.c"
|
||||
"${LIBCELT_SRC_DIR}/pitch.c"
|
||||
"${LIBCELT_SRC_DIR}/psy.c"
|
||||
"${LIBCELT_SRC_DIR}/quant_bands.c"
|
||||
"${LIBCELT_SRC_DIR}/rangedec.c"
|
||||
"${LIBCELT_SRC_DIR}/rangeenc.c"
|
||||
"${LIBCELT_SRC_DIR}/rate.c"
|
||||
"${LIBCELT_SRC_DIR}/vq.c"
|
||||
)
|
||||
|
||||
target_disable_warnings(celt)
|
||||
38
3rdparty/mach-override-build/CMakeLists.txt
vendored
Normal file
38
3rdparty/mach-override-build/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
set(SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../mach-override-src")
|
||||
|
||||
if(NOT EXISTS "${SRC_DIR}/README.markdown")
|
||||
message(FATAL_ERROR
|
||||
"\"${SRC_DIR}/README.markdown\" was not found.\n"
|
||||
"Please checkout the submodule:\n"
|
||||
"git submodule update --init --recursive"
|
||||
)
|
||||
endif()
|
||||
|
||||
add_library(mach-override STATIC)
|
||||
|
||||
target_include_directories(mach-override PUBLIC SYSTEM ${SRC_DIR})
|
||||
|
||||
target_sources(mach-override
|
||||
PUBLIC
|
||||
"${SRC_DIR}/mach_override.h"
|
||||
PRIVATE
|
||||
"${SRC_DIR}/mach_override.c"
|
||||
"${SRC_DIR}/udis86.h"
|
||||
|
||||
"${SRC_DIR}/libudis86/decode.c"
|
||||
"${SRC_DIR}/libudis86/decode.h"
|
||||
"${SRC_DIR}/libudis86/extern.h"
|
||||
"${SRC_DIR}/libudis86/input.c"
|
||||
"${SRC_DIR}/libudis86/input.h"
|
||||
"${SRC_DIR}/libudis86/itab.c"
|
||||
"${SRC_DIR}/libudis86/itab.h"
|
||||
"${SRC_DIR}/libudis86/syn.c"
|
||||
"${SRC_DIR}/libudis86/syn-att.c"
|
||||
"${SRC_DIR}/libudis86/syn-intel.c"
|
||||
"${SRC_DIR}/libudis86/syn.h"
|
||||
"${SRC_DIR}/libudis86/types.h"
|
||||
"${SRC_DIR}/libudis86/udint.h"
|
||||
"${SRC_DIR}/libudis86/udis86.c"
|
||||
)
|
||||
|
||||
target_disable_warnings(mach-override)
|
||||
2
3rdparty/opus-src
vendored
2
3rdparty/opus-src
vendored
@ -1 +1 @@
|
||||
Subproject commit ad8fe90db79b7d2a135e3dfd2ed6631b0c5662ab
|
||||
Subproject commit 296d213da679eea977a869583b59f1e5a51b9ff5
|
||||
57
3rdparty/rnnoise-build/CMakeLists.txt
vendored
Normal file
57
3rdparty/rnnoise-build/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
# Copyright 2005-2019 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
set(RNNOISE_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../rnnoise-src")
|
||||
|
||||
if(NOT EXISTS "${RNNOISE_SRC_DIR}/COPYING")
|
||||
message(FATAL_ERROR
|
||||
"${RNNOISE_SRC_DIR} was not found.\n"
|
||||
"Please checkout the submodule:\n"
|
||||
"git submodule update --init --recursive"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
add_library(rnnoise SHARED)
|
||||
set_target_properties(rnnoise PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
if(MINGW)
|
||||
# Remove "lib" prefix.
|
||||
set_target_properties(rnnoise PROPERTIES PREFIX "")
|
||||
endif()
|
||||
target_compile_definitions(rnnoise
|
||||
PRIVATE
|
||||
"WIN32"
|
||||
"DLL_EXPORT"
|
||||
)
|
||||
else()
|
||||
add_library(rnnoise STATIC)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(rnnoise PRIVATE "HAVE_CONFIG_H")
|
||||
|
||||
target_include_directories(rnnoise
|
||||
PRIVATE SYSTEM
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PUBLIC SYSTEM
|
||||
"${RNNOISE_SRC_DIR}/include"
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
# Use malloc() and free() instead of variable length arrays (unsupported)
|
||||
target_compile_definitions(rnnoise PRIVATE "USE_MALLOC")
|
||||
# Define M_PI
|
||||
target_compile_definitions(rnnoise PRIVATE "_USE_MATH_DEFINES")
|
||||
endif()
|
||||
|
||||
target_sources(rnnoise PRIVATE
|
||||
"${RNNOISE_SRC_DIR}/src/rnn_data.c"
|
||||
"${RNNOISE_SRC_DIR}/src/rnn.c"
|
||||
"${RNNOISE_SRC_DIR}/src/pitch.c"
|
||||
"${RNNOISE_SRC_DIR}/src/kiss_fft.c"
|
||||
"${RNNOISE_SRC_DIR}/src/denoise.c"
|
||||
"${RNNOISE_SRC_DIR}/src/celt_lpc.c"
|
||||
)
|
||||
|
||||
target_disable_warnings(rnnoise)
|
||||
94
3rdparty/speex-build/CMakeLists.txt
vendored
Normal file
94
3rdparty/speex-build/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
set(SPEEX_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../speex-src")
|
||||
set(SPEEXDSP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../speexdsp-src")
|
||||
|
||||
set(SPEEX_SRC_DIR "${SPEEX_DIR}/libspeex")
|
||||
set(SPEEXDSP_SRC_DIR "${SPEEXDSP_DIR}/libspeexdsp")
|
||||
|
||||
if(NOT EXISTS "${SPEEX_DIR}/COPYING" OR NOT EXISTS "${SPEEXDSP_DIR}/COPYING")
|
||||
message(FATAL_ERROR
|
||||
"${SPEEX_DIR} or ${SPEEXDSP_DIR} was not found. You need to do one of the following:\n"
|
||||
"Option 1: Checkout the submodule:\n"
|
||||
"git submodule update --init --recursive\n"
|
||||
"Option 2: Use system Speex and SpeexDSP (v1.2 or later):\n"
|
||||
"cmake .. -Dbundled-speex=OFF"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
add_library(speex SHARED)
|
||||
set_target_properties(speex PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
if(MINGW)
|
||||
# Remove "lib" prefix.
|
||||
set_target_properties(speex PROPERTIES PREFIX "")
|
||||
endif()
|
||||
else()
|
||||
add_library(speex STATIC)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(speex PRIVATE "HAVE_CONFIG_H")
|
||||
|
||||
target_include_directories(speex PRIVATE SYSTEM "${SPEEX_DIR}/libspeex" "${SPEEXDSP_DIR}/libspeexdsp")
|
||||
target_include_directories(speex PUBLIC SYSTEM "${SPEEX_DIR}/include" "${SPEEXDSP_DIR}/include")
|
||||
|
||||
if(MSVC)
|
||||
# We include "win32" only for MSVC because MinGW uses the "config.h" for Unix-like systems.
|
||||
target_include_directories(speex PRIVATE SYSTEM BEFORE "${CMAKE_CURRENT_SOURCE_DIR}/win32")
|
||||
else()
|
||||
target_include_directories(speex PUBLIC SYSTEM ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_compile_definitions(speex PRIVATE "_USE_MATH_DEFINES" "USE_SMALLFT")
|
||||
target_sources(speex PRIVATE "mumble_speex_init.c")
|
||||
endif()
|
||||
|
||||
set(SPEEXDSP_SOURCES
|
||||
"${SPEEXDSP_SRC_DIR}/fftwrap.c"
|
||||
"${SPEEXDSP_SRC_DIR}/filterbank.c"
|
||||
"${SPEEXDSP_SRC_DIR}/jitter.c"
|
||||
"${SPEEXDSP_SRC_DIR}/mdf.c"
|
||||
"${SPEEXDSP_SRC_DIR}/preprocess.c"
|
||||
"${SPEEXDSP_SRC_DIR}/resample.c"
|
||||
"${SPEEXDSP_SRC_DIR}/scal.c"
|
||||
"${SPEEXDSP_SRC_DIR}/smallft.c"
|
||||
)
|
||||
|
||||
set(SPEEX_SOURCES
|
||||
"${SPEEX_SRC_DIR}/bits.c"
|
||||
"${SPEEX_SRC_DIR}/cb_search.c"
|
||||
"${SPEEX_SRC_DIR}/exc_5_64_table.c"
|
||||
"${SPEEX_SRC_DIR}/exc_5_256_table.c"
|
||||
"${SPEEX_SRC_DIR}/exc_8_128_table.c"
|
||||
"${SPEEX_SRC_DIR}/exc_10_16_table.c"
|
||||
"${SPEEX_SRC_DIR}/exc_10_32_table.c"
|
||||
"${SPEEX_SRC_DIR}/exc_20_32_table.c"
|
||||
"${SPEEX_SRC_DIR}/filters.c"
|
||||
"${SPEEX_SRC_DIR}/gain_table.c"
|
||||
"${SPEEX_SRC_DIR}/gain_table_lbr.c"
|
||||
"${SPEEX_SRC_DIR}/hexc_10_32_table.c"
|
||||
"${SPEEX_SRC_DIR}/hexc_table.c"
|
||||
"${SPEEX_SRC_DIR}/high_lsp_tables.c"
|
||||
"${SPEEX_SRC_DIR}/kiss_fft.c"
|
||||
"${SPEEX_SRC_DIR}/kiss_fftr.c"
|
||||
"${SPEEX_SRC_DIR}/lpc.c"
|
||||
"${SPEEX_SRC_DIR}/lsp.c"
|
||||
"${SPEEX_SRC_DIR}/lsp_tables_nb.c"
|
||||
"${SPEEX_SRC_DIR}/ltp.c"
|
||||
"${SPEEX_SRC_DIR}/modes.c"
|
||||
"${SPEEX_SRC_DIR}/modes_wb.c"
|
||||
"${SPEEX_SRC_DIR}/nb_celp.c"
|
||||
"${SPEEX_SRC_DIR}/quant_lsp.c"
|
||||
"${SPEEX_SRC_DIR}/sb_celp.c"
|
||||
"${SPEEX_SRC_DIR}/speex.c"
|
||||
"${SPEEX_SRC_DIR}/speex_callbacks.c"
|
||||
"${SPEEX_SRC_DIR}/speex_header.c"
|
||||
"${SPEEX_SRC_DIR}/stereo.c"
|
||||
"${SPEEX_SRC_DIR}/vbr.c"
|
||||
"${SPEEX_SRC_DIR}/vorbis_psy.c"
|
||||
"${SPEEX_SRC_DIR}/vq.c"
|
||||
"${SPEEX_SRC_DIR}/window.c"
|
||||
)
|
||||
|
||||
target_sources(speex PRIVATE ${SPEEXDSP_SOURCES} ${SPEEX_SOURCES} "speex.def")
|
||||
|
||||
target_disable_warnings(speex)
|
||||
7
3rdparty/xinputcheck-build/CMakeLists.txt
vendored
Normal file
7
3rdparty/xinputcheck-build/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
set(XINPUTCHECK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../xinputcheck-src")
|
||||
|
||||
add_library(xinputcheck STATIC "${XINPUTCHECK_DIR}/xinputcheck.cpp")
|
||||
|
||||
target_include_directories(xinputcheck PUBLIC ${XINPUTCHECK_DIR})
|
||||
|
||||
target_disable_warnings(xinputcheck)
|
||||
106
CMakeLists.txt
Normal file
106
CMakeLists.txt
Normal file
@ -0,0 +1,106 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
cmake_policy(SET CMP0079 NEW)
|
||||
cmake_policy(SET CMP0091 NEW)
|
||||
|
||||
set(version "1.4.0" CACHE STRING "Project version")
|
||||
|
||||
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]" version_short ${version})
|
||||
|
||||
project(Mumble
|
||||
VERSION ${version_short}
|
||||
DESCRIPTION "Open source, low-latency, high quality voice chat."
|
||||
HOMEPAGE_URL "https://www.mumble.info"
|
||||
LANGUAGES "C" "CXX"
|
||||
)
|
||||
|
||||
message(STATUS "Mumble version: ${version}")
|
||||
|
||||
set(3RDPARTY_DIR "${CMAKE_SOURCE_DIR}/3rdparty")
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH
|
||||
"${CMAKE_SOURCE_DIR}/cmake"
|
||||
"${CMAKE_SOURCE_DIR}/cmake/FindModules"
|
||||
)
|
||||
|
||||
include(pkg-utils)
|
||||
include(CTest)
|
||||
|
||||
option(BUILD_TESTING "Build tests." OFF)
|
||||
|
||||
option(optimize "Build a heavily optimized version, specific to the machine it's being compiled on." OFF)
|
||||
option(static "Build static binaries." OFF)
|
||||
option(symbols "Build binaries in a way that allows easier debugging." OFF)
|
||||
option(warnings-as-errors "All warnings are treated as errors." OFF)
|
||||
|
||||
option(dpkg-buildflags "Add CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS from dpkg-buildflags to the build flags." OFF)
|
||||
|
||||
option(overlay "Build overlay." ON)
|
||||
option(packaging "Build package." OFF)
|
||||
option(plugins "Build plugins." ON)
|
||||
|
||||
# We support the "Debug" and "Release" configurations.
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
|
||||
"Debug"
|
||||
"Release"
|
||||
)
|
||||
|
||||
# CMAKE_CONFIGURATION_TYPES exists with multi configuration generators, such as Visual Studio.
|
||||
if(CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
|
||||
endif()
|
||||
|
||||
# We set the CMake configuration to "Release", in case it's not set.
|
||||
if(NOT CMAKE_CONFIGURATION_TYPES)
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY VALUE "Release")
|
||||
elseif(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
|
||||
add_definitions(
|
||||
"-DDEBUG"
|
||||
"-DSNAPSHOT_BUILD"
|
||||
)
|
||||
elseif(NOT ${CMAKE_BUILD_TYPE} STREQUAL "Release")
|
||||
message(FATAL_ERROR "Unsupported build type! Please choose either \"Debug\" or \"Release\".")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(compiler)
|
||||
include(os)
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
if(g15 AND WIN32)
|
||||
add_subdirectory(g15helper)
|
||||
endif()
|
||||
|
||||
if(overlay AND client)
|
||||
if(WIN32)
|
||||
add_subdirectory(overlay)
|
||||
else()
|
||||
add_subdirectory(overlay_gl)
|
||||
|
||||
if(APPLE)
|
||||
add_subdirectory(macx/osax)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(plugins AND client)
|
||||
add_subdirectory(plugins)
|
||||
endif()
|
||||
|
||||
if(packaging)
|
||||
if(WIN32)
|
||||
file(COPY "${CMAKE_SOURCE_DIR}/scripts/Create-Win32InstallerMUI.ps1" DESTINATION ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
include(cmake/packaging.cmake)
|
||||
endif()
|
||||
88
cmake/FindModules/FindGRPC.cmake
Normal file
88
cmake/FindModules/FindGRPC.cmake
Normal file
@ -0,0 +1,88 @@
|
||||
# https://github.com/IvanSafonov/grpc-cmake-example
|
||||
|
||||
# MIT License
|
||||
#
|
||||
# Copyright (c) 2018 Ivan Safonov
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
#
|
||||
# Locate and configure the gRPC library
|
||||
#
|
||||
# Adds the following targets:
|
||||
#
|
||||
# gRPC::grpc - gRPC library
|
||||
# gRPC::grpc++ - gRPC C++ library
|
||||
# gRPC::grpc++_reflection - gRPC C++ reflection library
|
||||
# gRPC::grpc_cpp_plugin - C++ generator plugin for Protocol Buffers
|
||||
#
|
||||
|
||||
# Find gRPC include directory
|
||||
find_path(GRPC_INCLUDE_DIR grpc/grpc.h)
|
||||
mark_as_advanced(GRPC_INCLUDE_DIR)
|
||||
|
||||
# Find gRPC library
|
||||
if(NOT TARGET gRPC::grpc)
|
||||
find_library(GRPC_LIBRARY NAMES grpc)
|
||||
mark_as_advanced(GRPC_LIBRARY)
|
||||
add_library(gRPC::grpc UNKNOWN IMPORTED)
|
||||
set_target_properties(gRPC::grpc PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${GRPC_INCLUDE_DIR}
|
||||
INTERFACE_LINK_LIBRARIES "-lpthread;-ldl"
|
||||
IMPORTED_LOCATION ${GRPC_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Find gRPC C++ library
|
||||
if(NOT TARGET gRPC::grpc++)
|
||||
find_library(GRPC_GRPC++_LIBRARY NAMES grpc++)
|
||||
mark_as_advanced(GRPC_GRPC++_LIBRARY)
|
||||
add_library(gRPC::grpc++ UNKNOWN IMPORTED)
|
||||
set_target_properties(gRPC::grpc++ PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${GRPC_INCLUDE_DIR}
|
||||
INTERFACE_LINK_LIBRARIES gRPC::grpc
|
||||
IMPORTED_LOCATION ${GRPC_GRPC++_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Find gRPC C++ reflection library
|
||||
if(NOT TARGET gRPC::grpc++_reflection)
|
||||
find_library(GRPC_GRPC++_REFLECTION_LIBRARY NAMES grpc++_reflection)
|
||||
mark_as_advanced(GRPC_GRPC++_REFLECTION_LIBRARY)
|
||||
add_library(gRPC::grpc++_reflection UNKNOWN IMPORTED)
|
||||
set_target_properties(gRPC::grpc++_reflection PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${GRPC_INCLUDE_DIR}
|
||||
INTERFACE_LINK_LIBRARIES gRPC::grpc++
|
||||
IMPORTED_LOCATION ${GRPC_GRPC++_REFLECTION_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Find gRPC CPP generator
|
||||
if(NOT TARGET gRPC::grpc_cpp_plugin)
|
||||
find_program(GRPC_CPP_PLUGIN NAMES grpc_cpp_plugin)
|
||||
mark_as_advanced(GRPC_CPP_PLUGIN)
|
||||
add_executable(gRPC::grpc_cpp_plugin IMPORTED)
|
||||
set_target_properties(gRPC::grpc_cpp_plugin PROPERTIES
|
||||
IMPORTED_LOCATION ${GRPC_CPP_PLUGIN}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(TARGET gRPC::grpc AND TARGET gRPC::grpc++ AND TARGET gRPC::grpc++_reflection AND TARGET gRPC::grpc_cpp_plugin)
|
||||
set(GRPC_FOUND PARENT_SCOPE TRUE)
|
||||
endif()
|
||||
122
cmake/compiler.cmake
Normal file
122
cmake/compiler.cmake
Normal file
@ -0,0 +1,122 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
||||
set(64_BIT TRUE)
|
||||
elseif(${CMAKE_SIZEOF_VOID_P} EQUAL 4)
|
||||
set(32_BIT TRUE)
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown architecture - only 32bit and 64bit are supported")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
if($<CONFIG:Release>)
|
||||
add_compile_options(
|
||||
"/Ox"
|
||||
"/fp:fast"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(32_BIT)
|
||||
# SSE2 code is generated by default, unless an explict arch is set.
|
||||
# Our 32 bit binaries should not contain any SSE2 code, so override the default.
|
||||
add_compile_options("-arch:SSE")
|
||||
endif()
|
||||
|
||||
if(symbols)
|
||||
# Configure build to be able to properly debug release builds (https://docs.microsoft.com/cpp/build/how-to-debug-a-release-build).
|
||||
# This includes explicitely disabling /Oy to help debugging (https://docs.microsoft.com/cpp/build/reference/oy-frame-pointer-omission).
|
||||
# Also set /Zo to enhance optimized debugging (https://docs.microsoft.com/cpp/build/reference/zo-enhance-optimized-debugging).
|
||||
add_compile_options(
|
||||
"/GR"
|
||||
"/Zi"
|
||||
"/Zo"
|
||||
"/Oy-"
|
||||
)
|
||||
add_link_options(
|
||||
"/DEBUG"
|
||||
"/OPT:REF"
|
||||
"/OPT:ICF"
|
||||
"/INCREMENTAL:NO"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(warnings-as-errors)
|
||||
add_compile_options("/WX")
|
||||
add_link_options("/WX")
|
||||
endif()
|
||||
elseif(UNIX OR MINGW)
|
||||
add_compile_options(
|
||||
"-fvisibility=hidden"
|
||||
"-Wall"
|
||||
"-Wextra"
|
||||
)
|
||||
|
||||
if(options)
|
||||
add_compile_options(
|
||||
"-O3"
|
||||
"-march=native"
|
||||
"-ffast-math"
|
||||
"-ftree-vectorize"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(warnings-as-errors)
|
||||
add_compile_options("-Werror")
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
add_link_options("-Wl,-dead_strip")
|
||||
|
||||
if(symbols)
|
||||
add_compile_options(
|
||||
"-gfull"
|
||||
"-gdwarf-2"
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
if(NOT MINGW)
|
||||
add_link_options(
|
||||
"-Wl,-z,relro"
|
||||
"-Wl,-z,now"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Ensure _FORTIFY_SOURCE is not used in debug builds.
|
||||
#
|
||||
# First, ensure _FORTIFY_SOURCE is undefined.
|
||||
# Then -- and, only for release builds -- set _FORTIFY_SOURCE=2.
|
||||
#
|
||||
# We can't use _FORTIFY_SOURCE in debug builds (which are built with -O0) because _FORTIFY_SOURCE=1 requires -O1 and _FORTIFY_SOURCE=2 requires -O2.
|
||||
# Modern GLIBCs warn about this since https://sourceware.org/bugzilla/show_bug.cgi?id=13979.
|
||||
# In Mumble builds with warnings-as-errors, this will cause build failures.
|
||||
add_compile_options("-U_FORTIFY_SOURCE")
|
||||
|
||||
if($<CONFIG:Debug>)
|
||||
if(NOT MINGW)
|
||||
add_compile_options("-fstack-protector")
|
||||
endif()
|
||||
add_compile_options("-fPIE")
|
||||
add_link_options(
|
||||
"-pie"
|
||||
"-Wl,--no-add-needed"
|
||||
)
|
||||
else()
|
||||
add_compile_options("-D_FORTIFY_SOURCE=2")
|
||||
endif()
|
||||
|
||||
if(symbols)
|
||||
add_compile_options("-g")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
function(target_disable_warnings TARGET)
|
||||
if(MSVC)
|
||||
target_compile_options(${TARGET} PRIVATE "/w")
|
||||
else()
|
||||
target_compile_options(${TARGET} PRIVATE "-w")
|
||||
endif()
|
||||
endfunction()
|
||||
63
cmake/os.cmake
Normal file
63
cmake/os.cmake
Normal file
@ -0,0 +1,63 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
if(BUILD_TESTING)
|
||||
if(WIN32 AND NOT ${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
|
||||
# We're building for Windows on a different operating system.
|
||||
find_program(WINE
|
||||
NAMES
|
||||
"wine"
|
||||
"wine-development"
|
||||
DOC
|
||||
"Wine (to run tests)"
|
||||
)
|
||||
if(WINE)
|
||||
set(CMAKE_CROSSCOMPILING_EMULATOR ${WINE})
|
||||
message(STATUS "The following Wine binary will be used to run tests: \"${WINE}\"")
|
||||
else()
|
||||
message(STATUS "You are cross-compiling for Windows but don't have Wine, you will not be able to run tests.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Qt-related performance tweaks.
|
||||
add_definitions(
|
||||
"-DQT_USE_FAST_CONCATENATION"
|
||||
"-DQT_USE_FAST_OPERATOR_PLUS"
|
||||
# TODO: Uncomment the following definitions when the resulting errors are fixed.
|
||||
#"-DQT_NO_CAST_FROM_ASCII"
|
||||
#"-DQT_NO_CAST_TO_ASCII"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
add_definitions(
|
||||
"-DUNICODE"
|
||||
"-DWIN32_LEAN_AND_MEAN"
|
||||
)
|
||||
else()
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
include_directories("/usr/local/include")
|
||||
link_directories("/usr/local/lib")
|
||||
endif()
|
||||
|
||||
find_pkg(OpenSSL QUIET)
|
||||
find_pkg(Qt5 QUIET)
|
||||
|
||||
if(NOT OpenSSL_FOUND)
|
||||
if(APPLE)
|
||||
# Homebrew
|
||||
set(OPENSSL_ROOT_DIR "/usr/local/opt/openssl")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT Qt5_FOUND)
|
||||
if(APPLE)
|
||||
# Homebrew
|
||||
set(Qt5_DIR "/usr/local/opt/qt5/lib/cmake/Qt5")
|
||||
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
|
||||
set(Qt5_DIR "/usr/local/lib/qt5/cmake/Qt5")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
108
cmake/packaging.cmake
Normal file
108
cmake/packaging.cmake
Normal file
@ -0,0 +1,108 @@
|
||||
# Copyright 2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
if(WIN32)
|
||||
set(CPACK_GENERATOR WIX)
|
||||
|
||||
if(64_BIT)
|
||||
set(CPACK_WIX_PRODUCT_GUID "E028BDFC-3FE2-4BEE-A33B-EB9C80611555")
|
||||
elseif(32_BIT)
|
||||
set(CPACK_WIX_PRODUCT_GUID "B0EEFCC7-8A9C-4471-AB10-CBD35BE3161D")
|
||||
endif()
|
||||
|
||||
set(CPACK_WIX_CULTURES "en-us")
|
||||
set(CPACK_WIX_LCID "1033")
|
||||
set(CPACK_WIX_UI_BANNER "${CMAKE_SOURCE_DIR}/installer/bannrbmp.bmp")
|
||||
set(CPACK_WIX_UI_DIALOG "${CMAKE_SOURCE_DIR}/installer/dlgbmp.bmp")
|
||||
set(CPACK_WIX_PRODUCT_GUID "84afea8b-15e5-4cc7-b77d-27dd17030944")
|
||||
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_SOURCE_DIR}/icons/mumble.ico")
|
||||
set(CPACK_WIX_EXTENSIONS "WiXUtilExtension")
|
||||
set(CPACK_WIX_TEMPLATE "wix-template.xml")
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_EXECUTABLES "mumble;Mumble" "murmur;Murmur")
|
||||
set(CPACK_CREATE_DESKTOP_LINKS "mumble;Mumble" "murmur;Murmur")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Mumble")
|
||||
|
||||
if(client)
|
||||
set(CPACK_PACKAGE_NAME "Mumble (client)")
|
||||
set(CPACK_PACKAGE_FILE_NAME "mumble_client-${version}")
|
||||
set(CPACK_PACKAGE_VENDOR "Mumble VoIP")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Mumble is a free, open source, low latency, high quality voice chat application.")
|
||||
set(CPACK_PACKAGE_HOMEPAGE_URL "https://mumble.info")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/installer/gpl.rtf")
|
||||
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
|
||||
set(CPACK_COMPONENTS_ALL mumble_client)
|
||||
set(CPACK_COMPONENT_MUMBLE_CLIENT_DISPLAY_NAME "Client")
|
||||
set(CPACK_COMPONENT_MUMBLE_CLIENT_DESCRIPTION "The Mumble VoIP Client")
|
||||
#set(CPACK_WIX_PATCH_FILE "${CMAKE_SOURCE_DIR}/installer/client-shortcuts.xml")
|
||||
set(CPACK_COMPONENT_MUMBLE_CLIENT_REQUIRED ON)
|
||||
|
||||
install(FILES
|
||||
"${CMAKE_SOURCE_DIR}/CHANGES"
|
||||
"${CMAKE_SOURCE_DIR}/installer/gpl.txt"
|
||||
"${CMAKE_SOURCE_DIR}/installer/qt.txt"
|
||||
"${CMAKE_SOURCE_DIR}/installer/speex.txt"
|
||||
DESTINATION "."
|
||||
COMPONENT mumble_client
|
||||
)
|
||||
endif()
|
||||
|
||||
if(server)
|
||||
if(NOT client)
|
||||
if(WIN32)
|
||||
set(CPACK_WIX_PRODUCT_GUID "ccc5eaa4-0b88-4197-9e54-580d37003903")
|
||||
set(CPACK_WIX_UPGRADE_GUID "03e9476f-0f75-4661-bfc9-a9daeb23d3a0")
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_NAME "Mumble (server)")
|
||||
set(CPACK_PACKAGE_FILE_NAME "mumble_server-${version}")
|
||||
set(CPACK_PACKAGE_VENDOR "Mumble VoIP")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Mumble is a free, open source, low latency, high quality voice chat application.")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/installer/gpl.rtf")
|
||||
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README")
|
||||
set(CPACK_COMPONENT_MUMBLE_SERVER_REQUIRED ON)
|
||||
|
||||
install(FILES
|
||||
"${CMAKE_SOURCE_DIR}/CHANGES"
|
||||
"${CMAKE_SOURCE_DIR}/installer/gpl.txt"
|
||||
"${CMAKE_SOURCE_DIR}/installer/qt.txt"
|
||||
DESTINATION "."
|
||||
COMPONENT mumble_server
|
||||
)
|
||||
endif()
|
||||
|
||||
set(CPACK_COMPONENTS_ALL mumble_server)
|
||||
set(CPACK_COMPONENT_MUMBLE_SERVER_DISPLAY_NAME "Server")
|
||||
set(CPACK_COMPONENT_MUMBLE_SERVER_DESCRIPTION "The Mumble VoIP Server")
|
||||
#set(CPACK_WIX_PATCH_FILE "${CMAKE_SOURCE_DIR}/installer/server-shortcuts.xml")
|
||||
|
||||
if(WIN32)
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/scripts/murmur.ini" DESTINATION "." COMPONENT mumble_server)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(client AND server)
|
||||
if(WIN32)
|
||||
set(CPACK_PACKAGE_NAME "Mumble")
|
||||
set(CPACK_PACKAGE_FILE_NAME "Mumble-${version}")
|
||||
set(CPACK_PACKAGE_VENDOR "Mumble VoIP")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Mumble is a free, open source, low latency, high quality voice chat application.")
|
||||
set(CPACK_COMPONENT_MUMBLE_SERVER_DISABLED ON)
|
||||
# set(CPACK_WIX_PATCH_FILE
|
||||
# "${CMAKE_SOURCE_DIR}/installer/client-shortcuts.xml"
|
||||
# "${CMAKE_SOURCE_DIR}/installer/server-shortcuts.xml"
|
||||
# )
|
||||
endif()
|
||||
|
||||
set(CPACK_COMPONENTS_ALL mumble_client mumble_server)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(CPACK_WIX_UPGRADE_GUID ${CPACK_WIX_PRODUCT_GUID})
|
||||
configure_file("${CMAKE_SOURCE_DIR}/installer/wix-template.xml" ${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
185
cmake/pkg-utils.cmake
Normal file
185
cmake/pkg-utils.cmake
Normal file
@ -0,0 +1,185 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
|
||||
include(FindPackageMessage)
|
||||
|
||||
function(pkgconfig_search MODULE)
|
||||
if(NOT PkgConfig_FOUND)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# We don't want pkg_search_module() to write into the variables that will be passed to the pkgconfig_search()'s caller.
|
||||
set(PRIVATE "PRIVATE_${MODULE}")
|
||||
|
||||
pkg_search_module(${PRIVATE} ${MODULE} QUIET)
|
||||
|
||||
if(NOT ${PRIVATE}_FOUND)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT ${PRIVATE}_LINK_LIBRARIES)
|
||||
foreach(LIBRARY ${${PRIVATE}_LIBRARIES})
|
||||
# A cache entry named by <VAR> is created to store the result of find_library().
|
||||
# If the library is found the result is stored in the variable and the search will not be repeated unless the variable is cleared.
|
||||
# Using a name that depends on the loop-item is suggested in contrast to clearing the variable.
|
||||
# @ref https://cmake.org/pipermail/cmake/2011-November/047171.html
|
||||
find_library(${LIBRARY}_LINK ${PRIVATE_LIBRARY} PATHS ${${PRIVATE}_LIBRARY_DIRS})
|
||||
list(APPEND ${PRIVATE}_LINK_LIBRARIES ${${LIBRARY}_LINK})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set(${MODULE}_INCLUDE_DIRS ${${PRIVATE}_INCLUDE_DIRS} PARENT_SCOPE)
|
||||
set(${MODULE}_LIBRARIES ${${PRIVATE}_LINK_LIBRARIES} PARENT_SCOPE)
|
||||
set(${MODULE}_VERSION ${${PRIVATE}_VERSION} PARENT_SCOPE)
|
||||
set(${MODULE}_FOUND ${${PRIVATE}_FOUND} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# This macro's main purpose is to call find_package() with CONFIG and then with MODULE if it fails.
|
||||
# It also handles multiple package names and searches them with pkg-config if they are not found.
|
||||
macro(find_pkg ARG_ALIASES)
|
||||
# We specify "CONFIG", "MODULE" and "NO_MODULE" so that they are not considered unparsed arguments (passed to find_package()).
|
||||
cmake_parse_arguments(FIND_PACKAGE "ARG_ALIASES;CONFIG;MODULE;NO_DEFAULT_PATH;NO_MODULE;REQUIRED;QUIET" "" "COMPONENTS;OPTIONAL_COMPONENTS;PATHS" ${ARGN})
|
||||
|
||||
if(FIND_PACKAGE_PATHS)
|
||||
list(APPEND FIND_PACKAGE_ARGUMENTS "PATHS" ${FIND_PACKAGE_PATHS})
|
||||
endif()
|
||||
|
||||
if(FIND_PACKAGE_NO_DEFAULT_PATH)
|
||||
list(APPEND FIND_PACKAGE_ARGUMENTS "NO_DEFAULT_PATH")
|
||||
endif()
|
||||
|
||||
# We add the aliases to a clean list because of an issue with list(GET).
|
||||
# If we pass the argument list directly to it, LAST_ALIAS is always set to "NOTFOUND".
|
||||
foreach(ALIAS ${ARG_ALIASES})
|
||||
list(APPEND ALIASES ${ALIAS})
|
||||
endforeach()
|
||||
|
||||
list(REMOVE_DUPLICATES ALIASES)
|
||||
|
||||
list(GET ALIASES -1 LAST_ALIAS)
|
||||
|
||||
foreach(ALIAS ${ALIASES})
|
||||
set(NAME ${ALIAS})
|
||||
|
||||
if(FIND_PACKAGE_COMPONENTS)
|
||||
foreach(COMPONENT ${FIND_PACKAGE_COMPONENTS})
|
||||
find_package(${NAME} COMPONENTS ${COMPONENT} ${FIND_PACKAGE_ARGUMENTS} QUIET CONFIG ${FIND_PACKAGE_UNPARSED_ARGUMENTS})
|
||||
if(NOT ${NAME}_FOUND)
|
||||
find_package(${NAME} COMPONENTS ${COMPONENT} ${FIND_PACKAGE_ARGUMENTS} QUIET MODULE ${FIND_PACKAGE_UNPARSED_ARGUMENTS})
|
||||
endif()
|
||||
|
||||
if(NOT ${NAME}_FOUND)
|
||||
if(NOT ${NAME} STREQUAL ${LAST_ALIAS})
|
||||
break()
|
||||
else()
|
||||
if(FIND_PACKAGE_REQUIRED)
|
||||
message(FATAL_ERROR "${NAME} component not found: ${COMPONENT}")
|
||||
endif()
|
||||
|
||||
if(NOT FIND_PACKAGE_QUIET)
|
||||
message(STATUS "${NAME} component not found: ${COMPONENT}")
|
||||
endif()
|
||||
|
||||
break()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT FIND_PACKAGE_QUIET)
|
||||
if(${NAME}_VERSION)
|
||||
find_package_message(${NAME} "${NAME} component found: ${COMPONENT} | Version: ${${NAME}_VERSION}" "[${NAME}][${COMPONENT}][${${NAME}_VERSION}]")
|
||||
else()
|
||||
find_package_message(${NAME} "${NAME} component found: ${COMPONENT}" "[${NAME}][${COMPONENT}]")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(NOT ${NAME}_FOUND)
|
||||
continue()
|
||||
endif()
|
||||
else()
|
||||
find_package(${NAME} ${FIND_PACKAGE_ARGUMENTS} QUIET CONFIG ${FIND_PACKAGE_UNPARSED_ARGUMENTS})
|
||||
if(NOT ${NAME}_FOUND)
|
||||
find_package(${NAME} ${FIND_PACKAGE_ARGUMENTS} QUIET MODULE ${FIND_PACKAGE_UNPARSED_ARGUMENTS})
|
||||
if(NOT ${NAME}_FOUND)
|
||||
pkgconfig_search(${NAME})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ${NAME}_FOUND)
|
||||
if(NOT ${NAME} STREQUAL ${LAST_ALIAS})
|
||||
continue()
|
||||
else()
|
||||
if(FIND_PACKAGE_REQUIRED)
|
||||
message(FATAL_ERROR "${NAME} not found")
|
||||
endif()
|
||||
|
||||
if(NOT FIND_PACKAGE_QUIET)
|
||||
message(STATUS "${NAME} not found")
|
||||
endif()
|
||||
|
||||
break()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT FIND_PACKAGE_QUIET)
|
||||
if(${NAME}_VERSION)
|
||||
find_package_message(${NAME} "${NAME} found | Version: ${${NAME}_VERSION}" "[${NAME}][${${NAME}_VERSION}]")
|
||||
else()
|
||||
find_package_message(${NAME} "${NAME} found" "[${NAME}]")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(FIND_PACKAGE_OPTIONAL_COMPONENTS)
|
||||
foreach(COMPONENT ${FIND_PACKAGE_OPTIONAL_COMPONENTS})
|
||||
find_package(${NAME} COMPONENTS ${COMPONENT} ${FIND_PACKAGE_ARGUMENTS} QUIET CONFIG ${FIND_PACKAGE_UNPARSED_ARGUMENTS})
|
||||
if(NOT ${NAME}_FOUND)
|
||||
find_package(${NAME} COMPONENTS ${COMPONENT} ${FIND_PACKAGE_ARGUMENTS} QUIET MODULE ${FIND_PACKAGE_UNPARSED_ARGUMENTS})
|
||||
endif()
|
||||
|
||||
if(${NAME}_FOUND AND NOT FIND_PACKAGE_QUIET)
|
||||
if(${NAME}_VERSION)
|
||||
find_package_message(${NAME} "${NAME} optional component found: ${COMPONENT} | Version: ${${NAME}_VERSION}" "[${NAME}][${COMPONENT}][${${NAME}_VERSION}]")
|
||||
else()
|
||||
find_package_message(${NAME} "${NAME} optional component found: ${COMPONENT}" "[${NAME}][${COMPONENT}]")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(${NAME}_FOUND)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
unset(ALIASES)
|
||||
unset(LAST_ALIAS)
|
||||
unset(FIND_PACKAGE_ARGUMENTS)
|
||||
|
||||
if(${NAME}_FOUND)
|
||||
if(NOT ${NAME}_VERSION OR NOT ${NAME}_LIBRARIES)
|
||||
# The FindOpenSSL module defines the variables with an uppercase prefix.
|
||||
string(TOUPPER ${NAME} NAME_UPPER)
|
||||
|
||||
if(NOT ${NAME}_VERSION)
|
||||
set(${NAME}_VERSION ${${NAME_UPPER}_VERSION})
|
||||
endif()
|
||||
|
||||
if(NOT ${NAME}_LIBRARIES)
|
||||
set(${NAME}_LIBRARIES ${${NAME_UPPER}_LIBRARIES})
|
||||
endif()
|
||||
|
||||
unset(NAME_UPPER)
|
||||
endif()
|
||||
elseif(NOT FIND_PACKAGE_QUIET)
|
||||
if(NOT PkgConfig_FOUND)
|
||||
message(WARNING "pkg-config was not found, consider installing it for better chances of finding a package")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
unset(NAME)
|
||||
endmacro()
|
||||
53
cmake/qt-utils.cmake
Normal file
53
cmake/qt-utils.cmake
Normal file
@ -0,0 +1,53 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
function(include_qt_plugin TARGET SCOPE PLUGIN)
|
||||
set(PATH "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_plugin_import.cpp")
|
||||
if(NOT EXISTS ${PATH})
|
||||
file(WRITE ${PATH} "#include <QtPlugin>\n")
|
||||
set_property(SOURCE ${PATH} PROPERTY GENERATED TRUE SKIP_AUTOGEN TRUE)
|
||||
else()
|
||||
file(READ ${PATH} CONTENT)
|
||||
string(FIND ${CONTENT} ${PLUGIN} INDEX)
|
||||
if(NOT ${INDEX} EQUAL -1)
|
||||
set(FOUND TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT FOUND)
|
||||
file(APPEND ${PATH} "Q_IMPORT_PLUGIN(${PLUGIN})\n")
|
||||
endif()
|
||||
|
||||
get_property(TARGET_SOURCES TARGET ${TARGET} PROPERTY SOURCES)
|
||||
if(NOT ${PATH} IN_LIST TARGET_SOURCES)
|
||||
target_sources(${TARGET} ${SCOPE} ${PATH})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(create_translations_qrc TS_DIR TS_FILES QRC_FILENAME)
|
||||
find_pkg(Qt5 COMPONENTS LinguistTools REQUIRED)
|
||||
|
||||
# Workaround for Qt bug: CMake deletes .ts files upon clean.
|
||||
# @ref https://bugreports.qt.io/browse/QTBUG-41736
|
||||
# @ref https://stackoverflow.com/a/24245615/1917249
|
||||
set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM TRUE)
|
||||
|
||||
# Update the translation files (e.g. add new strings) and compile them.
|
||||
qt5_create_translation(QM_FILES ${TS_DIR} ${TS_FILES})
|
||||
|
||||
set(QRC_PATH "${CMAKE_CURRENT_BINARY_DIR}/${QRC_FILENAME}")
|
||||
|
||||
# Create a resource file (.qrc) containing the name of the compiled translation files (.qm).
|
||||
# This is required in order to embed those files into the built executable.
|
||||
# NOTE: We write the files' name instead of their path because they are in the same directory as the resource file.
|
||||
file(WRITE ${QRC_PATH} "<!DOCTYPE RCC><RCC version=\"1.0\">\n<qresource>\n")
|
||||
|
||||
foreach(QM_FILE ${QM_FILES})
|
||||
get_filename_component(FILENAME ${QM_FILE} NAME)
|
||||
file(APPEND ${QRC_PATH} "\t<file>${FILENAME}</file>\n")
|
||||
endforeach()
|
||||
|
||||
file(APPEND ${QRC_PATH} "</qresource>\n</RCC>\n")
|
||||
endfunction()
|
||||
62
g15helper/CMakeLists.txt
Normal file
62
g15helper/CMakeLists.txt
Normal file
@ -0,0 +1,62 @@
|
||||
# Copyright 2019 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
option(g15-emulator "Build the g15helper executable in emulator mode. This will cause an emulated G15 window to appear on screen. Allows the use of Mumble's G15 support without owning the physical hardware." OFF)
|
||||
|
||||
set(G15HELPER_RC "g15helper.rc")
|
||||
set(G15HELPER_ICON "${CMAKE_SOURCE_DIR}/icons/g15helper.ico")
|
||||
|
||||
get_target_property(MUMBLE_SOURCE_DIR mumble SOURCE_DIR)
|
||||
|
||||
configure_file(${G15HELPER_RC} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
add_executable(g15-helper WIN32
|
||||
"${MUMBLE_SOURCE_DIR}/mumble.appcompat.manifest"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${G15HELPER_RC}"
|
||||
)
|
||||
|
||||
set_target_properties(g15-helper
|
||||
PROPERTIES
|
||||
OUTPUT_NAME "mumble-g15-helper"
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
if($<CONFIG:Debug>)
|
||||
target_compile_definitions(g15-helper PRIVATE "USE_LOGFILE")
|
||||
endif()
|
||||
|
||||
if(g15-emulator)
|
||||
find_pkg(Qt5 COMPONENTS Core Gui Widgets REQUIRED)
|
||||
set_target_properties(g15-helper PROPERTIES AUTOMOC ON)
|
||||
target_sources(g15-helper PRIVATE "g15helper_emu.cpp" "g15helper_emu.h")
|
||||
target_link_libraries(g15-helper PRIVATE Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
|
||||
if(static AND WIN32 AND TARGET Qt5::QWindowsIntegrationPlugin)
|
||||
include_qt_plugin(g15-helper PRIVATE QWindowsIntegrationPlugin)
|
||||
target_link_libraries(g15-helper PRIVATE Qt5::QWindowsIntegrationPlugin)
|
||||
endif()
|
||||
else()
|
||||
if(MSVC)
|
||||
set_target_properties(g15-helper PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
|
||||
target_sources(g15-helper PRIVATE "g15helper.c" "g15helper.h")
|
||||
|
||||
if(NOT G15_DIR)
|
||||
set(G15_DIR "${3RDPARTY_DIR}/g15")
|
||||
endif()
|
||||
|
||||
if(64_BIT)
|
||||
find_library(LIB_LGLCD "lglcd" HINTS "${G15_DIR}/Lib/x64")
|
||||
else()
|
||||
find_library(LIB_LGLCD "lglcd" HINTS "${G15_DIR}/Lib/x86")
|
||||
endif()
|
||||
|
||||
target_include_directories(g15-helper PRIVATE "${G15_DIR}/Src")
|
||||
|
||||
target_link_libraries(g15-helper PRIVATE ${LIB_LGLCD})
|
||||
endif()
|
||||
|
||||
install(TARGETS g15-helper RUNTIME DESTINATION . COMPONENT mumble_client)
|
||||
@ -5,12 +5,12 @@
|
||||
|
||||
#include <winver.h>
|
||||
|
||||
IDI_ICON1 ICON DISCARDABLE "../icons/g15helper.ico"
|
||||
IDI_ICON1 ICON DISCARDABLE "@G15HELPER_ICON@"
|
||||
|
||||
#ifndef DEBUG
|
||||
#define VER_DEBUG 0L
|
||||
#define VER_DEBUG 0L
|
||||
#else
|
||||
#define VER_DEBUG VS_FF_DEBUG
|
||||
#define VER_DEBUG VS_FF_DEBUG
|
||||
#endif
|
||||
|
||||
#ifdef SNAPSHOT_BUILD
|
||||
@ -20,8 +20,8 @@ IDI_ICON1 ICON DISCARDABLE "../icons/g15helper.ico"
|
||||
#endif
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,4,0,0
|
||||
PRODUCTVERSION 1,4,0,0
|
||||
FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
|
||||
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS (VER_DEBUG|VER_RELEASE)
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
@ -34,8 +34,8 @@ VS_VERSION_INFO VERSIONINFO
|
||||
BEGIN
|
||||
VALUE "CompanyName", "The Mumble Developers"
|
||||
VALUE "FileDescription", "Mumble G15 LCD Helper"
|
||||
VALUE "FileVersion", "1.4.0"
|
||||
VALUE "ProductVersion", "1.4.0"
|
||||
VALUE "FileVersion", "@PROJECT_VERSION@"
|
||||
VALUE "ProductVersion", "@PROJECT_VERSION@"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2005-2020 The Mumble Developers"
|
||||
VALUE "OriginalFilename", "mumble-g15-helper.exe"
|
||||
VALUE "ProductName", "Mumble G15 LCD Helper"
|
||||
|
||||
24
installer/client-shortcuts.xml
Normal file
24
installer/client-shortcuts.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<!-- Copyright 2020 The Mumble Developers. All rights reserved.
|
||||
Use of this source code is governed by a BSD-style license
|
||||
that can be found in the LICENSE file at the root of the
|
||||
Mumble source tree or at <https://www.mumble.info/LICENSE>. -->
|
||||
|
||||
<CPackWiXPatch>
|
||||
<CPackWiXFragment Id="CM_C_mumble_client" Display="expand">
|
||||
<Feature Id="CM_SHORTCUT_F_mumble_client"
|
||||
Title="Program Group"
|
||||
Description="Create Menu Program Group"
|
||||
InstallDefault="followParent"
|
||||
AllowAdvertise="no">
|
||||
<ComponentRef Id="CM_SHORTCUT_mumble_client" />
|
||||
</Feature>
|
||||
|
||||
<Feature Id="CM_SHORTCUT_DESKTOP_F_mumble_client"
|
||||
Title="Desktop Shortcut"
|
||||
Description="Create Desktop Shortcut"
|
||||
InstallDefault="followParent"
|
||||
AllowAdvertise="no">
|
||||
<ComponentRef Id="CM_SHORTCUT_DESKTOP_mumble_client" />
|
||||
</Feature>
|
||||
</CPackWiXFragment>
|
||||
</CPackWiXPatch>
|
||||
24
installer/server-shortcuts.xml
Normal file
24
installer/server-shortcuts.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<!-- Copyright 2020 The Mumble Developers. All rights reserved.
|
||||
Use of this source code is governed by a BSD-style license
|
||||
that can be found in the LICENSE file at the root of the
|
||||
Mumble source tree or at <https://www.mumble.info/LICENSE>. -->
|
||||
|
||||
<CPackWiXPatch>
|
||||
<CPackWiXFragment Id="CM_C_mumble_server" Display="expand">
|
||||
<Feature Id="CM_SHORTCUT_F_mumble_server"
|
||||
Title="Program Group"
|
||||
Description="Create Menu Program Group"
|
||||
InstallDefault="followParent"
|
||||
AllowAdvertise="no">
|
||||
<ComponentRef Id="CM_SHORTCUT_mumble_server" />
|
||||
</Feature>
|
||||
|
||||
<Feature Id="CM_SHORTCUT_DESKTOP_F_mumble_server"
|
||||
Title="Desktop Shortcut"
|
||||
Description="Create Desktop Shortcut"
|
||||
InstallDefault="followParent"
|
||||
AllowAdvertise="no">
|
||||
<ComponentRef Id="CM_SHORTCUT_DESKTOP_mumble_server" />
|
||||
</Feature>
|
||||
</CPackWiXFragment>
|
||||
</CPackWiXPatch>
|
||||
52
installer/wix-template.xml
Normal file
52
installer/wix-template.xml
Normal file
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?include "cpack_variables.wxi"?>
|
||||
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
|
||||
RequiredVersion="3.6.3303.0">
|
||||
|
||||
<Product Id="$(var.CPACK_WIX_PRODUCT_GUID)"
|
||||
Name="$(var.CPACK_PACKAGE_NAME)"
|
||||
Language="@CPACK_WIX_LCID@"
|
||||
Version="$(var.CPACK_PACKAGE_VERSION)"
|
||||
Manufacturer="$(var.CPACK_PACKAGE_VENDOR)"
|
||||
UpgradeCode="$(var.CPACK_WIX_UPGRADE_GUID)">
|
||||
|
||||
<Package InstallerVersion="301" Compressed="yes"/>
|
||||
|
||||
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>
|
||||
|
||||
<MajorUpgrade
|
||||
Schedule="afterInstallInitialize"
|
||||
AllowSameVersionUpgrades="yes"
|
||||
DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>
|
||||
|
||||
<WixVariable Id="WixUILicenseRtf" Value="$(var.CPACK_WIX_LICENSE_RTF)"/>
|
||||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALL_ROOT"/>
|
||||
|
||||
<?ifdef CPACK_WIX_PRODUCT_ICON?>
|
||||
<Property Id="ARPPRODUCTICON">ProductIcon.ico</Property>
|
||||
<Icon Id="ProductIcon.ico" SourceFile="$(var.CPACK_WIX_PRODUCT_ICON)"/>
|
||||
<?endif?>
|
||||
|
||||
<?ifdef CPACK_WIX_UI_BANNER?>
|
||||
<WixVariable Id="WixUIBannerBmp" Value="$(var.CPACK_WIX_UI_BANNER)"/>
|
||||
<?endif?>
|
||||
|
||||
<?ifdef CPACK_WIX_UI_DIALOG?>
|
||||
<WixVariable Id="WixUIDialogBmp" Value="$(var.CPACK_WIX_UI_DIALOG)"/>
|
||||
<?endif?>
|
||||
|
||||
<FeatureRef Id="ProductFeature"/>
|
||||
|
||||
<UI Id="*">
|
||||
<TextStyle Id="Font" FaceName="MS Shell Dlg" Size="11"/>
|
||||
</UI>
|
||||
|
||||
<UIRef Id="$(var.CPACK_WIX_UI_REF)" />
|
||||
<UIRef Id="WixUI_ErrorProgressText" />
|
||||
|
||||
<?include "properties.wxi"?>
|
||||
<?include "product_fragment.wxi"?>
|
||||
</Product>
|
||||
</Wix>
|
||||
30
macx/osax/CMakeLists.txt
Normal file
30
macx/osax/CMakeLists.txt
Normal file
@ -0,0 +1,30 @@
|
||||
# Copyright 2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
# Mumble Overlay scripting addition
|
||||
# (for injection into running processes)
|
||||
|
||||
add_library(MumbleOverlay MODULE
|
||||
"osax.m"
|
||||
"MumbleOverlay.sdef"
|
||||
)
|
||||
|
||||
set_target_properties(MumbleOverlay
|
||||
PROPERTIES
|
||||
BUNDLE TRUE
|
||||
BUNDLE_EXTENSION "osax"
|
||||
RESOURCE "MumbleOverlay.sdef"
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/osax.plist"
|
||||
)
|
||||
|
||||
find_library(LIB_COCOA "Cocoa")
|
||||
find_library(LIB_FOUNDATION "Foundation")
|
||||
|
||||
target_link_libraries(MumbleOverlay
|
||||
PRIVATE
|
||||
${LIB_COCOA}
|
||||
${LIB_FOUNDATION}
|
||||
)
|
||||
@ -5,18 +5,18 @@
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
cp release/libmumbleoverlay.dylib release/MumbleOverlay.osax/Contents/MacOS/
|
||||
cp libmumbleoverlay.dylib MumbleOverlay.osax/Contents/MacOS/
|
||||
|
||||
productbuild \
|
||||
--component release/MumbleOverlay.osax /Library/ScriptingAdditions \
|
||||
release/synth.pkg
|
||||
--component MumbleOverlay.osax /Library/ScriptingAdditions \
|
||||
synth.pkg
|
||||
|
||||
root=$(mktemp -d -t mumble-overlay-installer)
|
||||
/usr/bin/xar -f release/synth.pkg -x -C ${root}
|
||||
/usr/bin/xar -f synth.pkg -x -C ${root}
|
||||
mkdir -p ${root}/Resources
|
||||
cp icons/mumble.osx.installer.png ${root}/Resources/bg.png
|
||||
VERSION=`defaults read "${PWD}/macx/osax/osax" "MumbleOverlayVersion"`
|
||||
MINCLIENT=`defaults read "${PWD}/macx/osax/osax" "MumbleOverlayMinMumbleVersion"`
|
||||
mv bg.png ${root}/Resources/
|
||||
VERSION=`/usr/libexec/PlistBuddy -c "print MumbleOverlayVersion" MumbleOverlay.osax/Contents/Info.plist`
|
||||
MINCLIENT=`/usr/libexec/PlistBuddy -c "print MumbleOverlayMinMumbleVersion" MumbleOverlay.osax/Contents/Info.plist`
|
||||
echo "<upgrade version=\"${VERSION}\" minclient=\"${MINCLIENT}\" />" > ${root}/upgrade.xml
|
||||
|
||||
sed -i '' -e 's,<installer-gui-script minSpecVersion="1">,<installer-gui-script minSpecVersion="1"><title>Mumble Overlay</title><background mime-type="image/png" file="bg.png" />,' ${root}/Distribution
|
||||
@ -25,4 +25,4 @@ pushd ${root}
|
||||
/usr/bin/xar -f MumbleOverlay.pkg --no-compress "^.*$" -c ./*
|
||||
popd
|
||||
|
||||
cp ${root}/MumbleOverlay.pkg release/MumbleOverlay.pkg
|
||||
cp ${root}/MumbleOverlay.pkg MumbleOverlay.pkg
|
||||
|
||||
@ -57,7 +57,7 @@ def codesign(path):
|
||||
for p in path:
|
||||
identifier = lookup_file_identifier(p)
|
||||
reqs = None
|
||||
with open('macx/scripts/codesign-requirements.tmpl', 'r') as f:
|
||||
with open(os.path.join(options.source_dir, 'macx/scripts/codesign-requirements.tmpl'), 'r') as f:
|
||||
tmplReqs = f.read()
|
||||
reqs = string.Template(tmplReqs).substitute({
|
||||
'identifier': identifier,
|
||||
@ -82,21 +82,24 @@ def prodsign(inf, outf):
|
||||
def create_overlay_package():
|
||||
print '* Creating overlay installer'
|
||||
|
||||
bundle = os.path.join('release', 'MumbleOverlay.osax')
|
||||
overlaylib = os.path.join('release', 'libmumbleoverlay.dylib')
|
||||
bundle = os.path.join(options.binary_dir, 'MumbleOverlay.osax')
|
||||
overlaylib = os.path.join(options.binary_dir, 'libmumbleoverlay.dylib')
|
||||
if options.developer_id:
|
||||
codesign(bundle)
|
||||
codesign(overlaylib)
|
||||
p = Popen(('./macx/scripts/build-overlay-installer',))
|
||||
|
||||
# Used as background in the installer
|
||||
shutil.copy(os.path.join(options.source_dir, 'icons/mumble.osx.installer.png'), os.path.join(options.binary_dir, 'bg.png'))
|
||||
|
||||
p = Popen(os.path.join(os.path.abspath(options.source_dir), 'macx/scripts/build-overlay-installer'), cwd=options.binary_dir)
|
||||
retval = p.wait()
|
||||
if retval != 0:
|
||||
raise Exception('build-overlay-installer failed')
|
||||
if options.developer_id:
|
||||
os.rename('release/MumbleOverlay.pkg', 'release/MumbleOverlayUnsigned.pkg')
|
||||
prodsign('release/MumbleOverlayUnsigned.pkg', 'release/MumbleOverlay.pkg')
|
||||
os.rename(os.path.join(options.binary_dir, 'MumbleOverlay.pkg'), os.path.join(options.binary_dir, 'MumbleOverlayUnsigned.pkg'))
|
||||
prodsign(os.path.join(options.binary_dir, 'MumbleOverlayUnsigned.pkg'), os.path.join(options.binary_dir, 'MumbleOverlay.pkg'))
|
||||
|
||||
class AppBundle(object):
|
||||
|
||||
def copy_helper(self, fn):
|
||||
'''
|
||||
Copy a helper binary into the Mumble app bundle.
|
||||
@ -125,7 +128,7 @@ class AppBundle(object):
|
||||
shutil.copy(rsrc, os.path.join(rsrcpath, b))
|
||||
|
||||
# Extras
|
||||
shutil.copy('release/MumbleOverlay.pkg', os.path.join(rsrcpath, 'MumbleOverlay.pkg'))
|
||||
shutil.copy(os.path.join(options.binary_dir, 'MumbleOverlay.pkg'), os.path.join(rsrcpath, 'MumbleOverlay.pkg'))
|
||||
|
||||
def copy_codecs(self):
|
||||
'''
|
||||
@ -134,7 +137,7 @@ class AppBundle(object):
|
||||
print ' * Attempting to copy audio codec libraries into App Bundle'
|
||||
dst = os.path.join(self.bundle, 'Contents', 'Codecs')
|
||||
os.makedirs(dst)
|
||||
codecs = ('release/libcelt0.0.7.0.dylib', 'release/libopus.dylib')
|
||||
codecs = (os.path.join(options.binary_dir, 'libcelt0.0.7.0.dylib'), os.path.join(options.binary_dir, 'libopus.dylib'))
|
||||
for codec in codecs:
|
||||
if os.path.exists(codec):
|
||||
shutil.copy(codec, dst)
|
||||
@ -147,7 +150,7 @@ class AppBundle(object):
|
||||
dst = os.path.join(self.bundle, 'Contents', 'Plugins')
|
||||
if os.path.exists(dst):
|
||||
shutil.rmtree(dst)
|
||||
shutil.copytree('release/plugins/', dst, symlinks=True)
|
||||
shutil.copytree(os.path.join(options.binary_dir, 'plugins'), dst, symlinks=True)
|
||||
|
||||
def update_plist(self):
|
||||
'''
|
||||
@ -261,28 +264,24 @@ def package_client():
|
||||
else:
|
||||
ver = gitrev()
|
||||
if options.universal:
|
||||
fn = 'release/Mumble-Universal-%s.dmg' % ver
|
||||
fn = os.path.join(options.binary_dir, 'Mumble-Universal-%s.dmg') % ver
|
||||
title = 'Mumble %s (Universal)' % ver
|
||||
else:
|
||||
fn = 'release/Mumble-%s.dmg' % ver
|
||||
fn = os.path.join(options.binary_dir, 'Mumble-%s.dmg') % ver
|
||||
title = 'Mumble %s' % ver
|
||||
|
||||
if not os.path.exists('release'):
|
||||
print 'This script needs to be run from the root of the Mumble source tree.'
|
||||
sys.exit(1)
|
||||
|
||||
# Fix overlay installer package
|
||||
create_overlay_package()
|
||||
if options.only_overlay:
|
||||
sys.exit(0)
|
||||
|
||||
# Do the finishing touches to our Application bundle before release
|
||||
a = AppBundle('release/Mumble.app', ver)
|
||||
a = AppBundle(os.path.join(options.binary_dir, 'Mumble.app'), ver)
|
||||
a.copy_helper('mumble-g15-helper')
|
||||
a.copy_helper('sbcelt-helper')
|
||||
a.copy_codecs()
|
||||
a.copy_plugins()
|
||||
a.copy_resources(['icons/mumble.icns'])
|
||||
a.copy_resources([os.path.join(options.source_dir, 'icons/mumble.icns')])
|
||||
a.update_plist()
|
||||
if not options.universal:
|
||||
a.set_min_macosx_version('10.9.0')
|
||||
@ -294,13 +293,13 @@ def package_client():
|
||||
if options.developer_id:
|
||||
print ' * Signing binaries with Developer ID `%s\'' % options.developer_id
|
||||
binaries = (
|
||||
'release/Mumble.app',
|
||||
'release/Mumble.app/Contents/Plugins/liblink.dylib',
|
||||
'release/Mumble.app/Contents/Plugins/libmanual.dylib',
|
||||
'release/Mumble.app/Contents/Codecs/libcelt0.0.7.0.dylib',
|
||||
'release/Mumble.app/Contents/Codecs/libopus.dylib',
|
||||
'release/Mumble.app/Contents/MacOS/mumble-g15-helper',
|
||||
'release/Mumble.app/Contents/MacOS/sbcelt-helper',
|
||||
os.path.join(options.binary_dir, 'Mumble.app'),
|
||||
os.path.join(options.binary_dir, 'Mumble.app/Contents/Plugins/liblink.dylib'),
|
||||
os.path.join(options.binary_dir, 'Mumble.app/Contents/Plugins/libmanual.dylib'),
|
||||
os.path.join(options.binary_dir, 'Mumble.app/Contents/Codecs/libcelt0.0.7.0.dylib'),
|
||||
os.path.join(options.binary_dir, 'Mumble.app/Contents/Codecs/libopus.dylib'),
|
||||
os.path.join(options.binary_dir, 'Mumble.app/Contents/MacOS/mumble-g15-helper'),
|
||||
os.path.join(options.binary_dir, 'Mumble.app/Contents/MacOS/sbcelt-helper'),
|
||||
)
|
||||
availableBinaries = [bin for bin in binaries if os.path.exists(bin)]
|
||||
codesign(availableBinaries)
|
||||
@ -311,9 +310,9 @@ def package_client():
|
||||
|
||||
# Create diskimage
|
||||
d = DiskImage(fn, title)
|
||||
d.copy('macx/scripts/DS_Store', '/.DS_Store')
|
||||
d.copy(os.path.join(options.source_dir, 'macx/scripts/DS_Store'), '/.DS_Store')
|
||||
d.symlink('/Applications', '/Applications')
|
||||
d.copy('release/Mumble.app')
|
||||
d.copy(os.path.join(options.binary_dir, 'Mumble.app'))
|
||||
d.create()
|
||||
|
||||
def package_server():
|
||||
@ -325,37 +324,37 @@ def package_server():
|
||||
name = 'Murmur-OSX-Static-%s' % ver
|
||||
|
||||
# Fix .ini files
|
||||
p = Popen(('bash', 'mkini.sh'), cwd='scripts')
|
||||
p = Popen(('bash', 'mkini.sh'), cwd=os.path.join(options.source_dir, 'scripts'))
|
||||
retval = p.wait()
|
||||
if retval != 0:
|
||||
raise Exception('build-overlay-installer failed')
|
||||
raise Exception('mkini.sh failed')
|
||||
|
||||
destdir = os.path.join('release', name)
|
||||
destdir = os.path.join(options.binary_dir, name)
|
||||
if os.path.exists(destdir):
|
||||
shutil.rmtree(destdir)
|
||||
os.mkdir(destdir)
|
||||
|
||||
shutil.copy('installer/gpl.txt', os.path.join(destdir, 'LICENSE'))
|
||||
shutil.copy('docs/additional-readmes/README.static.osx', os.path.join(destdir, 'README'))
|
||||
shutil.copy('CHANGES', os.path.join(destdir, 'CHANGES'))
|
||||
shutil.copy('scripts/murmur.pl', os.path.join(destdir, 'murmur.pl'))
|
||||
shutil.copy('scripts/weblist.pl', os.path.join(destdir, 'weblist.pl'))
|
||||
shutil.copy('scripts/icedemo.php', os.path.join(destdir, 'icedemo.php'))
|
||||
shutil.copy('scripts/weblist.php', os.path.join(destdir, 'weblist.php'))
|
||||
shutil.copy('scripts/murmur.ini.osx', os.path.join(destdir, 'murmur.ini'))
|
||||
shutil.copy('src/murmur/Murmur.ice', os.path.join(destdir, 'Murmur.ice'))
|
||||
shutil.copy(os.path.join(options.binary_dir, 'installer/gpl.txt'), os.path.join(destdir, 'LICENSE'))
|
||||
shutil.copy(os.path.join(options.binary_dir, 'docs/additional-readmes/README.static.osx'), os.path.join(destdir, 'README'))
|
||||
shutil.copy(os.path.join(options.binary_dir, 'CHANGES'), os.path.join(destdir, 'CHANGES'))
|
||||
shutil.copy(os.path.join(options.binary_dir, 'scripts/murmur.pl'), os.path.join(destdir, 'murmur.pl'))
|
||||
shutil.copy(os.path.join(options.binary_dir, 'scripts/weblist.pl'), os.path.join(destdir, 'weblist.pl'))
|
||||
shutil.copy(os.path.join(options.binary_dir, 'scripts/icedemo.php'), os.path.join(destdir, 'icedemo.php'))
|
||||
shutil.copy(os.path.join(options.binary_dir, 'scripts/weblist.php'), os.path.join(destdir, 'weblist.php'))
|
||||
shutil.copy(os.path.join(options.binary_dir, 'scripts/murmur.ini.osx'), os.path.join(destdir, 'murmur.ini'))
|
||||
shutil.copy(os.path.join(options.binary_dir, 'src/murmur/Murmur.ice'), os.path.join(destdir, 'Murmur.ice'))
|
||||
|
||||
shutil.copy('release/murmurd', os.path.join(destdir, 'murmurd'))
|
||||
shutil.copy(os.path.join(options.binary_dir, 'murmurd'), os.path.join(destdir, 'murmurd'))
|
||||
codesign(os.path.join(destdir, 'murmurd'))
|
||||
|
||||
certname = 'Developer ID Installer: %s' % options.developer_id
|
||||
p = Popen(('xip', '--keychain', options.keychain, '-s', certname, '--timestamp', destdir, os.path.join('release', name+'.xip')))
|
||||
p = Popen(('xip', '--keychain', options.keychain, '-s', certname, '--timestamp', destdir, os.path.join(options.binary_dir, name+'.xip')))
|
||||
retval = p.wait()
|
||||
if retval != 0:
|
||||
print 'Failed to build Murmur XIP package'
|
||||
sys.exit(1)
|
||||
|
||||
absrelease = os.path.join(os.getcwd(), 'release')
|
||||
absrelease = os.path.join(os.getcwd(), 'options.binary_dir')
|
||||
|
||||
p = Popen(('tar', '-cjpf', name+'.tar.bz2', name), cwd=absrelease)
|
||||
retval = p.wait()
|
||||
@ -371,16 +370,26 @@ def package_server():
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = OptionParser()
|
||||
parser.add_option('', '--source-dir', dest='source_dir', help='This sets the path to the repository. (Defaults to ".")', default='.')
|
||||
parser.add_option('', '--binary-dir', dest='binary_dir', help='This sets the path to the folder containing binaries. It will also be used as output directory. (Defaults to "build")', default='build')
|
||||
parser.add_option('', '--version', dest='version', help='This overrides the version number of the build.')
|
||||
parser.add_option('', '--universal', dest='universal', help='Build an universal snapshot.', action='store_true', default=False)
|
||||
parser.add_option('', '--only-appbundle', dest='only_appbundle', help='Only prepare the appbundle. Do not package.', action='store_true', default=False)
|
||||
parser.add_option('', '--only-overlay', dest='only_overlay', help='Only create the overlay installer.', action='store_true', default=False)
|
||||
parser.add_option('', '--developer-id', dest='developer_id', help='Identity (Developer ID) to use for code signing. The name is also used for GPG signing. (If not set, no code signing will occur)')
|
||||
parser.add_option('', '--keychain', dest='keychain', help='The keychain to use when invoking code signing utilities. (Defaults to login.keychain', default='login.keychain')
|
||||
parser.add_option('', '--keychain', dest='keychain', help='The keychain to use when invoking code signing utilities. (Defaults to "login.keychain")', default='login.keychain')
|
||||
parser.add_option('', '--server', dest='server', help='Build a Murmur package.', action='store_true', default=False)
|
||||
|
||||
options, args = parser.parse_args()
|
||||
|
||||
if not os.path.exists(options.source_dir):
|
||||
print 'Please specify a source directory that exists!'
|
||||
sys.exit(1)
|
||||
|
||||
if not os.path.exists(options.binary_dir):
|
||||
print 'Please specify a binary directory that exists!'
|
||||
sys.exit(1)
|
||||
|
||||
if not options.server:
|
||||
package_client()
|
||||
else:
|
||||
|
||||
193
overlay/CMakeLists.txt
Normal file
193
overlay/CMakeLists.txt
Normal file
@ -0,0 +1,193 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
option(BUILD_OVERLAY_XCOMPILE "Build an x86 overlay" OFF)
|
||||
|
||||
if(BUILD_OVERLAY_XCOMPILE)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
set(version "1.4.0" CACHE STRING "Project version")
|
||||
|
||||
project(overlay_xcompile
|
||||
VERSION ${version}
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
include("${PARENT_SOURCE_DIR}/cmake/compiler.cmake")
|
||||
endif()
|
||||
|
||||
set(DX11_PIXEL_SHADERS "overlay11.ps")
|
||||
set(DX11_VERTEX_SHADERS "overlay11.vs")
|
||||
set(EFFECTS "overlay.fx")
|
||||
|
||||
set(COMPILED_DX11_PIXEL_SHADERS "overlay11.ps.h")
|
||||
set(COMPILED_DX11_VERTEX_SHADERS "overlay11.vs.h")
|
||||
set(COMPILED_EFFECTS "overlay.hex")
|
||||
|
||||
set(OVERLAY_RC "mumble_ol.rc")
|
||||
|
||||
# We save the output name in a variable because it's used by configure_file()
|
||||
if(64_BIT AND NOT BUILD_OVERLAY_XCOMPILE)
|
||||
set(OUTPUT_NAME "mumble_ol_x64")
|
||||
else()
|
||||
set(OUTPUT_NAME "mumble_ol")
|
||||
endif()
|
||||
|
||||
remove_definitions("-DUNICODE")
|
||||
|
||||
add_library(overlay SHARED)
|
||||
|
||||
configure_file(${OVERLAY_RC} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
find_program(FXC "fxc" DOC "Effect-Compiler tool")
|
||||
if(NOT FXC)
|
||||
message(FATAL_ERROR "Effect-Compiler tool not found!")
|
||||
endif()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${COMPILED_DX11_PIXEL_SHADERS}
|
||||
COMMAND ${FXC} "/Tps_5_0" "/O3" "/Vng_pixel_shader" "/Fh" "${CMAKE_CURRENT_BINARY_DIR}/${COMPILED_DX11_PIXEL_SHADERS}" "${CMAKE_CURRENT_SOURCE_DIR}/${DX11_PIXEL_SHADERS}"
|
||||
MAIN_DEPENDENCY ${DX11_PIXEL_SHADERS}
|
||||
COMMENT "Compiling ${DX11_PIXEL_SHADERS}"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${COMPILED_DX11_VERTEX_SHADERS}
|
||||
COMMAND ${FXC} "/Tvs_5_0" "/O3" "/Vng_vertex_shader" "/Fh" "${CMAKE_CURRENT_BINARY_DIR}/${COMPILED_DX11_VERTEX_SHADERS}" "${CMAKE_CURRENT_SOURCE_DIR}/${DX11_VERTEX_SHADERS}"
|
||||
MAIN_DEPENDENCY ${DX11_VERTEX_SHADERS}
|
||||
COMMENT "Compiling ${DX11_VERTEX_SHADERS}"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${COMPILED_EFFECTS}
|
||||
COMMAND ${FXC} "/Tfx_4_0" "/O3" "/Fh" "${CMAKE_CURRENT_BINARY_DIR}/${COMPILED_EFFECTS}" "${CMAKE_CURRENT_SOURCE_DIR}/${EFFECTS}"
|
||||
MAIN_DEPENDENCY ${EFFECTS}
|
||||
COMMENT "Compiling ${EFFECTS}"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_target(build-overlay-files ALL DEPENDS
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${COMPILED_EFFECTS}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${COMPILED_DX11_VERTEX_SHADERS}"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${COMPILED_DX11_PIXEL_SHADERS}"
|
||||
)
|
||||
|
||||
add_dependencies(overlay build-overlay-files)
|
||||
|
||||
target_sources(overlay
|
||||
PRIVATE
|
||||
"D11StateBlock.cpp"
|
||||
"D11StateBlock.h"
|
||||
"HardHook.cpp"
|
||||
"HardHook.h"
|
||||
"ancestor.cpp"
|
||||
"ancestor.h"
|
||||
"d3d9.cpp"
|
||||
"d3d10.cpp"
|
||||
"d3d11.cpp"
|
||||
"dxgi.cpp"
|
||||
"excludecheck.cpp"
|
||||
"excludecheck.h"
|
||||
"lib.cpp"
|
||||
"lib.h"
|
||||
"ods.cpp"
|
||||
"ods.h"
|
||||
"olsettings.cpp"
|
||||
"olsettings.h"
|
||||
"opengl.cpp"
|
||||
"overlay_blacklist.h"
|
||||
"overlay_launchers.h"
|
||||
"overlay_whitelist.h"
|
||||
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${OVERLAY_RC}"
|
||||
)
|
||||
|
||||
set_target_properties(overlay PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
|
||||
|
||||
find_package(Boost REQUIRED)
|
||||
|
||||
if(BUILD_OVERLAY_XCOMPILE)
|
||||
set_target_properties(overlay PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${MUMBLE_BINARY_DIR})
|
||||
|
||||
target_include_directories(overlay
|
||||
PRIVATE
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${PARENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
else()
|
||||
set_target_properties(overlay PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
target_include_directories(overlay
|
||||
PRIVATE
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
install(TARGETS overlay RUNTIME DESTINATION . COMPONENT mumble_client)
|
||||
endif()
|
||||
|
||||
if(64_BIT)
|
||||
add_subdirectory("${3RDPARTY_DIR}/minhook-src" "${CMAKE_CURRENT_BINARY_DIR}/minhook" EXCLUDE_FROM_ALL)
|
||||
target_compile_definitions(overlay PRIVATE "USE_MINHOOK")
|
||||
target_link_libraries(overlay PRIVATE minhook)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# Set "/MT" for release builds and "/MTd" for debug ones.
|
||||
set_target_properties(overlay PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
|
||||
if(64_BIT AND MSVC)
|
||||
include(ExternalProject)
|
||||
|
||||
if(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
ExternalProject_Add(overlay_xcompile
|
||||
DOWNLOAD_COMMAND ""
|
||||
CMAKE_GENERATOR ${CMAKE_GENERATOR}
|
||||
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
"-DVCPKG_TARGET_TRIPLET=x86-windows-static-md"
|
||||
"-DPARENT_SOURCE_DIR=${CMAKE_SOURCE_DIR}"
|
||||
"-DMUMBLE_SOURCE_DIR=${CMAKE_SOURCE_DIR}/src/mumble"
|
||||
"-DMUMBLE_BINARY_DIR=${CMAKE_BINARY_DIR}"
|
||||
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
|
||||
# Force MSVC, because CMake prioritizes MinGW over it.
|
||||
"-DCMAKE_C_COMPILER=cl.exe"
|
||||
"-DCMAKE_CXX_COMPILER=cl.exe"
|
||||
"-DBUILD_OVERLAY_XCOMPILE=ON"
|
||||
"-Dsymbols=${symbols}"
|
||||
${CMAKE_SOURCE_DIR}/overlay
|
||||
CMAKE_GENERATOR_PLATFORM "Win32"
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/overlay/overlay_xcompile-prefix
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
else()
|
||||
ExternalProject_Add(overlay_xcompile
|
||||
DOWNLOAD_COMMAND ""
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ${CMAKE_SOURCE_DIR}/overlay/scripts/build_overlay_xcompile.cmd
|
||||
-G ${CMAKE_GENERATOR}
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
|
||||
"-DVCPKG_TARGET_TRIPLET=x86-windows-static-md"
|
||||
"-DPARENT_SOURCE_DIR=${CMAKE_SOURCE_DIR}"
|
||||
"-DMUMBLE_SOURCE_DIR=${CMAKE_SOURCE_DIR}/src/mumble"
|
||||
"-DMUMBLE_BINARY_DIR=${CMAKE_BINARY_DIR}"
|
||||
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
|
||||
# Force MSVC, because CMake prioritizes MinGW over it.
|
||||
"-DCMAKE_C_COMPILER=cl.exe"
|
||||
"-DCMAKE_CXX_COMPILER=cl.exe"
|
||||
"-DBUILD_OVERLAY_XCOMPILE=ON"
|
||||
"-Dsymbols=${symbols}"
|
||||
${CMAKE_SOURCE_DIR}/overlay
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/overlay/overlay_xcompile-prefix
|
||||
INSTALL_COMMAND ""
|
||||
)
|
||||
endif()
|
||||
install(FILES ${CMAKE_BINARY_DIR}/mumble_ol.dll ${CMAKE_BINARY_DIR}/mumble_ol_helper.exe DESTINATION . COMPONENT mumble_client)
|
||||
endif()
|
||||
|
||||
add_subdirectory(overlay_exe)
|
||||
@ -6,19 +6,17 @@
|
||||
#ifndef MUMBLE_HARDHOOK_MINHOOK_H_
|
||||
#define MUMBLE_HARDHOOK_MINHOOK_H_
|
||||
|
||||
#define _UNICODE
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
#include <windows.h>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <windows.h>
|
||||
#include <unknwn.h>
|
||||
|
||||
typedef void *(*voidFunc)();
|
||||
|
||||
struct HardHook {
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
#include <windows.h>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
#include <windows.h>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
@ -18,8 +18,8 @@
|
||||
#endif
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,4,0,0
|
||||
PRODUCTVERSION 1,4,0,0
|
||||
FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
|
||||
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS (VER_DEBUG|VER_RELEASE)
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
@ -32,10 +32,10 @@ VS_VERSION_INFO VERSIONINFO
|
||||
BEGIN
|
||||
VALUE "CompanyName", "The Mumble Developers"
|
||||
VALUE "FileDescription", "Mumble - Low-latency VoIP client"
|
||||
VALUE "FileVersion", "1.4.0"
|
||||
VALUE "ProductVersion", "1.4.0"
|
||||
VALUE "FileVersion", "@PROJECT_VERSION@"
|
||||
VALUE "ProductVersion", "@PROJECT_VERSION@"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2005-2020 The Mumble Developers"
|
||||
VALUE "OriginalFilename", "mumble_ol.dll"
|
||||
VALUE "OriginalFilename", "@OUTPUT_NAME@"
|
||||
VALUE "ProductName", "Mumble"
|
||||
#ifdef SNAPSHOT_BUILD
|
||||
VALUE "SpecialBuild", "Snapshot development release"
|
||||
|
||||
51
overlay/overlay_exe/CMakeLists.txt
Normal file
51
overlay/overlay_exe/CMakeLists.txt
Normal file
@ -0,0 +1,51 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
set(OVERLAY_EXE_RC "overlay_exe.rc")
|
||||
|
||||
add_definitions("-DUNICODE" "-DWIN32_LEAN_AND_MEAN")
|
||||
|
||||
# We save the output name in a variable because it's used by configure_file()
|
||||
if(64_BIT AND NOT BUILD_OVERLAY_XCOMPILE)
|
||||
set(OUTPUT_NAME "mumble_ol_helper_x64")
|
||||
else()
|
||||
set(OUTPUT_NAME "mumble_ol_helper")
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_OVERLAY_XCOMPILE)
|
||||
get_target_property(MUMBLE_SOURCE_DIR mumble SOURCE_DIR)
|
||||
endif()
|
||||
|
||||
configure_file(${OVERLAY_EXE_RC} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
add_executable(overlay_exe WIN32
|
||||
"overlay_exe.cpp"
|
||||
"overlay_exe.h"
|
||||
|
||||
"${MUMBLE_SOURCE_DIR}/mumble.appcompat.manifest"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${OVERLAY_EXE_RC}"
|
||||
)
|
||||
|
||||
set_target_properties(overlay_exe PROPERTIES OUTPUT_NAME ${OUTPUT_NAME})
|
||||
|
||||
if(BUILD_OVERLAY_XCOMPILE)
|
||||
set_target_properties(overlay_exe PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${MUMBLE_BINARY_DIR})
|
||||
|
||||
target_include_directories(overlay_exe PRIVATE ${PARENT_SOURCE_DIR}/overlay)
|
||||
else()
|
||||
set_target_properties(overlay_exe PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
target_include_directories(overlay_exe PRIVATE ${CMAKE_SOURCE_DIR}/overlay)
|
||||
|
||||
install(TARGETS overlay_exe RUNTIME DESTINATION . COMPONENT mumble_client)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(overlay_exe PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
|
||||
add_dependencies(overlay_exe overlay)
|
||||
|
||||
target_link_libraries(overlay_exe PRIVATE Shlwapi.lib)
|
||||
@ -18,8 +18,8 @@
|
||||
#endif
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,4,0,0
|
||||
PRODUCTVERSION 1,4,0,0
|
||||
FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
|
||||
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS (VER_DEBUG|VER_RELEASE)
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
@ -32,10 +32,10 @@ VS_VERSION_INFO VERSIONINFO
|
||||
BEGIN
|
||||
VALUE "CompanyName", "The Mumble Developers"
|
||||
VALUE "FileDescription", "Mumble - Low-latency VoIP client"
|
||||
VALUE "FileVersion", "1.4.0"
|
||||
VALUE "ProductVersion", "1.4.0"
|
||||
VALUE "FileVersion", "@PROJECT_VERSION@"
|
||||
VALUE "ProductVersion", "@PROJECT_VERSION@"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2005-2020 The Mumble Developers"
|
||||
VALUE "OriginalFilename", "mumble_ol_helper.exe"
|
||||
VALUE "OriginalFilename", "@OUTPUT_NAME@"
|
||||
VALUE "ProductName", "Mumble"
|
||||
#ifdef SNAPSHOT_BUILD
|
||||
VALUE "SpecialBuild", "Snapshot development release"
|
||||
|
||||
14
overlay/scripts/build_overlay_xcompile.cmd
Normal file
14
overlay/scripts/build_overlay_xcompile.cmd
Normal file
@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
|
||||
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
|
||||
set InstallDir=%%i
|
||||
)
|
||||
|
||||
if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
|
||||
"%InstallDir%\Common7\Tools\vsdevcmd.bat" -arch=x86 -host_arch=x64
|
||||
cmake %*
|
||||
cmake --build .
|
||||
exit
|
||||
)
|
||||
|
||||
exit
|
||||
118
overlay_gl/CMakeLists.txt
Normal file
118
overlay_gl/CMakeLists.txt
Normal file
@ -0,0 +1,118 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
# Overlay payload for UNIX-like systems.
|
||||
|
||||
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "amd64")
|
||||
option(overlay-xcompile "Build 32 bit overlay library, necessary for the overlay to work with 32 bit processes." ON)
|
||||
endif()
|
||||
|
||||
add_library(overlay_gl SHARED "overlay.c")
|
||||
|
||||
set_target_properties(overlay_gl
|
||||
PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
OUTPUT_NAME "mumbleoverlay"
|
||||
VERSION ${CMAKE_PROJECT_VERSION}
|
||||
)
|
||||
|
||||
if(NOT APPLE)
|
||||
target_link_options(overlay_gl
|
||||
PRIVATE
|
||||
"-Wl,-z,lazy"
|
||||
)
|
||||
|
||||
set_target_properties(overlay_gl
|
||||
PROPERTIES
|
||||
COMPILE_DEFINITIONS
|
||||
"TARGET_UNIX"
|
||||
)
|
||||
|
||||
if(overlay-xcompile)
|
||||
# Just check for this header file while using a 32bit target as a really small and incomplete check whether g++-multilib seems to be
|
||||
# installed. If we don't find it, we can assume it's not there but if we do find it, we still don't know. Thus we still print the
|
||||
# message about the 32bit target potentially failing due to missing g++-multilib.
|
||||
CHECK_INCLUDE_FILE("sys/cdefs.h" FOUND_CDEFS "-m32")
|
||||
if(NOT FOUND_CDEFS)
|
||||
message(FATAL_ERROR "Can't find the 32bit version of sys/cdefs.h - did you install g++-multilib?")
|
||||
else()
|
||||
message(STATUS "\nIf the 32 bit overlay library fails to compile, make sure the requirements are installed (\"g++-multilib\" package on Debian-based distributions).\n")
|
||||
endif()
|
||||
|
||||
set_target_properties(overlay_gl
|
||||
PROPERTIES
|
||||
OUTPUT_NAME "mumbleoverlay.x86_64"
|
||||
)
|
||||
|
||||
add_library(overlay_gl_x86 SHARED "overlay.c")
|
||||
|
||||
target_compile_definitions(overlay_gl_x86
|
||||
PRIVATE
|
||||
"TARGET_UNIX"
|
||||
)
|
||||
|
||||
target_compile_options(overlay_gl_x86
|
||||
PRIVATE
|
||||
"-m32"
|
||||
)
|
||||
|
||||
# Linking the overlay library with '-z now' requires all target processes to have libGL symbols in them at load time.
|
||||
# If it doesn't, the program will not start at all.
|
||||
#
|
||||
# Instead, explicitly use '-z lazy' to defer libGL symbol resolution until first use, which is never for non-libGL users.
|
||||
target_link_options(overlay_gl_x86
|
||||
PRIVATE
|
||||
"-m32"
|
||||
"-Wl,-z,lazy"
|
||||
)
|
||||
|
||||
set_target_properties(overlay_gl_x86
|
||||
PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
OUTPUT_NAME "mumbleoverlay.x86"
|
||||
VERSION ${CMAKE_PROJECT_VERSION}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
target_link_libraries(overlay_gl
|
||||
PRIVATE
|
||||
"-ldl"
|
||||
"-lrt"
|
||||
)
|
||||
|
||||
if(TARGET overlay_gl_x86)
|
||||
target_link_libraries(overlay_gl_x86
|
||||
PRIVATE
|
||||
"-ldl"
|
||||
"-lrt"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
add_subdirectory("${3RDPARTY_DIR}/mach-override-build" "${CMAKE_CURRENT_BINARY_DIR}/mach-override")
|
||||
|
||||
find_library(LIB_COREFOUNDATION "CoreFoundation")
|
||||
|
||||
target_compile_definitions(overlay_gl
|
||||
PRIVATE
|
||||
"TARGET_MAC"
|
||||
)
|
||||
target_compile_options(overlay_gl
|
||||
PRIVATE
|
||||
"-ObjC"
|
||||
)
|
||||
target_sources(overlay_gl
|
||||
PRIVATE
|
||||
"avail_mac.h"
|
||||
"overlay_gl.plist"
|
||||
)
|
||||
target_link_libraries(overlay_gl
|
||||
PRIVATE
|
||||
"-undefined dynamic_lookup" # Defer libGL symbol resolution until first use, which is never for non-libGL users.
|
||||
mach-override
|
||||
${LIB_COREFOUNDATION}
|
||||
)
|
||||
endif()
|
||||
35
plugins/CMakeLists.txt
Normal file
35
plugins/CMakeLists.txt
Normal file
@ -0,0 +1,35 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
if(NOT WIN32 AND NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
|
||||
add_subdirectory(link)
|
||||
|
||||
# Shared library on UNIX (e.g. ".so")
|
||||
set_target_properties(link PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
|
||||
|
||||
return()
|
||||
endif()
|
||||
|
||||
file(GLOB ITEMS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/*")
|
||||
|
||||
foreach(ITEM ${ITEMS})
|
||||
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${ITEM}")
|
||||
add_subdirectory(${ITEM})
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(${ITEM} user32.lib)
|
||||
|
||||
# Shared library on Windows (e.g. ".dll")
|
||||
set_target_properties(${ITEM} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
|
||||
install(TARGETS ${ITEM} RUNTIME DESTINATION ./plugins COMPONENT mumble_client)
|
||||
else()
|
||||
# Shared library on UNIX (e.g. ".so")
|
||||
set_target_properties(${ITEM} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
|
||||
install(TARGETS ${ITEM} LIBRARY DESTINATION lib/plugins COMPONENT mumble_client)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
6
plugins/aoc/CMakeLists.txt
Normal file
6
plugins/aoc/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(aoc SHARED "aoc.cpp")
|
||||
6
plugins/arma2/CMakeLists.txt
Normal file
6
plugins/arma2/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(arma2 SHARED "arma2.cpp")
|
||||
6
plugins/bf1/CMakeLists.txt
Normal file
6
plugins/bf1/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(bf1 SHARED "bf1.cpp")
|
||||
6
plugins/bf1942/CMakeLists.txt
Normal file
6
plugins/bf1942/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(bf1942 SHARED "bf1942.cpp")
|
||||
6
plugins/bf2/CMakeLists.txt
Normal file
6
plugins/bf2/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(bf2 SHARED "bf2.cpp")
|
||||
6
plugins/bf2142/CMakeLists.txt
Normal file
6
plugins/bf2142/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(bf2142 SHARED "bf2142.cpp")
|
||||
6
plugins/bf3/CMakeLists.txt
Normal file
6
plugins/bf3/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(bf3 SHARED "bf3.cpp")
|
||||
6
plugins/bf4/CMakeLists.txt
Normal file
6
plugins/bf4/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(bf4 SHARED "bf4.cpp")
|
||||
6
plugins/bf4_x86/CMakeLists.txt
Normal file
6
plugins/bf4_x86/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(bf4_x86 SHARED "bf4_x86.cpp")
|
||||
6
plugins/bfbc2/CMakeLists.txt
Normal file
6
plugins/bfbc2/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(bfbc2 SHARED "bfbc2.cpp")
|
||||
6
plugins/bfheroes/CMakeLists.txt
Normal file
6
plugins/bfheroes/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(bfheroes SHARED "bfheroes.cpp")
|
||||
6
plugins/blacklight/CMakeLists.txt
Normal file
6
plugins/blacklight/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(blacklight SHARED "blacklight.cpp")
|
||||
6
plugins/borderlands/CMakeLists.txt
Normal file
6
plugins/borderlands/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(borderlands SHARED "borderlands.cpp")
|
||||
6
plugins/borderlands2/CMakeLists.txt
Normal file
6
plugins/borderlands2/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(borderlands2 SHARED "borderlands2.cpp")
|
||||
6
plugins/breach/CMakeLists.txt
Normal file
6
plugins/breach/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(breach SHARED "breach.cpp")
|
||||
6
plugins/cod2/CMakeLists.txt
Normal file
6
plugins/cod2/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(cod2 SHARED "cod2.cpp")
|
||||
6
plugins/cod4/CMakeLists.txt
Normal file
6
plugins/cod4/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(cod4 SHARED "cod4.cpp")
|
||||
6
plugins/cod5/CMakeLists.txt
Normal file
6
plugins/cod5/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(cod5 SHARED "cod5.cpp")
|
||||
6
plugins/codmw2/CMakeLists.txt
Normal file
6
plugins/codmw2/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(codmw2 SHARED "codmw2.cpp")
|
||||
6
plugins/codmw2so/CMakeLists.txt
Normal file
6
plugins/codmw2so/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(codmw2so SHARED "codmw2so.cpp")
|
||||
6
plugins/cs/CMakeLists.txt
Normal file
6
plugins/cs/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(cs SHARED "cs.cpp")
|
||||
8
plugins/css/CMakeLists.txt
Normal file
8
plugins/css/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(css SHARED "../null_plugin.cpp")
|
||||
|
||||
target_compile_definitions(css PRIVATE "NULL_DESC=L\"Counter Strike: Source (retracted, now using Link)\"")
|
||||
8
plugins/dods/CMakeLists.txt
Normal file
8
plugins/dods/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(dods SHARED "../null_plugin.cpp")
|
||||
|
||||
target_compile_definitions(dods PRIVATE "NULL_DESC=L\"Day of Defeat: Source (retracted, now using Link)\"")
|
||||
6
plugins/dys/CMakeLists.txt
Normal file
6
plugins/dys/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(dys SHARED "dys.cpp")
|
||||
6
plugins/etqw/CMakeLists.txt
Normal file
6
plugins/etqw/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(etqw SHARED "etqw.cpp")
|
||||
6
plugins/ffxiv/CMakeLists.txt
Normal file
6
plugins/ffxiv/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(ffxiv SHARED "ffxiv.cpp")
|
||||
8
plugins/ffxiv_x64/CMakeLists.txt
Normal file
8
plugins/ffxiv_x64/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(ffxiv_x64 SHARED "../ffxiv/ffxiv.cpp")
|
||||
|
||||
target_compile_definitions(ffxiv_x64 PRIVATE "FFXIV_USE_x64")
|
||||
6
plugins/gmod/CMakeLists.txt
Normal file
6
plugins/gmod/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(gmod SHARED "gmod.cpp")
|
||||
6
plugins/gtaiv/CMakeLists.txt
Normal file
6
plugins/gtaiv/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(gtaiv SHARED "gtaiv.cpp")
|
||||
6
plugins/gtasa/CMakeLists.txt
Normal file
6
plugins/gtasa/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(gtasa SHARED "gtasa.cpp")
|
||||
6
plugins/gtav/CMakeLists.txt
Normal file
6
plugins/gtav/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(gtav SHARED "gtav.cpp")
|
||||
6
plugins/gw/CMakeLists.txt
Normal file
6
plugins/gw/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(gw SHARED "gw.cpp")
|
||||
8
plugins/hl2dm/CMakeLists.txt
Normal file
8
plugins/hl2dm/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(hl2dm SHARED "../null_plugin.cpp")
|
||||
|
||||
target_compile_definitions(hl2dm PRIVATE "NULL_DESC=L\"Half-Life 2: Deathmatch (retracted, now using Link)\"")
|
||||
6
plugins/insurgency/CMakeLists.txt
Normal file
6
plugins/insurgency/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(insurgency SHARED "insurgency.cpp")
|
||||
6
plugins/jc2/CMakeLists.txt
Normal file
6
plugins/jc2/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(jc2 SHARED "jc2.cpp")
|
||||
6
plugins/l4d/CMakeLists.txt
Normal file
6
plugins/l4d/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(l4d SHARED "l4d.cpp")
|
||||
6
plugins/l4d2/CMakeLists.txt
Normal file
6
plugins/l4d2/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(l4d2 SHARED "l4d2.cpp")
|
||||
17
plugins/link/CMakeLists.txt
Normal file
17
plugins/link/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(link SHARED)
|
||||
|
||||
if(WIN32)
|
||||
target_sources(link PRIVATE "link.cpp")
|
||||
elseif(UNIX)
|
||||
target_sources(link PRIVATE "link-posix.cpp")
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
find_library(LIB_RT "rt")
|
||||
target_link_libraries(link PRIVATE ${LIB_RT})
|
||||
endif()
|
||||
endif()
|
||||
6
plugins/lol/CMakeLists.txt
Normal file
6
plugins/lol/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(lol SHARED "lol.cpp")
|
||||
6
plugins/lotro/CMakeLists.txt
Normal file
6
plugins/lotro/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(lotro SHARED "lotro.cpp")
|
||||
6
plugins/ql/CMakeLists.txt
Normal file
6
plugins/ql/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(ql SHARED "ql.cpp")
|
||||
6
plugins/rl/CMakeLists.txt
Normal file
6
plugins/rl/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(rl SHARED "rl.cpp")
|
||||
6
plugins/sr/CMakeLists.txt
Normal file
6
plugins/sr/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(sr SHARED "sr.cpp")
|
||||
8
plugins/sto/CMakeLists.txt
Normal file
8
plugins/sto/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(sto SHARED "../null_plugin.cpp")
|
||||
|
||||
target_compile_definitions(sto PRIVATE "NULL_DESC=L\"Star Trek Online (retracted due to lack of maintenance)\"")
|
||||
8
plugins/tf2/CMakeLists.txt
Normal file
8
plugins/tf2/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(tf2 SHARED "../null_plugin.cpp")
|
||||
|
||||
target_compile_definitions(tf2 PRIVATE "NULL_DESC=L\"Team Fortress 2 (retracted, now using Link)\"")
|
||||
6
plugins/ut2004/CMakeLists.txt
Normal file
6
plugins/ut2004/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(ut2004 SHARED "ut2004.cpp")
|
||||
6
plugins/ut3/CMakeLists.txt
Normal file
6
plugins/ut3/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(ut3 SHARED "ut3.cpp")
|
||||
6
plugins/ut99/CMakeLists.txt
Normal file
6
plugins/ut99/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(ut99 SHARED "ut99.cpp")
|
||||
6
plugins/wolfet/CMakeLists.txt
Normal file
6
plugins/wolfet/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(wolfet SHARED "wolfet.cpp")
|
||||
6
plugins/wow/CMakeLists.txt
Normal file
6
plugins/wow/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(wow SHARED "wow.cpp")
|
||||
6
plugins/wow_x64/CMakeLists.txt
Normal file
6
plugins/wow_x64/CMakeLists.txt
Normal file
@ -0,0 +1,6 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
add_library(wow_x64 SHARED "wow_x64.cpp")
|
||||
137
scripts/Create-Win32InstallerMUI.ps1
Normal file
137
scripts/Create-Win32InstallerMUI.ps1
Normal file
@ -0,0 +1,137 @@
|
||||
# Copyright 2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]$packageName,
|
||||
[Parameter(Mandatory=$true)]$version
|
||||
)
|
||||
|
||||
Function Build-Installer {
|
||||
[cmdletbinding()]
|
||||
Param (
|
||||
[string]$culture,
|
||||
[string]$lcid
|
||||
)
|
||||
|
||||
Process {
|
||||
Write-Host "Creating installer for $culture..."
|
||||
cpack -C Release -D CPACK_PACKAGE_FILE_NAME="$installerName-$culture" -D CPACK_WIX_CULTURES=$culture -D CPACK_WIX_LCID=$lcid
|
||||
}
|
||||
}
|
||||
|
||||
# TODO: Check whether WiX is in PATH?
|
||||
if(-Not (Test-Path $env:WIX)) {
|
||||
Write-Host "Error: \"WIX\" environment variable not found, is WiX installed?"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if(-Not (Test-Path -Path "EmbedTransform.exe")) {
|
||||
Write-Host "Downloading EmbedTransform from FireGiant (WiX)..."
|
||||
|
||||
try {
|
||||
Invoke-WebRequest https://www.firegiant.com/system/files/samples/EmbedTransform.zip -OutFile ".\EmbedTransform.zip"
|
||||
} catch {
|
||||
Write-Host "URL for FireGiant has been removed or is not available. Aborting..."
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Extracting EmbedTransform archive..."
|
||||
|
||||
try {
|
||||
Expand-Archive -Path "EmbedTransform.zip" -DestinationPath "."
|
||||
} catch {
|
||||
Write-Host "EmbedTransform archive missing or corrupt. Aborting..."
|
||||
exit 1
|
||||
}
|
||||
|
||||
Remove-Item "EmbedTransform.zip"
|
||||
}
|
||||
|
||||
$mainCulture = "en-US"
|
||||
$extraCultures =
|
||||
"cs-CZ",
|
||||
"da-DK",
|
||||
"de-DE",
|
||||
"el-GR",
|
||||
"es-ES",
|
||||
"fi-FI",
|
||||
"fr-FR",
|
||||
"it-IT",
|
||||
"ja-JP",
|
||||
"nb-NO",
|
||||
"nl-NL",
|
||||
"pl-PL",
|
||||
"pt-PT",
|
||||
"ru-RU",
|
||||
"sv-SE",
|
||||
"tr-TR",
|
||||
"zh-CN",
|
||||
"zh-TW"
|
||||
|
||||
$wixBinaryDir = $env:WIX + "bin"
|
||||
$installerName = "$packageName-$version"
|
||||
$lcids = New-Object System.Collections.Generic.List[System.Object]
|
||||
|
||||
$cultureInfo = New-Object system.globalization.cultureinfo($mainCulture)
|
||||
$cultureLCID = $cultureInfo.TextInfo.LCID
|
||||
Build-Installer -culture $mainCulture -lcid $cultureLCID
|
||||
$lcids.Add($cultureLCID)
|
||||
|
||||
# The main culture installer is used as base for the multi-language one.
|
||||
Copy-Item -Path "$installerName-$mainCulture.msi" "$installerName.msi"
|
||||
|
||||
foreach($culture in $extraCultures) {
|
||||
$cultureInfo = New-Object system.globalization.cultureinfo($culture)
|
||||
$cultureLCID = $cultureInfo.TextInfo.LCID
|
||||
Build-Installer -culture $culture -lcid $cultureLCID
|
||||
Write-Host "Creating language transform for $culture..."
|
||||
& $wixBinaryDir\torch.exe -p -t language "$installerName.msi" "$installerName-$culture.msi" -out $cultureLCID
|
||||
Write-Host "Embedding transform for $culture..."
|
||||
& .\EmbedTransform.exe "$installerName.msi" $cultureLCID
|
||||
$lcids.Add($cultureLCID)
|
||||
}
|
||||
|
||||
if ([Environment]::Is64BitProcess) {
|
||||
$platform = "x64"
|
||||
} else {
|
||||
$platform = "Intel"
|
||||
}
|
||||
|
||||
Write-Host "Updating template string..."
|
||||
# Inspired by https://stackoverflow.com/a/53203626/6658002.
|
||||
$windowsInstaller = New-Object -ComObject WindowsInstaller.Installer
|
||||
$msi = $windowsInstaller.OpenDatabase("$PSScriptRoot\$installerName.msi", 2)
|
||||
$summaryInfo = $msi.SummaryInformation(4)
|
||||
|
||||
Write-Host "Original: " $summaryInfo.Property(7)
|
||||
$lcidsString = [system.String]::Join(",", $lcids)
|
||||
$summaryInfo.Property(7) = "$platform;$lcidsString"
|
||||
Write-Host "Updated: " $summaryInfo.Property(7)
|
||||
|
||||
$summaryInfo.Persist()
|
||||
$msi.Commit()
|
||||
|
||||
# If we don't release the objects, we cannot interact with the file we opened until PowerShell is closed.
|
||||
[System.Runtime.Interopservices.Marshal]::ReleaseComObject($summaryInfo) | Out-Null
|
||||
[System.Runtime.Interopservices.Marshal]::ReleaseComObject($msi) | Out-Null
|
||||
[System.Runtime.Interopservices.Marshal]::ReleaseComObject($windowsInstaller) | Out-Null
|
||||
|
||||
Write-Host "Generating checksum (SHA1)..."
|
||||
$checksum = Get-FileHash "$installerName.msi" -Algorithm SHA1 | Select-Object -ExpandProperty Hash
|
||||
$checksumOutput = "$installerName - $checksum"
|
||||
Out-File -InputObject $checksumOutput -FilePath "$installerName.sha1"
|
||||
|
||||
Write-Host "Deleting temporary files..."
|
||||
foreach($lcid in $lcids) {
|
||||
$cultureInfo = New-Object system.globalization.cultureinfo($lcid)
|
||||
$culture = $cultureInfo.TextInfo.CultureName
|
||||
if (-Not ($culture -eq $mainCulture)) {
|
||||
Remove-Item $lcid
|
||||
}
|
||||
|
||||
Remove-Item "$installerName-$culture.msi"
|
||||
}
|
||||
|
||||
Write-Host "Done!"
|
||||
@ -1,74 +0,0 @@
|
||||
# Builds Mumble using the specified build script.
|
||||
# The path to the script is relative to the build environment's root.
|
||||
# The configuration we build with is adjusted to be close to
|
||||
# our release builds.
|
||||
#
|
||||
# Below is a list of configuration variables used from environment.
|
||||
#
|
||||
# Predefined variables:
|
||||
#
|
||||
# AGENT_BUILDDIRECTORY - The local path on the agent where all folders
|
||||
# for a given build pipeline are created
|
||||
# (e.g. "c:\agent_work\1").
|
||||
# BUILD_SOURCESDIRECTORY - The local path on the agent where the
|
||||
# repository is downloaded.
|
||||
# (e.g. "c:\agent_work\1\s").
|
||||
# AGENT_TOOLSDIRECTORY - The directory used by tasks such as
|
||||
# Node Tool Installer and Use Python Version
|
||||
# to switch between multiple versions of a tool.
|
||||
# We store our build environment there, in the
|
||||
# folder specified by MUMBLE_ENVIRONMENT_DIR.
|
||||
#
|
||||
# Defined in the visual designer on Azure Pipelines:
|
||||
#
|
||||
# MUMBLE_ENVIRONMENT_DIR - Folder where the build environment will be stored
|
||||
# (e.g. "MumbleBuild").
|
||||
# MUMBLE_ENVIRONMENT_VERSION - Full build environment version
|
||||
# (e.g. win64-static-no-ltcg-1.3.x-2017-02-02-ec94ddb-790).
|
||||
# Must match .7z and extracted folder name.
|
||||
# MUMBLE_BUILDSCRIPT - Path to required build script cmd file. Relative to build
|
||||
# environment's "mumble-releng\buildscripts" path.
|
||||
# (e.g. "1.3.x/buildenv-win64-static.cmd").
|
||||
#
|
||||
# Defined in the YAML configuration:
|
||||
#
|
||||
# MUMBLE_NO_PCH - Indicates whether the build should not use PCH.
|
||||
#
|
||||
|
||||
$MUMBLE_BUILD_DIR = $env:AGENT_BUILDDIRECTORY
|
||||
$MUMBLE_SOURCE_DIR = $env:BUILD_SOURCESDIRECTORY
|
||||
$MUMBLE_BUILDENV_DIR = Join-Path (Join-Path $env:AGENT_TOOLSDIRECTORY $env:MUMBLE_ENVIRONMENT_DIR) $env:MUMBLE_ENVIRONMENT_VERSION
|
||||
$MUMBLE_BUILDSCRIPT = Join-Path $MUMBLE_BUILDENV_DIR "mumble-releng\buildscripts\$env:MUMBLE_BUILDSCRIPT"
|
||||
|
||||
$env:MUMBLE_EXTRA_QMAKE_CONFIG_FLAGS = ""
|
||||
|
||||
# We do not sign the Azure Pipelines CI builds, so we must disable
|
||||
# uiaccess elevation. Also no intermediary signing is wanted.
|
||||
$env:MUMBLE_EXTRA_QMAKE_CONFIG_FLAGS = $env:MUMBLE_EXTRA_QMAKE_CONFIG_FLAGS + " no-elevation"
|
||||
|
||||
# If "MUMBLE_NO_PCH" is enabled, pass "no-pch".
|
||||
if ($env:MUMBLE_NO_PCH -eq 1) {
|
||||
$env:MUMBLE_EXTRA_QMAKE_CONFIG_FLAGS = $env:MUMBLE_EXTRA_QMAKE_CONFIG_FLAGS + " no-pch"
|
||||
}
|
||||
|
||||
# Use jom to take advantage of the multiple cores we get on the builder.
|
||||
$env:MUMBLE_NMAKE = "jom"
|
||||
$env:MUMBLE_SKIP_COLLECT_SYMBOLS = "1"
|
||||
$env:MUMBLE_SKIP_INTERNAL_SIGNING = "1"
|
||||
$env:MUMBLE_BUILDENV_DIR = $MUMBLE_BUILDENV_DIR
|
||||
|
||||
Get-ChildItem -Path $MUMBLE_BUILD_DIR
|
||||
|
||||
& $MUMBLE_BUILDSCRIPT
|
||||
|
||||
if ($lastexitcode -ne 0) {
|
||||
Write-Output "Skipping build-artifatcs due to a build-error"
|
||||
exit $lastexitcode
|
||||
}
|
||||
|
||||
if ($env:MUMBLE_PUBLISH_INSTALLER -eq 1) {
|
||||
Write-Output "Copying build-artifacts to destination directory '$env:BUILD_ARTIFACTSTAGINGDIRECTORY'"
|
||||
cp installer\bin\x64\Release\*.msi "$env:BUILD_ARTIFACTSTAGINGDIRECTORY"
|
||||
}
|
||||
|
||||
exit $lastexitcode
|
||||
@ -4,25 +4,28 @@
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
#
|
||||
# Below is a list of configuration variables used from environment.
|
||||
#
|
||||
# AGENT_BUILDDIRECTORY - The local path on the agent where all folders
|
||||
# for a given build pipeline are created
|
||||
# BUILD_SOURCESDIRECTORY - The local path on the agent where the
|
||||
# repository is downloaded.
|
||||
#
|
||||
|
||||
ver=$(python scripts/mumble-version.py)
|
||||
VER=$(python scripts/mumble-version.py)
|
||||
|
||||
qmake -recursive CONFIG+="release tests warnings-as-errors" DEFINES+="MUMBLE_VERSION=${ver}"
|
||||
cd $AGENT_BUILDDIRECTORY
|
||||
|
||||
make -j $(nproc)
|
||||
make check
|
||||
# QSslDiffieHellmanParameters was introduced in Qt 5.8, Ubuntu 16.04 has 5.5.
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=appdir/usr -DBUILD_TESTING=ON -Dversion=$VER -Dsymbols=ON -Dqssldiffiehellmanparameters=OFF $BUILD_SOURCESDIRECTORY
|
||||
cmake --build .
|
||||
ctest
|
||||
cmake --install .
|
||||
|
||||
# TODO: The next few lines should be done by "make install": https://github.com/mumble-voip/mumble/issues/1029
|
||||
mkdir -p appdir/usr/bin appdir/usr/lib/mumble appdir/usr/share/metainfo/ appdir/usr/share/icons/hicolor/scalable/apps/ appdir/usr/share/applications/
|
||||
cp release/lib* appdir/usr/lib/
|
||||
cp release/mumble appdir/usr/bin
|
||||
cp release/plugins/lib* appdir/usr/lib/mumble/
|
||||
cp scripts/mumble.desktop appdir/usr/share/applications/
|
||||
cp scripts/mumble.appdata.xml appdir/usr/share/metainfo/
|
||||
cp icons/mumble.svg appdir/usr/share/icons/hicolor/scalable/apps/
|
||||
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
||||
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
|
||||
./linuxdeployqt-continuous-x86_64.AppImage $(find $HOME -type d -name 'appdir'| head -n 1)/usr/share/applications/*.desktop -appimage -extra-plugins=sqldrivers/libqsqlite.so
|
||||
ARCH=x86_64 ./linuxdeployqt-continuous-x86_64.AppImage $(find $HOME -type d -name 'appdir'| head -n 1)/usr/share/applications/*.desktop -appimage -extra-plugins=sqldrivers/libqsqlite.so
|
||||
|
||||
for f in Mumble*.AppImage; do
|
||||
# Embed update information into AppImage
|
||||
@ -32,4 +35,4 @@ for f in Mumble*.AppImage; do
|
||||
zsyncmake $f
|
||||
done
|
||||
|
||||
mv Mumble*.AppImage* ${BUILD_ARTIFACTSTAGINGDIRECTORY}
|
||||
mv Mumble*.AppImage* $BUILD_ARTIFACTSTAGINGDIRECTORY
|
||||
|
||||
@ -4,21 +4,23 @@
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
#
|
||||
# Below is a list of configuration variables used from environment.
|
||||
#
|
||||
# AGENT_BUILDDIRECTORY - The local path on the agent where all folders
|
||||
# for a given build pipeline are created
|
||||
# BUILD_SOURCESDIRECTORY - The local path on the agent where the
|
||||
# repository is downloaded.
|
||||
#
|
||||
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
|
||||
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/opt/openssl/lib/pkgconfig
|
||||
export PATH=$PATH:/usr/local/opt/qt5/bin:/usr/local/bin
|
||||
export MUMBLE_PREFIX=/usr/local
|
||||
export MUMBLE_ICE_PREFIX=/usr/local/opt/ice
|
||||
VER=$(python scripts/mumble-version.py)
|
||||
|
||||
ver=$(python scripts/mumble-version.py)
|
||||
cd $AGENT_BUILDDIRECTORY
|
||||
|
||||
qmake -recursive CONFIG+="release tests warnings-as-errors" DEFINES+="MUMBLE_VERSION=${ver}"
|
||||
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=$MUMBLE_ENVIRONMENT_TOOLCHAIN -DIce_HOME="$MUMBLE_ENVIRONMENT_PATH/installed/x64-osx" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -Dversion=$VER -Dstatic=ON -Dsymbols=ON $BUILD_SOURCESDIRECTORY
|
||||
cmake --build .
|
||||
ctest
|
||||
|
||||
make -j $(sysctl -n hw.ncpu)
|
||||
make check
|
||||
$BUILD_SOURCESDIRECTORY/macx/scripts/osxdist.py --version=$VER --source-dir=$BUILD_SOURCESDIRECTORY --binary-dir=.
|
||||
|
||||
# Build installer
|
||||
./macx/scripts/osxdist.py --version=${ver}
|
||||
|
||||
mv release/*.dmg ${BUILD_ARTIFACTSTAGINGDIRECTORY}
|
||||
mv *.dmg $BUILD_ARTIFACTSTAGINGDIRECTORY
|
||||
|
||||
73
scripts/azure-pipelines/build_windows.bat
Normal file
73
scripts/azure-pipelines/build_windows.bat
Normal file
@ -0,0 +1,73 @@
|
||||
:: Copyright 2020 The Mumble Developers. All rights reserved.
|
||||
:: Use of this source code is governed by a BSD-style license
|
||||
:: that can be found in the LICENSE file at the root of the
|
||||
:: Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
::
|
||||
:: Builds Mumble using the specified build script.
|
||||
:: The path to the script is relative to the build environment's root.
|
||||
:: The configuration we build with is adjusted to be close to
|
||||
:: our release builds.
|
||||
::
|
||||
:: Below is a list of configuration variables used from environment.
|
||||
::
|
||||
:: Predefined variables:
|
||||
::
|
||||
:: AGENT_BUILDDIRECTORY - The local path on the agent where all folders
|
||||
:: for a given build pipeline are created
|
||||
:: BUILD_SOURCESDIRECTORY - The local path on the agent where the
|
||||
:: repository is downloaded.
|
||||
:: AGENT_TOOLSDIRECTORY - The directory used by tasks such as
|
||||
:: Node Tool Installer and Use Python Version
|
||||
:: to switch between multiple versions of a tool.
|
||||
:: We store our build environment there, in the
|
||||
:: folder specified by MUMBLE_ENVIRONMENT_DIR.
|
||||
::
|
||||
:: Defined in .azure-pipelines.yml:
|
||||
::
|
||||
:: MUMBLE_ENVIRONMENT_STORE - Path to the folder the build environment is stored in.
|
||||
:: MUMBLE_ENVIRONMENT_SOURCE - Build environment web source folder URL
|
||||
:: MUMBLE_ENVIRONMENT_VERSION - Full build environment version
|
||||
:: Must match archive and extracted folder name.
|
||||
:: MUMBLE_ENVIRONMENT_TOOLCHAIN - Path to the vcpkg CMake toolchain, used for CMake.
|
||||
::
|
||||
|
||||
@echo on
|
||||
|
||||
for /f "tokens=* USEBACKQ" %%g in (`python "scripts/mumble-version.py"`) do (SET "VER=%%g")
|
||||
|
||||
cd /d %AGENT_BUILDDIRECTORY%
|
||||
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
|
||||
:: Delete MinGW, otherwise CMake picks it over MSVC.
|
||||
:: We don't delete the (Chocolatey) packages because it takes ~10 minutes...
|
||||
del C:\ProgramData\chocolatey\bin\gcc.exe
|
||||
del C:\ProgramData\chocolatey\bin\g++.exe
|
||||
del C:\ProgramData\chocolatey\bin\c++.exe
|
||||
del C:\Strawberry\c\bin\gcc.exe
|
||||
del C:\Strawberry\c\bin\g++.exe
|
||||
del C:\Strawberry\c\bin\c++.exe
|
||||
|
||||
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE="%MUMBLE_ENVIRONMENT_TOOLCHAIN%" -DVCPKG_TARGET_TRIPLET=x64-windows-static-md -DIce_HOME="%MUMBLE_ENVIRONMENT_PATH%\installed\x64-windows-static-md" -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -Dversion=%VER% -Dpackaging=ON -Dstatic=ON -Dsymbols=ON -Dasio=ON -Dg15=ON "%BUILD_SOURCESDIRECTORY%"
|
||||
|
||||
if errorlevel 1 (
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
cmake --build .
|
||||
|
||||
if errorlevel 1 (
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
ctest
|
||||
|
||||
if errorlevel 1 (
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
cmake --install .
|
||||
|
||||
if errorlevel 1 (
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
@ -1,64 +0,0 @@
|
||||
# Ensures we have downloaded and extracted a build environment
|
||||
# into our Azure Pipelines VM before we attempt to build. If the
|
||||
# environment archive is already present, this script will just extract it.
|
||||
#
|
||||
# Below is a list of configuration variables used from environment.
|
||||
#
|
||||
# Predefined variables:
|
||||
#
|
||||
# AGENT_TOOLSDIRECTORY - The directory used by tasks such as
|
||||
# Node Tool Installer and Use Python Version
|
||||
# to switch between multiple versions of a tool.
|
||||
# We store our build environment there, in the
|
||||
# folder specified by MUMBLE_ENVIRONMENT_DIR.
|
||||
#
|
||||
# Defined in the visual designer on Azure Pipelines:
|
||||
#
|
||||
# MUMBLE_ENVIRONMENT_DIR - Folder where the build environment will be stored
|
||||
# (e.g. "MumbleBuild").
|
||||
# MUMBLE_ENVIRONMENT_SOURCE - Build environment web source folder URL
|
||||
# (e.g. https://somehost/folder).
|
||||
# MUMBLE_ENVIRONMENT_VERSION - Full build environment version
|
||||
# (e.g. win64-static-no-ltcg-1.3.x-2017-02-02-ec94ddb-790).
|
||||
# Must match .7z and extracted folder name.
|
||||
#
|
||||
|
||||
$MUMBLE_ENVIRONMENT_VERSION = $env:MUMBLE_ENVIRONMENT_VERSION
|
||||
$MUMBLE_ENVIRONMENT_SOURCE = $env:MUMBLE_ENVIRONMENT_SOURCE
|
||||
$MUMBLE_ENVIRONMENT_PATH = Join-Path $env:AGENT_TOOLSDIRECTORY $env:MUMBLE_ENVIRONMENT_DIR
|
||||
$MUMBLE_ENVIRONMENT_STORE = Join-Path $MUMBLE_ENVIRONMENT_PATH "cache"
|
||||
|
||||
if (-Not (Test-Path $MUMBLE_ENVIRONMENT_STORE)) {
|
||||
New-Item $MUMBLE_ENVIRONMENT_STORE -ItemType Directory | Out-Null
|
||||
}
|
||||
|
||||
$env_7z = Join-Path $MUMBLE_ENVIRONMENT_STORE "$MUMBLE_ENVIRONMENT_VERSION.7z";
|
||||
|
||||
if (-Not (Test-Path $env_7z)) {
|
||||
Write-Host "Environment not cached. Downloading..."
|
||||
$env_url = "$MUMBLE_ENVIRONMENT_SOURCE/$MUMBLE_ENVIRONMENT_VERSION.7z"
|
||||
try {
|
||||
# According to https://github.com/PowerShell/PowerShell/issues/2138 disabling the
|
||||
# progressbar can significantly increase the speed of Invoke-Web-Request.
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
Invoke-WebRequest -Uri $env_url -OutFile $env_7z
|
||||
|
||||
# Reset progressbar
|
||||
$ProgressPreference = 'Continue'
|
||||
} catch {
|
||||
Write-Host "Failed at downloading build-environment: $PSItem"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
if (-Not (Test-Path (Join-Path $MUMBLE_ENVIRONMENT_PATH $MUMBLE_ENVIRONMENT_VERSION))) {
|
||||
Write-Host "Extracting build environment to $MUMBLE_ENVIRONMENT_PATH..."
|
||||
& C:\ProgramData\chocolatey\bin\7z.exe x $env_7z -o"$MUMBLE_ENVIRONMENT_PATH"
|
||||
}
|
||||
|
||||
Get-ChildItem -Path $MUMBLE_ENVIRONMENT_PATH
|
||||
|
||||
# We have to create a symlink because unfortunately C:\MumbleBuild is hardcoded
|
||||
# in our environment (e.g. qmake's configuration files' path).
|
||||
New-Item -Path C:\MumbleBuild -ItemType SymbolicLink -Value $MUMBLE_ENVIRONMENT_PATH
|
||||
@ -7,10 +7,11 @@
|
||||
|
||||
sudo apt-get update
|
||||
|
||||
sudo apt-get -y install build-essential pkg-config qt5-default qttools5-dev-tools libqt5svg5-dev \
|
||||
sudo apt-get -y install build-essential g++-multilib ninja-build pkg-config \
|
||||
qt5-default qttools5-dev qttools5-dev-tools libqt5svg5-dev \
|
||||
libboost-dev libssl-dev libprotobuf-dev protobuf-compiler \
|
||||
libcap-dev libxi-dev \
|
||||
libasound2-dev libpulse-dev \
|
||||
libogg-dev libsndfile1-dev libspeechd-dev \
|
||||
libavahi-compat-libdnssd-dev libzeroc-ice-dev libg15daemon-client-dev \
|
||||
libavahi-compat-libdnssd-dev libzeroc-ice-dev \
|
||||
zsync
|
||||
|
||||
@ -5,16 +5,24 @@
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
brew update
|
||||
cd $AGENT_TEMPDIRECTORY
|
||||
|
||||
# As brew will set a non-zero exit status if one of the packages it is asked to install
|
||||
# is installed already. Thus we have to iterate through every single one and check if it
|
||||
# is installed first.
|
||||
for pkg in pkg-config qt5 boost libogg libvorbis flac libsndfile protobuf openssl ice; do
|
||||
if brew ls --versions "$pkg" > /dev/null; then
|
||||
echo "Skipping installation of $pkg as it is already installed"
|
||||
else
|
||||
brew install "$pkg"
|
||||
fi
|
||||
done
|
||||
brew install ninja
|
||||
|
||||
if [ -d $MUMBLE_ENVIRONMENT_PATH ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Environment not cached. Downloading..."
|
||||
|
||||
wget "$MUMBLE_ENVIRONMENT_SOURCE/$MUMBLE_ENVIRONMENT_VERSION.tar.xz"
|
||||
|
||||
echo "Extracting build environment to $MUMBLE_ENVIRONMENT_STORE..."
|
||||
|
||||
mkdir -p $MUMBLE_ENVIRONMENT_STORE
|
||||
|
||||
tar xf "$MUMBLE_ENVIRONMENT_VERSION.tar.xz" -C $MUMBLE_ENVIRONMENT_STORE
|
||||
|
||||
chmod +x "$MUMBLE_ENVIRONMENT_PATH/installed/x64-osx/tools/Ice/slice2cpp"
|
||||
|
||||
ls -l $MUMBLE_ENVIRONMENT_STORE
|
||||
|
||||
88
scripts/azure-pipelines/install-environment_windows.ps1
Normal file
88
scripts/azure-pipelines/install-environment_windows.ps1
Normal file
@ -0,0 +1,88 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
#
|
||||
# Ensures we have downloaded and extracted a build environment
|
||||
# into our Azure Pipelines VM before we attempt to build. If the
|
||||
# environment archive is already present, this script will just extract it.
|
||||
#
|
||||
# Below is a list of configuration variables used from environment.
|
||||
#
|
||||
# Predefined variables:
|
||||
#
|
||||
# AGENT_TEMPDIRECTORY - A temporary folder that is cleaned after each pipeline job.
|
||||
# This directory is used by tasks such as .NET Core CLI task
|
||||
# to hold temporary items like test results before they are published.
|
||||
# AGENT_TOOLSDIRECTORY - The directory used by tasks such as
|
||||
# Node Tool Installer and Use Python Version
|
||||
# to switch between multiple versions of a tool.
|
||||
# We store our build environment there, in the
|
||||
# folder specified by MUMBLE_ENVIRONMENT_DIR.
|
||||
#
|
||||
# Defined in .azure-pipelines.yml:
|
||||
#
|
||||
# MUMBLE_ENVIRONMENT_STORE - Path to the folder the build environment is stored in.
|
||||
# (e.g. c:\hostedtoolcache\windows\MumbleBuild).
|
||||
# MUMBLE_ENVIRONMENT_SOURCE - Build environment web source folder URL
|
||||
# (e.g. https://somehost/folder).
|
||||
# MUMBLE_ENVIRONMENT_VERSION - Full build environment version
|
||||
# (e.g. win64-static-1.4.x-2020-05-27-ecb3c64-1151).
|
||||
# Must match .7z and extracted folder name.
|
||||
#
|
||||
|
||||
Set-Location -Path $env:AGENT_TEMPDIRECTORY
|
||||
|
||||
$SOURCE_DIR = $env:BUILD_SOURCESDIRECTORY
|
||||
|
||||
$MUMBLE_ENVIRONMENT_STORE = $env:MUMBLE_ENVIRONMENT_STORE
|
||||
$MUMBLE_ENVIRONMENT_VERSION = $env:MUMBLE_ENVIRONMENT_VERSION
|
||||
|
||||
if (-Not (Test-Path $MUMBLE_ENVIRONMENT_STORE)) {
|
||||
New-Item $MUMBLE_ENVIRONMENT_STORE -ItemType Directory | Out-Null
|
||||
}
|
||||
|
||||
if (-Not (Test-Path (Join-Path $MUMBLE_ENVIRONMENT_STORE $MUMBLE_ENVIRONMENT_VERSION))) {
|
||||
Write-Host "Environment not cached. Downloading..."
|
||||
|
||||
$env_url = "$env:MUMBLE_ENVIRONMENT_SOURCE/$MUMBLE_ENVIRONMENT_VERSION.7z"
|
||||
$env_7z = Join-Path $MUMBLE_ENVIRONMENT_STORE "$MUMBLE_ENVIRONMENT_VERSION.7z";
|
||||
try {
|
||||
# According to https://github.com/PowerShell/PowerShell/issues/2138 disabling the
|
||||
# progress bar can significantly increase the speed of Invoke-Web-Request.
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
Invoke-WebRequest -Uri $env_url -OutFile $env_7z
|
||||
|
||||
# Reset progress bar
|
||||
$ProgressPreference = 'Continue'
|
||||
} catch {
|
||||
Write-Host "Failed to download build-environment: $PSItem"
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Extracting build environment to $MUMBLE_ENVIRONMENT_STORE..."
|
||||
7z x $env_7z -o"$MUMBLE_ENVIRONMENT_STORE"
|
||||
}
|
||||
|
||||
Write-Host "Downloading ASIO SDK..."
|
||||
|
||||
try {
|
||||
Invoke-WebRequest -Uri "https://dl.mumble.info/build/extra/asio_sdk.zip" -OutFile "asio_sdk.zip"
|
||||
7z x "asio_sdk.zip"
|
||||
Move-Item -Path "asiosdk_2.3.3_2019-06-14" -Destination "$SOURCE_DIR/3rdparty/asio"
|
||||
} catch {
|
||||
Write-Host "Failed to download ASIO SDK: $PSItem"
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Downloading G15 SDK..."
|
||||
|
||||
try {
|
||||
Invoke-WebRequest -Uri "https://dl.mumble.info/build/extra/g15_sdk.zip" -OutFile "g15_sdk.zip"
|
||||
7z x "g15_sdk.zip"
|
||||
Move-Item -Path "G15SDK/LCDSDK" -Destination "$SOURCE_DIR/3rdparty/g15"
|
||||
} catch {
|
||||
Write-Host "Failed to download G15 SDK: $PSItem"
|
||||
exit 1
|
||||
}
|
||||
@ -8,60 +8,54 @@
|
||||
MUMBLE_HOST_DEB=${MUMBLE_HOST/_/-}
|
||||
|
||||
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
|
||||
# Bump the apt http timeout to 120 seconds.
|
||||
# Without this, we'd regularly get timeout errors
|
||||
# from our MXE mirror on dl.mumble.info.
|
||||
#
|
||||
# See mumble-voip/mumble#3312 for more information.
|
||||
echo 'Acquire::http::Timeout "120";' | sudo tee /etc/apt/apt.conf.d/99zzztimeout
|
||||
|
||||
if [ "${MUMBLE_HOST}" == "x86_64-linux-gnu" ] || [ "${MUMBLE_HOST}" == "aarch64-linux-gnu" ]; then
|
||||
if [ "${MUMBLE_HOST}" == "aarch64-linux-gnu" ] || [ "${MUMBLE_HOST}" == "x86_64-linux-gnu" ]; then
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get -y install build-essential pkg-config qt5-default qttools5-dev-tools qttranslations5-l10n \
|
||||
libqt5svg5-dev libboost-dev libssl-dev libprotobuf-dev protobuf-compiler \
|
||||
sudo apt-get -y install build-essential ninja-build pkg-config \
|
||||
qt5-default qttools5-dev qttools5-dev-tools libqt5svg5-dev \
|
||||
libboost-dev libssl-dev libprotobuf-dev protobuf-compiler \
|
||||
libcap-dev libxi-dev \
|
||||
libasound2-dev libpulse-dev \
|
||||
libogg-dev libsndfile1-dev libspeechd-dev \
|
||||
libavahi-compat-libdnssd-dev libzeroc-ice-dev libg15daemon-client-dev \
|
||||
libgrpc++-dev libprotoc-dev protobuf-compiler-grpc
|
||||
elif [ "${MUMBLE_HOST}" == "i686-w64-mingw32" ]; then
|
||||
libavahi-compat-libdnssd-dev libzeroc-ice-dev
|
||||
if [ "${MUMBLE_HOST}" == "aarch64-linux-gnu" ]; then
|
||||
# Kitware's APT repository doesn't provide packages for ARM64.
|
||||
cd ${HOME}
|
||||
if [ -d "cmake-3.17.2" ] && [ "$(ls -A cmake-3.17.2)" ]; then
|
||||
# Directory cached, CMake has already been compiled in a previous build.
|
||||
cd cmake-3.17.2 && sudo make install
|
||||
else
|
||||
# Build a recent version of CMake.
|
||||
wget https://github.com/Kitware/CMake/releases/download/v3.17.2/cmake-3.17.2.tar.gz && tar -xzvf cmake-3.17.2.tar.gz && cd cmake-3.17.2
|
||||
./bootstrap && make -j $(nproc) && sudo make install
|
||||
fi
|
||||
else
|
||||
sudo apt-get -y install g++-multilib
|
||||
fi
|
||||
elif [ "${MUMBLE_HOST}" == "i686-w64-mingw32" ] || [ "${MUMBLE_HOST}" == "x86_64-w64-mingw32" ]; then
|
||||
sudo dpkg --add-architecture i386
|
||||
|
||||
sudo apt-get -qq update
|
||||
echo "deb https://dl.mumble.info/mirror/pkg.mxe.cc/repos/apt bionic main" | sudo tee /etc/apt/sources.list.d/mxe.list
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 86B72ED9
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get install \
|
||||
wine32-development wine-development \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-qtbase \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-qtsvg \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-qttools \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-qttranslations \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-boost \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-protobuf \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-sqlite \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-flac \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-ogg \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-vorbis \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-libsndfile
|
||||
elif [ "${MUMBLE_HOST}" == "x86_64-w64-mingw32" ]; then
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get -qq update
|
||||
echo "deb https://dl.mumble.info/mirror/pkg.mxe.cc/repos/apt bionic main" | sudo tee /etc/apt/sources.list.d/mxe.list
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 86B72ED9
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get install \
|
||||
wine64-development wine-development \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-qtbase \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-qtsvg \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-qttools \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-qttranslations \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-boost \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-protobuf \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-sqlite \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-flac \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-ogg \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-vorbis \
|
||||
mxe-${MUMBLE_HOST_DEB}.static-libsndfile
|
||||
sudo apt-get -y install ninja-build wine32-development wine-development
|
||||
|
||||
mkdir ${HOME}/mxe && cd ${HOME}/mxe
|
||||
|
||||
# Download lists of MXE packages to install.
|
||||
wget https://dl.mumble.info/build/mxe/mxe.deb-list
|
||||
wget https://dl.mumble.info/build/mxe/mxe-x86-64-pc-linux-gnu.deb-list
|
||||
wget https://dl.mumble.info/build/mxe/mxe-${MUMBLE_HOST_DEB}.static.deb-list
|
||||
|
||||
# Merge the lists into a single one.
|
||||
cat *.deb-list > packages.deb-list
|
||||
|
||||
# Download the MXE packages, if not cached.
|
||||
while read package; do
|
||||
if [ ! -z "$package" ] && [ ! -f "$package" ]; then
|
||||
wget https://dl.mumble.info/build/mxe/$package
|
||||
fi
|
||||
done <packages.deb-list
|
||||
|
||||
# Install the MXE packages.
|
||||
sudo dpkg -i *.deb
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -11,44 +11,37 @@ if [ "${TRAVIS_REPO_SLUG}" == "mumble-voip/mumble" ] && [ "${TRAVIS_PULL_REQUEST
|
||||
fi
|
||||
fi
|
||||
|
||||
VER=$(python scripts/mumble-version.py)
|
||||
|
||||
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
|
||||
if [ "${MUMBLE_HOST}" == "x86_64-linux-gnu" ]; then
|
||||
EXTRA_CONFIG=PREFIX=/usr
|
||||
if [ "${MUMBLE_NO_PCH}" == "1" ]; then
|
||||
EXTRA_CONFIG="no-pch ${EXTRA_CONFIG}"
|
||||
fi
|
||||
qmake CONFIG+="release tests g15-emulator grpc ${EXTRA_CONFIG}" DEFINES+="MUMBLE_VERSION=${TRAVIS_COMMIT:0:7}" -recursive
|
||||
make -j2
|
||||
make check
|
||||
elif [ "${MUMBLE_HOST}" == "aarch64-linux-gnu" ]; then
|
||||
qmake CONFIG+="release tests warnings-as-errors grpc ${EXTRA_CONFIG}" -recursive
|
||||
make -j $(nproc)
|
||||
elif [ "${MUMBLE_HOST}" == "i686-w64-mingw32" ]; then
|
||||
wget http://www.steinberg.net/sdk_downloads/asiosdk2.3.zip -P ../
|
||||
unzip ../asiosdk2.3.zip -d ../
|
||||
mv ../ASIOSDK2.3 3rdparty/asio
|
||||
if [ "${MUMBLE_HOST}" == "aarch64-linux-gnu" ]; then
|
||||
mkdir build && cd build
|
||||
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -Dversion=$VER -Dsymbols=ON ..
|
||||
cmake --build .
|
||||
# We don't execute tests on ARM64 because TestPacketDataStream fails.
|
||||
# See https://github.com/mumble-voip/mumble/issues/3845.
|
||||
#ctest
|
||||
sudo cmake --install .
|
||||
elif [ "${MUMBLE_HOST}" == "x86_64-linux-gnu" ]; then
|
||||
mkdir build && cd build
|
||||
# We specify the absolute path because otherwise Travis CI's CMake is used.
|
||||
/usr/bin/cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -Dversion=$VER -Dsymbols=ON ..
|
||||
/usr/bin/cmake --build .
|
||||
/usr/bin/ctest
|
||||
sudo /usr/bin/cmake --install .
|
||||
elif [ "${MUMBLE_HOST}" == "i686-w64-mingw32" ] || [ "${MUMBLE_HOST}" == "x86_64-w64-mingw32" ]; then
|
||||
wget https://dl.mumble.info/build/extra/asio_sdk.zip -P /tmp/
|
||||
unzip /tmp/asio_sdk.zip
|
||||
mv asiosdk_2.3.3_2019-06-14 3rdparty/asio
|
||||
|
||||
mkdir build && cd build
|
||||
|
||||
PATH=$PATH:/usr/lib/mxe/usr/bin
|
||||
export MUMBLE_PROTOC=/usr/lib/mxe/usr/x86_64-pc-linux-gnu/bin/protoc
|
||||
EXTRA_CONFIG=
|
||||
if [ "${MUMBLE_NO_PCH}" == "1" ]; then
|
||||
EXTRA_CONFIG="no-pch ${EXTRA_CONFIG}"
|
||||
fi
|
||||
${MUMBLE_HOST}.static-qmake-qt5 -recursive -Wall CONFIG+="release tests warnings-as-errors g15-emulator no-overlay no-bonjour no-elevation no-ice ${EXTRA_CONFIG}"
|
||||
make -j2
|
||||
make check TESTRUNNER="wine-development"
|
||||
elif [ "${MUMBLE_HOST}" == "x86_64-w64-mingw32" ]; then
|
||||
wget http://www.steinberg.net/sdk_downloads/asiosdk2.3.zip -P ../
|
||||
unzip ../asiosdk2.3.zip -d ../
|
||||
mv ../ASIOSDK2.3 3rdparty/asio
|
||||
PATH=$PATH:/usr/lib/mxe/usr/bin
|
||||
export MUMBLE_PROTOC=/usr/lib/mxe/usr/x86_64-pc-linux-gnu/bin/protoc
|
||||
EXTRA_CONFIG=
|
||||
if [ "${MUMBLE_NO_PCH}" == "1" ]; then
|
||||
EXTRA_CONFIG="no-pch ${EXTRA_CONFIG}"
|
||||
fi
|
||||
${MUMBLE_HOST}.static-qmake-qt5 -recursive -Wall CONFIG+="release tests warnings-as-errors g15-emulator no-overlay no-bonjour no-elevation no-ice ${EXTRA_CONFIG}"
|
||||
make -j2
|
||||
make check TESTRUNNER="wine-development"
|
||||
|
||||
${MUMBLE_HOST}.static-cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -Dversion=$VER -Dstatic=ON -Dsymbols=ON -Dasio=ON -Dbonjour=OFF -Dice=OFF -Doverlay=OFF ..
|
||||
cmake --build .
|
||||
# TODO: investigate why tests fail.
|
||||
#ctest
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
172
src/CMakeLists.txt
Normal file
172
src/CMakeLists.txt
Normal file
@ -0,0 +1,172 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
set(GRPC_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Mumble.proto")
|
||||
|
||||
option(client "Build the client (Mumble)" ON)
|
||||
option(server "Build the server (Murmur)" ON)
|
||||
|
||||
option(qssldiffiehellmanparameters "Build support for custom Diffie-Hellman parameters." ON)
|
||||
|
||||
option(bonjour "Build support for Bonjour." ON)
|
||||
|
||||
option(dbus "Build support for DBus." ON)
|
||||
|
||||
find_pkg(Qt5
|
||||
COMPONENTS
|
||||
Core
|
||||
Network
|
||||
Xml
|
||||
REQUIRED
|
||||
)
|
||||
|
||||
find_pkg(OpenSSL
|
||||
COMPONENTS
|
||||
Crypto
|
||||
SSL
|
||||
REQUIRED
|
||||
)
|
||||
|
||||
find_pkg(Protobuf REQUIRED)
|
||||
|
||||
add_library(shared STATIC)
|
||||
|
||||
protobuf_generate(LANGUAGE cpp TARGET shared PROTOS ${GRPC_FILE} OUT_VAR BUILT_GRPC_FILES)
|
||||
|
||||
set_target_properties(shared
|
||||
PROPERTIES
|
||||
AUTOMOC ON
|
||||
# We explicitly tell CMake not to call any autogen tools (e.g. MOC) for the generated files.
|
||||
# @ref https://cmake.org/cmake/help/latest/policy/CMP0071.html
|
||||
SKIP_AUTOGEN ON
|
||||
)
|
||||
|
||||
set(SHARED_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
set(SHARED_SOURCES
|
||||
"Ban.cpp"
|
||||
"EnvUtils.cpp"
|
||||
"FFDHE.cpp"
|
||||
"HostAddress.cpp"
|
||||
"HTMLFilter.cpp"
|
||||
"License.cpp"
|
||||
"LogEmitter.cpp"
|
||||
"OSInfo.cpp"
|
||||
"PasswordGenerator.cpp"
|
||||
"PlatformCheck.cpp"
|
||||
"SelfSignedCertificate.cpp"
|
||||
"ServerAddress.cpp"
|
||||
"ServerResolver.cpp"
|
||||
"ServerResolverRecord.cpp"
|
||||
"SSL.cpp"
|
||||
"SSLCipherInfo.cpp"
|
||||
"SSLLocks.cpp"
|
||||
"Timer.cpp"
|
||||
"UnresolvedServerAddress.cpp"
|
||||
"User.cpp"
|
||||
"Version.cpp"
|
||||
|
||||
"crypto/CryptographicHash.cpp"
|
||||
"crypto/CryptographicRandom.cpp"
|
||||
"crypto/CryptStateOCB2.cpp"
|
||||
|
||||
"${3RDPARTY_DIR}/arc4random-src/arc4random_uniform.cpp"
|
||||
)
|
||||
|
||||
set(SHARED_HEADERS
|
||||
"Ban.h"
|
||||
"ByteSwap.h"
|
||||
"EnvUtils.h"
|
||||
"FFDHE.h"
|
||||
"FFDHETable.h"
|
||||
"HostAddress.h"
|
||||
"HTMLFilter.h"
|
||||
"License.h"
|
||||
"licenses.h"
|
||||
"LogEmitter.h"
|
||||
"Net.h"
|
||||
"OSInfo.h"
|
||||
"PasswordGenerator.h"
|
||||
"PlatformCheck.h"
|
||||
"SelfSignedCertificate.h"
|
||||
"ServerAddress.h"
|
||||
"ServerResolver.h"
|
||||
"ServerResolverRecord.h"
|
||||
"SSL.h"
|
||||
"SSLCipherInfo.h"
|
||||
"SSLCipherInfoTable.h"
|
||||
"SSLLocks.h"
|
||||
"Timer.h"
|
||||
"UnresolvedServerAddress.h"
|
||||
"User.h"
|
||||
"Version.h"
|
||||
|
||||
"crypto/CryptographicHash.h"
|
||||
"crypto/CryptographicRandom.h"
|
||||
"crypto/CryptState.h"
|
||||
"crypto/CryptStateOCB2.h"
|
||||
|
||||
"${3RDPARTY_DIR}/arc4random-src/arc4random_uniform.h"
|
||||
)
|
||||
|
||||
target_sources(shared
|
||||
PUBLIC
|
||||
${SHARED_HEADERS}
|
||||
PRIVATE
|
||||
${SHARED_SOURCES}
|
||||
)
|
||||
|
||||
target_compile_definitions(shared
|
||||
PUBLIC
|
||||
"MUMBLE_VERSION=${version}"
|
||||
"MUMBLE_VERSION_STRING=${version}"
|
||||
)
|
||||
|
||||
target_include_directories(shared
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
PRIVATE
|
||||
"${3RDPARTY_DIR}/arc4random-src"
|
||||
)
|
||||
|
||||
target_link_libraries(shared
|
||||
PUBLIC
|
||||
protobuf::libprotobuf
|
||||
OpenSSL::Crypto
|
||||
OpenSSL::SSL
|
||||
Qt5::Core
|
||||
Qt5::Network
|
||||
Qt5::Xml
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(shared PUBLIC qwave.lib)
|
||||
elseif(APPLE)
|
||||
find_library(LIB_CORESERVICES "CoreServices")
|
||||
target_link_libraries(shared PUBLIC ${LIB_CORESERVICES})
|
||||
endif()
|
||||
|
||||
if(qssldiffiehellmanparameters)
|
||||
target_compile_definitions(shared PUBLIC "USE_QSSLDIFFIEHELLMANPARAMETERS")
|
||||
endif()
|
||||
|
||||
if(client)
|
||||
add_subdirectory(mumble)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/scripts/mumble.appdata.xml" DESTINATION "share/metainfo")
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/scripts/mumble.desktop" DESTINATION "share/applications")
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/icons/mumble.svg" DESTINATION "share/icons/hicolor/scalable/apps")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(server)
|
||||
add_subdirectory(murmur)
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
904
src/mumble/CMakeLists.txt
Normal file
904
src/mumble/CMakeLists.txt
Normal file
@ -0,0 +1,904 @@
|
||||
# Copyright 2019-2020 The Mumble Developers. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file at the root of the
|
||||
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
|
||||
|
||||
set(MUMBLE_RC "mumble.rc")
|
||||
set(MUMBLE_DLL_RC "mumble_dll.rc")
|
||||
set(MUMBLE_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/mumble.plist")
|
||||
|
||||
set(MUMBLE_ICON "${CMAKE_SOURCE_DIR}/icons/mumble.ico")
|
||||
set(MUMBLE_ICNS "${CMAKE_SOURCE_DIR}/icons/mumble.icns")
|
||||
|
||||
include(qt-utils)
|
||||
|
||||
option(update "Check for updates by default." ON)
|
||||
|
||||
option(translations "Include languages other than English." ON)
|
||||
|
||||
option(classic-theme "Include the classic theme." ON)
|
||||
|
||||
option(bundled-opus "Build the included version of Opus instead of looking for one on the system." ON)
|
||||
option(bundled-celt "Build the included version of CELT instead of looking for one on the system." ON)
|
||||
option(bundled-speex "Build the included version of Speex instead of looking for one on the system." ON)
|
||||
option(rnnoise "Build RNNoise for machine learning noise reduction" ON)
|
||||
|
||||
option(manual-plugin "Include the built-in \"manual\" positional audio plugin." ON)
|
||||
|
||||
option(qtspeech "Use Qt's text-to-speech system (part of the Qt Speech module) instead of Mumble's own OS-specific text-to-speech implementations." OFF)
|
||||
|
||||
option(jackaudio "Build support for JackAudio." ON)
|
||||
option(portaudio "Build support for PortAudio" ON)
|
||||
|
||||
if(WIN32)
|
||||
option(asio "Build support for ASIO audio input." OFF)
|
||||
option(wasapi "Build support for WASAPI." ON)
|
||||
option(xboxinput "Build support for global shortcuts from Xbox controllers via the XInput DLL." ON)
|
||||
option(gkey "Build support for Logitech G-Keys. Note: This feature does not require any build-time dependencies, and requires Logitech Gaming Software to be installed to have any effect at runtime." ON)
|
||||
elseif(UNIX)
|
||||
if(APPLE)
|
||||
option(coreaudio "Build support for CoreAudio." ON)
|
||||
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
option(oss "Build support for OSS." ON)
|
||||
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
option(alsa "Build support for ALSA." ON)
|
||||
option(pulseaudio "Build support for PulseAudio." ON)
|
||||
option(speechd "Build support for Speech Dispatcher." ON)
|
||||
option(xinput2 "Build support for XI2" ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT APPLE)
|
||||
option(g15 "Include support for the G15 keyboard (and compatible devices)." OFF)
|
||||
endif()
|
||||
|
||||
if(WIN32 OR APPLE)
|
||||
option(crash-report "Include support for reporting crashes to the Mumble developers." ON)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
option(elevation "Set \"uiAccess=true\", required for global shortcuts to work with privileged applications. Requires the client's executable to be signed with a trusted code signing certificate." OFF)
|
||||
endif()
|
||||
|
||||
find_pkg(Qt5
|
||||
COMPONENTS
|
||||
Concurrent
|
||||
Sql
|
||||
Svg
|
||||
Widgets
|
||||
REQUIRED
|
||||
)
|
||||
|
||||
set(MUMBLE_SOURCES
|
||||
"main.cpp"
|
||||
"About.cpp"
|
||||
"About.h"
|
||||
"ACLEditor.cpp"
|
||||
"ACLEditor.h"
|
||||
"ACLEditor.ui"
|
||||
"ApplicationPalette.h"
|
||||
"AudioConfigDialog.cpp"
|
||||
"AudioConfigDialog.h"
|
||||
"Audio.cpp"
|
||||
"Audio.h"
|
||||
"AudioInput.cpp"
|
||||
"AudioInput.h"
|
||||
"AudioInput.ui"
|
||||
"AudioOutput.cpp"
|
||||
"AudioOutput.h"
|
||||
"AudioOutputSample.cpp"
|
||||
"AudioOutputSample.h"
|
||||
"AudioOutputSpeech.cpp"
|
||||
"AudioOutputSpeech.h"
|
||||
"AudioOutput.ui"
|
||||
"AudioOutputUser.cpp"
|
||||
"AudioOutputUser.h"
|
||||
"AudioStats.cpp"
|
||||
"AudioStats.h"
|
||||
"AudioStats.ui"
|
||||
"AudioWizard.cpp"
|
||||
"AudioWizard.h"
|
||||
"AudioWizard.ui"
|
||||
"BanEditor.cpp"
|
||||
"BanEditor.h"
|
||||
"BanEditor.ui"
|
||||
"CELTCodec.cpp"
|
||||
"CELTCodec.h"
|
||||
"Cert.cpp"
|
||||
"Cert.h"
|
||||
"Cert.ui"
|
||||
"ClientUser.cpp"
|
||||
"ClientUser.h"
|
||||
"ConfigDialog.cpp"
|
||||
"ConfigDialog.h"
|
||||
"ConfigDialog.ui"
|
||||
"ConfigWidget.cpp"
|
||||
"ConfigWidget.h"
|
||||
"ConnectDialog.cpp"
|
||||
"ConnectDialogEdit.ui"
|
||||
"ConnectDialog.h"
|
||||
"ConnectDialog.ui"
|
||||
"CustomElements.cpp"
|
||||
"CustomElements.h"
|
||||
"Database.cpp"
|
||||
"Database.h"
|
||||
"DeveloperConsole.cpp"
|
||||
"DeveloperConsole.h"
|
||||
"Global.cpp"
|
||||
"Global.h"
|
||||
"GlobalShortcut.cpp"
|
||||
"GlobalShortcut.h"
|
||||
"GlobalShortcutTarget.ui"
|
||||
"GlobalShortcut.ui"
|
||||
"LCD.cpp"
|
||||
"LCD.h"
|
||||
"LCD.ui"
|
||||
"ListenerLocalVolumeDialog.cpp"
|
||||
"Log.cpp"
|
||||
"Log.h"
|
||||
"Log.ui"
|
||||
"LookConfig.cpp"
|
||||
"LookConfig.h"
|
||||
"LookConfig.ui"
|
||||
"MainWindow.cpp"
|
||||
"MainWindow.h"
|
||||
"MainWindow.ui"
|
||||
"Markdown.cpp"
|
||||
"Markdown.h"
|
||||
"Messages.cpp"
|
||||
"MumbleApplication.cpp"
|
||||
"MumbleApplication.h"
|
||||
"NetworkConfig.cpp"
|
||||
"NetworkConfig.h"
|
||||
"NetworkConfig.ui"
|
||||
"OpusCodec.cpp"
|
||||
"OpusCodec.h"
|
||||
"Plugins.cpp"
|
||||
"Plugins.h"
|
||||
"Plugins.ui"
|
||||
"PTTButtonWidget.cpp"
|
||||
"PTTButtonWidget.h"
|
||||
"PTTButtonWidget.ui"
|
||||
"RichTextEditor.cpp"
|
||||
"RichTextEditor.h"
|
||||
"RichTextEditorLink.ui"
|
||||
"RichTextEditor.ui"
|
||||
"Screen.cpp"
|
||||
"Screen.h"
|
||||
"ServerHandler.cpp"
|
||||
"ServerHandler.h"
|
||||
"Settings.cpp"
|
||||
"Settings.h"
|
||||
"SharedMemory.cpp"
|
||||
"SharedMemory.h"
|
||||
"SocketRPC.cpp"
|
||||
"SocketRPC.h"
|
||||
"SvgIcon.cpp"
|
||||
"SvgIcon.h"
|
||||
"TalkingUI.cpp"
|
||||
"TalkingUI.h"
|
||||
"TextMessage.cpp"
|
||||
"TextMessage.h"
|
||||
"TextMessage.ui"
|
||||
"TextToSpeech.h"
|
||||
"ThemeInfo.cpp"
|
||||
"ThemeInfo.h"
|
||||
"Themes.cpp"
|
||||
"Themes.h"
|
||||
"Tokens.cpp"
|
||||
"Tokens.h"
|
||||
"Tokens.ui"
|
||||
"Usage.cpp"
|
||||
"Usage.h"
|
||||
"UserEdit.cpp"
|
||||
"UserEdit.h"
|
||||
"UserEdit.ui"
|
||||
"UserInformation.cpp"
|
||||
"UserInformation.h"
|
||||
"UserInformation.ui"
|
||||
"UserListModel.cpp"
|
||||
"UserListModel.h"
|
||||
"UserLocalVolumeDialog.cpp"
|
||||
"UserLocalVolumeDialog.h"
|
||||
"UserLocalVolumeDialog.ui"
|
||||
"UserModel.cpp"
|
||||
"UserModel.h"
|
||||
"UserView.cpp"
|
||||
"UserView.h"
|
||||
"VersionCheck.cpp"
|
||||
"VersionCheck.h"
|
||||
"ViewCert.cpp"
|
||||
"ViewCert.h"
|
||||
"VoiceRecorder.cpp"
|
||||
"VoiceRecorderDialog.cpp"
|
||||
"VoiceRecorderDialog.h"
|
||||
"VoiceRecorderDialog.ui"
|
||||
"VoiceRecorder.h"
|
||||
"WebFetch.cpp"
|
||||
"WebFetch.h"
|
||||
"XMLTools.cpp"
|
||||
"XMLTools.h"
|
||||
|
||||
"widgets/MUComboBox.cpp"
|
||||
"widgets/MUComboBox.h"
|
||||
|
||||
"${SHARED_SOURCE_DIR}/ACL.cpp"
|
||||
"${SHARED_SOURCE_DIR}/ACL.h"
|
||||
"${SHARED_SOURCE_DIR}/Channel.cpp"
|
||||
"${SHARED_SOURCE_DIR}/Channel.h"
|
||||
"${SHARED_SOURCE_DIR}/ChannelListener.cpp"
|
||||
"${SHARED_SOURCE_DIR}/ChannelListener.h"
|
||||
"${SHARED_SOURCE_DIR}/Connection.cpp"
|
||||
"${SHARED_SOURCE_DIR}/Connection.h"
|
||||
"${SHARED_SOURCE_DIR}/Group.cpp"
|
||||
"${SHARED_SOURCE_DIR}/Group.h"
|
||||
"${SHARED_SOURCE_DIR}/SignalCurry.h"
|
||||
|
||||
"${3RDPARTY_DIR}/smallft-src/smallft.cpp"
|
||||
|
||||
"mumble.qrc"
|
||||
"flags/mumble_flags_0.qrc"
|
||||
"${CMAKE_SOURCE_DIR}/themes/MumbleTheme.qrc"
|
||||
)
|
||||
|
||||
if(static AND WIN32)
|
||||
# On Windows, building a static client means building the main app into a DLL.
|
||||
add_library(mumble SHARED ${MUMBLE_SOURCES})
|
||||
set_target_properties(mumble PROPERTIES OUTPUT_NAME "mumble_app")
|
||||
if(MINGW)
|
||||
# Remove "lib" prefix.
|
||||
set_target_properties(mumble PROPERTIES PREFIX "")
|
||||
endif()
|
||||
|
||||
configure_file(${MUMBLE_DLL_RC} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_sources(mumble PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/${MUMBLE_DLL_RC}")
|
||||
|
||||
add_subdirectory("${SHARED_SOURCE_DIR}/mumble_exe" "${CMAKE_BINARY_DIR}/mumble_exe")
|
||||
else()
|
||||
add_executable(mumble ${MUMBLE_SOURCES})
|
||||
|
||||
if(WIN32)
|
||||
configure_file(${MUMBLE_RC} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"mumble.appcompat.manifest"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${MUMBLE_RC}"
|
||||
)
|
||||
|
||||
if(elevation)
|
||||
set_property(TARGET mumble APPEND_STRING PROPERTY LINK_FLAGS " /MANIFESTUAC:\"level=\'asInvoker\' uiAccess=\'true\'\"")
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
set_target_properties(mumble
|
||||
PROPERTIES
|
||||
OUTPUT_NAME "Mumble"
|
||||
MACOSX_BUNDLE TRUE
|
||||
RESOURCE ${MUMBLE_ICNS}
|
||||
MACOSX_BUNDLE_INFO_PLIST ${MUMBLE_PLIST}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_target_properties(mumble
|
||||
PROPERTIES
|
||||
AUTOMOC ON
|
||||
AUTORCC ON
|
||||
AUTOUIC ON
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
install(TARGETS mumble RUNTIME DESTINATION . COMPONENT mumble_client)
|
||||
else()
|
||||
if(NOT APPLE)
|
||||
install(TARGETS mumble RUNTIME DESTINATION bin COMPONENT mumble_client)
|
||||
else()
|
||||
install(TARGETS mumble BUNDLE DESTINATION . COMPONENT mumble_client)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_compile_definitions(mumble
|
||||
PRIVATE
|
||||
"MUMBLE"
|
||||
"USE_OPUS"
|
||||
)
|
||||
|
||||
target_include_directories(mumble
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR} # This is required for includes in current folder to be found by files from the shared directory.
|
||||
"widgets"
|
||||
${SHARED_SOURCE_DIR}
|
||||
"${3RDPARTY_DIR}/smallft-src"
|
||||
)
|
||||
|
||||
find_pkg("LibSndFile;sndfile" REQUIRED)
|
||||
|
||||
if(static AND TARGET sndfile-static)
|
||||
target_link_libraries(mumble PRIVATE sndfile-static)
|
||||
elseif(TARGET sndfile)
|
||||
target_link_libraries(mumble PRIVATE sndfile)
|
||||
else()
|
||||
target_link_libraries(mumble PRIVATE ${sndfile_LIBRARIES})
|
||||
endif()
|
||||
|
||||
target_link_libraries(mumble
|
||||
PRIVATE
|
||||
shared
|
||||
Qt5::Concurrent
|
||||
Qt5::Sql
|
||||
Qt5::Svg
|
||||
Qt5::Widgets
|
||||
)
|
||||
|
||||
if(static)
|
||||
if(TARGET Qt5::QSQLiteDriverPlugin)
|
||||
include_qt_plugin(mumble PRIVATE "QSQLiteDriverPlugin")
|
||||
target_link_libraries(mumble PRIVATE Qt5::QSQLiteDriverPlugin)
|
||||
endif()
|
||||
if(TARGET Qt5::QSvgIconPlugin)
|
||||
include_qt_plugin(mumble PRIVATE "QSvgIconPlugin")
|
||||
target_link_libraries(mumble PRIVATE Qt5::QSvgIconPlugin)
|
||||
endif()
|
||||
if(TARGET Qt5::QSvgPlugin)
|
||||
include_qt_plugin(mumble PRIVATE "QSvgPlugin")
|
||||
target_link_libraries(mumble PRIVATE Qt5::QSvgPlugin)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
target_compile_definitions(mumble PRIVATE "RESTRICT=")
|
||||
else()
|
||||
target_compile_definitions(mumble PRIVATE "RESTRICT=__restrict__")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_sources(mumble PRIVATE
|
||||
"GlobalShortcut_win.cpp"
|
||||
"GlobalShortcut_win.h"
|
||||
"Log_win.cpp"
|
||||
"SharedMemory_win.cpp"
|
||||
"TaskList.cpp"
|
||||
"UserLockFile_win.cpp"
|
||||
"WinGUIDs.cpp"
|
||||
"os_early_win.cpp"
|
||||
"os_win.cpp"
|
||||
|
||||
"${CMAKE_SOURCE_DIR}/overlay/ods.cpp"
|
||||
)
|
||||
|
||||
find_pkg(Boost
|
||||
COMPONENTS
|
||||
system
|
||||
thread
|
||||
REQUIRED
|
||||
)
|
||||
|
||||
if(static AND TARGET Qt5::QWindowsIntegrationPlugin)
|
||||
include_qt_plugin(mumble PRIVATE QWindowsIntegrationPlugin)
|
||||
target_link_libraries(mumble PRIVATE Qt5::QWindowsIntegrationPlugin)
|
||||
endif()
|
||||
|
||||
add_subdirectory("${3RDPARTY_DIR}/xinputcheck-build" "${CMAKE_CURRENT_BINARY_DIR}/xinputcheck")
|
||||
target_link_libraries(mumble PRIVATE xinputcheck)
|
||||
|
||||
if(MSVC)
|
||||
target_link_libraries(mumble
|
||||
PRIVATE
|
||||
Boost::dynamic_linking
|
||||
Delayimp.lib
|
||||
)
|
||||
set_property(TARGET mumble APPEND_STRING PROPERTY LINK_FLAGS " /DELAYLOAD:user32.dll /DELAYLOAD:qwave.dll")
|
||||
endif()
|
||||
|
||||
target_link_libraries(mumble
|
||||
PRIVATE
|
||||
Boost::system
|
||||
Boost::thread
|
||||
)
|
||||
|
||||
target_link_libraries(mumble
|
||||
PRIVATE
|
||||
dbghelp.lib
|
||||
dinput8.lib
|
||||
dxguid.lib
|
||||
wintrust.lib
|
||||
)
|
||||
else()
|
||||
target_sources(mumble PRIVATE "SharedMemory_unix.cpp")
|
||||
|
||||
if(NOT APPLE)
|
||||
find_pkg(X11 COMPONENTS Xext REQUIRED)
|
||||
|
||||
if(xinput2)
|
||||
find_pkg(X11 COMPONENTS Xi REQUIRED)
|
||||
target_link_libraries(mumble PRIVATE X11::Xi)
|
||||
else()
|
||||
target_compile_definitions(mumble PRIVATE "NO_XINPUT2")
|
||||
endif()
|
||||
|
||||
if(static AND TARGET Qt5::QXcbIntegrationPlugin)
|
||||
include_qt_plugin(mumble PRIVATE QXcbIntegrationPlugin)
|
||||
target_link_libraries(mumble PRIVATE Qt5::QXcbIntegrationPlugin)
|
||||
endif()
|
||||
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"GlobalShortcut_unix.cpp"
|
||||
"GlobalShortcut_unix.h"
|
||||
"Log_unix.cpp"
|
||||
"os_unix.cpp"
|
||||
)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
find_library(LIB_RT rt)
|
||||
target_link_libraries(mumble PRIVATE ${LIB_RT})
|
||||
endif()
|
||||
|
||||
target_link_libraries(mumble PRIVATE X11::Xext)
|
||||
else()
|
||||
find_library(LIB_APPKIT "AppKit")
|
||||
find_library(LIB_APPLICATIONSERVICES "ApplicationServices")
|
||||
find_library(LIB_CARBON "Carbon")
|
||||
find_library(LIB_SCRIPTINGBRIDGE "ScriptingBridge")
|
||||
find_library(LIB_SECURITY "Security")
|
||||
find_library(LIB_XAR "xar")
|
||||
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"AppNap.h"
|
||||
"AppNap.mm"
|
||||
"GlobalShortcut_macx.h"
|
||||
"GlobalShortcut_macx.mm"
|
||||
"Log_macx.mm"
|
||||
"os_macx.mm"
|
||||
)
|
||||
|
||||
if(static AND TARGET Qt5::QCocoaIntegrationPlugin)
|
||||
include_qt_plugin(mumble PRIVATE QCocoaIntegrationPlugin)
|
||||
target_link_libraries(mumble PRIVATE Qt5::QCocoaIntegrationPlugin)
|
||||
endif()
|
||||
|
||||
target_link_libraries(mumble
|
||||
PRIVATE
|
||||
${LIB_APPKIT}
|
||||
${LIB_APPLICATIONSERVICES}
|
||||
${LIB_CARBON}
|
||||
${LIB_SCRIPTINGBRIDGE}
|
||||
${LIB_SECURITY}
|
||||
${LIB_XAR}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(bundled-opus)
|
||||
option(OPUS_BUILD_SHARED_LIBRARY "" ON)
|
||||
if(MINGW)
|
||||
option(OPUS_STACK_PROTECTOR "" OFF)
|
||||
endif()
|
||||
|
||||
add_subdirectory("${3RDPARTY_DIR}/opus-src" "${CMAKE_CURRENT_BINARY_DIR}/opus")
|
||||
|
||||
add_dependencies(mumble opus)
|
||||
|
||||
target_include_directories(mumble PRIVATE "${3RDPARTY_DIR}/opus-src/include")
|
||||
|
||||
if(BUILD_TESTING)
|
||||
set_target_properties(test_opus_decode test_opus_padding PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# Shared library on Windows (e.g. ".dll")
|
||||
set_target_properties(opus PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
install(TARGETS opus RUNTIME DESTINATION . COMPONENT mumble_client)
|
||||
else()
|
||||
# Shared library on UNIX (e.g. ".so")
|
||||
set_target_properties(opus PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
install(TARGETS opus LIBRARY DESTINATION lib)
|
||||
endif()
|
||||
else()
|
||||
find_pkg(Opus CONFIG REQUIRED)
|
||||
add_dependencies(mumble PRIVATE Opus::opus)
|
||||
target_include_directories(mumble PRIVATE ${Opus_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(bundled-celt)
|
||||
add_subdirectory("${3RDPARTY_DIR}/celt-0.7.0-build" "${CMAKE_CURRENT_BINARY_DIR}/celt")
|
||||
|
||||
add_dependencies(mumble celt)
|
||||
|
||||
target_include_directories(mumble PRIVATE "${3RDPARTY_DIR}/celt-0.7.0-src/libcelt")
|
||||
|
||||
if(WIN32)
|
||||
# Shared library on Windows (e.g. ".dll")
|
||||
set_target_properties(celt PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
install(TARGETS celt RUNTIME DESTINATION . COMPONENT mumble_client)
|
||||
else()
|
||||
# Shared library on UNIX (e.g. ".so")
|
||||
set_target_properties(celt PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
install(TARGETS celt LIBRARY DESTINATION lib)
|
||||
endif()
|
||||
else()
|
||||
find_pkg(celt REQUIRED)
|
||||
add_dependencies(mumble PRIVATE ${celt_LIBRARIES})
|
||||
target_include_directories(celt PRIVATE ${celt_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if(bundled-speex)
|
||||
add_subdirectory("${3RDPARTY_DIR}/speex-build" "${CMAKE_CURRENT_BINARY_DIR}/speex")
|
||||
target_link_libraries(mumble PRIVATE speex)
|
||||
|
||||
if(WIN32)
|
||||
# Shared library on Windows (e.g. ".dll")
|
||||
set_target_properties(speex PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
install(TARGETS speex RUNTIME DESTINATION . COMPONENT mumble_client)
|
||||
endif()
|
||||
else()
|
||||
find_pkg(speex REQUIRED)
|
||||
find_pkg(speexdsp REQUIRED)
|
||||
|
||||
target_link_libraries(mumble
|
||||
PRIVATE
|
||||
${speex_LIBRARIES}
|
||||
${speexdsp_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(rnnoise)
|
||||
add_subdirectory("${3RDPARTY_DIR}/rnnoise-build" "${CMAKE_CURRENT_BINARY_DIR}/rnnoise")
|
||||
target_compile_definitions(mumble PRIVATE "USE_RNNOISE")
|
||||
target_link_libraries(mumble PRIVATE rnnoise)
|
||||
|
||||
if(WIN32)
|
||||
# Shared library on Windows (e.g. ".dll")
|
||||
set_target_properties(speex PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
install(TARGETS rnnoise RUNTIME DESTINATION . COMPONENT mumble_client)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(qtspeech)
|
||||
find_pkg(Qt5 COMPONENTS TextToSpeech REQUIRED)
|
||||
target_sources(mumble PRIVATE "TextToSpeech.cpp")
|
||||
target_link_libraries(mumble PRIVATE Qt5::TextToSpeech)
|
||||
elseif(WIN32)
|
||||
target_sources(mumble PRIVATE "TextToSpeech_win.cpp")
|
||||
if(MINGW)
|
||||
target_link_libraries(mumble PRIVATE sapi.lib)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
target_sources(mumble PRIVATE "TextToSpeech_macx.mm")
|
||||
else()
|
||||
target_sources(mumble PRIVATE "TextToSpeech_unix.cpp")
|
||||
|
||||
if(speechd)
|
||||
find_pkg("speech-dispatcher" REQUIRED)
|
||||
|
||||
target_compile_definitions(mumble
|
||||
PRIVATE
|
||||
"USE_SPEECHD"
|
||||
"USE_SPEECHD_PKGCONFIG"
|
||||
)
|
||||
target_link_libraries(mumble PRIVATE ${speech-dispatcher_LIBRARIES})
|
||||
else()
|
||||
target_compile_definitions(mumble PRIVATE "USE_NO_TTS")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(crash-report)
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"CrashReporter.cpp"
|
||||
"CrashReporter.h"
|
||||
)
|
||||
else()
|
||||
target_compile_definitions(mumble PRIVATE "NO_CRASH_REPORT")
|
||||
endif()
|
||||
|
||||
if(manual-plugin)
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"ManualPlugin.cpp"
|
||||
"ManualPlugin.h"
|
||||
"ManualPlugin.ui"
|
||||
)
|
||||
|
||||
target_compile_definitions(mumble PRIVATE "USE_MANUAL_PLUGIN")
|
||||
endif()
|
||||
|
||||
if(NOT update)
|
||||
target_compile_definitions(mumble PRIVATE "NO_UPDATE_CHECK")
|
||||
endif()
|
||||
|
||||
if(translations)
|
||||
set(ts_files
|
||||
"mumble_ar.ts"
|
||||
"mumble_be.ts"
|
||||
"mumble_bg.ts"
|
||||
"mumble_br.ts"
|
||||
"mumble_ca_ES.ts"
|
||||
"mumble_ca.ts"
|
||||
"mumble_cs.ts"
|
||||
"mumble_cy.ts"
|
||||
"mumble_da.ts"
|
||||
"mumble_de.ts"
|
||||
"mumble_el_GR.ts"
|
||||
"mumble_el.ts"
|
||||
"mumble_en_GB.ts"
|
||||
"mumble_en.ts"
|
||||
"mumble_eo.ts"
|
||||
"mumble_es.ts"
|
||||
"mumble_eu.ts"
|
||||
"mumble_fa_IR.ts"
|
||||
"mumble_fi.ts"
|
||||
"mumble_fr.ts"
|
||||
"mumble_gl.ts"
|
||||
"mumble_he.ts"
|
||||
"mumble_hi.ts"
|
||||
"mumble_hu.ts"
|
||||
"mumble_it.ts"
|
||||
"mumble_ja.ts"
|
||||
"mumble_ko.ts"
|
||||
"mumble_lt.ts"
|
||||
"mumble_nb_NO.ts"
|
||||
"mumble_nl_BE.ts"
|
||||
"mumble_nl.ts"
|
||||
"mumble_no.ts"
|
||||
"mumble_pl.ts"
|
||||
"mumble_pt_BR.ts"
|
||||
"mumble_pt_PT.ts"
|
||||
"mumble_ro.ts"
|
||||
"mumble_ru.ts"
|
||||
"mumble_sk.ts"
|
||||
"mumble_sv.ts"
|
||||
"mumble_te.ts"
|
||||
"mumble_th.ts"
|
||||
"mumble_tr.ts"
|
||||
"mumble_uk.ts"
|
||||
"mumble_vi.ts"
|
||||
"mumble_zh_CN.ts"
|
||||
"mumble_zh_HK.ts"
|
||||
"mumble_zh_TW.ts"
|
||||
)
|
||||
|
||||
create_translations_qrc(${CMAKE_CURRENT_SOURCE_DIR} "${ts_files}" "translations.qrc")
|
||||
target_sources(mumble PRIVATE "translations.qrc")
|
||||
endif()
|
||||
|
||||
if(classic-theme)
|
||||
target_sources(mumble PRIVATE "${CMAKE_SOURCE_DIR}/themes/ClassicTheme.qrc")
|
||||
endif()
|
||||
|
||||
if(overlay)
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"Overlay.cpp"
|
||||
"Overlay.h"
|
||||
"Overlay.ui"
|
||||
"OverlayClient.cpp"
|
||||
"OverlayClient.h"
|
||||
"OverlayConfig.cpp"
|
||||
"OverlayConfig.h"
|
||||
"OverlayEditor.cpp"
|
||||
"OverlayEditor.h"
|
||||
"OverlayEditor.ui"
|
||||
"OverlayEditorScene.cpp"
|
||||
"OverlayEditorScene.h"
|
||||
"OverlayPositionableItem.cpp"
|
||||
"OverlayPositionableItem.h"
|
||||
"OverlayText.cpp"
|
||||
"OverlayText.h"
|
||||
"OverlayUser.cpp"
|
||||
"OverlayUser.h"
|
||||
"OverlayUserGroup.cpp"
|
||||
"OverlayUserGroup.h"
|
||||
"PathListWidget.cpp"
|
||||
"PathListWidget.h"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"Overlay_win.cpp"
|
||||
"Overlay_win.h"
|
||||
)
|
||||
else()
|
||||
if(APPLE)
|
||||
target_sources(mumble PRIVATE "Overlay_macx.mm")
|
||||
else()
|
||||
target_sources(mumble PRIVATE "Overlay_unix.cpp")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_compile_definitions(mumble PRIVATE "USE_OVERLAY")
|
||||
endif()
|
||||
|
||||
if(xboxinput)
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"XboxInput.cpp"
|
||||
"XboxInput.h"
|
||||
)
|
||||
|
||||
target_compile_definitions(mumble PRIVATE "USE_XBOXINPUT")
|
||||
endif()
|
||||
|
||||
if(gkey)
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"GKey.cpp"
|
||||
"GKey.h"
|
||||
)
|
||||
|
||||
target_compile_definitions(mumble PRIVATE "USE_GKEY")
|
||||
endif()
|
||||
|
||||
if(g15)
|
||||
if(WIN32 OR APPLE)
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"G15LCDEngine_helper.cpp"
|
||||
"G15LCDEngine_helper.h"
|
||||
)
|
||||
else()
|
||||
find_library(LIB_G15DAEMON_CLIENT "g15daemon_client")
|
||||
if(LIB_G15DAEMON_CLIENT-NOTFOUND)
|
||||
message(FATAL_ERROR "G15 library not found!")
|
||||
endif()
|
||||
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"G15LCDEngine_unix.cpp"
|
||||
"G15LCDEngine_unix.h"
|
||||
)
|
||||
|
||||
target_compile_definitions(mumble PRIVATE "USE_G15")
|
||||
target_link_libraries(mumble PRIVATE ${LIB_G15DAEMON_CLIENT})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(bonjour)
|
||||
if(NOT APPLE)
|
||||
find_pkg(avahi-compat-libdns_sd QUIET)
|
||||
if(avahi-compat-libdns_sd_FOUND)
|
||||
target_include_directories(mumble PRIVATE ${avahi-compat-libdns_sd_INCLUDE_DIRS})
|
||||
target_link_libraries(mumble PRIVATE ${avahi-compat-libdns_sd_LIBRARIES})
|
||||
else()
|
||||
find_library(LIB_DNSSD "dnssd")
|
||||
if(${LIB_DNSSD} STREQUAL "LIB_DNSSD-NOTFOUND")
|
||||
message(FATAL_ERROR "DNS-SD library not found!")
|
||||
endif()
|
||||
target_link_libraries(mumble PRIVATE ${LIB_DNSSD})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"BonjourClient.cpp"
|
||||
"BonjourClient.h"
|
||||
|
||||
"${3RDPARTY_DIR}/qqbonjour-src/BonjourRecord.h"
|
||||
"${3RDPARTY_DIR}/qqbonjour-src/BonjourServiceBrowser.cpp"
|
||||
"${3RDPARTY_DIR}/qqbonjour-src/BonjourServiceBrowser.h"
|
||||
"${3RDPARTY_DIR}/qqbonjour-src/BonjourServiceResolver.cpp"
|
||||
"${3RDPARTY_DIR}/qqbonjour-src/BonjourServiceResolver.h"
|
||||
)
|
||||
|
||||
target_compile_definitions(mumble PRIVATE "USE_BONJOUR")
|
||||
target_include_directories(mumble PRIVATE "${3RDPARTY_DIR}/qqbonjour-src")
|
||||
endif()
|
||||
|
||||
if(alsa)
|
||||
find_pkg(ALSA REQUIRED)
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"ALSAAudio.cpp"
|
||||
"ALSAAudio.h"
|
||||
)
|
||||
|
||||
target_compile_definitions(mumble PRIVATE "USE_ALSA")
|
||||
target_link_libraries(mumble PRIVATE ALSA::ALSA)
|
||||
endif()
|
||||
|
||||
if(asio)
|
||||
if(NOT ASIO_DIR)
|
||||
set(ASIO_DIR "${3RDPARTY_DIR}/asio")
|
||||
endif()
|
||||
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"ASIOInput.cpp"
|
||||
"ASIOInput.h"
|
||||
"ASIOInput.ui"
|
||||
)
|
||||
|
||||
target_compile_definitions(mumble PRIVATE "USE_ASIO")
|
||||
target_include_directories(mumble
|
||||
PRIVATE SYSTEM
|
||||
"${ASIO_DIR}/common"
|
||||
"${ASIO_DIR}/host"
|
||||
"${ASIO_DIR}/host/pc"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(coreaudio)
|
||||
find_library(LIB_AUDIOUNIT "AudioUnit")
|
||||
find_library(LIB_COREAUDIO "CoreAudio")
|
||||
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"CoreAudio.cpp"
|
||||
"CoreAudio.h"
|
||||
)
|
||||
|
||||
target_link_libraries(mumble
|
||||
PRIVATE
|
||||
${LIB_AUDIOUNIT}
|
||||
${LIB_COREAUDIO}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(jackaudio)
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"JackAudio.cpp"
|
||||
"JackAudio.h"
|
||||
)
|
||||
|
||||
target_compile_definitions(mumble PRIVATE "USE_JACKAUDIO")
|
||||
target_include_directories(mumble PRIVATE SYSTEM "${3RDPARTY_DIR}/jack-src")
|
||||
endif()
|
||||
|
||||
if(oss)
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"OSS.cpp"
|
||||
"OSS.h"
|
||||
)
|
||||
|
||||
target_compile_definitions(mumble PRIVATE "USE_OSS")
|
||||
target_include_directories(mumble PRIVATE SYSTEM "/usr/lib/oss/include")
|
||||
endif()
|
||||
|
||||
if(portaudio)
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"PAAudio.cpp"
|
||||
"PAAudio.h"
|
||||
)
|
||||
|
||||
target_compile_definitions(mumble PRIVATE "USE_PORTAUDIO")
|
||||
target_include_directories(mumble PRIVATE SYSTEM "${3RDPARTY_DIR}/portaudio-src")
|
||||
endif()
|
||||
|
||||
if(pulseaudio)
|
||||
find_pkg("libpulse" REQUIRED)
|
||||
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"PulseAudio.cpp"
|
||||
"PulseAudio.h"
|
||||
)
|
||||
|
||||
target_compile_definitions(mumble PRIVATE "USE_PULSEAUDIO")
|
||||
target_link_libraries(mumble PRIVATE ${libpulse_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(wasapi)
|
||||
target_sources(mumble
|
||||
PRIVATE
|
||||
"WASAPI.cpp"
|
||||
"WASAPI.h"
|
||||
"WASAPINotificationClient.cpp"
|
||||
"WASAPINotificationClient.h"
|
||||
)
|
||||
|
||||
target_compile_definitions(mumble PRIVATE "USE_WASAPI")
|
||||
target_link_libraries(mumble PRIVATE avrt.lib)
|
||||
if(MINGW)
|
||||
target_link_libraries(mumble PRIVATE ksuser.lib)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set_property(TARGET mumble APPEND_STRING PROPERTY LINK_FLAGS " /DELAYLOAD:avrt.dll")
|
||||
endif()
|
||||
endif()
|
||||
@ -9,7 +9,8 @@
|
||||
#include "AudioInput.h"
|
||||
#include "AudioOutput.h"
|
||||
|
||||
#include <QLibrary>
|
||||
#include <QtCore/QLibrary>
|
||||
#include <QtCore/QWaitCondition>
|
||||
|
||||
#include <portaudio.h>
|
||||
|
||||
|
||||
@ -6,6 +6,14 @@
|
||||
#include "WASAPI.h"
|
||||
#include "WASAPINotificationClient.h"
|
||||
|
||||
#ifdef __MINGW32__
|
||||
// Fix a redefinition issue in protobuf's "strutil.h" include file:
|
||||
// "redefinition of 'std::__cxx11::string google::protobuf::StrCat_instead_use_StringCbCat_or_StringCchCat'"
|
||||
# ifdef StrCat
|
||||
# undef StrCat
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "MainWindow.h"
|
||||
#include "Utils.h"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user