mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-19 14:36:58 +00:00
Fix build for Linux.
This commit is contained in:
parent
fcb2950ce8
commit
c87f9d0074
@ -14,8 +14,6 @@ windowMinWidth: 380px;
|
||||
windowMinHeight: 480px;
|
||||
windowDefaultWidth: 800px;
|
||||
windowDefaultHeight: 600px;
|
||||
windowShadow: icon {{ "window_shadow", windowShadowFg }};
|
||||
windowShadowShift: 1px;
|
||||
|
||||
columnMinimalWidthLeft: 260px;
|
||||
columnMaximalWidthLeft: 540px;
|
||||
@ -164,86 +162,6 @@ mainMenuVersionLabel: FlatLabel(mainMenuTelegramLabel) {
|
||||
}
|
||||
mainMenuVersionBottom: 21px;
|
||||
|
||||
// Windows specific title
|
||||
|
||||
titleHeight: 21px;
|
||||
titleButtonMinimize: IconButton {
|
||||
width: 24px;
|
||||
height: 21px;
|
||||
|
||||
icon: icon {
|
||||
{ size(24px, 21px), titleButtonBg },
|
||||
{ "title_button_minimize", titleButtonFg, point(4px, 4px) },
|
||||
};
|
||||
iconOver: icon {
|
||||
{ size(24px, 21px), titleButtonBgOver },
|
||||
{ "title_button_minimize", titleButtonFgOver, point(4px, 4px) },
|
||||
};
|
||||
iconPosition: point(0px, 0px);
|
||||
}
|
||||
titleButtonMinimizeIconActive: icon {
|
||||
{ size(24px, 21px), titleButtonBgActive },
|
||||
{ "title_button_minimize", titleButtonFgActive, point(4px, 4px) },
|
||||
};
|
||||
titleButtonMinimizeIconActiveOver: icon {
|
||||
{ size(24px, 21px), titleButtonBgActiveOver },
|
||||
{ "title_button_minimize", titleButtonFgActiveOver, point(4px, 4px) },
|
||||
};
|
||||
titleButtonMaximize: IconButton(titleButtonMinimize) {
|
||||
icon: icon {
|
||||
{ size(24px, 21px), titleButtonBg },
|
||||
{ "title_button_maximize", titleButtonFg, point(4px, 4px) },
|
||||
};
|
||||
iconOver: icon {
|
||||
{ size(24px, 21px), titleButtonBgOver },
|
||||
{ "title_button_maximize", titleButtonFgOver, point(4px, 4px) },
|
||||
};
|
||||
}
|
||||
titleButtonMaximizeIconActive: icon {
|
||||
{ size(24px, 21px), titleButtonBgActive },
|
||||
{ "title_button_maximize", titleButtonFgActive, point(4px, 4px) },
|
||||
};
|
||||
titleButtonMaximizeIconActiveOver: icon {
|
||||
{ size(24px, 21px), titleButtonBgActiveOver },
|
||||
{ "title_button_maximize", titleButtonFgActiveOver, point(4px, 4px) },
|
||||
};
|
||||
titleButtonRestoreIcon: icon {
|
||||
{ size(24px, 21px), titleButtonBg },
|
||||
{ "title_button_restore", titleButtonFg, point(4px, 4px) },
|
||||
};
|
||||
titleButtonRestoreIconOver: icon {
|
||||
{ size(24px, 21px), titleButtonBgOver },
|
||||
{ "title_button_restore", titleButtonFgOver, point(4px, 4px) },
|
||||
};
|
||||
titleButtonRestoreIconActive: icon {
|
||||
{ size(24px, 21px), titleButtonBgActive },
|
||||
{ "title_button_restore", titleButtonFgActive, point(4px, 4px) },
|
||||
};
|
||||
titleButtonRestoreIconActiveOver: icon {
|
||||
{ size(24px, 21px), titleButtonBgActiveOver },
|
||||
{ "title_button_restore", titleButtonFgActiveOver, point(4px, 4px) },
|
||||
};
|
||||
titleButtonClose: IconButton(titleButtonMinimize) {
|
||||
width: 25px;
|
||||
|
||||
icon: icon {
|
||||
{ size(25px, 21px), titleButtonCloseBg },
|
||||
{ "title_button_close", titleButtonCloseFg, point(5px, 4px) },
|
||||
};
|
||||
iconOver: icon {
|
||||
{ size(25px, 21px), titleButtonCloseBgOver },
|
||||
{ "title_button_close", titleButtonCloseFgOver, point(5px, 4px) },
|
||||
};
|
||||
}
|
||||
titleButtonCloseIconActive: icon {
|
||||
{ size(25px, 21px), titleButtonCloseBgActive },
|
||||
{ "title_button_close", titleButtonCloseFgActive, point(5px, 4px) },
|
||||
};
|
||||
titleButtonCloseIconActiveOver: icon {
|
||||
{ size(25px, 21px), titleButtonCloseBgActiveOver },
|
||||
{ "title_button_close", titleButtonCloseFgActiveOver, point(5px, 4px) },
|
||||
};
|
||||
|
||||
themeEditorSampleSize: size(90px, 51px);
|
||||
themeEditorMargin: margins(17px, 10px, 17px, 10px);
|
||||
themeEditorDescriptionSkip: 10px;
|
||||
|
@ -1,173 +0,0 @@
|
||||
##
|
||||
## Modified for Telegram Desktop project by Telegram Desktop authors.
|
||||
##
|
||||
# Function for setting up precompiled headers. Usage:
|
||||
#
|
||||
# add_library/executable(target
|
||||
# pchheader.c pchheader.cpp pchheader.h)
|
||||
#
|
||||
# add_precompiled_header(target pchheader.h
|
||||
# [FORCEINCLUDE]
|
||||
# [SOURCE_C pchheader.c]
|
||||
# [SOURCE_CXX pchheader.cpp])
|
||||
#
|
||||
# Options:
|
||||
#
|
||||
# FORCEINCLUDE: Add compiler flags to automatically include the
|
||||
# pchheader.h from every source file. Works with both GCC and
|
||||
# MSVC. This is recommended.
|
||||
#
|
||||
# SOURCE_C/CXX: Specifies the .c/.cpp source file that includes
|
||||
# pchheader.h for generating the pre-compiled header
|
||||
# output. Defaults to pchheader.c. Only required for MSVC.
|
||||
#
|
||||
# Caveats:
|
||||
#
|
||||
# * Its not currently possible to use the same precompiled-header in
|
||||
# more than a single target in the same directory (No way to set
|
||||
# the source file properties differently for each target).
|
||||
#
|
||||
# * MSVC: A source file with the same name as the header must exist
|
||||
# and be included in the target (E.g. header.cpp). Name of file
|
||||
# can be changed using the SOURCE_CXX/SOURCE_C options.
|
||||
#
|
||||
# License:
|
||||
#
|
||||
# Copyright (C) 2009-2013 Lars Christensen <larsch@belunktum.dk>
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
# (the 'Software') deal in the Software without restriction,
|
||||
# including without limitation the rights to use, copy, modify, merge,
|
||||
# publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
# and to permit persons to whom the Software is furnished to do so,
|
||||
# subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be
|
||||
# included in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
include(CMakeParseArguments)
|
||||
|
||||
macro(combine_arguments _variable)
|
||||
set(_result "")
|
||||
foreach(_element ${${_variable}})
|
||||
set(_result "${_result} \"${_element}\"")
|
||||
endforeach()
|
||||
string(STRIP "${_result}" _result)
|
||||
set(${_variable} "${_result}")
|
||||
endmacro()
|
||||
|
||||
function(export_all_flags _filename _source_name_for_flags)
|
||||
set(_include_directories "$<TARGET_PROPERTY:${_target},INCLUDE_DIRECTORIES>")
|
||||
set(_compile_definitions "$<TARGET_PROPERTY:${_target},COMPILE_DEFINITIONS>")
|
||||
get_source_file_property(_compile_file_flags "${_source_name_for_flags}" COMPILE_FLAGS)
|
||||
set(_compile_flags "$<TARGET_PROPERTY:${_target},COMPILE_FLAGS>")
|
||||
set(_compile_options "$<TARGET_PROPERTY:${_target},COMPILE_OPTIONS>")
|
||||
set(_include_directories "$<$<BOOL:${_include_directories}>:-I$<JOIN:${_include_directories},\n-I>\n>")
|
||||
set(_compile_definitions "$<$<BOOL:${_compile_definitions}>:-D$<JOIN:${_compile_definitions},\n-D>\n>")
|
||||
set(_compile_file_flags "$<$<BOOL:${_compile_file_flags}>:$<JOIN:${_compile_file_flags},\n>\n>")
|
||||
set(_compile_flags "$<$<BOOL:${_compile_flags}>:$<JOIN:${_compile_flags},\n>\n>")
|
||||
set(_compile_options "$<$<BOOL:${_compile_options}>:$<JOIN:${_compile_options},\n>\n>")
|
||||
file(GENERATE OUTPUT "${_filename}" CONTENT "${_compile_definitions}${_include_directories}${_compile_file_flags}${_compile_flags}${_compile_options}\n")
|
||||
endfunction()
|
||||
|
||||
function(add_precompiled_header _target _input)
|
||||
if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU|Clang")
|
||||
get_filename_component(_name ${_input} NAME)
|
||||
set(_pch_header "${CMAKE_CURRENT_SOURCE_DIR}/${_input}")
|
||||
set(_pch_binary_dir "${CMAKE_CURRENT_BINARY_DIR}/${_target}_pch")
|
||||
set(_pchfile "${_pch_binary_dir}/${_name}")
|
||||
set(_outdir "${_pch_binary_dir}/${_name}.gch")
|
||||
make_directory(${_outdir})
|
||||
set(_output_cxx "${_outdir}/.c++")
|
||||
set(_output_c "${_outdir}/.c")
|
||||
|
||||
get_property(_sources TARGET ${_target} PROPERTY SOURCES)
|
||||
foreach(_source ${_sources})
|
||||
if(_source MATCHES \\.\(c\)$ AND NOT _source_for_c_flags)
|
||||
set(_source_for_c_flags "${_source}")
|
||||
elseif(_source MATCHES \\.\(cc|cxx|cpp\)$ AND NOT _source_for_cpp_flags)
|
||||
set(_source_for_cpp_flags "${_source}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT "${_pchfile}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy "${_pch_header}" "${_pchfile}"
|
||||
DEPENDS "${_pch_header}"
|
||||
IMPLICIT_DEPENDS CXX "${_pch_header}"
|
||||
IMPLICIT_DEPENDS C "${_pch_header}"
|
||||
COMMENT "Updating ${_name}")
|
||||
|
||||
if(_source_for_c_flags)
|
||||
set(_pch_c_flags_file "${_pch_binary_dir}/compile_flags_c.rsp")
|
||||
export_all_flags("${_pch_c_flags_file}" "${_source_for_c_flags}")
|
||||
set(_compiler_FLAGS "@${_pch_c_flags_file}")
|
||||
add_custom_command(
|
||||
OUTPUT "${_output_c}"
|
||||
COMMAND "${CMAKE_C_COMPILER}" ${_compiler_FLAGS} -x c-header -o "${_output_c}" -c "${_pchfile}"
|
||||
DEPENDS "${_pchfile}" "${_pch_c_flags_file}"
|
||||
IMPLICIT_DEPENDS C "${_pch_header}"
|
||||
COMMENT "Precompiling ${_name} for ${_target} (C)")
|
||||
endif()
|
||||
if(_source_for_cpp_flags)
|
||||
set(_pch_cpp_flags_file "${_pch_binary_dir}/compile_flags_cpp.rsp")
|
||||
export_all_flags("${_pch_cpp_flags_file}" "${_source_for_cpp_flags}")
|
||||
set(_compiler_FLAGS "@${_pch_cpp_flags_file}")
|
||||
add_custom_command(
|
||||
OUTPUT "${_output_cxx}"
|
||||
COMMAND "${CMAKE_CXX_COMPILER}" ${_compiler_FLAGS} -x c++-header -o "${_output_cxx}" -c "${_pchfile}"
|
||||
DEPENDS "${_pchfile}" "${_pch_cpp_flags_file}"
|
||||
IMPLICIT_DEPENDS CXX "${_pch_header}"
|
||||
COMMENT "Precompiling header ${_name} for ${_target} (C++)")
|
||||
endif()
|
||||
|
||||
foreach(_source ${_sources})
|
||||
set(_pch_compile_flags "")
|
||||
|
||||
if(_source MATCHES \\.\(cc|cxx|cpp|c\)$)
|
||||
get_source_file_property(_pch_compile_flags "${_source}" COMPILE_FLAGS)
|
||||
if(NOT _pch_compile_flags)
|
||||
set(_pch_compile_flags)
|
||||
endif()
|
||||
separate_arguments(_pch_compile_flags)
|
||||
if(_source MATCHES \\.\(cc|cxx|cpp\)$)
|
||||
list(APPEND _pch_compile_flags -include "${_pchfile}")
|
||||
else()
|
||||
list(APPEND _pch_compile_flags "-I${_pch_binary_dir}")
|
||||
endif()
|
||||
|
||||
get_source_file_property(_object_depends "${_source}" OBJECT_DEPENDS)
|
||||
if(NOT _object_depends)
|
||||
set(_object_depends)
|
||||
endif()
|
||||
list(APPEND _object_depends "${_pchfile}")
|
||||
if(_source MATCHES \\.\(cc|cxx|cpp\)$)
|
||||
list(APPEND _object_depends "${_output_cxx}")
|
||||
else()
|
||||
list(APPEND _object_depends "${_output_c}")
|
||||
endif()
|
||||
|
||||
combine_arguments(_pch_compile_flags)
|
||||
set_source_files_properties(${_source} PROPERTIES
|
||||
COMPILE_FLAGS "${_pch_compile_flags}"
|
||||
OBJECT_DEPENDS "${_object_depends}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||
if(NOT _PCH_FORCEINCLUDE)
|
||||
set(_PCH_FORCEINCLUDE ON)
|
||||
endif()
|
||||
endif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
||||
endif(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU|Clang")
|
||||
endfunction()
|
@ -1 +1 @@
|
||||
Subproject commit 14890fb48acb3ee8151f98589847ffcfd3aa7826
|
||||
Subproject commit 0d9d39ab7dd1ecd80235c647fc4bf62d580cbf6c
|
@ -1,27 +0,0 @@
|
||||
# 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
|
||||
|
||||
{
|
||||
'includes': [
|
||||
'helpers/common/common.gypi',
|
||||
],
|
||||
'targets': [{
|
||||
'target_name': 'linux_glibc_wraps',
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
'<(src_loc)/platform/linux/linux_glibc_wraps.c',
|
||||
],
|
||||
'conditions': [[ '"<!(uname -m)" == "x86_64" or "<!(uname -m)" == "aarch64"', {
|
||||
'sources': [
|
||||
'<(src_loc)/platform/linux/linux_glibc_wraps_64.c',
|
||||
],
|
||||
}, {
|
||||
'sources': [
|
||||
'<(src_loc)/platform/linux/linux_glibc_wraps_32.c',
|
||||
],
|
||||
}]],
|
||||
}],
|
||||
}
|
@ -19,17 +19,8 @@
|
||||
#'xkbcommon',
|
||||
],
|
||||
},
|
||||
'dependencies': [
|
||||
'<(DEPTH)/linux_glibc_wraps.gyp:linux_glibc_wraps',
|
||||
],
|
||||
'libraries': [
|
||||
'<(PRODUCT_DIR)/obj.target/liblinux_glibc_wraps.a',
|
||||
'-lbreakpad_client',
|
||||
'-lcomposeplatforminputcontextplugin',
|
||||
'-libusplatforminputcontextplugin',
|
||||
'-lfcitxplatforminputcontextplugin',
|
||||
'-lhimeplatforminputcontextplugin',
|
||||
'-lnimfplatforminputcontextplugin',
|
||||
'-llzma',
|
||||
'-lopenal',
|
||||
'-lavformat',
|
||||
|
@ -138,6 +138,11 @@
|
||||
'<(src_loc)/platform/win/windows_dlls.cpp',
|
||||
'<(src_loc)/platform/win/windows_dlls.h',
|
||||
],
|
||||
}], [ 'build_linux', {
|
||||
'libraries': [
|
||||
'<(linux_lib_ssl)',
|
||||
'<(linux_lib_crypto)',
|
||||
],
|
||||
}]],
|
||||
}],
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit f86bc73cfe871b3ac8cd91ffebfa6ddf5cf480a3
|
||||
Subproject commit d19c6720195269e252038563e370253fea968f1c
|
@ -1 +1 @@
|
||||
Subproject commit f7c3e22cc9d51e4bce0fe82e9eaa10cedc7bf5d5
|
||||
Subproject commit c9990aee058d0b321a01a3f564b6eaff886628d0
|
Loading…
Reference in New Issue
Block a user