mateosss / matter

Customizable GRUB theme inspired by Material Design
Boost Software License 1.0
865 stars 50 forks source link

Partial solution to remove ImageMagick dependency (#46) #61

Closed heyzec closed 3 years ago

mateosss commented 3 years ago

I'm using a distro derived from Ubuntu 18.04 and a sudo apt install inkscape gets you Inkscape 0.92.3 (2405546, 2018-03-11) which seems to not have the --export-filename flag thus Matter is failing.

This is the output I get, I added extra prints prefixed with >>>. I also removed the 2>/dev/nullin the inkscape cmd. is it too verbose if you don't silence inkscape stderr? it could be useful for future issues.

~/D/p/m/matter (heyzec61|✚3…) [1] $ ./matter.py -i ubuntu microsoft-windows folder ubuntu restore ubuntu restore ubuntu restore cog
[I] Begin Matter install
[I] Build theme from user preferences
[I] Convert icons
>>> [svg2png.py@68] cmd=inkscape --export-filename='/home/mateo/Documents/projects/matter/Matter/icons/ubuntu.png' temp.svg -w 72

** (inkscape:10583): WARNING **: 10:14:18.224: Invalid option --export-filename=/home/mateo/Documents/projects/matter/Matter/icons/ubuntu.png
>>> [svg2png.py@70] exit_code=256
>>> [matter.py.py@266] color=#ffffff, src_path=/home/mateo/Documents/projects/matter/icons/ubuntu.svg, dst_path=/home/mateo/Documents/projects/matter/Matter/icons/ubuntu.png
[E] Stop. The `inkscape` command returned an error
heyzec commented 3 years ago

Oops, I didn't realise all that created so many notifications. Anyways, the script should now be working, do take a look :D

mateosss commented 3 years ago

Thank you! this is very useful.

mateosss commented 3 years ago

I just noticed (a bit late :sweat_smile:) that the PNGs that were being produced were not correct (color and padding were not being applied) I tried it with both inkscape 1.0.2 and inkscape 0.92.3 with the same results.

I commented out the usage of inkscape_convert_svg2png for now.

heyzec commented 3 years ago

Hmm, that's odd. I tried a clean install on Ubuntu using both inkscape versions and it works for me. What's the output when you run the command which inkscape?

mateosss commented 3 years ago
~ $ which inkscape
/usr/bin/inkscape
~ $ inkscape --version
Inkscape 0.92.3 (2405546, 2018-03-11)

Maybe it is something with my setup, it seems that the temp.svg file is not getting the fill nor the transform properties written. I'll have a look at it later.

mateosss commented 3 years ago

This is now working, solved in https://github.com/mateosss/matter/commit/3ab56e1540e4fe6112be4ff63d77f36d103b6b27 For some reason elements = root.findall(...) was returning an empty list.