Archive: NSIS and Win XP


NSIS and Win XP
Yesterday I have tried co create makensis.exe with Win XP style support. I set NSIS_CONFIG_XPSTYLE_SUPPORT define in the
config.h and did not have a wanted result.
After 1 hour of research I have found some advices that can help to create WinXP compatible makensis.exe. They are:
1) in the resource.rc from exehead project following strings:

#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_XPSTYLE_SUPPORT)
#if defined(APSTUDIO_INVOKED)
CREATEPROCESS_MANIFEST_RESOURCE_ID$(NSIS_CONFIG_XPSTYLE_SUPPORT) RT_MANIFEST MOVEABLE PURE "exehead.xml"
#else
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST MOVEABLE PURE "exehead.xml"
#endif
#endif

need be replaced by:

#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_XPSTYLE_SUPPORT)
#if defined(APSTUDIO_INVOKED)
1 24 MOVEABLE PURE "exehead.xml"
#else
1 24 MOVEABLE PURE "exehead.xml"
#endif
#endif

2) Manifest file exehead.xml must be edited to one long line (see attachment)

After rebuilding we have new WinXP-style-compatible makensis.exe.

If anybody knows other means - let me know, please!


Tight ... can we have the compiled version???

-Duane


That is weird because when i recompile NSIS with XP Support i only have to uncomment that line and it works just fine.. Maybe you had built nsis before and you didn't do a Rebuild All? (I know if you don't do this when switching Compression's NSIS will create bad installers) just a thought cause it works just fine here..


2 DuaneJeffers
see attachment

2 Schultz
I worked with NSIS 1.96 (from 2.06.02). I have tried to unremark
#define NSIS_CONFIG_XPSTYLE_SUPPORT from config.h and rebuild all af course (and many times :) - unsuccessfully.
Do you unremark only this define and rebuild all to have fine result?
Can you send your makensis.exe and exehead.exe?


I just tried this today.
I didn't have any problems, just uncommented the line for the XPSTYLE_SUPPORT. Tested it and it works as expected. I built makensis on my 2k box.


2Pomflain

Can you send me your exehead.exe ?
I build it under VC6 SP5 2K too

I don`t understand anything ... It can not work !!! See MSDN::"Using Windows XP Visual Styles"::

CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "YourApp.exe.manifest"
Note When you add the previous entry to the resource you must format it on ONE LINE.

But original exehead.xml is not formatted in one line!!!


Ok, I built a "normal" version for you. I've modified the source to add in extra commands and trimmed out all the ones that I don't use, but this should be a standard version for you with the XPSTYLE built in as well.


I have found my mistake: my SDK\include (where last winuser.h with RT_MANIFEST define is placed) followed after VC98\include folder.
After include path order replacement all work very well !
I`m sorry for the rubbish.


The only change that needs to be made is to put exehead.xml all on one line.


By the way, this should be compiled by default. I don't see any change in the exehead size with this change.


I have compiled all with original exehead.xml (not in one line) - all works (see screenshot)


Actually, I may have compiled it after changed exehead.xml, so you may be right. Either way, the next version should turn the option on by default.