fogleman / primitive

Reproducing images with geometric primitives.
https://primitive.lol/
MIT License
12.35k stars 608 forks source link

Windows 10 primitive command not recognized #34

Closed nedimAT closed 7 years ago

nedimAT commented 7 years ago

Hi, first of all i'm new to go :) The steps i did:

  1. Install go from golang.org (Installdir C:\Go)
  2. Path Variable added: C:\Go\bin
  3. GOROOT = C:\Go\
  4. Created new workingdirectory C:\Go\workspace
  5. GOPATH= C:\Go\workspace
  6. then i run go get -u github.com/fogleman/primitive which runs through smooth After that i tried running primitive but it isn't recognized as a command, i tried powershell and command line. What did i miss?
sallen-wiley commented 7 years ago

Hi netschki,

I was in exactly the same situation, but managed to figure it out.

In your working directory, after pulling the repository, you should see some folders (bin, pkg and src) - inside 'bin' there should be the compiled 'primitive.exe'.

You might be able to add this to your shell paths, but I just run the script from within that directory (i even copy the images into the same directory before processing them).

I created a batch command that allows you to drag an image (from within the same directory as 'primitive.exe') onto the .bat file that will create a small mix of images.

mix.txt

edit: I'm new as well, so if there is a more effective way to do this, please let me know :P

nedimAT commented 7 years ago

Thank you! I navigated to the bin directory with CMD and there the command works. So if you want to have it "everywhere" you should add $GOPATH\bin to your PATH variable and restart CMD line.