3

I'm currently using the rdiff windows port from my delphi 2010 application to calculate delta/signature for remote delta/diff

I'm trying to explore the possibility of using the librsync library instead of rdiff, I googled & read a lot, I found these files (can be found/installed using cygwin - librsync-dev-0.9.7-3):

cygrsync-1.dll
librsync.a
librsync.dll.a
librsync.la

However, it's not clear at all how to call this dll (assuming it's even possible!)

Anyone knows how to call the librsync/cygrsync-1.dll from Delphi 2010?

Thanks!

poolie
  • 9,289
  • 1
  • 47
  • 74
TheDude
  • 3,045
  • 4
  • 46
  • 95
  • 2
    I'm not sure this is a great idea. Linking to a cygwin based DLL will also require you to link to cygwin. You ought to be able to find a native port of librsync (most likely built with mingw) and then you need a header translation. – David Heffernan Mar 17 '12 at 10:09
  • @DavidHeffernan: **rdiff.exe** already requires **cygwin-1.dll**, so I'm going to ship it anyway if I keep using it. Also, native dll or not, I'll need header translation in both cases (which is precisely what I'm trying to find, but I'm completely cluless) – TheDude Mar 17 '12 at 10:21
  • And you are happy with the terms of the GPL meaning that you will have license your app under the GPL too, or something compatible with GPL. – David Heffernan Mar 17 '12 at 10:43
  • As for the header translation you need to make a file like Windows.pas that defines the appropriate records/structs and imports the necessary functions from the DLL. Or find one that has already been made for Delphi. – David Heffernan Mar 17 '12 at 10:48
  • Actually that's one of the reasons why I want to switch to librsync (whose license is LGPL). As for the headers translation, I **really** googled a lot but couldn't find any pascal translation, and my knowledge in C is next to zero to do that myself, that's why I'm asking if someone has done it before (or can give some insights on this) – TheDude Mar 17 '12 at 11:03
  • I think the JEDI website and Rudy Velthuis' blog have advice on header translations. Linking to cygwin makes you code GPL. You'll need to do what I said and build with mingw or some other compiler. Cygwin is a no go for you. – David Heffernan Mar 17 '12 at 11:06
  • Wonderful :( Thanks for the warning, David! I didn't realize I had to GPL my app in order to use the cygwin DLL. This makes my task even harder... – TheDude Mar 17 '12 at 11:13
  • 1
    @Gdhami: you should probably install msys which will certainely compile librsync (and with no dependency on cygwin), and you could try h2pas (from the freepascal project) to get a pascal unit, the .h is pretty trivial it could work. – armel Mar 19 '12 at 08:01
  • possible duplicate of [How to compile and build librsync using visual Studio 2010?](http://stackoverflow.com/questions/20185936/how-to-compile-and-build-librsync-using-visual-studio-2010) – Paul Sweatte Sep 30 '15 at 13:42

0 Answers0