Re: RFC; [PATCH] Add ikvm.props to the NuGet Package to Copy Native Binaries

Christopher Boumenot <[email protected]> Mon, 31 Aug 2015 09:17:39 -0700
Newsgroups gmane.comp.java.ikvm.devel
Message-ID <CAOZeni4noN1eVN2G0MV0P65ATm315FyxvtJnt4GFnc1wwNQ3pQ@mail.gmail.com>
Hi Jeroen,

I like that idea better.  I will work on this and send an updated
patch, and I'll move over KVM.Runtime.JNI.dll too.

I based my first patch on a cloned git repo just to see if the idea
made sense.  It does, so I'll invest in syncing from the official CVS
repository.  It will take a little bit longer to get the next revision
out.



Thanks,
Christopher

On Mon, Aug 31, 2015 at 7:42 AM, Jeroen Frijters <[email protected]> wrote:
> Hi Christopher,
>
> Thanks for looking into this. Would it be an idea to split the nuget package into a pure-managed and a native package? That way the majority of users that don't need to native code won't get the native libaries. It should be possible to move IKVM.Runtime.JNI.dll into the native package as well.
>
> Thanks,
> Jeroen
>
>> -----Original Message-----
>> From: Christopher Boumenot [mailto:[email protected]]
>> Sent: Monday, August 31, 2015 8:25
>> To: [email protected]
>> Subject: [Ikvm-developers] RFC; [PATCH] Add ikvm.props to the NuGet
>> Package to Copy Native Binaries
>>
>> I am developing a project that uses IKVM that has to access native
>> binaries.  In my project I reference ikvm-native-win32-x64.dll and
>> JVM.dll in my project, but I am trying to figure out how to make this
>> easier when I ship my project as a NuGet package to end-users.  I would
>> prefer if end users just install the NuGet package, and the binaries end
>> up in the build output directory.  This is not true for IKVM (in the
>> case of these binaries), and instead I need to rely on the end user
>> referencing the ikvm-native-win32-x64.dll and JVM.dll or putting it in
>> their load path.  One solution that I have seen (from
>> libgit2sharp.nativebinaries) is to create a props files that copies the
>> native binaries to the build output directory.  This provides a well-
>> defined location for my project to load these necessary binaries without
>> the user having to take action.  This also makes it easier to consume my
>> project in LINQPad without having to manually call out binaries.
>>
>> Is there a preferred solution to this problem or any ideas on how to
>> best solve it?  I have attached a patch that implements the props
>> solution.  Any feedback is appreciated.
>>
>>
>>
>> Thanks,
>> Christopher

------------------------------------------------------------------------------