libgit2sharp.nativebinaries icon indicating copy to clipboard operation
libgit2sharp.nativebinaries copied to clipboard

SSH support

Open Therzok opened this issue 10 years ago • 9 comments
trafficstars

Okay so, I'm going to lay down the docs over this issue so I don't lose them:

Windows:

We need cmake, zlib-1.2.8 package and libssh2 repo cloned.

Having these side-by-side, inside libssh2 directory:

cd path/to/libssh2_repo ; mkdir build ; cd build ; cmake .. -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON -DZLIB_LIBRARY="....\zlib-1.2.8\lib\zdll.lib" -DZLIB_INCLUDE_DIR="....\zlib-1.2.8\include"

This will build libssh2 dll and .lib inside path/to/libssh2_repo/build/src/Debug

It will link against zlib and we'd have to use zlib-1.2.8/zlib1.dll file side-by-side with libssh2.dll and libgit2.dll

TODO: Update docs on what parameters we need to send libgit2 to pick up libssh2. We have to modify all these properties manually, so we set FOUND manually, and so do we set link and include directories.

Mac:

brew install libssh2 build cmake with DUSE_SSH copy libssh2 to output directory and install_name_tool -id libssh2.dylib libssh2.dylib

Linux: Magic script: https://github.com/mono/monodevelop/blob/master/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/build_libgit2.sh

Therzok avatar Jun 04 '15 12:06 Therzok