mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-11 08:54:54 +00:00
Fix build for the new GYP version, fix Appveyor.
This commit is contained in:
parent
bf659938ba
commit
475f0e9544
@ -34,6 +34,8 @@ GOTO:EOF
|
||||
call:logInfo "Setup GYP/Ninja and generate VS solution"
|
||||
cd %LIB_DIR%
|
||||
git clone https://chromium.googlesource.com/external/gyp
|
||||
cd gyp
|
||||
git checkout a478c1ab51
|
||||
SET PATH=%PATH%;C:\TBuild\Libraries\gyp;C:\TBuild\Libraries\ninja;
|
||||
cd %SRC_DIR%
|
||||
git submodule init
|
||||
|
@ -22,8 +22,14 @@ import glob, re, binascii, os, sys
|
||||
|
||||
input_file = ''
|
||||
output_path = ''
|
||||
next_output_path = False
|
||||
for arg in sys.argv[1:]:
|
||||
if re.match(r'^-o(.+)', arg):
|
||||
if next_output_path:
|
||||
next_output_path = False
|
||||
output_path = arg
|
||||
elif arg == '-o':
|
||||
next_output_path = True
|
||||
elif re.match(r'^-o(.+)', arg):
|
||||
output_path = arg[2:]
|
||||
else:
|
||||
input_file = arg
|
||||
|
@ -29,8 +29,8 @@
|
||||
],
|
||||
'action': [
|
||||
'python', '<(DEPTH)/update_dependent.py', '--styles',
|
||||
'-I<(res_loc)', '-I<(src_loc)',
|
||||
'-o<(SHARED_INTERMEDIATE_DIR)/update_dependent_styles.timestamp',
|
||||
'-I', '<(res_loc)', '-I', '<(src_loc)',
|
||||
'-o', '<(SHARED_INTERMEDIATE_DIR)/update_dependent_styles.timestamp',
|
||||
'<@(style_files)',
|
||||
],
|
||||
'message': 'Updating dependent style files..',
|
||||
@ -46,7 +46,7 @@
|
||||
],
|
||||
'action': [
|
||||
'python', '<(DEPTH)/update_dependent.py', '--qrc',
|
||||
'-o<(SHARED_INTERMEDIATE_DIR)/update_dependent_qrc.timestamp',
|
||||
'-o', '<(SHARED_INTERMEDIATE_DIR)/update_dependent_qrc.timestamp',
|
||||
'<@(qrc_files)',
|
||||
],
|
||||
'message': 'Updating dependent qrc files..',
|
||||
@ -63,9 +63,9 @@
|
||||
],
|
||||
'action': [
|
||||
'<(PRODUCT_DIR)/codegen_style<(exe_ext)',
|
||||
'-I<(res_loc)', '-I<(src_loc)',
|
||||
'-o<(SHARED_INTERMEDIATE_DIR)/styles',
|
||||
'-w<(PRODUCT_DIR)/../..',
|
||||
'-I', '<(res_loc)', '-I', '<(src_loc)',
|
||||
'-o', '<(SHARED_INTERMEDIATE_DIR)/styles',
|
||||
'-w', '<(PRODUCT_DIR)/../..',
|
||||
|
||||
# GYP/Ninja bug workaround: if we specify just <(RULE_INPUT_PATH)
|
||||
# the <(RULE_INPUT_ROOT) variables won't be available in Ninja,
|
||||
@ -89,8 +89,8 @@
|
||||
],
|
||||
'action': [
|
||||
'<(PRODUCT_DIR)/codegen_lang<(exe_ext)',
|
||||
'-o<(SHARED_INTERMEDIATE_DIR)', '<(res_loc)/langs/lang.strings',
|
||||
'-w<(PRODUCT_DIR)/../..',
|
||||
'-o', '<(SHARED_INTERMEDIATE_DIR)', '<(res_loc)/langs/lang.strings',
|
||||
'-w', '<(PRODUCT_DIR)/../..',
|
||||
],
|
||||
'message': 'codegen_lang-ing lang.strings..',
|
||||
'process_outputs_as_sources': 1,
|
||||
@ -106,8 +106,8 @@
|
||||
],
|
||||
'action': [
|
||||
'<(PRODUCT_DIR)/codegen_numbers<(exe_ext)',
|
||||
'-o<(SHARED_INTERMEDIATE_DIR)', '<(res_loc)/numbers.txt',
|
||||
'-w<(PRODUCT_DIR)/../..',
|
||||
'-o', '<(SHARED_INTERMEDIATE_DIR)', '<(res_loc)/numbers.txt',
|
||||
'-w', '<(PRODUCT_DIR)/../..',
|
||||
],
|
||||
'message': 'codegen_numbers-ing numbers.txt..',
|
||||
'process_outputs_as_sources': 1,
|
||||
@ -123,7 +123,7 @@
|
||||
],
|
||||
'action': [
|
||||
'python', '<(src_loc)/codegen/scheme/codegen_scheme.py',
|
||||
'-o<(SHARED_INTERMEDIATE_DIR)', '<(res_loc)/scheme.tl',
|
||||
'-o', '<(SHARED_INTERMEDIATE_DIR)', '<(res_loc)/scheme.tl',
|
||||
],
|
||||
'message': 'codegen_scheme-ing scheme.tl..',
|
||||
'process_outputs_as_sources': 1,
|
||||
@ -138,7 +138,7 @@
|
||||
],
|
||||
'action': [
|
||||
'<(PRODUCT_DIR)/codegen_emoji<(exe_ext)',
|
||||
'-o<(SHARED_INTERMEDIATE_DIR)',
|
||||
'-o', '<(SHARED_INTERMEDIATE_DIR)',
|
||||
],
|
||||
'message': 'codegen_emoji-ing..',
|
||||
'process_outputs_as_sources': 1,
|
||||
@ -156,9 +156,9 @@
|
||||
],
|
||||
'action': [
|
||||
'<(PRODUCT_DIR)/codegen_style<(exe_ext)',
|
||||
'-I<(res_loc)', '-I<(src_loc)',
|
||||
'-o<(SHARED_INTERMEDIATE_DIR)/styles',
|
||||
'-w<(PRODUCT_DIR)/../..',
|
||||
'-I', '<(res_loc)', '-I', '<(src_loc)',
|
||||
'-o', '<(SHARED_INTERMEDIATE_DIR)/styles',
|
||||
'-w', '<(PRODUCT_DIR)/../..',
|
||||
|
||||
# GYP/Ninja bug workaround: if we specify just <(RULE_INPUT_PATH)
|
||||
# the <(RULE_INPUT_ROOT) variables won't be available in Ninja,
|
||||
|
@ -19,6 +19,8 @@ if not "%TDESKTOP_BUILD_DEFINES%" == "" (
|
||||
echo [INFO] Set build defines to !BUILD_DEFINES!
|
||||
)
|
||||
|
||||
set GYP_MSVS_VERSION=2015
|
||||
|
||||
cd "%FullScriptPath%"
|
||||
call gyp --depth=. --generator-output=../.. -Goutput_dir=out !BUILD_DEFINES! Telegram.gyp --format=ninja
|
||||
if %errorlevel% neq 0 goto error
|
||||
|
@ -277,8 +277,10 @@ run `git reset --hard HEAD` and execute `gclient` again
|
||||
<!-- -->
|
||||
|
||||
git clone https://chromium.googlesource.com/external/gyp
|
||||
cd gyp
|
||||
git checkout a478c1ab51
|
||||
SET PATH=%PATH%;D:\TBuild\Libraries\gyp;D:\TBuild\Libraries\ninja;
|
||||
cd ..\tdesktop\Telegram
|
||||
cd ..\..\tdesktop\Telegram
|
||||
|
||||
Also, actually add **D:\\TBuild\\Libraries\\ninja\\** (not just for running the **gyp** command) to your path environment variable, since Telegram needs it for the build process.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user