From 3a919628b3a8875dc46f96348b2303ff4949a903 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Thu, 18 Feb 2016 21:28:38 -0300 Subject: [PATCH 1/6] Include some reference XDG files Include a .desktop file (for app menu in xdg-complaint desktops), and tg.protocol (for having xdg-complaint apps pick up the tg: protocol). Signed-off-by: Hugo Osvaldo Barrera (github: hobarrera) --- lib/xdg/telegramdesktop.desktop | 12 ++++++++++++ lib/xdg/tg.protocol | 11 +++++++++++ 2 files changed, 23 insertions(+) create mode 100644 lib/xdg/telegramdesktop.desktop create mode 100644 lib/xdg/tg.protocol diff --git a/lib/xdg/telegramdesktop.desktop b/lib/xdg/telegramdesktop.desktop new file mode 100644 index 0000000000..2151d0ad45 --- /dev/null +++ b/lib/xdg/telegramdesktop.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=Telegram Desktop +Comment=Official desktop version of Telegram messaging app +Exec=/usr/bin/telegram-desktop -- %u +Icon=telegram-desktop +Terminal=false +StartupWMClass=Telegram +Type=Application +Categories=Network; +MimeType=application/x-xdg-protocol-tg;x-scheme-handler/tg; diff --git a/lib/xdg/tg.protocol b/lib/xdg/tg.protocol new file mode 100644 index 0000000000..a4b083acb1 --- /dev/null +++ b/lib/xdg/tg.protocol @@ -0,0 +1,11 @@ +[Protocol] +exec=/usr/bin/telegram-desktop -- %u +protocol=tg +input=none +output=none +helper=true +listing=false +reading=false +writing=false +makedir=false +deleting=false From 580306d090c84dc5f1042b2947f7b7f7dd6955ce Mon Sep 17 00:00:00 2001 From: Christoph Auer Date: Thu, 17 Mar 2016 20:46:09 +0100 Subject: [PATCH 2/6] Fix path in doc/building-xcode.md Closes #1794 Signed-off-by: Christoph Auer --- doc/building-xcode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/building-xcode.md b/doc/building-xcode.md index e520697818..a88516bc02 100644 --- a/doc/building-xcode.md +++ b/doc/building-xcode.md @@ -235,7 +235,7 @@ In Terminal go to **/Users/user/TBuild/Libraries** and run: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git cd gyp ./setup.py build - sudo setup.py install + sudo ./setup.py install cd .. #####Build crashpad From 729a024ddf2330bbe5b5587848467c64d7f0542a Mon Sep 17 00:00:00 2001 From: Christoph Auer Date: Wed, 24 Feb 2016 22:10:28 +0100 Subject: [PATCH 3/6] Add Travis CI files Signed-off-by: Christoph Auer --- .travis.yml | 42 +++++++ .travis/arch.sh | 296 +++++++++++++++++++++++++++++++++++++++++++++++ .travis/build.sh | 191 ++++++++++++++++++++++++++++++ 3 files changed, 529 insertions(+) create mode 100644 .travis.yml create mode 100755 .travis/arch.sh create mode 100755 .travis/build.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..11a9c3adbd --- /dev/null +++ b/.travis.yml @@ -0,0 +1,42 @@ +sudo: required + +language: cpp + +env: + - BUILD_VERSION="" + - BUILD_VERSION="no_autoupdate" + - BUILD_VERSION="no_custom_scheme" + - BUILD_VERSION="no_autoupdate+no_custom_scheme" + +arch: + packages: + - bzr + - wget + - qt5-base + + - git + - patch + - libunity + - libappindicator-gtk2 + + - ffmpeg + - icu + - jasper + - libexif + - libmng + - libwebp + - libxkbcommon-x11 + - libinput + - libproxy + - mtdev + - openal + - libva + - desktop-file-utils + - gtk-update-icon-cache + + script: + - libtool --finish /usr/lib + - .travis/build.sh + +script: + - .travis/arch.sh \ No newline at end of file diff --git a/.travis/arch.sh b/.travis/arch.sh new file mode 100755 index 0000000000..fbe132bbd9 --- /dev/null +++ b/.travis/arch.sh @@ -0,0 +1,296 @@ +#!/bin/bash +# Copyright (C) 2016 Mikkel Oscar Lyderik Larsen +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Source: https://raw.githubusercontent.com/mikkeloscar/arch-travis/master/arch-travis.sh + +# Script for setting up and running a travis-ci build in an up to date +# Arch Linux chroot + +ARCH_TRAVIS_MIRROR=${ARCH_TRAVIS_MIRROR:-"https://lug.mtu.edu/archlinux"} +ARCH_TRAVIS_ARCH_ISO=${ARCH_TRAVIS_ARCH_ISO:-"$(date +%Y.%m).01"} +mirror_entry='Server = '$ARCH_TRAVIS_MIRROR'/\$repo/os/\$arch' +archive="archlinux-bootstrap-$ARCH_TRAVIS_ARCH_ISO-x86_64.tar.gz" +default_root="root.x86_64" +ARCH_TRAVIS_CHROOT=${ARCH_TRAVIS_CHROOT:-"$default_root"} +user="travis" +user_home="/home/$user" +user_build_dir="/build" +user_uid=$UID + +if [ -n "$CC" ]; then + # store travis CC + TRAVIS_CC=$CC + # reset to gcc for building arch packages + CC=gcc +fi + + +# default packages +default_packages=("base-devel" "git") + +# pacman.conf repository line +repo_line=70 + +# setup working Arch Linux chroot +setup_chroot() { + arch_msg "Setting up Arch chroot" + + if [ ! -f $archive ]; then + # get root fs + local curl=$(curl --fail -O "$ARCH_TRAVIS_MIRROR/iso/$ARCH_TRAVIS_ARCH_ISO/$archive" 2>&1) + + # if it fails, try arch iso form the previous month + if [ $? -gt 0 ]; then + ARCH_TRAVIS_ARCH_ISO="$(date +%Y.%m -d "-1 month").01" + archive="archlinux-bootstrap-$ARCH_TRAVIS_ARCH_ISO-x86_64.tar.gz" + as_normal "curl -O $ARCH_TRAVIS_MIRROR/iso/$ARCH_TRAVIS_ARCH_ISO/$archive" + fi + fi + + # extract root fs + as_root "tar xf $archive" + + # remove archive if ARCH_TRAVIS_CLEAN_CHROOT is set + if [ -n "$ARCH_TRAVIS_CLEAN_CHROOT" ]; then + as_root "rm $archive" + fi + + if [ "$ARCH_TRAVIS_CHROOT" != "$default_root" ]; then + as_root "mv $default_root $ARCH_TRAVIS_CHROOT" + fi + + # don't care for signed packages + as_root "sed -i 's|SigLevel = Required DatabaseOptional|SigLevel = Never|' $ARCH_TRAVIS_CHROOT/etc/pacman.conf" + + # enable multilib + as_root "sed -i 's|#\[multilib\]|\[multilib\]\nInclude = /etc/pacman.d/mirrorlist|' $ARCH_TRAVIS_CHROOT/etc/pacman.conf" + + # add mirror + as_root "echo $mirror_entry >> $ARCH_TRAVIS_CHROOT/etc/pacman.d/mirrorlist" + + # add nameserver to resolv.conf + as_root "echo nameserver 8.8.8.8 >> $ARCH_TRAVIS_CHROOT/etc/resolv.conf" + + sudo mount $ARCH_TRAVIS_CHROOT $ARCH_TRAVIS_CHROOT --bind + sudo mount --bind /proc $ARCH_TRAVIS_CHROOT/proc + sudo mount --bind /sys $ARCH_TRAVIS_CHROOT/sys + sudo mount --bind /dev $ARCH_TRAVIS_CHROOT/dev + sudo mount --bind /dev/pts $ARCH_TRAVIS_CHROOT/dev/pts + sudo mount --bind /dev/shm $ARCH_TRAVIS_CHROOT/dev/shm + sudo mount --bind /run $ARCH_TRAVIS_CHROOT/run + + # update packages + chroot_as_root "pacman -Syy" + chroot_as_root "pacman -Syu ${default_packages[*]} --noconfirm" + + # use LANG=en_US.UTF-8 as expected in travis environments + as_root "sed -i 's|#en_US.UTF-8|en_US.UTF-8|' $ARCH_TRAVIS_CHROOT/etc/locale.gen" + chroot_as_root "locale-gen" + + # setup non-root user + chroot_as_root "useradd -u $user_uid -m -s /bin/bash $user" + + # disable password for sudo users + as_root "echo \"$user ALL=(ALL) NOPASSWD: ALL\" >> $ARCH_TRAVIS_CHROOT/etc/sudoers.d/$user" + + # Add build dir + chroot_as_root "mkdir $user_build_dir && chown $user $user_build_dir" + + # bind $TRAVIS_BUILD_DIR to chroot build dir + sudo mount --bind $TRAVIS_BUILD_DIR $ARCH_TRAVIS_CHROOT$user_build_dir + + # add custom repos + add_repositories + + # setup pacaur for AUR packages + setup_pacaur +} + +# add custom repositories to pacman.conf +add_repositories() { + if [ ${#CONFIG_REPOS[@]} -gt 0 ]; then + for r in "${CONFIG_REPOS[@]}"; do + local splitarr=(${r//=/ }) + ((repo_line+=1)) + as_root "sed -i '${repo_line}i[${splitarr[0]}]' $ARCH_TRAVIS_CHROOT/etc/pacman.conf" + ((repo_line+=1)) + as_root "sed -i '${repo_line}iServer = ${splitarr[1]}\n' $ARCH_TRAVIS_CHROOT/etc/pacman.conf" + ((repo_line+=1)) + done + + # update repos + chroot_as_root "pacman -Syy" + fi +} + +# a wrapper which can be used to eventually add fakeroot support. +sudo_wrapper() { + sudo "$@" +} + +# run command as normal user +as_normal() { + local str="$@" + run /bin/bash -c "$str" +} + +# run command as root +as_root() { + local str="$@" + run sudo_wrapper /bin/bash -c "$str" +} + +# run command in chroot as root +chroot_as_root() { + local str="$@" + run sudo_wrapper chroot $ARCH_TRAVIS_CHROOT /bin/bash -c "$str" +} + +# run command in chroot as normal user +chroot_as_normal() { + local str="$@" + run sudo_wrapper chroot --userspec=$user:$user $ARCH_TRAVIS_CHROOT /bin/bash \ + -c "export HOME=$user_home USER=$user TRAVIS_BUILD_DIR=$user_build_dir && cd $user_build_dir && $str" +} + +# run command +run() { + "$@" + local ret=$? + + if [ $ret -gt 0 ]; then + takedown_chroot + exit $ret + fi +} + +# run build script +run_build_script() { + local cmd="$@" + echo "$ $cmd" + sudo_wrapper chroot --userspec=$user:$user $ARCH_TRAVIS_CHROOT /bin/bash -c "export HOME=$user_home USER=$user TRAVIS_BUILD_DIR=$user_build_dir && cd $user_build_dir && $cmd" + local ret=$? + + if [ $ret -gt 0 ]; then + takedown_chroot + exit $ret + fi +} + +# setup pacaur +setup_pacaur() { + local cowerarchive="cower.tar.gz" + local aururl="https://aur.archlinux.org/cgit/aur.git/snapshot/" + # install cower + as_normal "curl -O $aururl/$cowerarchive" + as_normal "tar xf $cowerarchive" + chroot_as_normal "cd cower && makepkg -is --skippgpcheck --noconfirm" + as_root "rm -r cower" + as_normal "rm $cowerarchive" + # install pacaur + chroot_as_normal "cower -dd pacaur" + chroot_as_normal "cd pacaur && makepkg -is --noconfirm" + chroot_as_normal "rm -rf pacaur" +} + +# install package through pacaur +_pacaur() { + local pacaur="pacaur -S $@ --noconfirm --noedit" + chroot_as_normal "$pacaur" +} + +# takedown chroot +# unmounts anything mounted in the chroot setup +takedown_chroot() { + sudo umount $ARCH_TRAVIS_CHROOT/{run,dev/shm,dev/pts,dev,sys,proc} + sudo umount $ARCH_TRAVIS_CHROOT$user_build_dir + sudo umount $ARCH_TRAVIS_CHROOT + + if [ -n "$ARCH_TRAVIS_CLEAN_CHROOT" ]; then + as_root "rm -rf $ARCH_TRAVIS_CHROOT" + fi +} + +# read value from .travis.yml +travis_yml() { + ruby -ryaml -e 'puts ARGV[1..-1].inject(YAML.load(File.read(ARGV[0]))) {|acc, key| acc[key] }' .travis.yml $@ +} + +read_config() { + old_ifs=$IFS + IFS=$'\n' + CONFIG_BUILD_SCRIPTS=($(travis_yml arch script)) + CONFIG_PACKAGES=($(travis_yml arch packages)) + CONFIG_REPOS=($(travis_yml arch repos)) + IFS=$old_ifs +} + +# run build scripts defined in .travis.yml +build_scripts() { + if [ ${#CONFIG_BUILD_SCRIPTS[@]} -gt 0 ]; then + for script in "${CONFIG_BUILD_SCRIPTS[@]}"; do + run_build_script $script + done + else + echo "No build scripts defined" + takedown_chroot + exit 1 + fi +} + +# install packages defined in .travis.yml +install_packages() { + for package in "${CONFIG_PACKAGES[@]}"; do + _pacaur $package + done +} + +# install custom compiler if CC != gcc +install_c_compiler() { + if [ "$TRAVIS_CC" != "gcc" ]; then + _pacaur "$TRAVIS_CC" + fi +} + +arch_msg() { + lightblue='\033[1;34m' + reset='\e[0m' + echo -e "${lightblue}$@${reset}" +} + +# read .travis.yml +read_config + +echo "travis_fold:start:arch_travis" +setup_chroot + +install_packages + +if [ -n "$CC" ]; then + install_c_compiler + + # restore CC + CC=$TRAVIS_CC +fi +echo "travis_fold:end:arch_travis" +echo "" + +arch_msg "Running travis build" +build_scripts + +takedown_chroot + +# vim:set ts=2 sw=2 et: diff --git a/.travis/build.sh b/.travis/build.sh new file mode 100755 index 0000000000..62635d9701 --- /dev/null +++ b/.travis/build.sh @@ -0,0 +1,191 @@ +#!/bin/bash +# Installs libs and compiles tdesktop + +run() { + info_msg "Build version: ${BUILD_VERSION}" + + downloadLibs + prepare + build + check +} + +# set colors +RCol='\e[0m' # Text Reset + +# Regular Bold Underline High Intensity BoldHigh Intens Background High Intensity Backgrounds +Bla='\e[0;30m'; BBla='\e[1;30m'; UBla='\e[4;30m'; IBla='\e[0;90m'; BIBla='\e[1;90m'; On_Bla='\e[40m'; On_IBla='\e[0;100m'; +Red='\e[0;31m'; BRed='\e[1;31m'; URed='\e[4;31m'; IRed='\e[0;91m'; BIRed='\e[1;91m'; On_Red='\e[41m'; On_IRed='\e[0;101m'; +Gre='\e[0;32m'; BGre='\e[1;32m'; UGre='\e[4;32m'; IGre='\e[0;92m'; BIGre='\e[1;92m'; On_Gre='\e[42m'; On_IGre='\e[0;102m'; +Yel='\e[0;33m'; BYel='\e[1;33m'; UYel='\e[4;33m'; IYel='\e[0;93m'; BIYel='\e[1;93m'; On_Yel='\e[43m'; On_IYel='\e[0;103m'; +Blu='\e[0;34m'; BBlu='\e[1;34m'; UBlu='\e[4;34m'; IBlu='\e[0;94m'; BIBlu='\e[1;94m'; On_Blu='\e[44m'; On_IBlu='\e[0;104m'; +Pur='\e[0;35m'; BPur='\e[1;35m'; UPur='\e[4;35m'; IPur='\e[0;95m'; BIPur='\e[1;95m'; On_Pur='\e[45m'; On_IPur='\e[0;105m'; +Cya='\e[0;36m'; BCya='\e[1;36m'; UCya='\e[4;36m'; ICya='\e[0;96m'; BICya='\e[1;96m'; On_Cya='\e[46m'; On_ICya='\e[0;106m'; +Whi='\e[0;37m'; BWhi='\e[1;37m'; UWhi='\e[4;37m'; IWhi='\e[0;97m'; BIWhi='\e[1;97m'; On_Whi='\e[47m'; On_IWhi='\e[0;107m'; + +# Set variables +_qtver=5.5.1 +srcdir=${PWD} + +downloadLibs() { + travis_fold_start "download_libs" + # Move telegram project to subfolder + mkdir tdesktop + mv -f Telegram tdesktop + + # Download libraries + info_msg "QT-Version: ${_qtver}, SRC-Dir: ${srcdir}" + + echo -e "\nDownload and extract qt" + qt_file=qt-everywhere-opensource-src-$_qtver.tar.xz + echo -e "QT-File: ${qt_file}" + + wget "http://download.qt.io/official_releases/qt/${_qtver%.*}/$_qtver/single/$qt_file" + tar xf $qt_file + rm $qt_file + + echo -e "Clone Breakpad" + git clone https://chromium.googlesource.com/breakpad/breakpad breakpad + + echo -e "\nClone Linux Syscall Support" + git clone https://chromium.googlesource.com/linux-syscall-support breakpad-lss + + echo -e "\nLets view the folder content" + ls + travis_fold_end "download_libs" +} + +prepare() { + travis_fold_start "prepare" + start_msg "Preparing the libraries..." + + cd "$srcdir/tdesktop" + + mkdir -p "$srcdir/Libraries" + + local qt_patch_file="$srcdir/tdesktop/Telegram/_qtbase_${_qtver//./_}_patch.diff" + if [ "$qt_patch_file" -nt "$srcdir/Libraries/QtStatic" ]; then + rm -rf "$srcdir/Libraries/QtStatic" + mv "$srcdir/qt-everywhere-opensource-src-$_qtver" "$srcdir/Libraries/QtStatic" + cd "$srcdir/Libraries/QtStatic/qtbase" + patch -p1 -i "$qt_patch_file" + fi + + if [ ! -h "$srcdir/Libraries/breakpad" ]; then + ln -s "$srcdir/breakpad" "$srcdir/Libraries/breakpad" + ln -s "$srcdir/breakpad-lss" "$srcdir/Libraries/breakpad/src/third_party/lss" + fi + + sed -i 's/CUSTOM_API_ID//g' "$srcdir/tdesktop/Telegram/Telegram.pro" + sed -i 's,LIBS += /usr/local/lib/libxkbcommon.a,,g' "$srcdir/tdesktop/Telegram/Telegram.pro" + sed -i 's,LIBS += /usr/local/lib/libz.a,LIBS += -lz,g' "$srcdir/tdesktop/Telegram/Telegram.pro" + + local options="" + + if [[ $BUILD_VERSION == *"no_autoupdate"* ]]; then + options+="\nDEFINES += TDESKTOP_DISABLE_AUTOUPDATE" + fi + + if [[ $BUILD_VERSION == *"no_custom_scheme"* ]]; then + options+="\nDEFINES += TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME" + fi + + options+='\nINCLUDEPATH += "/usr/lib/glib-2.0/include"' + options+='\nINCLUDEPATH += "/usr/lib/gtk-2.0/include"' + options+='\nINCLUDEPATH += "/usr/include/opus"' + options+='\nLIBS += -lcrypto -lssl' + + info_msg "Build options: ${options}" + + echo -e "${options}" >> "$srcdir/tdesktop/Telegram/Telegram.pro" + + success_msg "Prepare done! :)" + travis_fold_end "prepare" +} + +build() { + start_msg "Building the projects..." + + info_msg "Build patched Qt" + # Build patched Qt + cd "$srcdir/Libraries/QtStatic" + ./configure -prefix "$srcdir/qt" -release -opensource -confirm-license -qt-zlib \ + -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb \ + -qt-xkbcommon-x11 -no-opengl -static -nomake examples -nomake tests + make --silent module-qtbase module-qtimageformats + make --silent module-qtbase-install_subtargets module-qtimageformats-install_subtargets + + export PATH="$srcdir/qt/bin:$PATH" + + info_msg "Build breakpad" + # Build breakpad + cd "$srcdir/Libraries/breakpad" + ./configure + make --silent + + info_msg "Build MetaStyle" + # Build MetaStyle + mkdir -p "$srcdir/tdesktop/Linux/DebugIntermediateStyle" + cd "$srcdir/tdesktop/Linux/DebugIntermediateStyle" + qmake CONFIG+=debug "../../Telegram/MetaStyle.pro" + make --silent + + info_msg "Build MetaLang" + # Build MetaLang + mkdir -p "$srcdir/tdesktop/Linux/DebugIntermediateLang" + cd "$srcdir/tdesktop/Linux/DebugIntermediateLang" + qmake CONFIG+=debug "../../Telegram/MetaLang.pro" + make --silent + + info_msg "Build Telegram Desktop" + # Build Telegram Desktop + mkdir -p "$srcdir/tdesktop/Linux/ReleaseIntermediate" + cd "$srcdir/tdesktop/Linux/ReleaseIntermediate" + + qmake CONFIG+=release "../../Telegram/Telegram.pro" + local pattern="^PRE_TARGETDEPS +=" + grep "$pattern" "$srcdir/tdesktop/Telegram/Telegram.pro" | sed "s/$pattern//g" | xargs make + + qmake CONFIG+=release "../../Telegram/Telegram.pro" + make +} + +check() { + local filePath="$srcdir/tdesktop/Linux/Release/Telegram" + if test -f "$filePath"; then + success_msg "Build successful done! :)" + + local size; + size=$(stat -c %s "$filePath") + success_msg "File size of ${filePath}: ${size} Bytes" + else + error_msg "Build error, output file does not exist" + exit 1 + fi +} + +start_msg() { + echo -e "\n${Gre}$*${RCol}" +} + +info_msg() { + echo -e "\n${Cya}$*${RCol}" +} + +error_msg() { + echo -e "\n${BRed}$*${RCol}" +} + +success_msg() { + echo -e "\n${BGre}$*${RCol}" +} + +travis_fold_start() { + echo "travis_fold:start:$*" +} + +travis_fold_end() { + echo "travis_fold:end:$*" +} + +run From 6e441312cb4755f3763174799b8f77ab107c87c6 Mon Sep 17 00:00:00 2001 From: Christoph Auer Date: Thu, 17 Mar 2016 22:21:46 +0100 Subject: [PATCH 4/6] Remove duplicated information Signed-off-by: Christoph Auer --- doc/building-xcode.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/building-xcode.md b/doc/building-xcode.md index a88516bc02..c638310682 100644 --- a/doc/building-xcode.md +++ b/doc/building-xcode.md @@ -90,10 +90,6 @@ In Terminal go to **/Users/user/TBuild/Libraries/xz-5.0.5** and there run: make sudo make install -####zlib 1.2.8 - -Using the system lib - ####libexif 0.6.20 #####Get the source code From 8cc7e86793ece8f423c87b69430fea09828e22b2 Mon Sep 17 00:00:00 2001 From: Christoph Date: Fri, 18 Mar 2016 21:06:16 +0100 Subject: [PATCH 5/6] Add build status badge to readme Signed-off-by: Christoph Auer --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4f9b406f71..f4edaa4795 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ This is the complete source code and the build instructions for the alpha version of the official desktop client for the [Telegram][telegram] messenger, based on the [Telegram API][telegram_api] and the [MTProto][telegram_proto] secure protocol. +[![Build Status](https://travis-ci.org/telegramdesktop/tdesktop.svg?branch=master)](https://travis-ci.org/telegramdesktop/tdesktop) + The source code is published under GPLv3 with OpenSSL exception, the license is available [here][license]. ## Supported systems From f227740e93faaa0182f21c3a6c8def6084a86f97 Mon Sep 17 00:00:00 2001 From: Christoph Auer Date: Thu, 24 Mar 2016 23:56:21 +0100 Subject: [PATCH 6/6] Add new macros to travis Signed-off-by: Christoph Auer --- .travis.yml | 7 ++++--- .travis/build.sh | 12 ++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 11a9c3adbd..612e30f7ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,10 @@ language: cpp env: - BUILD_VERSION="" - - BUILD_VERSION="no_autoupdate" - - BUILD_VERSION="no_custom_scheme" - - BUILD_VERSION="no_autoupdate+no_custom_scheme" + - BUILD_VERSION="disable_autoupdate" + - BUILD_VERSION="disable_register_custom_scheme" + - BUILD_VERSION="disable_crash_reports" + - BUILD_VERSION="disable_network_proxy" arch: packages: diff --git a/.travis/build.sh b/.travis/build.sh index 62635d9701..ebbaeffc4a 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -82,14 +82,22 @@ prepare() { local options="" - if [[ $BUILD_VERSION == *"no_autoupdate"* ]]; then + if [[ $BUILD_VERSION == *"disable_autoupdate"* ]]; then options+="\nDEFINES += TDESKTOP_DISABLE_AUTOUPDATE" fi - if [[ $BUILD_VERSION == *"no_custom_scheme"* ]]; then + if [[ $BUILD_VERSION == *"disable_register_custom_scheme"* ]]; then options+="\nDEFINES += TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME" fi + if [[ $BUILD_VERSION == *"disable_crash_reports"* ]]; then + options+="\nDEFINES += TDESKTOP_DISABLE_CRASH_REPORTS" + fi + + if [[ $BUILD_VERSION == *"disable_network_proxy"* ]]; then + options+="\nDEFINES += TDESKTOP_DISABLE_NETWORK_PROXY" + fi + options+='\nINCLUDEPATH += "/usr/lib/glib-2.0/include"' options+='\nINCLUDEPATH += "/usr/lib/gtk-2.0/include"' options+='\nINCLUDEPATH += "/usr/include/opus"'