mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-23 19:31:44 +00:00
build system: add dependencies for Qt resource files
This commit is contained in:
parent
f066e7ab9c
commit
e9d65b182b
2
Rakefile
2
Rakefile
@ -1163,6 +1163,8 @@ if $build_mkvtoolnix_gui
|
||||
qrc = [ "src/mkvtoolnix-gui/qt_resources.qrc" ]
|
||||
qrc << "lib/QDarkStyleSheet/qdarkstyle/style.qrc" if $building_for[:windows]
|
||||
|
||||
add_qrc_dependencies(*qrc)
|
||||
|
||||
file "src/mkvtoolnix-gui/qt_resources.cpp" => qrc, &qrc_compiler
|
||||
|
||||
Application.new("src/mkvtoolnix-gui/mkvtoolnix-gui").
|
||||
|
@ -287,6 +287,19 @@ def update_version_number_include
|
||||
end
|
||||
end
|
||||
|
||||
def add_qrc_dependencies *qrcs
|
||||
qrc_content = read_files(*qrcs)
|
||||
qrc_content.each do |file_name, content|
|
||||
dir = file_name.gsub(%r{[^/]+$}, '')
|
||||
dependencies = content.
|
||||
join('').
|
||||
scan(%r{<file[^>]*>([^<]+)}).
|
||||
map { |matches| dir + matches[0] }
|
||||
|
||||
file file_name => dependencies
|
||||
end
|
||||
end
|
||||
|
||||
class Rake::Task
|
||||
def mo_all_prerequisites
|
||||
todo = [name]
|
||||
|
Loading…
Reference in New Issue
Block a user