Remove GYP build scripts.

This commit is contained in:
John Preston 2020-01-21 15:22:33 +03:00
parent 35176fd02a
commit 593c50f623
6 changed files with 0 additions and 568 deletions

View file

@ -1,55 +0,0 @@
# This file is part of Desktop App Toolkit,
# a set of libraries for developing nice desktop applications.
#
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
{
'actions': [{
'action_name': 'codegen_palette',
'inputs': [
'<(PRODUCT_DIR)/codegen_style<(exe_ext)',
'<(style_timestamp)',
'<(src_loc)/ui/colors.palette',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/styles/palette.h',
'<(SHARED_INTERMEDIATE_DIR)/styles/palette.cpp',
],
'action': [
'<(PRODUCT_DIR)/codegen_style<(exe_ext)',
'-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,
# and the 'message' will be just 'codegen_style-ing .style..'
# Looks like the using the <(RULE_INPUT_ROOT) here "exports" it
# for using in the 'message' field.
'<(src_loc)/ui/colors.palette',
],
'message': 'codegen_palette-ing colors..',
'process_outputs_as_sources': 1,
}, {
'action_name': 'codegen_emoji',
'inputs': [
'<(PRODUCT_DIR)/codegen_emoji<(exe_ext)',
'<(emoji_suggestions_loc)/emoji_autocomplete.json',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/emoji.cpp',
'<(SHARED_INTERMEDIATE_DIR)/emoji.h',
'<(SHARED_INTERMEDIATE_DIR)/emoji_suggestions_data.cpp',
'<(SHARED_INTERMEDIATE_DIR)/emoji_suggestions_data.h',
],
'action': [
'<(PRODUCT_DIR)/codegen_emoji<(exe_ext)',
'<(emoji_suggestions_loc)/emoji_autocomplete.json',
'-o', '<(SHARED_INTERMEDIATE_DIR)',
],
'message': 'codegen_emoji-ing..',
'process_outputs_as_sources': 1,
}],
}

View file

@ -1,72 +0,0 @@
# This file is part of Desktop App Toolkit,
# a set of libraries for developing nice desktop applications.
#
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
{
'variables': {
'qrc_files': [
'<(submodules_loc)/lib_ui/fonts/fonts.qrc',
],
},
'conditions': [
[ 'build_linux', {
'variables': {
'qrc_files': [
'<(submodules_loc)/lib_ui/qt_conf/linux.qrc',
],
}
}],
[ 'build_mac', {
'variables': {
'qrc_files': [
'<(submodules_loc)/lib_ui/qt_conf/mac.qrc',
],
},
}],
[ 'build_win', {
'variables': {
'qrc_files': [
'<(submodules_loc)/lib_ui/qt_conf/win.qrc',
],
}
}],
],
'actions': [{
'action_name': 'update_dependent_qrc',
'inputs': [
'update_dependent.py',
'<@(qrc_files)',
'<!@(python <(submodules_loc)/lib_ui/gyp/update_dependent.py --qrc_list <@(qrc_files))',
],
'outputs': [
'<(qrc_timestamp)',
],
'action': [
'python', '<(submodules_loc)/lib_ui/gyp/update_dependent.py', '--qrc',
'-o', '<(qrc_timestamp)',
'<@(qrc_files)',
],
'message': 'Updating dependent qrc files..',
}],
'rules': [{
'rule_name': 'qt_rcc',
'extension': 'qrc',
'inputs': [
'<(qrc_timestamp)',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/qrc/qrc_<(RULE_INPUT_ROOT).cpp',
],
'action': [
'<(qt_loc)/bin/rcc<(exe_ext)',
'-name', '<(RULE_INPUT_ROOT)',
'-no-compress',
'<(RULE_INPUT_PATH)',
'-o', '<(SHARED_INTERMEDIATE_DIR)/<(_target_name)/qrc/qrc_<(RULE_INPUT_ROOT).cpp',
],
'message': 'Rcc-ing <(RULE_INPUT_ROOT).qrc..',
'process_outputs_as_sources': 1,
}],
}

View file

@ -1,146 +0,0 @@
<(src_loc)/ui/effects/animation_value.cpp
<(src_loc)/ui/effects/animation_value.h
<(src_loc)/ui/effects/animations.cpp
<(src_loc)/ui/effects/animations.h
<(src_loc)/ui/effects/cross_animation.cpp
<(src_loc)/ui/effects/cross_animation.h
<(src_loc)/ui/effects/fade_animation.cpp
<(src_loc)/ui/effects/fade_animation.h
<(src_loc)/ui/effects/numbers_animation.cpp
<(src_loc)/ui/effects/numbers_animation.h
<(src_loc)/ui/effects/panel_animation.cpp
<(src_loc)/ui/effects/panel_animation.h
<(src_loc)/ui/effects/radial_animation.cpp
<(src_loc)/ui/effects/radial_animation.h
<(src_loc)/ui/effects/ripple_animation.cpp
<(src_loc)/ui/effects/ripple_animation.h
<(src_loc)/ui/effects/slide_animation.cpp
<(src_loc)/ui/effects/slide_animation.h
<(src_loc)/ui/image/image_prepare.cpp
<(src_loc)/ui/image/image_prepare.h
<(src_loc)/ui/layers/box_content.cpp
<(src_loc)/ui/layers/box_content.h
<(src_loc)/ui/layers/box_layer_widget.cpp
<(src_loc)/ui/layers/box_layer_widget.h
<(src_loc)/ui/layers/generic_box.cpp
<(src_loc)/ui/layers/generic_box.h
<(src_loc)/ui/layers/layer_manager.cpp
<(src_loc)/ui/layers/layer_manager.h
<(src_loc)/ui/layers/layer_widget.cpp
<(src_loc)/ui/layers/layer_widget.h
<(src_loc)/ui/platform/linux/ui_window_linux.cpp
<(src_loc)/ui/platform/linux/ui_window_linux.h
<(src_loc)/ui/platform/linux/ui_utility_linux.cpp
<(src_loc)/ui/platform/linux/ui_utility_linux.h
<(src_loc)/ui/platform/mac/ui_window_mac.h
<(src_loc)/ui/platform/mac/ui_window_mac.mm
<(src_loc)/ui/platform/mac/ui_window_title_mac.h
<(src_loc)/ui/platform/mac/ui_window_title_mac.mm
<(src_loc)/ui/platform/mac/ui_utility_mac.h
<(src_loc)/ui/platform/mac/ui_utility_mac.mm
<(src_loc)/ui/platform/win/ui_window_shadow_win.cpp
<(src_loc)/ui/platform/win/ui_window_shadow_win.h
<(src_loc)/ui/platform/win/ui_window_title_win.cpp
<(src_loc)/ui/platform/win/ui_window_title_win.h
<(src_loc)/ui/platform/win/ui_window_win.cpp
<(src_loc)/ui/platform/win/ui_window_win.h
<(src_loc)/ui/platform/win/ui_utility_win.cpp
<(src_loc)/ui/platform/win/ui_utility_win.h
<(src_loc)/ui/platform/ui_platform_window.h
<(src_loc)/ui/platform/ui_platform_utility.h
<(src_loc)/ui/style/style_core.cpp
<(src_loc)/ui/style/style_core.h
<(src_loc)/ui/style/style_core_color.cpp
<(src_loc)/ui/style/style_core_color.h
<(src_loc)/ui/style/style_core_direction.cpp
<(src_loc)/ui/style/style_core_direction.h
<(src_loc)/ui/style/style_core_font.cpp
<(src_loc)/ui/style/style_core_font.h
<(src_loc)/ui/style/style_core_icon.cpp
<(src_loc)/ui/style/style_core_icon.h
<(src_loc)/ui/style/style_core_scale.cpp
<(src_loc)/ui/style/style_core_scale.h
<(src_loc)/ui/style/style_core_types.cpp
<(src_loc)/ui/style/style_core_types.h
<(src_loc)/ui/text/text.cpp
<(src_loc)/ui/text/text.h
<(src_loc)/ui/text/text_block.cpp
<(src_loc)/ui/text/text_block.h
<(src_loc)/ui/text/text_entity.cpp
<(src_loc)/ui/text/text_entity.h
<(src_loc)/ui/text/text_isolated_emoji.h
<(src_loc)/ui/text/text_utilities.cpp
<(src_loc)/ui/text/text_utilities.h
<(src_loc)/ui/toast/toast.cpp
<(src_loc)/ui/toast/toast.h
<(src_loc)/ui/toast/toast_manager.cpp
<(src_loc)/ui/toast/toast_manager.h
<(src_loc)/ui/toast/toast_widget.cpp
<(src_loc)/ui/toast/toast_widget.h
<(src_loc)/ui/widgets/box_content_divider.cpp
<(src_loc)/ui/widgets/box_content_divider.h
<(src_loc)/ui/widgets/buttons.cpp
<(src_loc)/ui/widgets/buttons.h
<(src_loc)/ui/widgets/checkbox.cpp
<(src_loc)/ui/widgets/checkbox.h
<(src_loc)/ui/widgets/dropdown_menu.cpp
<(src_loc)/ui/widgets/dropdown_menu.h
<(src_loc)/ui/widgets/inner_dropdown.cpp
<(src_loc)/ui/widgets/inner_dropdown.h
<(src_loc)/ui/widgets/input_fields.cpp
<(src_loc)/ui/widgets/input_fields.h
<(src_loc)/ui/widgets/labels.cpp
<(src_loc)/ui/widgets/labels.h
<(src_loc)/ui/widgets/menu.cpp
<(src_loc)/ui/widgets/menu.h
<(src_loc)/ui/widgets/popup_menu.cpp
<(src_loc)/ui/widgets/popup_menu.h
<(src_loc)/ui/widgets/scroll_area.cpp
<(src_loc)/ui/widgets/scroll_area.h
<(src_loc)/ui/widgets/shadow.cpp
<(src_loc)/ui/widgets/shadow.h
<(src_loc)/ui/widgets/tooltip.cpp
<(src_loc)/ui/widgets/tooltip.h
<(src_loc)/ui/widgets/window.cpp
<(src_loc)/ui/widgets/window.h
<(src_loc)/ui/wrap/fade_wrap.cpp
<(src_loc)/ui/wrap/fade_wrap.h
<(src_loc)/ui/wrap/padding_wrap.cpp
<(src_loc)/ui/wrap/padding_wrap.h
<(src_loc)/ui/wrap/slide_wrap.cpp
<(src_loc)/ui/wrap/slide_wrap.h
<(src_loc)/ui/wrap/vertical_layout.cpp
<(src_loc)/ui/wrap/vertical_layout.h
<(src_loc)/ui/wrap/wrap.h
<(src_loc)/ui/abstract_button.cpp
<(src_loc)/ui/abstract_button.h
<(src_loc)/ui/basic_click_handlers.cpp
<(src_loc)/ui/basic_click_handlers.h
<(src_loc)/ui/click_handler.cpp
<(src_loc)/ui/click_handler.h
<(src_loc)/ui/delayed_activation.cpp
<(src_loc)/ui/delayed_activation.h
<(src_loc)/ui/emoji_config.cpp
<(src_loc)/ui/emoji_config.h
<(src_loc)/ui/focus_persister.h
<(src_loc)/ui/inactive_press.cpp
<(src_loc)/ui/inactive_press.h
<(src_loc)/ui/integration.cpp
<(src_loc)/ui/integration.h
<(src_loc)/ui/main_queue_processor.cpp
<(src_loc)/ui/main_queue_processor.h
<(src_loc)/ui/painter.h
<(src_loc)/ui/ph.cpp
<(src_loc)/ui/ph.h
<(src_loc)/ui/rect_part.h
<(src_loc)/ui/round_rect.cpp
<(src_loc)/ui/round_rect.h
<(src_loc)/ui/rp_widget.cpp
<(src_loc)/ui/rp_widget.h
<(src_loc)/ui/ui_log.cpp
<(src_loc)/ui/ui_log.h
<(src_loc)/ui/ui_utility.cpp
<(src_loc)/ui/ui_utility.h
<(emoji_suggestions_loc)/emoji_suggestions.cpp
<(emoji_suggestions_loc)/emoji_suggestions.h
<(emoji_suggestions_loc)/emoji_suggestions_helper.h

View file

@ -1,55 +0,0 @@
# This file is part of Desktop App Toolkit,
# a set of libraries for developing nice desktop applications.
#
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
{
'actions': [{
'action_name': 'update_dependent_styles',
'inputs': [
'update_dependent.py',
'<@(style_files)',
'<@(dependent_style_files)',
],
'outputs': [
'<(style_timestamp)',
],
'action': [
'python', '<(submodules_loc)/lib_ui/gyp/update_dependent.py', '--styles',
'-I', '<(src_loc)', '-I', '<(submodules_loc)/lib_ui',
'-o', '<(style_timestamp)',
'<@(style_files)',
],
'message': 'Updating dependent style files..',
}],
'rules': [{
'rule_name': 'codegen_style',
'extension': 'style',
'inputs': [
'<(PRODUCT_DIR)/codegen_style<(exe_ext)',
'<(style_timestamp)',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/styles/style_<(RULE_INPUT_ROOT).h',
'<(SHARED_INTERMEDIATE_DIR)/styles/style_<(RULE_INPUT_ROOT).cpp',
],
'action': [
'<(PRODUCT_DIR)/codegen_style<(exe_ext)',
'-I', '<(src_loc)', '-I', '<(submodules_loc)/lib_ui',
'-I', '<(DEPTH)/../Resources',
'-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,
# and the 'message' will be just 'codegen_style-ing .style..'
# Looks like the using the <(RULE_INPUT_ROOT) here "exports" it
# for using in the 'message' field.
'<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)',
],
'message': 'codegen_style-ing <(RULE_INPUT_ROOT).style..',
'process_outputs_as_sources': 1,
}],
}

View file

@ -1,170 +0,0 @@
# This file is part of Desktop App Toolkit,
# a set of libraries for developing nice desktop applications.
#
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
from __future__ import print_function
import sys
import os
import re
import time
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
sys.exit(1)
my_path = os.path.dirname(os.path.realpath(__file__)).replace('\\', '/')
def get_qrc_dependencies(file_path):
global one_modified
dependencies = {}
if not os.path.isfile(file_path):
eprint('File not found: ' + file_path)
dir_name = os.path.dirname(file_path).replace('\\', '/')
with open(file_path) as f:
for line in f:
file_match = re.match('^\s*<file(\s[^>]*)?>([^<]+)</file>', line)
if file_match:
full_path = dir_name + '/' + file_match.group(2)
dependencies[full_path] = 1
return dependencies
def list_qrc_dependencies(file_path):
global one_modified
dependencies = get_qrc_dependencies(file_path)
for path in dependencies:
print(path)
one_modified = 0
def handle_qrc_dependencies(file_path):
global one_modified
dependencies = get_qrc_dependencies(file_path)
file_modified = os.path.getmtime(file_path)
latest_modified = file_modified
for path in dependencies:
if os.path.isfile(path):
dependency_modified = os.path.getmtime(path)
if latest_modified < dependency_modified:
latest_modified = dependency_modified
else:
eprint('File not found: ' + path)
if file_modified < latest_modified:
os.utime(file_path, None);
one_modified = 1
def get_direct_style_dependencies(file_path):
dependencies = {}
dependencies[file_path] = 1
if not os.path.isfile(file_path):
eprint('File not found: ' + file_path)
with open(file_path) as f:
for line in f:
using_match = re.match('^\s*using "([^"]+)"', line)
if using_match:
path = using_match.group(1)
found = 0
for include_dir in include_dirs:
full_path = include_dir + '/' + path
if os.path.isfile(full_path):
try:
if dependencies[full_path]:
eprint('Cyclic dependencies: ' + full_path)
except KeyError:
dependencies[full_path] = 1
found = 1
break
if found != 1:
eprint('File not found: ' + path)
return dependencies
include_dirs = []
def handle_style_dependencies(file_path):
global one_modified
all_dependencies = {}
all_dependencies[file_path] = 1
added_from = {}
while len(added_from) != len(all_dependencies):
for dependency in all_dependencies:
try:
if added_from[dependency]:
continue
except KeyError:
added_from[dependency] = 1
add = get_direct_style_dependencies(dependency)
for new_dependency in add:
all_dependencies[new_dependency] = 1
break
file_modified = os.path.getmtime(file_path)
latest_modified = file_modified
for path in all_dependencies:
if path != file_path:
dependency_modified = os.path.getmtime(path)
if latest_modified < dependency_modified:
latest_modified = dependency_modified
if file_modified < latest_modified:
os.utime(file_path, None);
one_modified = 1
file_paths = []
request = ''
output_file = ''
next_include_dir = 0
next_output_file = 0
next_self = 1
for arg in sys.argv:
if next_self != 0:
next_self = 0
continue
if arg == '--styles' or arg == '--qrc_list' or arg == '--qrc':
if request == '':
request = arg[2:]
else:
eprint('Only one request required.')
continue
if next_include_dir != 0:
next_include_dir = 0
include_dirs.append(arg)
continue
if next_output_file != 0:
next_output_file = 0
output_file = arg
continue
include_dir_match = re.match(r'^\-I(.*)$', arg)
if include_dir_match:
include_dir = include_dir_match.group(1)
if include_dir == '':
next_include_dir = 1
else:
include_dirs.append(include_dir)
continue
output_match = re.match(r'^-o(.*)$', arg)
if output_match:
output_file = output_match.group(1)
if output_file == '':
next_output_file = 1
continue
file_paths.append(arg)
if request == 'styles':
for file_path in file_paths:
handle_style_dependencies(file_path)
elif request == 'qrc':
for file_path in file_paths:
handle_qrc_dependencies(file_path)
elif request == 'qrc_list':
for file_path in file_paths:
list_qrc_dependencies(file_path)
sys.exit(0)
else:
eprint('Request required.')
if not os.path.isfile(output_file):
with open(output_file, "w") as f:
f.write('1')
elif one_modified != 0:
os.utime(output_file, None);

View file

@ -1,70 +0,0 @@
# This file is part of Desktop App Toolkit,
# a set of libraries for developing nice desktop applications.
#
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
{
'includes': [
'../gyp/helpers/common/common.gypi',
],
'targets': [{
'target_name': 'lib_ui',
'hard_dependency': 1,
'includes': [
'../gyp/helpers/common/library.gypi',
'../gyp/helpers/modules/qt.gypi',
'../gyp/helpers/modules/qt_moc.gypi',
'../gyp/helpers/modules/pch.gypi',
'../gyp/helpers/modules/openssl.gypi',
'gyp/styles_rule.gypi',
'gyp/codegen_actions.gypi',
],
'dependencies': [
'<(submodules_loc)/codegen/codegen.gyp:codegen_emoji',
'<(submodules_loc)/codegen/codegen.gyp:codegen_style',
'<(submodules_loc)/lib_base/lib_base.gyp:lib_base',
],
'export_dependent_settings': [
'<(submodules_loc)/lib_base/lib_base.gyp:lib_base',
],
'variables': {
'src_loc': '.',
'emoji_suggestions_loc': '<(src_loc)/emoji_suggestions',
'style_files': [
'<(src_loc)/ui/colors.palette',
'<(src_loc)/ui/basic.style',
'<(src_loc)/ui/layers/layers.style',
'<(src_loc)/ui/widgets/widgets.style',
],
'dependent_style_files': [
],
'style_timestamp': '<(SHARED_INTERMEDIATE_DIR)/update_dependent_styles_ui.timestamp',
'list_sources_command': 'python <(submodules_loc)/lib_base/gyp/list_sources.py --input gyp/sources.txt --replace src_loc=<(src_loc)',
'pch_source': '<(src_loc)/ui/ui_pch.cpp',
'pch_header': '<(src_loc)/ui/ui_pch.h',
},
'defines': [
],
'include_dirs': [
'<(src_loc)',
'<(SHARED_INTERMEDIATE_DIR)',
'<(emoji_suggestions_loc)',
],
'direct_dependent_settings': {
'include_dirs': [
'<(src_loc)',
'<(SHARED_INTERMEDIATE_DIR)',
'<(emoji_suggestions_loc)',
],
},
'sources': [
'<@(style_files)',
'gyp/sources.txt',
'<!@(<(list_sources_command) <(qt_moc_list_sources_arg))',
],
'sources!': [
'<!@(<(list_sources_command) <(qt_moc_list_sources_arg) --exclude_for <(build_os))',
],
}],
}