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

Use with Windows #36

Open
viendocraz opened this issue Mar 10, 2023 · 4 comments
Open

Use with Windows #36

viendocraz opened this issue Mar 10, 2023 · 4 comments

Comments

@viendocraz
Copy link

I was wondering how to use this in Windows? I downloaded sentences_windows-amd64.tar.gz and extracted/added to path. I was hoping to use as such:

type input.txt > sentences > output.txt

The extracted file does not seem to work as an executable though - could someone help?

@neurosnap
Copy link
Owner

Greetings!
We don't do anything special so it should "just work." See here for how we build windows: https://github.com/neurosnap/sentences/blob/main/Makefile#L56-L57

I don't have a windows machine anymore so unfortunately I cannot test it. I'll happily review any PRs that address this issue.

@viendocraz
Copy link
Author

I compiled by doing the following:

  • Installing go from https://go.dev/doc/install
  • go get github.com/go-bindata/go-bindata/...
  • go install github.com/go-bindata/go-bindata/...
  • Downloading this source code and using the command line to enter the root of the directory structure
  • go-bindata -pkg="data" -o data/english.go data/english.json
  • go build -ldflags "-X main.VERSION=1.1.2" ./cmd/sentences

This produces a sentences.exe file in the root of the directory structure.

Maybe the Makefile should be archiving sentences.exe for windows?

I can now use the executable like so:
sentences -f input.txt > output.txt

Thanks for your help.

@viendocraz
Copy link
Author

I should add that I was doing this on a Windows machine and therefore did not need to set the following environment variables:
-GOOS=windows
-GOARCH=amd64

@neurosnap
Copy link
Owner

I'll happily accept any PRs relating to this for our builds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants