Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXPORT_FILE_OPTION: unbound variable when using resvg #591

Open
pinpox opened this issue Jun 5, 2021 · 5 comments
Open

EXPORT_FILE_OPTION: unbound variable when using resvg #591

pinpox opened this issue Jun 5, 2021 · 5 comments
Labels

Comments

@pinpox
Copy link

pinpox commented Jun 5, 2021

Questioner Info

  • Materia version: master
  • Distribution (and version): NixOS
  • Desktop environment (and version): awesomeWM

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?

@pinpox pinpox added the question label Jun 5, 2021
@balsoft
Copy link

balsoft commented Jun 6, 2021

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

@balsoft
Copy link

balsoft commented Jun 6, 2021

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
Copy link
Collaborator

btw, are you still able to reproduce this one? #523

@actionless
Copy link
Collaborator

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
Copy link

rnhmjoj commented Dec 6, 2021

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

TheGreatMcPain added a commit to TheGreatMcPain/gruvbox-material-gtk that referenced this issue Dec 8, 2022
The Materia version that themix-gui-1.15.1 uses is still from May 12, 2021

Some notible changes is that I had to switch from inkscape to resvg
since exporting using inkscape has been borked since 2021. Hopefully
things still render properly.

Issue on themix-gui's repository regarding inkscape and materia.
themix-project/themix-gui#387

How I got materia to export with resvg.
nana-4/materia-theme#591
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants