diff --git a/Telegram/Resources/qrc/telegram_emoji_1.qrc b/Telegram/Resources/qrc/emoji_1.qrc similarity index 100% rename from Telegram/Resources/qrc/telegram_emoji_1.qrc rename to Telegram/Resources/qrc/emoji_1.qrc diff --git a/Telegram/Resources/qrc/telegram_emoji_2.qrc b/Telegram/Resources/qrc/emoji_2.qrc similarity index 100% rename from Telegram/Resources/qrc/telegram_emoji_2.qrc rename to Telegram/Resources/qrc/emoji_2.qrc diff --git a/Telegram/Resources/qrc/telegram_emoji_3.qrc b/Telegram/Resources/qrc/emoji_3.qrc similarity index 100% rename from Telegram/Resources/qrc/telegram_emoji_3.qrc rename to Telegram/Resources/qrc/emoji_3.qrc diff --git a/Telegram/Resources/qrc/telegram_emoji_4.qrc b/Telegram/Resources/qrc/emoji_4.qrc similarity index 100% rename from Telegram/Resources/qrc/telegram_emoji_4.qrc rename to Telegram/Resources/qrc/emoji_4.qrc diff --git a/Telegram/Resources/qrc/telegram_emoji_5.qrc b/Telegram/Resources/qrc/emoji_5.qrc similarity index 100% rename from Telegram/Resources/qrc/telegram_emoji_5.qrc rename to Telegram/Resources/qrc/emoji_5.qrc diff --git a/Telegram/Resources/qrc/telegram_emoji_preview.qrc b/Telegram/Resources/qrc/emoji_preview.qrc similarity index 100% rename from Telegram/Resources/qrc/telegram_emoji_preview.qrc rename to Telegram/Resources/qrc/emoji_preview.qrc diff --git a/Telegram/Resources/qrc/telegram_fonts.qrc b/Telegram/Resources/qrc/fonts.qrc similarity index 100% rename from Telegram/Resources/qrc/telegram_fonts.qrc rename to Telegram/Resources/qrc/fonts.qrc diff --git a/Telegram/Resources/qrc/telegram_linux.qrc b/Telegram/Resources/qrc/linux.qrc similarity index 100% rename from Telegram/Resources/qrc/telegram_linux.qrc rename to Telegram/Resources/qrc/linux.qrc diff --git a/Telegram/Resources/qrc/telegram_mac.qrc b/Telegram/Resources/qrc/mac.qrc similarity index 100% rename from Telegram/Resources/qrc/telegram_mac.qrc rename to Telegram/Resources/qrc/mac.qrc diff --git a/Telegram/Resources/qrc/telegram.qrc b/Telegram/Resources/qrc/telegram.qrc deleted file mode 100644 index c0572c4b4..000000000 --- a/Telegram/Resources/qrc/telegram.qrc +++ /dev/null @@ -1,60 +0,0 @@ - - - ../export_html/css/style.css - ../export_html/images/back.png - ../export_html/images/back@2x.png - ../export_html/images/media_call.png - ../export_html/images/media_call@2x.png - ../export_html/images/media_contact.png - ../export_html/images/media_contact@2x.png - ../export_html/images/media_file.png - ../export_html/images/media_file@2x.png - ../export_html/images/media_game.png - ../export_html/images/media_game@2x.png - ../export_html/images/media_location.png - ../export_html/images/media_location@2x.png - ../export_html/images/media_music.png - ../export_html/images/media_music@2x.png - ../export_html/images/media_photo.png - ../export_html/images/media_photo@2x.png - ../export_html/images/media_shop.png - ../export_html/images/media_shop@2x.png - ../export_html/images/media_video.png - ../export_html/images/media_video@2x.png - ../export_html/images/media_voice.png - ../export_html/images/media_voice@2x.png - ../export_html/images/section_calls.png - ../export_html/images/section_calls@2x.png - ../export_html/images/section_chats.png - ../export_html/images/section_chats@2x.png - ../export_html/images/section_contacts.png - ../export_html/images/section_contacts@2x.png - ../export_html/images/section_frequent.png - ../export_html/images/section_frequent@2x.png - ../export_html/images/section_other.png - ../export_html/images/section_other@2x.png - ../export_html/images/section_photos.png - ../export_html/images/section_photos@2x.png - ../export_html/images/section_sessions.png - ../export_html/images/section_sessions@2x.png - ../export_html/images/section_web.png - ../export_html/images/section_web@2x.png - ../export_html/js/script.js - - - ../art/bg.jpg - ../art/bg_initial.jpg - ../art/logo_256.png - ../art/logo_256_no_margin.png - ../art/sunrise.jpg - ../day-blue.tdesktop-theme - ../night.tdesktop-theme - ../night-green.tdesktop-theme - - - qmime/freedesktop.org.xml - - - ../default_shortcuts-custom.json - - diff --git a/Telegram/Resources/qrc/telegram/sounds.qrc b/Telegram/Resources/qrc/telegram/sounds.qrc new file mode 100644 index 000000000..6135e0050 --- /dev/null +++ b/Telegram/Resources/qrc/telegram/sounds.qrc @@ -0,0 +1,10 @@ + + + ../../sounds/msg_incoming.mp3 + ../../sounds/call_busy.mp3 + ../../sounds/call_connect.mp3 + ../../sounds/call_end.mp3 + ../../sounds/call_incoming.mp3 + ../../sounds/call_outgoing.mp3 + + diff --git a/Telegram/Resources/qrc/telegram/telegram.qrc b/Telegram/Resources/qrc/telegram/telegram.qrc new file mode 100644 index 000000000..87ee77587 --- /dev/null +++ b/Telegram/Resources/qrc/telegram/telegram.qrc @@ -0,0 +1,60 @@ + + + ../../export_html/css/style.css + ../../export_html/images/back.png + ../../export_html/images/back@2x.png + ../../export_html/images/media_call.png + ../../export_html/images/media_call@2x.png + ../../export_html/images/media_contact.png + ../../export_html/images/media_contact@2x.png + ../../export_html/images/media_file.png + ../../export_html/images/media_file@2x.png + ../../export_html/images/media_game.png + ../../export_html/images/media_game@2x.png + ../../export_html/images/media_location.png + ../../export_html/images/media_location@2x.png + ../../export_html/images/media_music.png + ../../export_html/images/media_music@2x.png + ../../export_html/images/media_photo.png + ../../export_html/images/media_photo@2x.png + ../../export_html/images/media_shop.png + ../../export_html/images/media_shop@2x.png + ../../export_html/images/media_video.png + ../../export_html/images/media_video@2x.png + ../../export_html/images/media_voice.png + ../../export_html/images/media_voice@2x.png + ../../export_html/images/section_calls.png + ../../export_html/images/section_calls@2x.png + ../../export_html/images/section_chats.png + ../../export_html/images/section_chats@2x.png + ../../export_html/images/section_contacts.png + ../../export_html/images/section_contacts@2x.png + ../../export_html/images/section_frequent.png + ../../export_html/images/section_frequent@2x.png + ../../export_html/images/section_other.png + ../../export_html/images/section_other@2x.png + ../../export_html/images/section_photos.png + ../../export_html/images/section_photos@2x.png + ../../export_html/images/section_sessions.png + ../../export_html/images/section_sessions@2x.png + ../../export_html/images/section_web.png + ../../export_html/images/section_web@2x.png + ../../export_html/js/script.js + + + ../../art/bg.jpg + ../../art/bg_initial.jpg + ../../art/logo_256.png + ../../art/logo_256_no_margin.png + ../../art/sunrise.jpg + ../../day-blue.tdesktop-theme + ../../night.tdesktop-theme + ../../night-green.tdesktop-theme + + + ../qmime/freedesktop.org.xml + + + ../../default_shortcuts-custom.json + + diff --git a/Telegram/Resources/qrc/telegram_sounds.qrc b/Telegram/Resources/qrc/telegram_sounds.qrc deleted file mode 100644 index 594f558fc..000000000 --- a/Telegram/Resources/qrc/telegram_sounds.qrc +++ /dev/null @@ -1,10 +0,0 @@ - - - ../sounds/msg_incoming.mp3 - ../sounds/call_busy.mp3 - ../sounds/call_connect.mp3 - ../sounds/call_end.mp3 - ../sounds/call_incoming.mp3 - ../sounds/call_outgoing.mp3 - - diff --git a/Telegram/Resources/qrc/telegram_wnd.qrc b/Telegram/Resources/qrc/wnd.qrc similarity index 100% rename from Telegram/Resources/qrc/telegram_wnd.qrc rename to Telegram/Resources/qrc/wnd.qrc diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index 5c96c88e4..d8533510e 100644 --- a/Telegram/Resources/winrc/Telegram.rc +++ b/Telegram/Resources/winrc/Telegram.rc @@ -1,6 +1,5 @@ // Microsoft Visual C++ generated resource script. // -#include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -66,16 +65,3 @@ END #endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index 290b7764b..711a6cbd2 100644 --- a/Telegram/Resources/winrc/Updater.rc +++ b/Telegram/Resources/winrc/Updater.rc @@ -1,6 +1,5 @@ // Microsoft Visual C++ generated resource script. // -#include "resource1.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// @@ -57,16 +56,3 @@ END #endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/Telegram/Resources/winrc/resource.h b/Telegram/Resources/winrc/resource.h deleted file mode 100644 index fb440adac..000000000 Binary files a/Telegram/Resources/winrc/resource.h and /dev/null differ diff --git a/Telegram/Resources/winrc/resource1.h b/Telegram/Resources/winrc/resource1.h deleted file mode 100644 index fa4d7c2ea..000000000 --- a/Telegram/Resources/winrc/resource1.h +++ /dev/null @@ -1,14 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Updater.rc - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp index d2cb486d6..145fd678f 100644 --- a/Telegram/gyp/Telegram.gyp +++ b/Telegram/gyp/Telegram.gyp @@ -6,163 +6,7 @@ { 'includes': [ - 'common.gypi', + 'common/common.gypi', + 'telegram/telegram.gypi', ], - 'targets': [{ - 'target_name': 'Telegram', - 'variables': { - 'variables': { - 'libs_loc': '../../../Libraries', - }, - 'libs_loc': '<(libs_loc)', - 'src_loc': '../SourceFiles', - 'res_loc': '../Resources', - 'submodules_loc': '../ThirdParty', - 'minizip_loc': '<(submodules_loc)/minizip', - 'sp_media_key_tap_loc': '<(submodules_loc)/SPMediaKeyTap', - 'emoji_suggestions_loc': '<(submodules_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': [ - '<(res_loc)/colors.palette', - '<(res_loc)/basic.style', - '<(src_loc)/ui/widgets/widgets.style', - ], - 'style_timestamp': '<(SHARED_INTERMEDIATE_DIR)/update_dependent_styles.timestamp', - 'langpacks': [ - 'en', - 'de', - 'es', - 'it', - 'nl', - 'ko', - 'pt-BR', - ], - 'build_defines%': '', - 'list_sources_command': 'python <(DEPTH)/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': [ - 'common_executable.gypi', - 'telegram_qrc.gypi', - 'telegram_win.gypi', - 'telegram_mac.gypi', - 'telegram_linux.gypi', - 'openssl.gypi', - 'qt.gypi', - 'qt_moc.gypi', - 'qt_rcc.gypi', - 'codegen_styles_rule.gypi', - 'codegen_rules.gypi', - 'pch.gypi', - ], - - 'dependencies': [ - 'codegen.gyp:codegen_emoji', - 'codegen.gyp:codegen_lang', - 'codegen.gyp:codegen_numbers', - 'codegen.gyp:codegen_style', - 'tests/tests.gyp:tests', - 'utils.gyp:Updater', - '../ThirdParty/libtgvoip/libtgvoip.gyp:libtgvoip', - 'crl.gyp:crl', - 'lib_base.gyp:lib_base', - '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', - 'lib_ui.gyp:lib_ui', - ], - - 'defines': [ - 'AL_LIBTYPE_STATIC', - 'AL_ALEXT_PROTOTYPES', - 'TGVOIP_USE_CXX11_LIB', - 'XXH_INLINE_ALL', - 'TDESKTOP_API_ID=<(api_id)', - 'TDESKTOP_API_HASH=<(api_hash)', - ' createPlatformIntegration -> QXcbIntegrationPlugin::create #'xkbcommon', ], - 'linux_path_ffmpeg%': '/usr/local', - 'linux_path_openal%': '/usr/local', - 'linux_path_va%': '/usr/local', - 'linux_path_vdpau%': '/usr/local', - 'linux_path_breakpad%': '/usr/local', - 'linux_path_opus_include%': '<(libs_loc)/opus/include', - 'linux_path_range%': '/usr/local', }, - 'include_dirs': [ - '/usr/local/include', - '<(linux_path_ffmpeg)/include', - '<(linux_path_openal)/include', - '<(linux_path_breakpad)/include/breakpad', - '<(linux_path_opus_include)', - '<(linux_path_range)/include', - ], - 'library_dirs': [ - '/usr/local/lib', - '<(linux_path_ffmpeg)/lib', - '<(linux_path_openal)/lib', - '<(linux_path_va)/lib', - '<(linux_path_vdpau)/lib', - '<(linux_path_breakpad)/lib', - ], 'libraries': [ - 'breakpad_client', - 'composeplatforminputcontextplugin', - 'ibusplatforminputcontextplugin', - 'fcitxplatforminputcontextplugin', - 'himeplatforminputcontextplugin', - 'nimfplatforminputcontextplugin', - 'liblzma.a', - 'libopenal.a', - 'libavformat.a', - 'libavcodec.a', - 'libswresample.a', - 'libswscale.a', - 'libavutil.a', - 'libopus.a', - 'libva-x11.a', - 'libva-drm.a', - 'libva.a', - 'libvdpau.a', - 'libdrm.a', - 'libz.a', + '-lbreakpad_client', + '-lcomposeplatforminputcontextplugin', + '-libusplatforminputcontextplugin', + '-lfcitxplatforminputcontextplugin', + '-lhimeplatforminputcontextplugin', + '-lnimfplatforminputcontextplugin', + '-llzma', + '-lopenal', + '-lavformat', + '-lavcodec', + '-lswresample', + '-lswscale', + '-lavutil', + '-lopus', + '-lva-x11', + '-lva-drm', + '-lva', + '-lvdpau', + '-ldrm', + '-lz', # ' /dev/null --libs <@(pkgconfig_libs))', ], 'cflags_cc': [ @@ -74,6 +51,7 @@ '-Wl,-wrap,secure_getenv', '-Wl,-wrap,clock_gettime', '-Wl,--no-as-needed,-lrt', + '-Wl,-Bstatic', ], 'configurations': { 'Release': { diff --git a/Telegram/gyp/telegram_mac.gypi b/Telegram/gyp/telegram/mac.gypi similarity index 100% rename from Telegram/gyp/telegram_mac.gypi rename to Telegram/gyp/telegram/mac.gypi diff --git a/Telegram/gyp/telegram_qrc.gypi b/Telegram/gyp/telegram/qrc.gypi similarity index 52% rename from Telegram/gyp/telegram_qrc.gypi rename to Telegram/gyp/telegram/qrc.gypi index 6b24aaf25..389ca8c77 100644 --- a/Telegram/gyp/telegram_qrc.gypi +++ b/Telegram/gyp/telegram/qrc.gypi @@ -7,36 +7,36 @@ { 'variables': { 'qrc_files': [ - '<(res_loc)/qrc/telegram.qrc', - '<(res_loc)/qrc/telegram_fonts.qrc', - '<(res_loc)/qrc/telegram_emoji_1.qrc', - '<(res_loc)/qrc/telegram_emoji_2.qrc', - '<(res_loc)/qrc/telegram_emoji_3.qrc', - '<(res_loc)/qrc/telegram_emoji_4.qrc', - '<(res_loc)/qrc/telegram_emoji_5.qrc', - '<(res_loc)/qrc/telegram_emoji_preview.qrc', - '<(res_loc)/qrc/telegram_sounds.qrc', + '<(res_loc)/qrc/fonts.qrc', + '<(res_loc)/qrc/emoji_1.qrc', + '<(res_loc)/qrc/emoji_2.qrc', + '<(res_loc)/qrc/emoji_3.qrc', + '<(res_loc)/qrc/emoji_4.qrc', + '<(res_loc)/qrc/emoji_5.qrc', + '<(res_loc)/qrc/emoji_preview.qrc', + '<(res_loc)/qrc/telegram/telegram.qrc', + '<(res_loc)/qrc/telegram/sounds.qrc', ], }, 'conditions': [ [ 'build_linux', { 'variables': { 'qrc_files': [ - '<(res_loc)/qrc/telegram_linux.qrc', + '<(res_loc)/qrc/linux.qrc', ], } }], [ 'build_mac', { 'variables': { 'qrc_files': [ - '<(res_loc)/qrc/telegram_mac.qrc', + '<(res_loc)/qrc/mac.qrc', ], }, }], [ 'build_win', { 'variables': { 'qrc_files': [ - '<(res_loc)/qrc/telegram_wnd.qrc', + '<(res_loc)/qrc/wnd.qrc', ], } }], diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram/sources.txt similarity index 100% rename from Telegram/gyp/telegram_sources.txt rename to Telegram/gyp/telegram/sources.txt diff --git a/Telegram/gyp/telegram/telegram.gypi b/Telegram/gyp/telegram/telegram.gypi new file mode 100644 index 000000000..dfd5e1646 --- /dev/null +++ b/Telegram/gyp/telegram/telegram.gypi @@ -0,0 +1,161 @@ +# This file is part of Telegram Desktop, +# the official desktop application for the Telegram messaging service. +# +# For license and copyright information please follow this link: +# https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL + +{ + 'targets': [{ + 'target_name': 'Telegram', + 'variables': { + 'src_loc': '../SourceFiles', + 'res_loc': '../Resources', + 'submodules_loc': '../ThirdParty', + 'minizip_loc': '<(submodules_loc)/minizip', + 'sp_media_key_tap_loc': '<(submodules_loc)/SPMediaKeyTap', + 'emoji_suggestions_loc': '<(submodules_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': [ + '<(res_loc)/colors.palette', + '<(res_loc)/basic.style', + '<(src_loc)/ui/widgets/widgets.style', + ], + 'style_timestamp': '<(SHARED_INTERMEDIATE_DIR)/update_dependent_styles.timestamp', + 'langpacks': [ + 'en', + 'de', + 'es', + 'it', + 'nl', + 'ko', + 'pt-BR', + ], + 'build_defines%': '', + 'list_sources_command': 'python <(DEPTH)/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': [ + '../common/executable.gypi', + 'qrc.gypi', + 'win.gypi', + 'mac.gypi', + 'linux.gypi', + '../modules/openssl.gypi', + '../modules/qt.gypi', + '../modules/qt_moc.gypi', + '../modules/qt_rcc.gypi', + '../modules/pch.gypi', + '../codegen/styles_rule.gypi', + '../codegen/rules.gypi', + ], + + 'dependencies': [ + 'codegen.gyp:codegen_emoji', + 'codegen.gyp:codegen_lang', + 'codegen.gyp:codegen_numbers', + 'codegen.gyp:codegen_style', + 'tests/tests.gyp:tests', + 'utils.gyp:Updater', + '../ThirdParty/libtgvoip/libtgvoip.gyp:libtgvoip', + 'crl.gyp:crl', + 'lib_base.gyp:lib_base', + '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', + 'lib_ui.gyp:lib_ui', + ], + + 'defines': [ + 'AL_LIBTYPE_STATIC', + 'AL_ALEXT_PROTOTYPES', + 'TGVOIP_USE_CXX11_LIB', + 'XXH_INLINE_ALL', + 'TDESKTOP_API_ID=<(api_id)', + 'TDESKTOP_API_HASH=<(api_hash)', + '