Archive: XPStyle & stripping of useless dialogs and bitmaps


XPStyle & stripping of useless dialogs and bitmaps
Hi!

Since justin didn't want to do it, I did it my self. So here it is, script compile time directive to add WinXP style support and stripping of useless dialogs and bitmaps when using silent mode.

XPStyle disable|enable

XPStyle is disabled by default.

Attached are the changed source files and a new version of my EditPlus syntax file.

I only have one problem with it, when I strip the useless resources manually with a program like Resource Hacker it reduces about 3 KBs from the header but when I do it with my code it only reduces a KB. Does anyone know what I am doing wrong? The stripping code is in build.cpp.

If I have some more time I will convert more compile time #define's to script compile time directives.

Enjoy,
KiCHiK

BTW, the road from here to full color icons is short... ;)


Cool, Good work.

-Duane


Bug found...

This patch will ouput corrupted installer if !packhdr is used.
Sorry about this, I will release a fix with the next patch that will include support for full color icons as well.


Ok, now this really sucks... It turns out that UpdateResource only works on NT. :(

I will try to do it without those functions...

I will let you know.


Well, if it is only going to work on XP, then the NT problem shouldn't matter because the kernel was built on NT.

-Duane


to manipulate resources in PE exe images, you need to use the declarations in winnt.h.

This is how I wrote the resource offset finding code. To update resources is slightly more complicated as you need to update the offsets in the resource table as well as actually delete the data, so window can still find the resources in the exe file. Although I kept it all inline, to find so many resources, you would probably need to process recursively.

It is a good idea though, so I might be able to offer a small bit of help.

Peter.


We can always use Geeworks Win32 Resource Library! It is only 3000$ :igor: ! Oops... My bad :( it is only 2999$ :p

Well, I guess I will have to write some resource updating functions myself. I have in my hands a Delphi source code of some sort of resource editing program someone sent as an answer in a news-group somewhere in the deep cyberspace :D

If anyone can help, or know an open source resource editing proggie I will really appreciate it because I don't really have the time right now. If no one can help I will have some free time, two months, in about two months.

Ta ta, cheers
KiCHiK


Hi

if ya want NSIS with win xp buttons & progress bars here is a little prog i made
http://home.iprimus.com.au/shaun_l/Files/NSIS_WinXp.zip (450kb)


Hi Shadow,

Thanks for your help! But what I want is more than just XP style, I want to be able to edit all of NSIS's resources. Is the source code for this program available? Are you using UpdateResource or did you implement resource editing functions according to the PE structure? Did you write it with C or another language?

TIA
KiCHiK


Hi

i made it with Resource Hacker & upx
it just extracts the files to a temp folder
then auto updates the tmp.dat and gives the updated file to makensisw
i am still learning to program :P
i got a demo program that came with delphi 6 to view & i think to edit pe files u want it?


Thanks Shadow!

Well, using Resource Hacker inside NSIS will be kind of messy...

I will be happy if you can send the demo to me so I will have a better starting point. All I will have to do is to translate from Delphi to C, and that will be easier than doing it all from scratch.


Hi

i dident mean the Resource Hacker is in the output .exe file,
it just adds the WinXP.manifest into the header file before NSIS compiler adds the compressed file, scripts and all the stuff it dose


oh yea here is the source code