Hi, just wanted to update everybody on my work with this, sorry I have not been good at replying to personal emails lately. I am not currently attaching any code but will clean things up and then submit my patches to wine-patches soon.
So, the good news is that, as a proof of concept, I have gotten the Vector NTI installer to work successfully, which requires the JScript functionality. Specifically, this tests custom actions 5/6 and 37/38, there are two other sets that would be nice to test (but it is all the same script handler so it should work).
Also, to make this work, I had to implement the OLE automation interface. Now, I have not implemented the entire interface yet, but I have made the entire .tlb file for this and made a framework which makes implementing everything fairly straightforward (and everything is a wrapper around the existing MSI database functions, so there is no actual functionality, it is just adding new cases to the switch statements that call the MSI database functions appropriately).
Basically, because of the MSI design where everything that is an object has an MSIHANDLE, I have made one Automation Object that each specific object "inherits" from by implementing its invoke function (minus basic parameter checking, etc. which is all done by the automation object) and passing it to create_automation_object with its CLSID. It is pretty easy to implement more functions, and I will try to keep on adding more, probably as patches that I will periodically send to wine-patches.
Anyhow, look for my first patches in the next couple of days.
Misha
On Fri, 2007-02-23 at 19:20 -0600, Misha Koshelev wrote:
Hi, just wanted to update everybody on my work with this, sorry I have not been good at replying to personal emails lately. I am not currently attaching any code but will clean things up and then submit my patches to wine-patches soon.
So, the good news is that, as a proof of concept, I have gotten the Vector NTI installer to work successfully, which requires the JScript functionality. Specifically, this tests custom actions 5/6 and 37/38, there are two other sets that would be nice to test (but it is all the same script handler so it should work).
Also, to make this work, I had to implement the OLE automation interface. Now, I have not implemented the entire interface yet, but I have made the entire .tlb file for this and made a framework which makes implementing everything fairly straightforward (and everything is a wrapper around the existing MSI database functions, so there is no actual functionality, it is just adding new cases to the switch statements that call the MSI database functions appropriately).
Basically, because of the MSI design where everything that is an object has an MSIHANDLE, I have made one Automation Object that each specific object "inherits" from by implementing its invoke function (minus basic parameter checking, etc. which is all done by the automation object) and passing it to create_automation_object with its CLSID. It is pretty easy to implement more functions, and I will try to keep on adding more, probably as patches that I will periodically send to wine-patches.
Anyhow, look for my first patches in the next couple of days.
Misha
Almost forgot, one big caveat is right now for some reason Microsoft Script 5.6 does not install properly on wine either (bummer), it looks for some Scriptable.Dictionary (I am writing this from memory) object, doesn't find it, and then doesn't want to run the script, so currently one needs to install IE6 first to get Microsoft Script to work properly. But in any case IE6 < IE6+native MSI which was required before, and I think tracking down the Microsoft Script installation problem should not be too bad.
Misha
On Fri, 2007-02-23 at 19:22 -0600, Misha Koshelev wrote:
On Fri, 2007-02-23 at 19:20 -0600, Misha Koshelev wrote:
Hi, just wanted to update everybody on my work with this, sorry I have not been good at replying to personal emails lately. I am not currently attaching any code but will clean things up and then submit my patches to wine-patches soon.
So, the good news is that, as a proof of concept, I have gotten the Vector NTI installer to work successfully, which requires the JScript functionality. Specifically, this tests custom actions 5/6 and 37/38, there are two other sets that would be nice to test (but it is all the same script handler so it should work).
Also, to make this work, I had to implement the OLE automation interface. Now, I have not implemented the entire interface yet, but I have made the entire .tlb file for this and made a framework which makes implementing everything fairly straightforward (and everything is a wrapper around the existing MSI database functions, so there is no actual functionality, it is just adding new cases to the switch statements that call the MSI database functions appropriately).
Basically, because of the MSI design where everything that is an object has an MSIHANDLE, I have made one Automation Object that each specific object "inherits" from by implementing its invoke function (minus basic parameter checking, etc. which is all done by the automation object) and passing it to create_automation_object with its CLSID. It is pretty easy to implement more functions, and I will try to keep on adding more, probably as patches that I will periodically send to wine-patches.
Anyhow, look for my first patches in the next couple of days.
Misha
Almost forgot, one big caveat is right now for some reason Microsoft Script 5.6 does not install properly on wine either (bummer), it looks for some Scriptable.Dictionary (I am writing this from memory) object, doesn't find it, and then doesn't want to run the script, so currently one needs to install IE6 first to get Microsoft Script to work properly. But in any case IE6 < IE6+native MSI which was required before, and I think tracking down the Microsoft Script installation problem should not be too bad.
Misha
Okay, even though I said no code yet I actually didn't have that much cleaning to do, and here are the patches I am thinking of submitting. I would like to test these with an MSI file that has the other two scripting custom action types (script in an installed file and script in a property, already tested script in an MSI binary and script in the target field of the custom action table) though. Let me know what ppl think.
Also, just to comment on the IE6 requirement with the Microsoft Script 5.6, it actually is not just a requirement of my patches to the wine MSI, but is required by native MSI as well, at least to install Vector NTI (native MSI complains about scripting and does not finish installing if I install Microsoft Script from the MS website or with the MS script that it comes bundled with and installed; however ,with IE6 it installs fine, and, as I said previously, there is something about a missing Dictionary entry in the registry in the logs, so I will have to look into it).
In any case, the first patch can be applied by itself, but the other two must be applied together. Look at the bottom of automation.c to see how easy it will be to fill in all the other OLE automation functions (easy but a little tedious, mostly because of time checking things on MSDN; also QA is hard to do as all the tests would have to be wine_todo since wine has no native scripting engine) - I think these would be separate patches though.
Anyhow, let me stress that these patches fix bug #7357 and possibly other installer bugs that require scripting or allow them to be easily fixed by implementing a few more OLE automation functions (when an unhandled function is called this triggers a FIXME with the function name and CLSID of the object, and as I mentioned they are all wrappers around already implemented functions anyway).
Misha
Ok nevermind about the IE6 requirement. Windows Script 5.6 needs mfc42.dll to install properly, that is all that is required with my patch for Vector NTI then:
1. Copy mfc42.dll to .wine/drive_c/windows/system32 2. Run the Vector NTI installer
Yay, down from like 20 steps :)
Misha