hsc
Posts: 101
Joined: Wed Mar 02, 2016 2:55 pm

Cloning functionality

I created some rather complex functionality in an installer which includes GUI logic as well as embedded and external PowerShell scripts. I want to copy this functionality to other installers. If it were only one, I'd copy/paste the stuff, but in the end there will be 5 or more installers which need these functions. What is AI's recommended way of cloning one installer's custom functionality to another installer?

Thanks
Hans
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Cloning functionality

Hello Hans,

The best way I would say is the "Save as Template" functionality.

This will allow you to save your project as a template and then start another project based on the templace (meaning it will contain all the UI changes and the PowerShell scripts as well).

Using the "Save as template" option

and another newer article written by me:

Efficient Project Duplication with Advanced Installer's 'Save as Template' Feature

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hsc
Posts: 101
Joined: Wed Mar 02, 2016 2:55 pm

Re: Cloning functionality

Hello Catalin, thank you, but that doesn't solve the problem. Those installer projects are too much different to be created from a common template. Is there no way to share the code and UI across projects? I mean, something like you can share C++ code by means of a lib file, or in binary form as a DLL file? After all, an installer project is like code, and code duplication is the source of all evil.

Regards
Hans
Catalin
Posts: 7492
Joined: Wed Jun 13, 2018 7:49 am

Re: Cloning functionality

Hello Hans,

I understand.

Perhaps for your scenario we can use the "Repository Manager"?

This would be helpful for stuff such as dialogs and prerequisites. For instance, you can have a dialog configured on a project, add it to repository and then import it into another project.

Would this help in your scenario?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”