From e3f5a505ebb375e1b43e2c852cd1668720ec3e0e Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 18 Sep 2019 09:56:01 +0300 Subject: [PATCH] Fix folder structure for Xcode build. --- .gitmodules | 24 ++--- Telegram/ThirdParty/codegen | 1 - Telegram/ThirdParty/gyp_helpers | 1 - Telegram/ThirdParty/lib_base | 1 - Telegram/ThirdParty/lib_crl | 1 - Telegram/ThirdParty/lib_rpl | 1 - Telegram/ThirdParty/lib_ui | 1 - Telegram/codegen | 1 + Telegram/gyp/Telegram.gyp | 127 +++++++++++++++++++++- Telegram/gyp/helpers | 1 + Telegram/gyp/lib_export.gyp | 12 +-- Telegram/gyp/lib_ffmpeg.gyp | 15 ++- Telegram/gyp/lib_lottie.gyp | 17 ++- Telegram/gyp/lib_lz4.gyp | 11 +- Telegram/gyp/lib_mtproto.gyp | 10 +- Telegram/gyp/lib_rlottie.gyp | 11 +- Telegram/gyp/lib_scheme.gyp | 10 +- Telegram/gyp/lib_storage.gyp | 16 +-- Telegram/gyp/linux_glibc_wraps.gyp | 8 +- Telegram/gyp/telegram/linux.gypi | 4 + Telegram/gyp/telegram/mac.gypi | 16 +++ Telegram/gyp/telegram/telegram.gypi | 156 ---------------------------- Telegram/gyp/tests/common_test.gypi | 6 +- Telegram/gyp/tests/tests.gyp | 6 +- Telegram/gyp/utils.gyp | 8 +- Telegram/lib_base | 1 + Telegram/lib_crl | 1 + Telegram/lib_rpl | 1 + Telegram/lib_ui | 1 + 29 files changed, 233 insertions(+), 236 deletions(-) delete mode 160000 Telegram/ThirdParty/codegen delete mode 160000 Telegram/ThirdParty/gyp_helpers delete mode 160000 Telegram/ThirdParty/lib_base delete mode 160000 Telegram/ThirdParty/lib_crl delete mode 160000 Telegram/ThirdParty/lib_rpl delete mode 160000 Telegram/ThirdParty/lib_ui create mode 160000 Telegram/codegen create mode 160000 Telegram/gyp/helpers delete mode 100644 Telegram/gyp/telegram/telegram.gypi create mode 160000 Telegram/lib_base create mode 160000 Telegram/lib_crl create mode 160000 Telegram/lib_rpl create mode 160000 Telegram/lib_ui diff --git a/.gitmodules b/.gitmodules index 65ea7c340f..1c097c1d61 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,21 +19,21 @@ [submodule "Telegram/ThirdParty/lz4"] path = Telegram/ThirdParty/lz4 url = https://github.com/lz4/lz4.git -[submodule "Telegram/ThirdParty/lib_crl"] - path = Telegram/ThirdParty/lib_crl +[submodule "Telegram/lib_crl"] + path = Telegram/lib_crl url = https://github.com/desktop-app/lib_crl.git -[submodule "Telegram/ThirdParty/lib_rpl"] - path = Telegram/ThirdParty/lib_rpl +[submodule "Telegram/lib_rpl"] + path = Telegram/lib_rpl url = https://github.com/desktop-app/lib_rpl.git -[submodule "Telegram/ThirdParty/lib_base"] - path = Telegram/ThirdParty/lib_base +[submodule "Telegram/lib_base"] + path = Telegram/lib_base url = https://github.com/desktop-app/lib_base.git -[submodule "Telegram/ThirdParty/gyp_helpers"] - path = Telegram/ThirdParty/gyp_helpers +[submodule "Telegram/gyp/helpers"] + path = Telegram/gyp/helpers url = https://github.com/desktop-app/gyp_helpers.git -[submodule "Telegram/ThirdParty/codegen"] - path = Telegram/ThirdParty/codegen +[submodule "Telegram/codegen"] + path = Telegram/codegen url = https://github.com/desktop-app/codegen.git -[submodule "Telegram/ThirdParty/lib_ui"] - path = Telegram/ThirdParty/lib_ui +[submodule "Telegram/lib_ui"] + path = Telegram/lib_ui url = https://github.com/desktop-app/lib_ui.git diff --git a/Telegram/ThirdParty/codegen b/Telegram/ThirdParty/codegen deleted file mode 160000 index 1fd5223332..0000000000 --- a/Telegram/ThirdParty/codegen +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1fd52233329a60f3e6a0c389873dfffc1ce403c8 diff --git a/Telegram/ThirdParty/gyp_helpers b/Telegram/ThirdParty/gyp_helpers deleted file mode 160000 index df28126a09..0000000000 --- a/Telegram/ThirdParty/gyp_helpers +++ /dev/null @@ -1 +0,0 @@ -Subproject commit df28126a0916edaa6b9c5d7a3ee2a0a71012308c diff --git a/Telegram/ThirdParty/lib_base b/Telegram/ThirdParty/lib_base deleted file mode 160000 index 349996d274..0000000000 --- a/Telegram/ThirdParty/lib_base +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 349996d274cc3820a79757ba903803f075a5f61d diff --git a/Telegram/ThirdParty/lib_crl b/Telegram/ThirdParty/lib_crl deleted file mode 160000 index 83ce4916d4..0000000000 --- a/Telegram/ThirdParty/lib_crl +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 83ce4916d4f712300b7550900c59d3d0d420178b diff --git a/Telegram/ThirdParty/lib_rpl b/Telegram/ThirdParty/lib_rpl deleted file mode 160000 index 93465f7854..0000000000 --- a/Telegram/ThirdParty/lib_rpl +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 93465f7854012f2237452f5eaddc5edcc7de2d48 diff --git a/Telegram/ThirdParty/lib_ui b/Telegram/ThirdParty/lib_ui deleted file mode 160000 index 9c711cca1a..0000000000 --- a/Telegram/ThirdParty/lib_ui +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9c711cca1a02fe8d3fce5976a3d8afc30f7eb7f4 diff --git a/Telegram/codegen b/Telegram/codegen new file mode 160000 index 0000000000..0172289398 --- /dev/null +++ b/Telegram/codegen @@ -0,0 +1 @@ +Subproject commit 01722893988a6573e1ba910028fbc0c596c2ae5b diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp index 40723b2557..4dedbfc4c3 100644 --- a/Telegram/gyp/Telegram.gyp +++ b/Telegram/gyp/Telegram.gyp @@ -6,7 +6,130 @@ { 'includes': [ - '../ThirdParty/gyp_helpers/common/common.gypi', - 'telegram/telegram.gypi', + 'helpers/common/common.gypi', ], + 'targets': [{ + 'target_name': 'Telegram', + 'variables': { + 'src_loc': '../SourceFiles', + 'res_loc': '../Resources', + 'minizip_loc': '<(third_party_loc)/minizip', + 'sp_media_key_tap_loc': '<(third_party_loc)/SPMediaKeyTap', + 'emoji_suggestions_loc': '<(third_party_loc)/emoji_suggestions', + 'style_files': [ + '<(src_loc)/boxes/boxes.style', + '<(src_loc)/calls/calls.style', + '<(src_loc)/dialogs/dialogs.style', + '<(src_loc)/export/view/export.style', + '<(src_loc)/history/history.style', + '<(src_loc)/info/info.style', + '<(src_loc)/intro/intro.style', + '<(src_loc)/media/view/mediaview.style', + '<(src_loc)/media/player/media_player.style', + '<(src_loc)/overview/overview.style', + '<(src_loc)/passport/passport.style', + '<(src_loc)/profile/profile.style', + '<(src_loc)/settings/settings.style', + '<(src_loc)/chat_helpers/chat_helpers.style', + '<(src_loc)/window/window.style', + ], + 'dependent_style_files': [ + '<(submodules_loc)/lib_ui/ui/colors.palette', + '<(submodules_loc)/lib_ui/ui/basic.style', + '<(submodules_loc)/lib_ui/ui/widgets/widgets.style', + ], + 'style_timestamp': '<(SHARED_INTERMEDIATE_DIR)/update_dependent_styles.timestamp', + 'qrc_timestamp': '<(SHARED_INTERMEDIATE_DIR)/update_dependent_qrc.timestamp', + 'langpacks': [ + 'en', + 'de', + 'es', + 'it', + 'nl', + 'ko', + 'pt-BR', + ], + 'build_defines%': '', + 'list_sources_command': 'python <(submodules_loc)/lib_base/gyp/list_sources.py --input <(DEPTH)/telegram/sources.txt --replace src_loc=<(src_loc)', + 'pch_source': '<(src_loc)/stdafx.cpp', + 'pch_header': '<(src_loc)/stdafx.h', + }, + 'includes': [ + 'helpers/common/executable.gypi', + 'helpers/modules/openssl.gypi', + 'helpers/modules/qt.gypi', + 'helpers/modules/qt_moc.gypi', + 'helpers/modules/pch.gypi', + '../lib_ui/gyp/qrc_rule.gypi', + '../lib_ui/gyp/styles_rule.gypi', + 'telegram/qrc.gypi', + 'telegram/win.gypi', + 'telegram/mac.gypi', + 'telegram/linux.gypi', + 'codegen/rules.gypi', + ], + + 'dependencies': [ + '<(submodules_loc)/codegen/codegen.gyp:codegen_lang', + '<(submodules_loc)/codegen/codegen.gyp:codegen_numbers', + '<(submodules_loc)/codegen/codegen.gyp:codegen_style', + '<(submodules_loc)/lib_base/lib_base.gyp:lib_base', + '<(submodules_loc)/lib_ui/lib_ui.gyp:lib_ui', + '<(third_party_loc)/libtgvoip/libtgvoip.gyp:libtgvoip', + 'tests/tests.gyp:tests', + 'utils.gyp:Updater', + 'lib_export.gyp:lib_export', + 'lib_storage.gyp:lib_storage', + 'lib_lottie.gyp:lib_lottie', + 'lib_ffmpeg.gyp:lib_ffmpeg', + 'lib_mtproto.gyp:lib_mtproto', + ], + + 'defines': [ + 'AL_LIBTYPE_STATIC', + 'AL_ALEXT_PROTOTYPES', + 'TGVOIP_USE_CXX11_LIB', + 'TDESKTOP_API_ID=<(api_id)', + 'TDESKTOP_API_HASH=<(api_hash)', + '