Static_VoiD
25th April 2009 14:33 UTC
NSIS 2.44 New Plugin API header for Delphi
I'm sorry if it has been already discussed and solved.
I searched forum for the subject now and earlier but hadn't found anything.
Now I was able to make this work and want to share it, because AFAIK there was a discussion thread of NSIS 2.44 New Plugin API and new header for C++. So there was a post about the same thing for Delphi, but the reply was negative.
Pidgeot
25th April 2009 15:33 UTC
Taking a quick look at the code, note that you CANNOT use this out of the box for ANSI NSIS plug-ins and D2009, since it uses the "plain" string and PChar types, which map to AnsiString and PAnsiChar in D2007 and prior, but UnicodeString and PWideChar in D2009. The same obviously applies to Unicode NSIS and D2007 or prior.
If you want one of those combinations, you'll have to alter a few minor things here.
I assume Unicode NSIS has not changed this bit drrastically, so I would guess that this work with Unicode NSIS and D2009 (but have not tested it).
Static_VoiD
25th April 2009 15:53 UTC
I'm sorry (again :) ) i forgot to mention - i'm coding in Delphi 7. Thus i was unable to test it on later Delphi releases.
But, i suppose, it won't be too hard to clange usual PChar and some other stuff so that it could be compatible with delphi 09
Anders
25th April 2009 18:34 UTC
I have not touched delphi since v3 so I don't remember anything about it, but I'm sure it would be possible to define/typedef your own type, name it NSISChar or whatever and some kind of define that lets you choose unicode or ansi so the same header can support both