Page 1 of 1
Alternative Installation?
Posted: Fri Feb 03, 2006 1:15 am
by jondr
I need to have alternative installations depending on the processor of the target system. If the target processor supports SSE2 instructions, install MyFasterApp.exe, else install MySlowerApp.exe. Looks like I need to have a DLL to find this out (any chance of using WMI Script, though?). Based on what the DLL finds, I would install the appropriate application renamed as MyApp.exe on the target system.
Is this even possible with IA? Is a DLL the way to do this?
Posted: Fri Feb 03, 2006 7:54 am
by MichaelNesmith
Hi!
InstallAware does not have a built-in function to detect SSE2 instructions. You can package such behavior into a DLL and call that DLL using the Call DLL Function command - this should work neatly. Once you have a variable holding the result of the SSE2 state, you can branch in the setup script using If and conditionally install one app or the other (including, of course, other files).
Alternative Installation
Posted: Mon Feb 13, 2006 11:09 am
by jondr
OK. I wrote a dll that calls the cpuid instruction (with asm blocks embedded in gcc/mingw c code). I made the function in the dll stdcall callable from the Call DLL plugin. I check the value returned to a variable in the script, and then have the installation use the appropriate Install Files using "if...else...end" constructs. It all seems to work fine. Thanks for a great product, and thanks to whoever wrote the Call DLL plugin!
Posted: Mon Feb 13, 2006 12:24 pm
by MichaelNesmith
Hi Jon!
Glad to hear it all works!
I hope this isn't asking for too much...but would you mind sharing your DLL with us here, so other users looking for this functionality can also find it?
You could post it to the Plug-Ins forum, along with a pasted Call DLL Function command that shows how to call it...
Just a request! If your code and/or binaries are part of intellectual property that cannot be posted publicly and shared, we all understand. Just glad InstallAware could do the job for you!
Posted: Tue Feb 14, 2006 12:20 am
by jondr
Sure, I should clean it up a bit. It is hacked to just zero in on the instructions and chip families/models that I can target with the compiler I'm using on this project. I can put back in the code to look at most everything and return some value for the script to work with. It'll take a few days.
There are one or two "tricks" that might not be obvious, so it is a good thing to share.