florianfesti / boxes

Boxes.py - laser cutting boxes and more
GNU General Public License v3.0
973 stars 355 forks source link

Inkscape Plugins disabled #574

Closed rebeltaz closed 2 months ago

rebeltaz commented 1 year ago

I installed the inkscape plugins using the manual method under Ubuntu 22.04 in inkscape 1.1. The plugins shows up under the extension menu, but every one is greyed out / disabled. What am I doing wrong?

EDIT: I managed to get the boxes2inkscape script to work (by changing "#!/usr/bin/env python3" to '#!/usr/bin/python3' and then saving it with unix encoding instead of windows) but I am still getting disabled / greyed out extensions.

I ran inkscape from the command line and it looks like a lot of things are missing! I installed the Requirements from the Installation page (the only one I was actually missing was affine).

rebeltaz commented 1 year ago

OK... I figured it out. The installation instructions did not say anything about copying both boxes.y and boxes_proxy.py to the inkscape/extensions/ directory. Once I fixed the "#!/usr/bin/env python3" issue with both scripts and copied those over, they options are no longer greyed out.

I also had to edit all of the generated .inx files to change '\<image>./' to '\<image>images/'. I then copied all of the images from static/samples to a new directory called inkscape/extensions/images/

I had tried copying all of the images directly to the extensions directory, but that still threw up errors, hence why I created my own.

After getting the extension to be enabled and actually pop up the dialog, I was getting errors that it couldn't find boxes. To fix that, I had to copy the 'boxes' directory to the inkscape directory and then add the inkscape extensions directory permanently to the PATH.

Good Lord. But... it is FINALLY working!

rebeltaz commented 1 year ago

if anyone has this same trouble, you can run the following commands from the 'boxes-master/' directory

sed -i 's/env python3/python3/' scripts/*
setup.py
scripts/boxes2inkscape
mkdir ~/.config/inkscape/extensions/images 
cp static/samples/* ~/.config/inkscape/extensions/images/
cp -r boxes ~/.config/inkscape/
cd ~/.config/inkscape/extensions/
sed -i "s/<image>\./<image>images/" boxes.py.*.inx 
echo $'\nexport PATH=$PATH:~/.config/inkscape/extensions' >> ~/.profile && source ~/.profile

reboot your computer.

abergmeier commented 7 months ago

Isn't the problem with python3 rather the Windows users, that commit CRLF?

Deltaplc commented 6 months ago

Good morning Excuse my ignorance, but I haven't yet understood the procedure to create all the files necessary to use this beautiful application on inkscape!! How do you create the boxes.exe file? And all the inx files? Can you help me? Can you give me a step by step guide? I can't really understand from the instructions on the site!!! Thank you

florianfesti commented 2 months ago

You might want to try MightyScape a selection of pre-build Inkscape extensions including Boxes.py: https://gitea.fablabchemnitz.de/FabLab_Chemnitz/mightyscape-1.2-zipmirror