mirror of
https://github.com/vale981/tdesktop
synced 2025-03-04 17:21:40 -05:00
Implement AppVeyor (#3025)
Also implement build defines for Windows Set TELEGRAM_BUILD_DEFINES before calling gyp/refresh.bat Fix #3000 Signed-off-by: Christoph <auer.chrisi@gmx.net>
This commit is contained in:
parent
843089733b
commit
ef535ca026
8 changed files with 122 additions and 5 deletions
77
.appveyor/install.bat
Normal file
77
.appveyor/install.bat
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
@echo off
|
||||||
|
|
||||||
|
SET BUILD_DIR=C:\TBuild
|
||||||
|
set LIB_DIR=%BUILD_DIR%\Libraries
|
||||||
|
set SRC_DIR=%BUILD_DIR%\tdesktop
|
||||||
|
SET QT_VERSION=5_6_2
|
||||||
|
|
||||||
|
cd %BUILD_DIR%
|
||||||
|
|
||||||
|
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
|
||||||
|
|
||||||
|
call:configureBuild
|
||||||
|
call:getDependencies
|
||||||
|
call:setupGYP
|
||||||
|
cd %SRC_DIR%
|
||||||
|
|
||||||
|
echo Finished!
|
||||||
|
|
||||||
|
GOTO:EOF
|
||||||
|
|
||||||
|
:: FUNCTIONS
|
||||||
|
:logInfo
|
||||||
|
echo [INFO] %~1
|
||||||
|
GOTO:EOF
|
||||||
|
|
||||||
|
:getDependencies
|
||||||
|
call:logInfo "Clone dependencies repository"
|
||||||
|
git clone -q --branch=master https://github.com/telegramdesktop/dependencies_windows.git %LIB_DIR%
|
||||||
|
cd %LIB_DIR%
|
||||||
|
|
||||||
|
call prepare.bat
|
||||||
|
GOTO:EOF
|
||||||
|
|
||||||
|
:setupGYP
|
||||||
|
call:logInfo "Setup GYP/Ninja and generate VS solution"
|
||||||
|
cd %LIB_DIR%
|
||||||
|
git clone https://chromium.googlesource.com/external/gyp
|
||||||
|
SET PATH=%PATH%;C:\TBuild\Libraries\gyp;C:\TBuild\Libraries\ninja;
|
||||||
|
cd %SRC_DIR%\Telegram
|
||||||
|
call gyp\refresh.bat
|
||||||
|
GOTO:EOF
|
||||||
|
|
||||||
|
:configureBuild
|
||||||
|
call:logInfo "Configuring build"
|
||||||
|
call:logInfo "Build version: %BUILD_VERSION%"
|
||||||
|
set TELEGRAM_BUILD_DEFINES=
|
||||||
|
|
||||||
|
echo %BUILD_VERSION% | findstr /C:"disable_autoupdate">nul && (
|
||||||
|
set TELEGRAM_BUILD_DEFINES=%TELEGRAM_BUILD_DEFINES%,TDESKTOP_DISABLE_AUTOUPDATE
|
||||||
|
)
|
||||||
|
|
||||||
|
echo %BUILD_VERSION% | findstr /C:"disable_register_custom_scheme">nul && (
|
||||||
|
set TELEGRAM_BUILD_DEFINES=%TELEGRAM_BUILD_DEFINES%,TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME
|
||||||
|
)
|
||||||
|
|
||||||
|
echo %BUILD_VERSION% | findstr /C:"disable_crash_reports">nul && (
|
||||||
|
set TELEGRAM_BUILD_DEFINES=%TELEGRAM_BUILD_DEFINES%,TDESKTOP_DISABLE_CRASH_REPORTS
|
||||||
|
)
|
||||||
|
|
||||||
|
echo %BUILD_VERSION% | findstr /C:"disable_network_proxy">nul && (
|
||||||
|
set TELEGRAM_BUILD_DEFINES=%TELEGRAM_BUILD_DEFINES%,TDESKTOP_DISABLE_NETWORK_PROXY
|
||||||
|
)
|
||||||
|
|
||||||
|
echo %BUILD_VERSION% | findstr /C:"disable_desktop_file_generation">nul && (
|
||||||
|
set TELEGRAM_BUILD_DEFINES=%TELEGRAM_BUILD_DEFINES%,TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION
|
||||||
|
)
|
||||||
|
|
||||||
|
echo %BUILD_VERSION% | findstr /C:"disable_unity_integration">nul && (
|
||||||
|
set TELEGRAM_BUILD_DEFINES=%TELEGRAM_BUILD_DEFINES%,TDESKTOP_DISABLE_UNITY_INTEGRATION
|
||||||
|
)
|
||||||
|
|
||||||
|
if not "%TELEGRAM_BUILD_DEFINES%" == "" (
|
||||||
|
set "TELEGRAM_BUILD_DEFINES=%TELEGRAM_BUILD_DEFINES:~1%"
|
||||||
|
)
|
||||||
|
|
||||||
|
call:logInfo "Build Defines: %TELEGRAM_BUILD_DEFINES%"
|
||||||
|
GOTO:EOF
|
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -3,3 +3,4 @@
|
||||||
|
|
||||||
# Ensure diffs have LF endings
|
# Ensure diffs have LF endings
|
||||||
*.diff text eol=lf
|
*.diff text eol=lf
|
||||||
|
*.bat text eol=crlf
|
||||||
|
|
|
@ -593,7 +593,7 @@ buildTelegram() {
|
||||||
|
|
||||||
cd "$UPSTREAM/Telegram/gyp"
|
cd "$UPSTREAM/Telegram/gyp"
|
||||||
"$GYP_PATH/gyp" \
|
"$GYP_PATH/gyp" \
|
||||||
-Dtravis_defines=${GYP_DEFINES:1} \
|
-Dbuild_defines=${GYP_DEFINES:1} \
|
||||||
-Dlinux_path_xkbcommon=$XKB_PATH \
|
-Dlinux_path_xkbcommon=$XKB_PATH \
|
||||||
-Dlinux_path_va=$VA_PATH \
|
-Dlinux_path_va=$VA_PATH \
|
||||||
-Dlinux_path_vdpau=$VDPAU_PATH \
|
-Dlinux_path_vdpau=$VDPAU_PATH \
|
||||||
|
|
|
@ -4,6 +4,7 @@ This is the complete source code and the build instructions for the alpha versio
|
||||||
|
|
||||||
[](https://github.com/telegramdesktop/tdesktop/releases)
|
[](https://github.com/telegramdesktop/tdesktop/releases)
|
||||||
[](https://travis-ci.org/telegramdesktop/tdesktop)
|
[](https://travis-ci.org/telegramdesktop/tdesktop)
|
||||||
|
[](https://ci.appveyor.com/project/telegramdesktop/tdesktop)
|
||||||
|
|
||||||
The source code is published under GPLv3 with OpenSSL exception, the license is available [here][license].
|
The source code is published under GPLv3 with OpenSSL exception, the license is available [here][license].
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
|
|
||||||
'defines': [
|
'defines': [
|
||||||
'AL_LIBTYPE_STATIC',
|
'AL_LIBTYPE_STATIC',
|
||||||
'<!@(python -c "for s in \'<(travis_defines)\'.split(\',\'): print(s)")',
|
'<!@(python -c "for s in \'<(build_defines)\'.split(\',\'): print(s)")',
|
||||||
],
|
],
|
||||||
|
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
|
|
|
@ -13,10 +13,16 @@ if exist "%FullScriptPath%..\..\..\Libraries\openssl\tmp32\lib.pdb" (
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if "%TELEGRAM_BUILD_DEFINES%" == "" (
|
||||||
|
set "TELEGRAM_BUILD_DEFINES= "
|
||||||
|
)
|
||||||
|
|
||||||
|
set "BUILD_DEFINES=-Dbuild_defines=%TELEGRAM_BUILD_DEFINES%"
|
||||||
|
|
||||||
cd "%FullScriptPath%"
|
cd "%FullScriptPath%"
|
||||||
call gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=ninja
|
call gyp --depth=. --generator-output=../.. -Goutput_dir=out %BUILD_DEFINES% Telegram.gyp --format=ninja
|
||||||
if %errorlevel% neq 0 goto error
|
if %errorlevel% neq 0 goto error
|
||||||
call gyp --depth=. --generator-output=../.. -Goutput_dir=out Telegram.gyp --format=msvs-ninja
|
call gyp --depth=. --generator-output=../.. -Goutput_dir=out %BUILD_DEFINES% Telegram.gyp --format=msvs-ninja
|
||||||
if %errorlevel% neq 0 goto error
|
if %errorlevel% neq 0 goto error
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
|
|
29
appveyor.yml
Normal file
29
appveyor.yml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
image: Visual Studio 2015
|
||||||
|
clone_folder: C:\TBuild\tdesktop
|
||||||
|
test: off
|
||||||
|
deploy: off
|
||||||
|
|
||||||
|
environment:
|
||||||
|
matrix:
|
||||||
|
- BUILD_VERSION:
|
||||||
|
- BUILD_VERSION: disable_autoupdate
|
||||||
|
- BUILD_VERSION: disable_register_custom_scheme
|
||||||
|
- BUILD_VERSION: disable_crash_reports
|
||||||
|
- BUILD_VERSION: disable_network_proxy
|
||||||
|
- BUILD_VERSION: disable_desktop_file_generation
|
||||||
|
- BUILD_VERSION: disable_unity_integration
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
fast_finish: true
|
||||||
|
|
||||||
|
install:
|
||||||
|
- .\.appveyor\install.bat
|
||||||
|
|
||||||
|
build:
|
||||||
|
project: Telegram.sln
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
- path: out\Debug\Telegram.exe
|
||||||
|
name: Telegram_debug.exe
|
||||||
|
- path: out\Debug\Telegram.exe.pdb
|
||||||
|
name: Telegram_debug.exe.pdb
|
|
@ -274,7 +274,10 @@ run `git reset --hard HEAD` and execute `gclient` again
|
||||||
git clone https://chromium.googlesource.com/external/gyp
|
git clone https://chromium.googlesource.com/external/gyp
|
||||||
SET PATH=%PATH%;D:\TBuild\Libraries\gyp;D:\TBuild\Libraries\ninja;
|
SET PATH=%PATH%;D:\TBuild\Libraries\gyp;D:\TBuild\Libraries\ninja;
|
||||||
cd ..\tdesktop\Telegram
|
cd ..\tdesktop\Telegram
|
||||||
gyp\refresh.bat
|
|
||||||
|
If you want to pass a build define (like `TDESKTOP_DISABLE_AUTOUPDATE` or `TDESKTOP_DISABLE_NETWORK_PROXY`), call `set TELEGRAM_BUILD_DEFINES=TDESKTOP_DISABLE_AUTOUPDATE,TDESKTOP_DISABLE_NETWORK_PROXY,...` (comma seperated string)
|
||||||
|
|
||||||
|
After, call `gyp\refresh.bat`
|
||||||
|
|
||||||
#### Configure VS
|
#### Configure VS
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue