Close

Boxes.py on Windows?

A project log for Boxes.py

Cut out boxes and other stuff with a laser cutter

florian-festiFlorian Festi 12/20/2017 at 09:475 Comments

Hi!

I am getting questions about Boxes.py on Windows I can't really answer - both as private message or as GitHub tickets. I personally have not used Windows for anything else than occasionally using a Desktop program (like the control software for our laser cutter) in over a decade. So I really have no clue.

Has anyone been able to run Boxes.py on their Windows machine and is able to share the steps needed preferably including links to the libraries and tools required. Are there any changes that would make installing it easier?

Has any one been able to make the Inkscape plugins work on Windows?

Any feed back that help improving the (very thin) install documentation or the installation itself is welcome!


Update:

Finally we have step by step instructions with screen shots for Windows 10 (64 bit). Many thanks to Martin Müller!

Discussions

deepinthewoods wrote 01/16/2018 at 00:07 point

I just tried to get this working a few days ago in win10. I got it to build but it still doesn't run. I'll try to remember all I can.

I was just following the instructions at http://florianfesti.github.io/boxes/html/install.html and googling any issues.

Getting Cairo installed was kinda tricky (I am a python noob). I just needed to install the GTK Runtime. 

At some point I started needing to run cmd.exe "As Administrator". I had ended up copying some exe files around (in program files) to get the c++ compiler working, I think that caused an issue with the permissions.

After this the main problem was that the scripts have no extension. Windows can't execute no-extension files (there are a few ways to make it do that with regedit, none worked). I renamed boxes2inkscape to boxes2inkscape.py and modified one line in setup.py accordingly. build/install with setup.py worked after this.

This is where I got stuck. I renamed scripts/boxes and scripts/boxesserver to have the .py extension but I'm not familiar enough with python/your code to change all the usages. 

If I run 'python boxes' in cmd from the scripts folder, it runs with no errors. I don't really understand the cmdline version, do you have example parameters that I can try?

Boxesserver throws an error when I try to generate a box:

Traceback (most recent call last):
  File "C:\Users\n\AppData\Local\Programs\Python\Python36-32\lib\wsgiref\handlers.py", line 137, in run
    self.result = application(self.environ, self.start_response)
  File "boxesserver", line 384, in serve
    os.remove(box.output)

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\n\\AppData\\Local\\Temp\\tmpxjri92p1'

if I try to delete that file, windows says it is being used by python.exe. After I close the boxesserver terminal I can delete it, so it's not another instance of python. Run as Administrator doesn't fix it.

Thanks for all the good work! It would be really cool to get this working on windows. I am willing to test any changes, and if we get this fixed I can do a clean install in a VM and contribute to docs/instructions.

  Are you sure? yes | no

Florian Festi wrote 01/16/2018 at 16:56 point

Ok, the permission error is probably caused by not closing the file early enough. Windows is a bit more picky about this than proper OSs. I'll look into this. Thanks for your report!

  Are you sure? yes | no

deepinthewoods wrote 01/16/2018 at 18:01 point

just sent a PR for that one. Boxesserver is now working.

  Are you sure? yes | no

deepinthewoods wrote 01/16/2018 at 18:49 point

Sill can't get the inkscape extensions working. I copied the boxes file to my extensions folder and I can generate boxes from the terminal in that folder. I can't find any errors from inkscape. Inkscape doesn't print anything to the terminal. My extension-errors.log file is as follows:

Extension "Dia Input" failed to load because a dependency was not met.
Dependency:
  type: executable
  location: path
  string: dia
  description: In order to import Dia files, Dia itself must be installed.  You can get Dia at http://live.gnome.org/Dia

Extension "DXF Output" failed to load because a dependency was not met.
Dependency:
  type: executable
  location: path
  string: pstoedit
  description: pstoedit must be installed to run; see http://www.pstoedit.net/pstoedit

Extension "EPS Input" failed to load because a dependency was not met.
Dependency:
  type: executable
  location: path
  string: ps2pdf

Extension "LaTeX" failed to load because a dependency was not met.
Dependency:
  type: executable
  location: path
  string: latex

Extension "LaTeX" failed to load because a dependency was not met.
Dependency:
  type: executable
  location: path
  string: dvips

Extension "LaTeX" failed to load because a dependency was not met.
Dependency:
  type: executable
  location: path
  string: pstoedit

Extension "XFIG Input" failed to load because a dependency was not met.
Dependency:
  type: executable
  location: path
  string: fig2dev

Extension "GIMP XCF" failed to load because a dependency was not met.
Dependency:
  type: executable
  location: path
  string: gimp

Extension "PostScript Input" failed to load because a dependency was not met.
Dependency:
  type: executable
  location: path
  string: ps2pdf

Extension "Sketch Input" failed to load because a dependency was not met.
Dependency:
  type: executable
  location: path
  string: skconvert

  Are you sure? yes | no

Florian Festi wrote 01/09/2018 at 07:44 point

Ok, I'll take this as a "no".

Anyone willing to give it a try? I may be able to offer a custom generator in return (depending on how complicated your wishes are).

  Are you sure? yes | no