Sample code to add an XP manifest to a program

Share your advanced PureBasic knowledge/code with the community.
Seldon
Enthusiast
Enthusiast
Posts: 405
Joined: Fri Aug 22, 2003 7:12 am
Location: Italia

Post by Seldon »

Definitely. Besides ResHacker has that bug and it can't be used always. I think it'd be very easy to allow the PBCompiler to accept other line parameters (that is a .RES file) that would pass directly to LccLnk. Fred, could you do this Fred for next release?
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

Maybe a simple solution:

new CompilerCommand:

IncludeResource Type,Name,File
(For example for the manifest or additional icons)

IncludeResourceSource Type,Name,File
(Version-Resource must be compiled (to .res) before it can be used. At the moment jaPBe goRC; would be nice, when this is not needed anymore)
Seldon
Enthusiast
Enthusiast
Posts: 405
Joined: Fri Aug 22, 2003 7:12 am
Location: Italia

Post by Seldon »

That is good, though I'd leave the command line option too. For resource files already compiled, you'd only need:

IncludeResource "file.res"

as settings like name, type, etc.. are stored in the .RES file.

For source resource files (.rc) , PBCompiler could invoke the RC compiler by Microsoft (I think it's totally free) or LRC by LCC.
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

And when the Fred will support resources, handling-routines would be nice, like addr=OpenResource(type,name), closeResource(adr), UseResourceIcon(name), UseResourceImage(name) ,....

GPI
Seldon
Enthusiast
Enthusiast
Posts: 405
Joined: Fri Aug 22, 2003 7:12 am
Location: Italia

Post by Seldon »

That would be nice, though API calls for resouces are easy to handle. Anyway.. I hope Fred will make the option to include our own .RES in the final EXE.
BTW... since I really DID NEED that for a project of mine, I've just hacked :oops: the PBCompiler, so now it adds my resource to my DLL. Sorry, but I had no other choice. Of course, I won't give that modified version to anyone.
Post Reply