Ketil,

It would be nice to have a Menu Option which would automatically add all necessary changes to include the xp manifest file..

Like under:
Project
--add new
--add existing
--resource
--stringtable
--version info
--xp manifest
Posted on 2003-09-12 22:21:54 by JimmyClif
I second that motion. It would be very easy to implement since all manifest resources are basically the same, just a few parts change when you want to specfy information about your program (like program version and description). It would be similar (even shorter) than the verinfo addin.
Posted on 2003-09-13 11:21:28 by QvasiModo
Sounds like an addin project QvasiModo :) you should write one for it. It would not be difficult just edit fields and a couple of lines in the RC file. The resource I would most like to see added is Accelerator tables, they are a bit of a pain to add, I may write an addin for them one day if I ever get all of the bugz worked out of the color replacement algorithms in TBPaint :rolleyes:
Posted on 2003-09-13 12:15:45 by donkey
Hi

Maybe I'm wrong but does not the xp manifest in a resource script have the form:

Name/ID 24 manifest.xml

If that is the case then it belongs to the resources together with bitmaps, icons and cursors.
Adding it to resource in RadASM is 10 minutes work.

KrtilO
Posted on 2003-09-13 13:25:55 by KetilO
The manifest also has to have the application name etc.. I was thinking that you could enter the data or have it generated and added to the XML script:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0" [b]<- taken from RAP file[/b]
processorArchitecture="X86"
name="Donkey.MyApp.MyApp" [b]<- this could be generated[/b]
type="win32"
/>
<description>My App description</description> [b]<- taken from RAP file[/b]
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>


Add the following to the RC file:
#define RT_MANIFEST                        24

#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2
#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
#define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID 1 /* inclusive */
#define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID 16 /* inclusive */

CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "Manifest\MyApp.manifest"
Posted on 2003-09-13 14:09:03 by donkey
I can write an accelerator table addin. The GUI could be based on VC's but I'll also think of a way to improve it :) .

As for the manifest thing I will do it too, but be warned that I doubt I can post it before Monday. Not that I can't make it before (it's 10 minutes work, alright :) ) but I won't have access to the Internet until then (my modem at home isn't working :( ).

Another idea for the manifest plugin: maybe it can be added right into the script, no need for external files... since the xml stuff is going to be generated by the addin, it can be added as raw data (provided the resource type remains 24). I haven't worked with raw data in the script before (I prefer having separated files for icons and such), but I've seen VC store icons that way, so anything is possible :grin:
Posted on 2003-09-13 14:10:57 by QvasiModo
Just read your last post, donkey. Yes, that's exactly what I had in mind about taking the version info addin as a model.

EDIT: I also just remembered, there's another ID that should be added for working with control panel applets. I think the name was CONTROL_PANEL_RESOURCE_MANIFEST_ID, but I could be wrong (it's not relevant anyway), but I'm sure the ID was 123 (decimal).
Posted on 2003-09-13 14:12:40 by QvasiModo
Hi QvasiModo,

You're fast, I hadn't finished completing the RC file entries necessary to make the whole thing work properly. Anyway, it should be complete as I posted. There should be no need to use a dialog at all, you can generate everything in the AddIn, just an option of whether to include a CC6 manifest or not.
Posted on 2003-09-13 14:14:37 by donkey
:grin:
I type fast sometimes :)

EDIT: BTW, the control panel thing also works with rundll32 invoked dll files.
Posted on 2003-09-13 14:16:04 by QvasiModo
I'm not sure whether you can hook into the AIM_RCUPDATE message and build the manifest file before the RC file is compiled or if it is done on AIM_MAKEBEGIN, KetilO would be able to say where the manifest build would have to take place.
Posted on 2003-09-13 14:26:25 by donkey
Hi

Here is a version of RadASM and the ReallyRad addin that supports the MANIFEST resource type.
Since RadASM still has no easy way to update the RC file from an addin, I recomend that the addin only creates and maintains the manifest xml file.

KetilO

Edit:
Attachment deleted.
Posted on 2003-09-13 16:19:12 by KetilO
That was fast... :) Thanks everyone...
Posted on 2003-09-15 15:00:00 by JimmyClif
Hi, everyone.
During my free time this weekend I coded this addin to handle the manifest resource type.
Too bad I didn't read that last post of yours, Ketil, it would have saved me some time... :grin:
Anyway, here it is. Please tell me what you think :)

P.S.: I didn't have enough time for the accelerators addin, but I started it. I'll post it then it's ready.

Edit:
Attachment deleted.
Posted on 2003-09-15 17:11:50 by QvasiModo
Update. Just a minor bugfix.

Edit:
Attachment deleted.
Posted on 2003-09-17 18:10:05 by QvasiModo
Hi QvasiModo,

I've just found a couple of bugs/issues with the AddManifest addin.


    [*]Using the Addin Manager, if I'm going to select/deselect an option and then click OK or Apply, RadASM.exe is crashing...
    This is not happening with any other addin. I'm running RadAsm on W2k environment.
    [*]Using your Addin (with the add to resource script option) and selecting the "clear" button, the Manifest file is deleted but the entry in the .rc file remains causing an RC2135 error at the next compilation, unless you're going to manually delete the entry in the resource file.
    [*]A carriage-return is not added after the last comment line "//; This part was generated by RadAsm (AddManifest AddIn). Do not edit!". Any other automatic append to the resource file will start from there instead of a new line...
Posted on 2003-09-23 07:54:04 by Cip
Hi QvasiModo

You must preserve edi in the InstallDll proc

InstallDll proc uses ebx esi edi hWin:DWORD, fOpt:DWORD

This should take care of the GPF.
Posted on 2003-09-23 08:17:39 by donkey

Hi QvasiModo,

I've just found a couple of bugs/issues with the AddManifest addin.


    [*]Using the Addin Manager, if I'm going to select/deselect an option and then click OK or Apply, RadASM.exe is crashing...
    This is not happening with any other addin. I'm running RadAsm on W2k environment.
    [*]Using your Addin (with the add to resource script option) and selecting the "clear" button, the Manifest file is deleted but the entry in the .rc file remains causing an RC2135 error at the next compilation, unless you're going to manually delete the entry in the resource file.
    [*]A carriage-return is not added after the last comment line "//; This part was generated by RadAsm (AddManifest AddIn). Do not edit!". Any other automatic append to the resource file will start from there instead of a new line...

1) Thanks donkey for the fix. In Win98 you don't even notice this kind of bugs...
2) Weird... I didn't try the clear button much to tell you the truth. I'll look into it.
3) That was actually my fix to another problem, caused by that last carriage return. I guess I'll have to find another way to do it. Will be fixed promptly.

EDIT: Indeed, the DeleteManifest proc simply does not delete anything from the resource script. So if you don't use a manifest file, it simple does nothing :mad:
I'm editing the source now (with Notepad) but I don't think they'll let me install RadAsm here to try it. I'll post the updated source, then I'll bring the compiled (and tested) version tomorrow.
Posted on 2003-09-23 10:33:39 by QvasiModo
Ok, here's the updated source. (Even edited the manifest and version info from the RAP file, all by hand. What a waste of time... :grin: ). It's all done but the compiling, and should work fine. I'll bring the compiled version tomorrow (if nobody posts it before me).

Edit:
Attachment deleted.
Posted on 2003-09-23 11:24:58 by QvasiModo
Hi QvasiModo,

All the issues are solved. You was really fast...

I've tested the new dll and everything seems to work fine.

I've posted here the compiled .dll, plus the modified .asm file.

I had to modify the DeleteManifest proc. I've added the local variables, and commented the "test fOptions,4" as it was preventing the file to be deleted.

A quick and dirty solution, but it's now time to go home for me ;)

Edit:
Attachment deleted.
Posted on 2003-09-23 12:10:47 by Cip

Hi QvasiModo,

All the issues are solved. You was really fast...

I've tested the new dll and everything seems to work fine.

I've posted here the compiled .dll, plus the modified .asm file.

Thanks, Cip! :alright:

I had to modify the DeleteManifest proc. I've added the local variables, and commented the "test fOptions,4" as it was preventing the file to be deleted.

A quick and dirty solution, but it's now time to go home for me ;)

I knew I was forgetting something :grin:
The test fOptions,4 was there to prevent the deletion of the manifest file if you chose not to use one. But I guess there is not much point in keeping it anyway, so it was a good idea.
Posted on 2003-09-23 12:20:13 by QvasiModo