Hello,
I've run into a bit of a snag. In most cases for my project if I try to install the same file to different places, the file is only installed in one place. For instance...
Our product is installed with a \\Source and \\Lib directory. The Source directory holds all the .pas source files and the Lib directory holds the compiled .dcu files. I would like to install the associated form files (.dfm) into each directory so I simply call Install Files twice, each with a different install location. This however is only installing the .dfm files in the Source directory.
Is there some setting I'm missing that will allow all the Install Files commands to execute as is or am I perhaps going about this the wrong way?
I apologize if this is a frequently asked question. I tried searching these forums and found nothing.
Duplicate files not installing
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Hi Nico,
As long as no Install Files commands are after Apply Install, they should take effect. We do the same with InstallAware's own setup, for instance. We install the same files into multiple locations, no problems.
As long as no Install Files commands are after Apply Install, they should take effect. We do the same with InstallAware's own setup, for instance. We install the same files into multiple locations, no problems.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Hi Michael,
I found the problem. I'm using a variable to define the install location of each file and changing the value of that variable as I move through the install script (This is how we did things in Wise and I just assumed it would work the same). For instance...
Set Variable TARGDIR to $MAINDIR$\\Lib
Install Files C:\\MyAppLocation\\MyForm.dfm to $TARGDIR$
Set Variable TARGDIR to $MAINDIR$\\Source
Install Files C:\\MyAppLocation\\MyForm.dfm to $TARGDIR$
Changing the variable name seemed to solve the problem. I assume either InstallAware or Windows Installer sees the same file and same location (variable) and tries to optimize.
Set Variable LIBDIR to $MAINDIR$\\Lib
Install Files C:\\MyAppLocation\\MyForm.dfm to $LIBDIR$
Set Variable SOURCEDIR to $MAINDIR$\\Source
Install Files C:\\MyAppLocation\\MyForm.dfm to $SOURCEDIR$
Thanks for your continued support.
I found the problem. I'm using a variable to define the install location of each file and changing the value of that variable as I move through the install script (This is how we did things in Wise and I just assumed it would work the same). For instance...
Set Variable TARGDIR to $MAINDIR$\\Lib
Install Files C:\\MyAppLocation\\MyForm.dfm to $TARGDIR$
Set Variable TARGDIR to $MAINDIR$\\Source
Install Files C:\\MyAppLocation\\MyForm.dfm to $TARGDIR$
Changing the variable name seemed to solve the problem. I assume either InstallAware or Windows Installer sees the same file and same location (variable) and tries to optimize.
Set Variable LIBDIR to $MAINDIR$\\Lib
Install Files C:\\MyAppLocation\\MyForm.dfm to $LIBDIR$
Set Variable SOURCEDIR to $MAINDIR$\\Source
Install Files C:\\MyAppLocation\\MyForm.dfm to $SOURCEDIR$
Thanks for your continued support.
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Oh, interesting. In fact this should be considered a bug in InstallAware itself. The problem is, both commands look "identical" to InstallAware.
Install Files C:\\MyAppLocation\\MyForm.dfm to $TARGDIR$
Install Files C:\\MyAppLocation\\MyForm.dfm to $TARGDIR$
All command parameters are identical. If one parameter was slightly different, you would probably see this working without having to use a different variable.
Purple commands are translated directly into the Windows Installer database and have effect only when Apply Install is called. Until then, their values are "saved" for use with Apply Install. The "saving" mechanism uses the type of a function and the function's parameters to form a separate "save slot" for each command. If the command parameters are identical, both commands fall into the same "save slot". This would ordinarily never occur, but in your case, this explains why the unexpected behavior is happening.
Non purple commands directly execute and therefore this is not an issue for them. Again, most Windows Installer commands would not experience this issue either unless they are 100% identical in all their parameters.
Install Files C:\\MyAppLocation\\MyForm.dfm to $TARGDIR$
Install Files C:\\MyAppLocation\\MyForm.dfm to $TARGDIR$
All command parameters are identical. If one parameter was slightly different, you would probably see this working without having to use a different variable.
Purple commands are translated directly into the Windows Installer database and have effect only when Apply Install is called. Until then, their values are "saved" for use with Apply Install. The "saving" mechanism uses the type of a function and the function's parameters to form a separate "save slot" for each command. If the command parameters are identical, both commands fall into the same "save slot". This would ordinarily never occur, but in your case, this explains why the unexpected behavior is happening.
Non purple commands directly execute and therefore this is not an issue for them. Again, most Windows Installer commands would not experience this issue either unless they are 100% identical in all their parameters.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 105 guests