-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove ns0 namespace added by etree and don't try to construct if a f…
…ile doesn't exist in size
- Loading branch information
Showing
2 changed files
with
37 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
mime_sizes = ['16', '24', '32', '48', '64', '128'] | ||
|
||
python3 = find_program('python3') | ||
python3 = find_program('python3', required: true) | ||
|
||
# Copy src dir to build dir, to give a base to work on | ||
|
||
|
@@ -92,19 +92,21 @@ endforeach | |
|
||
foreach type : mime_types | ||
foreach size: mime_sizes | ||
message('compositing: ' + type[0] + '.svg and ' + type[1] + '.svg @ ' + size ) | ||
|
||
output_file = '@[email protected]'.format(join_paths(meson.project_build_root(), 'mimes', size, type[0])) | ||
run_command('touch', output_file) | ||
|
||
run_command( | ||
python3, | ||
'@[email protected]'.format(join_paths(meson.project_source_root(), 'scripts', 'composite-svg')), | ||
'@[email protected]'.format(join_paths(meson.current_source_dir(), size, type[0])), | ||
'@[email protected]'.format(join_paths(meson.current_source_dir(), size, type[1])), | ||
output_file, | ||
check: false | ||
) | ||
if fs.is_file(size / type[0] + '.svg') | ||
message('compositing: ' + type[0] + '.svg and ' + type[1] + '.svg @ ' + size ) | ||
|
||
output_file = '@[email protected]'.format(join_paths(meson.project_build_root(), 'mimes', size, type[0])) | ||
run_command('touch', output_file) | ||
|
||
run_command( | ||
python3, | ||
'@[email protected]'.format(join_paths(meson.project_source_root(), 'scripts', 'composite-svg')), | ||
'@[email protected]'.format(join_paths(meson.current_source_dir(), size, type[0])), | ||
'@[email protected]'.format(join_paths(meson.current_source_dir(), size, type[1])), | ||
output_file, | ||
check: true | ||
) | ||
endif | ||
endforeach | ||
endforeach | ||
|
||
|
@@ -126,18 +128,20 @@ templates = [ | |
|
||
foreach template : templates | ||
foreach size: mime_sizes | ||
message('adding template decoration: ' + template + '.svg @ ' + size) | ||
|
||
run_command( | ||
python3, | ||
'@[email protected]'.format(join_paths(meson.project_source_root(), 'scripts', 'composite-svg')), | ||
'@[email protected]'.format(join_paths(meson.current_source_dir(), size, 'decoration-template')), | ||
# We operate entirely in the build directory here, because we are | ||
# cascading off of a previously composited file | ||
'@[email protected]'.format(join_paths(meson.project_build_root(), 'mimes', size, template)), | ||
'@[email protected]'.format(join_paths(meson.project_build_root(), 'mimes', size, template)), | ||
check: false | ||
) | ||
if fs.is_file(meson.project_build_root() / 'mimes' / size / template + '.svg') | ||
message('adding template decoration: ' + template + '.svg @ ' + size) | ||
|
||
run_command( | ||
python3, | ||
'@[email protected]'.format(join_paths(meson.project_source_root(), 'scripts', 'composite-svg')), | ||
'@[email protected]'.format(join_paths(meson.current_source_dir(), size, 'decoration-template')), | ||
# We operate entirely in the build directory here, because we are | ||
# cascading off of a previously composited file | ||
'@[email protected]'.format(join_paths(meson.project_build_root(), 'mimes', size, template)), | ||
'@[email protected]'.format(join_paths(meson.project_build_root(), 'mimes', size, template)), | ||
check: true | ||
) | ||
endif | ||
endforeach | ||
endforeach | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters