nana-4 / materia-theme

A Material Design theme for GNOME/GTK based desktop environments
GNU General Public License v2.0
3.42k stars 255 forks source link

EXPORT_FILE_OPTION: unbound variable when using resvg #591

Open pinpox opened 3 years ago

pinpox commented 3 years ago

Questioner Info

Description

I'm trying to run the ./change_colors.sh script using rendersvg/resvg which seems to be supported as an alternative to inkscape. There seems to be a bug though (or I'm doing something wrong?)

       > Rendering 'assets/treeview-ltr-button-hover.png'
       > ./render-asset.sh: line 52: EXPORT_FILE_OPTION: unbound variable
       > Rendering 'assets/treeview-ltr-button-active.png'
       > ./render-asset.sh: line 52: EXPORT_FILE_OPTION: unbound variable
       > Rendering 'assets/treeview-rtl-button.png'
       > ./render-asset.sh: line 52: EXPORT_FILE_OPTION: unbound variable
       > Rendering 'assets/treeview-rtl-button-hover.png'
       > ./render-asset.sh: line 52: EXPORT_FILE_OPTION: unbound variable
       > Rendering 'assets/treeview-rtl-button-active.png'
       > ./render-asset.sh: line 52: EXPORT_FILE_OPTION: unbound variable

Looking at the code it seems that this variable is indeed not set if inkscape is not present. Is this expected? Can I work around this?

balsoft commented 3 years ago

I think you have to pass -i False to change_colors.sh, then it errors out with a different error :)

balsoft commented 3 years ago

And the second error can be fixed with

sed -e 's/handle-horz-.*//' -e 's/handle-vert-.*//' -i ./src/gtk-2.0/assets.txt

I'm not sure if it's a bug in this repo or resvg (I can just say that there is indeed no nodes with such IDs in the relevant svg templates)

@pinpox here's what I think you want: https://github.com/balsoft/nixos-config/blob/master/modules/workspace/gtk.nix#L32

actionless commented 3 years ago

btw, are you still able to reproduce this one? https://github.com/nana-4/materia-theme/issues/523

actionless commented 3 years ago

cause after that 523 resvg support sorta dropped, just code left there in case if they will wake up and make resvg working again

rnhmjoj commented 2 years ago

Please, consider switching to resvg by default. Inkscape can't be compiled without a GUI anymore and (re)starting inkscape in a row is incredibly inefficient: rendering all the assets with resvg is 5x faster.

You can fix the resvg support by applying these changes:

find -name '*.sh' | xargs sed -i 's/rendersvg/resvg/g; s/--export-id/--export-area-drawing --export-id/g'
sed '/handle-/d' -i src/gtk-2.0/assets.txt