sbeckett
Posts: 35
Joined: Thu Aug 25, 2005 12:12 am

different components, same filename?

We are trying to have our DLLs compiled for specific processor versions.

We have one set of DLLs for Intel32, and one set that is generic to all x86 architectures.

So, I have set up

Component1
foo.dll
bar.dll

Component2
x86foo.dll
x86bar.dll

And we use conditional statements on environment variables (e.g. %PROCESSOR_IDENTIFIER ~>< "GenuineIntel") to determine which component is installed.

But we only ever install one of the two. (I have a previous request about how to make components mututally exclusive for installation)

However, we have other code that depends on the filename being fixed.

I cannot add both versions of the files to the project root under Files and Folders unless they have different names, and I can't change the destination or name of a component file in the component dialog.

How can I set up the project so that whether Component1 or Component2 is installed, the filenames are always foo.dll and bar.dll, in the root of the installation?
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Here is my suggestion on how to do this:
1. Create two properties in the "Install Parameters" page. Like this:

Code: Select all

MYFOLDER     c:\
MYFOLDER1    c:\
2. Switch to "Custom Actions" page and add two "Property set with formated" custom actions under the "InstallExecuteSequance->Begin" for each property defined at step 1. Edit the "Formatted Text" filed for each custom action with: [APPDIR]. The "Property Name" is one of MYFOLDER/MYFOLDER1.
3. Switch to "Files and Folders" page and add a new "Property Based" folder for each property defined at step 1.
4. Put your dlls in those folders. In the first folder put dlls for Intel processor and in the second folder the dlls for all x86 architectures.
5. Switch to "Organization" page and condition the component coresponding to the Intel dlls with the following condition:

Code: Select all

Intel
For the component coresponding to the x86 dlls use following condition:

Code: Select all

NOT Intel
Please let me know if this is not what you want.

Regards,
Gigi
________________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”