From 48469dd0ef0b3909e27fb4bbb963a6de5e886057 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Tue, 27 Nov 2018 22:30:18 +0100 Subject: [PATCH] Generate icons from svg (fixes pwmt/zathura#28) --- data/icon-128/meson.build | 12 ++++++++++++ data/icon-16/meson.build | 12 ++++++++++++ data/icon-256/meson.build | 12 ++++++++++++ data/icon-32/meson.build | 12 ++++++++++++ data/icon-64/meson.build | 12 ++++++++++++ data/meson.build | 9 ++++++++- data/org.pwmt.zathura.png | Bin 6347 -> 0 bytes data/org.pwmt.zathura.svg | 22 ++++++++++++++++++++++ 8 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 data/icon-128/meson.build create mode 100644 data/icon-16/meson.build create mode 100644 data/icon-256/meson.build create mode 100644 data/icon-32/meson.build create mode 100644 data/icon-64/meson.build delete mode 100644 data/org.pwmt.zathura.png create mode 100644 data/org.pwmt.zathura.svg diff --git a/data/icon-128/meson.build b/data/icon-128/meson.build new file mode 100644 index 0000000..7993222 --- /dev/null +++ b/data/icon-128/meson.build @@ -0,0 +1,12 @@ +custom_target('org.pwmt.zathura_128.png', + input: '../org.pwmt.zathura.svg', + output: 'org.pwmt.zathura.png', + command: [ + rsvg_convert, + '-w', '128', '-h', '128', + '-o', '@OUTPUT@', + '@INPUT@' + ], + install: true, + install_dir: join_paths(datadir, 'icons', 'hicolor', '128x128', 'apps') +) diff --git a/data/icon-16/meson.build b/data/icon-16/meson.build new file mode 100644 index 0000000..b62f5bc --- /dev/null +++ b/data/icon-16/meson.build @@ -0,0 +1,12 @@ +custom_target('org.pwmt.zathura_16.png', + input: '../org.pwmt.zathura.svg', + output: 'org.pwmt.zathura.png', + command: [ + rsvg_convert, + '-w', '16', '-h', '16', + '-o', '@OUTPUT@', + '@INPUT@' + ], + install: true, + install_dir: join_paths(datadir, 'icons', 'hicolor', '16x16', 'apps') +) diff --git a/data/icon-256/meson.build b/data/icon-256/meson.build new file mode 100644 index 0000000..6be7d7a --- /dev/null +++ b/data/icon-256/meson.build @@ -0,0 +1,12 @@ +custom_target('org.pwmt.zathura_256.png', + input: '../org.pwmt.zathura.svg', + output: 'org.pwmt.zathura.png', + command: [ + rsvg_convert, + '-w', '256', '-h', '256', + '-o', '@OUTPUT@', + '@INPUT@' + ], + install: true, + install_dir: join_paths(datadir, 'icons', 'hicolor', '256x256', 'apps') +) diff --git a/data/icon-32/meson.build b/data/icon-32/meson.build new file mode 100644 index 0000000..bef7bf5 --- /dev/null +++ b/data/icon-32/meson.build @@ -0,0 +1,12 @@ +custom_target('org.pwmt.zathura_32.png', + input: '../org.pwmt.zathura.svg', + output: 'org.pwmt.zathura.png', + command: [ + rsvg_convert, + '-w', '32', '-h', '32', + '-o', '@OUTPUT@', + '@INPUT@' + ], + install: true, + install_dir: join_paths(datadir, 'icons', 'hicolor', '32x32', 'apps') +) diff --git a/data/icon-64/meson.build b/data/icon-64/meson.build new file mode 100644 index 0000000..75fa8b8 --- /dev/null +++ b/data/icon-64/meson.build @@ -0,0 +1,12 @@ +custom_target('org.pwmt.zathura_64.png', + input: '../org.pwmt.zathura.svg', + output: 'org.pwmt.zathura.png', + command: [ + rsvg_convert, + '-w', '64', '-h', '64', + '-o', '@OUTPUT@', + '@INPUT@' + ], + install: true, + install_dir: join_paths(datadir, 'icons', 'hicolor', '64x64', 'apps') +) diff --git a/data/meson.build b/data/meson.build index 55cbe39..e512837 100644 --- a/data/meson.build +++ b/data/meson.build @@ -7,7 +7,14 @@ zathura_resources = gnome.compile_resources( ) install_data('org.pwmt.zathura.xml', install_dir: dbusinterfacesdir) -install_data('org.pwmt.zathura.png', install_dir: join_paths(datadir, 'icons', 'hicolor', '128x128', 'apps')) +install_data('org.pwmt.zathura.svg', install_dir: join_paths(datadir, 'icons', 'scalable', 'apps')) + +rsvg_convert = find_program('rsvg-convert', required: false, native: true) +if rsvg_convert.found() + foreach width : [16, 32, 64, 128, 256] + subdir('icon-@0@'.format(width)) + endforeach +endif i18n = import('i18n') podir = join_paths(meson.source_root(), 'po') diff --git a/data/org.pwmt.zathura.png b/data/org.pwmt.zathura.png deleted file mode 100644 index 4a41efc78b97c32be1976aa6d7c57226d9af3caf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6347 zcmaiZi8mDP_y04-RtVXK=q-&k`;eWHv5b97$i8P6(PW$KBC_vGrb42Uea{q;ea$Yi zWE--t^Y!@ye&=_dbMHOpIp5}Zx#F#1<_iE7!~X;VvU6dVofLj(9aV}25>_S>2KNot8~|XZ zXq2+?)5%TCiN{mF1}{#4MYUOu<4ctJ#Y$pIxABr<;;XW09o$y&TeFIvw&4YL);r4U=ld<}g@s{P1xo(E>SQS9#Y542 ze}8|CtrUn&%n!gvpCr;xk0nKta;8T+Iw{J_{~-Z-xyL>3;HZ83D*Y%#kYP|9+t5@+ zHP6<@jb%n0l2KBFU24)+n_U!S2a*agh6s|FQfxC}J%HQ4Y%LHC4j`ts@^Ma?ZbJIN zh6Kd?U|1G`m@;*Q(#(fKn&=SQy2v5u08f!dFQA{mkSjy5SEecSN%WzgxQ2*fG1(+x z91tW2lBz8bIFm#?oz1ca^PZq2X76L%H?N=lLZE-?tpd35FIy4>M<1JLUrxZQp*BK9 z*d8VPBChu0DbxOL1y|* zy1@siDrHn0%9w|%AVy$;v*Ie{7!ag-+JsR*njREve|LT!9D*e`W$p_3tr2P|QIb@^ z#w{4vRT4+ES!M;kULNCmk3 zVPgXKohq&g4!+uBgCOQW9W$LDih&V41&1^UH})1ZN)BWLEBnh~%*#P^ynlhvLVGP{jUY|^ zsLPjj5Uf$8viF9iUeOn#>wcobPsya%cH3d$z1?9e$@X<*cuanr$~)s>2O0zg*Et7Z zN!;dm$*{K6oUu;&F0Y>i(27CYrzH&z1KVeF7Bj(Ez?nB;R0uDM(t|(aQy5x-v5bEyIfdayyaefy5Ul!9yl1+H zSopDd<>*$fo4l34m}3j8J;?~=Xu;^#X0Ib6B?VA!9F_j3@<5x?l~4y+N=@CkiIP)~4*VS7nF(@7ol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