Old 25th April 2009, 14:33   #1
Static_VoiD
Junior Member
 
Join Date: Apr 2009
Location: Lensk, Yakutia
Posts: 16
Send a message via ICQ to Static_VoiD
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.
Attached Files
File Type: rar nsis.rar (1.8 KB, 259 views)
Static_VoiD is offline   Reply With Quote
Old 25th April 2009, 15:33   #2
Pidgeot
Senior Member
 
Pidgeot's Avatar
 
Join Date: Jan 2002
Location: Denmark
Posts: 136
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).
Pidgeot is offline   Reply With Quote
Old 25th April 2009, 15:53   #3
Static_VoiD
Junior Member
 
Join Date: Apr 2009
Location: Lensk, Yakutia
Posts: 16
Send a message via ICQ to Static_VoiD
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
Static_VoiD is offline   Reply With Quote
Old 25th April 2009, 18:34   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,185
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

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump