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

WIP New installer. #140

Merged
merged 9 commits into from
Apr 30, 2014
Merged

WIP New installer. #140

merged 9 commits into from
Apr 30, 2014

Conversation

tbranyen
Copy link
Member

View the PR diff at this URL to avoid seeing whitespace changes: https://github.com/nodegit/nodegit/pull/140/files?w=1

  • Converted to Promises.
  • Providing support for Windows.
  • Normalize paths correctly based on platform.

Currently failing on Windows. I've commented out two offending casting lines that will need to be addressed later. Lets get this thing build and linked first!

I need help with the binding.gyp file. I've tried many combinations and it currently does build, just link errors all over the place for every libgit2 external symbol. Definitely doing something wrong.

If you want to help fix this:
(Ensure you have cmake and python2 installed first)

# Clone the repository.
git clone --branch=new-installer https://github.com/nodegit/nodegit.git
cd nodegit

# Install dependencies.
npm install

# View link errors with:
node_modules\.bin\node-gyp configure build

@tbranyen tbranyen mentioned this pull request Mar 23, 2014
@@ -210,7 +210,7 @@ git_remote *GitRemote::GetValue() {
baton->remote = ObjectWrap::Unwrap<GitRemote>(args.This())->GetValue();
NanAssignPersistent(Value, baton->directionReference, args[0]);
git_direction from_direction;
from_direction = (git_direction) args[0]->ToNumber()->Value();
//from_direction = (git_direction) args[0]->ToNumber()->Value();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cast fails in Windows.

- Converted to Promises.
- Providing support for Windows.
- Normalize paths correctly based on platform.
I took the latest binding and made it work with the existing to resolve
the build failure.
This has taken me hours to figure out, but in order to get Windows
working a few issues had to be resolved:

- Casting. I've added an additional argument parameter in the libgit2
  JSON API to allow for special cast provisioning in the case where
  direct casting isn't possible.

- Update libgit2 build flags to not use STDCALL when compiling in
  Windows.

- Updated the binding.gyp file to have the correct configuratoin
  necessary for cross platform compiling.
@tbranyen
Copy link
Member Author

Since this actually allows you to install in Windows and everything passes, I'm going to merge.

tbranyen added a commit that referenced this pull request Apr 30, 2014
@tbranyen tbranyen merged commit 58b71fc into master Apr 30, 2014
@tbranyen tbranyen deleted the new-installer branch April 30, 2014 06:33
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.

1 participant