Share between multiple projects - Advanced Installer Community
buffalonan
Posts: 6
Joined: Thu Jun 08, 2017 9:48 am

Share between multiple projects

Good morning,

Here in AutoForm we have been working happily with AI for a long time, but now the company is growing and we have problems escalating.

We have 10 different products and therefore 10 different installers, with a lot of similarities between each other: same dialogs some times, same searches, same custom actions,... My question is, do you have a way of sharing these elements? For instance, I would like to be able to change a title in a dialog and get the change in all projects, or to add a Search and get it for all projects.

Another use case would be to have 3 installers with the same dialogs and functionality, but installing different applications (so handling different searches, references in the dialogs to the product,...). I tried using AI_BUILD_NAME property, but it does not work properly for dialogs ditinction since properties cannot have the same name and the dialogs tree gets really messy.

Thanks in advance
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Share between multiple projects

Hello,
I would like to be able to change a title in a dialog and get the change in all projects
This could be achieved using our Reporistory feature. Please take a look on our article : Repository Manager

The complete method is the following:
-go to the "Dialogs" page, right click on the dialog you need to use in multiple projects and click on "Move to repository"
-if you need to use this dialog in a new project, you could go to "Dialogs" page and click "Add Dialog" toolbar button. Then click "Repository" tab and choose your dialog.

Please note that whenever you modify your dialog, you need to re-store it in the repository by right clicking on it and clicking on "Move to Repository". A "Save in repository" prompt will be displayed and you should choose "Overwrite existing dialog". The updated dialog will be used automatically in all the projects that refer it.
to add a Search and get it for all projects
You could create a Merge module that contains your search. Then you should add this merge module to all the projects that need to use that search. You could reference the result property of the search contained by a merge module in the following way:

Code: Select all

MY_PROP.<GUID>
where <GUID> represents the merge module's containing the search GUID.

If you want to modify the search, just edit the merge module's project, build it and then rebuild all the projects that contain it.

Another method would be using project templates . To achieve this, you could create a new project, create the search and save the project as a template. Whenever you need to use this search you could use this template project as a starting point. This can be done by clicking File - New - "Custom templates" - and your template. This method has the disadvantage that if you want to modify the search later, you have to do this for all the projects.
Another use case would be to have 3 installers with the same dialogs and functionality, but installing different applications (so handling different searches, references in the dialogs to the product,...). I tried using AI_BUILD_NAME property, but it does not work properly for dialogs ditinction since properties cannot have the same name and the dialogs tree gets really messy.
I'm not sure I understand your scenario. Can you provide a more detailed scenario regarding what you want to achieve?

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
buffalonan
Posts: 6
Joined: Thu Jun 08, 2017 9:48 am

Re: Share between multiple projects

Hi Sorin,

Thanks a lot for your answer !

I am using now the repository and is working fine, I was lacking the "Overwrite existing dialog", thought just saving the project would be enough.

Merged modules is a great idea, but mostly I am using "Extended searches" to check if products are installed (SearchType -> criteria -> Product version specifically), and this is not available in the merged module searches page for me (at least is grayed out, only "New search" and "New file search" are enabled). Is there any way to have it or do you know any other way of doing it?

Regarding the unclear last point, I meant that I have 3 installers that are almost identical, but they install different products. So I have same dialogs with different titles according to the product (already solved using install parameters for all the uncommon references) and different searches (so would be nice if extended search could be used in the merged module, that will solve the issue).

Thanks again and best regards,
Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Share between multiple projects

Hello,

You are welcome!
...mostly I am using "Extended searches" to check if products are installed (SearchType -> criteria -> Product version specifically), and this is not available in the merged module searches page for me (at least is grayed out, only "New search" and "New file search" are enabled). Is there any way to have it or do you know any other way of doing it?
We use a custom implementation for our extended search feature. It isn't supported in merge modules because isn't implemented using the standard Windows Installer search action.
Regarding the unclear last point, I meant that I have 3 installers that are almost identical, but they install different products. So I have same dialogs with different titles according to the product (already solved using install parameters for all the uncommon references) and different searches (so would be nice if extended search could be used in the merged module, that will solve the issue).
As I said, unfortunately extended search, being an Advanced Installer custom feature, couldn't be used in merge modules.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”