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

Add windows support #3

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Add windows support #3

wants to merge 1 commit into from

Conversation

dpwright
Copy link

@dpwright dpwright commented May 8, 2013

Windows expects executables to have a .exe file extension, and the lack of
it causes various problems trying to run the plugin.

This commit fixes the filename for protoc on Windows. It doesn't fix the
other main problem with running the plugin on Windows, which is that
building protobuf requires you to be in a MinGW environment and gets a bit
involved. The expectation is that on Windows you'll have to build
protobuf yourself, but once you've done that the plugin should work as
normal.

Windows expects executables to have a .exe file extension, and the lack of
it causes various problems trying to run the plugin.

This commit fixes the filename for protoc on Windows.  It doesn't fix the
other main problem with running the plugin on Windows, which is that
building protobuf requires you to be in a MinGW environment and gets a bit
involved.  The expectation is that on Windows you'll have to build
protobuf yourself, but once you've done that the plugin should work as
normal.
@dpwright
Copy link
Author

dpwright commented May 8, 2013

I just hacked this in to get it working on Windows... it's a bit nasty-looking and I don't know whether you'd want to include dirty Windows hacks like this in your plugin's main code, but I thought I might as well send you what I'd done in case it comes in handy for anybody using lein-protobuf on Windows.

@cpmcdaniel
Copy link

I'm actually working on a patch that does it more directly by allowing you to specify a :protoc-exe path in the project map which will completely bypass the downloading and compiling of the protoc executable. Perhaps this plugin is trying to do too much. Can we not assume the user is capable of installing protoc themselves? What if they already have it installed, or are using it in multiple projects?

I'm not ready to submit the pull request yet. I'm actually having an issue with the regex for the proto import statements. It seems that the double-quotes are being stripped out. Once I get around this, I'll submit.

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

Successfully merging this pull request may close these issues.

2 participants