PDA

View Full Version : Feature Request: Add InstallScript CA's in DirectEdit Mode and Transforms



Christopher Painter
03-28-2006, 09:56 AM
Now that IS CA's are refactored into an easy to implement DLL format, I'd like for their to be the ability to compile RUL files and insert CA's into built MSI using the DirectEdit and Transforms. This was always next to impossible before, but now the implementation is as simple as streaming the DLL into the binary table and inserting it in the CustomAction table.

MichaelU
03-29-2006, 12:06 PM
This sounds like a great idea on the surface, but having probed it a bit deeper it raises a lot of questions I don't have good answers to. No matter the answers this strikes me as too big for 12.0, but say we implemented this, what do you think it should do in each of these scenarios:

1) You have a basic msi without any script CAs and are editing it in direct mode. You add a setup.rul file and sequence an IS CA. You hit save only to receive a compile error. What should be saved?

2) You fix all your compile errors and then want to add another action. Is the setup.rul you were editing in step 1 still available, or do you have to add a new one?

3) You save your work, close the IDE, and go home (I hear it happens, honest!). The next day you want to modify one of the three functions you added in one go the previous day. Is the original setup.rul somehow still available, or do you have to "obsolete" one of the functions from the first set and work on a new setup.rul today which reimplements that function?

I'm not convinced there's a good answer to any of these. Any time we completely discard a previous setup.rul that means there's a an issetup.dll worth of overhead. But if we don't there's the chance of accidentally pointing to the wrong setup.rul (if it's stored externally) or accidentally releasing your script code (if it's in the direct MSI somehow). And this still sidesteps a lot of making sure we don't end up with multiple conflicting f1, f2, etc. entry points.

Maybe what would be more useful is an "issetup.dll project" whose input is a script file and whose output is an issetup.dll ready for inclusion as an MSI DLL with a document mapping entry points to function (or vice-versa).

Christopher Painter
03-29-2006, 12:27 PM
1) You have a basic msi without any script CAs and are editing it in direct mode. You add a setup.rul file and sequence an IS CA. You hit save only to receive a compile error. What should be saved?


I would say Save always saves the RUL file no matter what. I would say the DLL only gets restreamed if the compile succeeds. A warning should be given.



2) You fix all your compile errors and then want to add another action. Is the setup.rul you were editing in step 1 still available, or do you have to add a new one?


I would say the RUL file always exists as source to the compilation process. I'd also say that the user should have the choice of creating multiple RUL files but I'd discourage it do to size of the multiple DLL's.



3) You save your work, close the IDE, and go home (I hear it happens, honest!). The next day you want to modify one of the three functions you added in one go the previous day. Is the original setup.rul somehow still available, or do you have to "obsolete" one of the functions from the first set and work on a new setup.rul today which reimplements that function?


I'd say the source is present to make changes and reimplement the CA's.

Maybe what would be more useful is an "issetup.dll project" whose input is a script file and whose output is an issetup.dll ready for inclusion as an MSI DLL with a document mapping entry points to function (or vice-versa).[/QUOTE]

That might be the ticket. I was already considering using a fake Basic MSI project and a bunch of build automation to harvest such a DLL. This is also where properly named function exports would be useful. Imagine a command line compiler that took a .RUL as an input and outputted a DLL that exported everything function that was decorated with EXPORT.

I just mention this cause when I used to do alot of repackaging work I'd have situations where I was making a transform for something and I'd say to myself "I really wish I could do an InstallScript CA here instead of VBScript".