AddFile behaviour - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Kim.Martin
Posts: 15
Joined: Mon Oct 18, 2010 5:27 pm

AddFile behaviour

In one of my other posts (http://www.advancedinstaller.com/forums ... =2&t=11735) I mentioned that we need to dynamically build the setup application on our CI/build server.

We do this by using sequences of commands added to an 'Edit.aic' file that is then processed, so we end up with lists like:

Code: Select all

AddFile APPDIR\WO "C:\agent1\_support\bin\XX\wo\XX.Presentation.Controls.resources.dll"
AddFile APPDIR\WO "C:\agent1\_support\bin\XX\wo\XX.resources.dll"
SetVersion 1.0.858.0
SetPackageName Setup.1.0.858.0.msi
Save
However, we can't seem to control where these get assigned in features and components. The problem that we have is two fold:

1) Some files types added, such as databases, documents, etc get assigned to a seemingly random component. As a result we end up with a component with 10 files linked to it. While this is not a problem as yet, it may become so.

2) Some files need to form part of features. Typically these are assemblies and Advanced installer seems to create individual components for each file. However, these components are all part of the default installation. We need them to be part of a (predefined) optional feature so that the user can choose to install them or not.

I cannot see any way that we can specify the feature or component that files are added to (only the destination folder, e.g. APPDIR\WO). I also cannot see any way of moving or reassigning the components once created.

Is there a way around this? If not, then it limits our dynamic project updating to changes only to the base installation - not to any features.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: AddFile behaviour

Hi,
1) Some files types added, such as databases, documents, etc get assigned to a seemingly random component. As a result we end up with a component with 10 files linked to it.
You cannot choose in what component to add a file when this is added to the project in Advanced Installer. Files are placed in components based on some predefined rules which you can read here.
2) Some files need to form part of features....
For this you can set the current feature in which the files will be added. Files will be added in components based on the algorithm presented in the above mentioned article.

You can rearrange the files from the components only from the GUI of Advanced Installer, in Organization page.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Kim.Martin
Posts: 15
Joined: Mon Oct 18, 2010 5:27 pm

Re: AddFile behaviour

Thank-you! That seems very helpful.

I believe that will be enough for my needs - I hadn't understood what SetCurrentFeature actually did. I will try this and let you know.

Return to “Common Problems”