Alternative Installation?

Got a problem you cannot solve? Try here.
jondr
Posts: 12
Joined: Wed Feb 01, 2006 2:05 pm

Alternative Installation?

Postby jondr » Fri Feb 03, 2006 1:15 am

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?
--
Jon

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Fri Feb 03, 2006 7:54 am

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).
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

jondr
Posts: 12
Joined: Wed Feb 01, 2006 2:05 pm

Alternative Installation

Postby jondr » Mon Feb 13, 2006 11:09 am

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!
--

Jon

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Mon Feb 13, 2006 12:24 pm

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!
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

jondr
Posts: 12
Joined: Wed Feb 01, 2006 2:05 pm

Postby jondr » Tue Feb 14, 2006 12:20 am

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.
--

Jon


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 128 guests