mono / ngit

Automated jgit port to c#
261 stars 152 forks source link

Fix compile time dependency on Windows for the Mono.Posix assembly #37

Closed WilbertOnGithub closed 12 years ago

WilbertOnGithub commented 12 years ago

Alan,

Your original suggestion to separate the LinuxFileHelper into a new Sharpen.Unix assembly is a bit more complicated because LinuxFileHelper also has a dependency on FilePath (which is in Sharpen and thus would create a circular dependency).

Instead of creating a more complicated solution I opted for the easy way out:

This works for me and solves issue #Num: #34 for me.

It is debatable I know, I'm open for suggestions.

alanmcgovern commented 12 years ago

I implemented the Sharpen.Unix approach in commit 9e592b5. I'm pretty against bundling binaries as packagers for the various Linux distros will complain to me ;) To build without the Mono.Posix dependency simply switch the solution to use the 'DebugWin' or 'ReleaseWin' configuration. The normal 'Debug' and 'Release' targets will build Sharpen.Unix and so will require Mono.Posix.dll.

WilbertOnGithub commented 12 years ago

Looks good to me and superior to the bundling of binaries, I agree.

It might be handy to create a separate MSBuild project file to be able to build the correct configuration. Combined with a simple batchfile gives developers an easy way to build a Mono or a Windows variant without having to switch configurations in Visual Studio.

Can supply you with a pull request if you think it adds value.

alanmcgovern commented 12 years ago

You can build from a commandline by passing something like: "msbuild /t:DebugWin NGit.sln" or "msbuild /t:ReleaseWin NGit.sln". Creating two solution files may end up creating issues if they got out of sync, so I wouldn't be hugely pushed about doubling them up in version control, but if it simplifies things for windows devs then I'd be ok with that.

alanmcgovern commented 12 years ago

Closing the pull request as the build issue has been dealt with. Let me know if you have any other issues!