Anyway To Control Including A Component At Build Time? - 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!

sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Anyway To Control Including A Component At Build Time?

I was trying to figure out if I have 2 components (or features?) that include one file (the same file but built differently in Visual Studio) could I control at BUILD TIME which file gets included into the build package?
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: Anyway To Control Including A Component At Build Time?

I see the command line parameter /SetProperty but I was trying to avoid using a Global Property because I don't want the end user to be able to "trigger" installing the alternate version if the property name leaked out.

I also didn't see how different "build names" would help.
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
sjeslis
Posts: 308
Joined: Mon Aug 22, 2011 11:40 pm
Contact: Website

Re: Anyway To Control Including A Component At Build Time?

I guess I could have a second build configuration that has a pre-build event defined to copy the alternate version of the file over the standard version on disk in the staging area (i.e. where the DLL in question resides).
Scott Jeslis
Senior Software Engineer
Cicero, Inc.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Anyway To Control Including A Component At Build Time?

Hello,

In order to achieve this you can add the first version of your file in the installation project, then develop your own pre-build event (e.g. a VB Script or a BAT file) which will overwrite (or not - based on your condition) the above file in its containing folder on disk.
I guess I could have a second build configuration that has a pre-build event defined to copy the alternate version of the file over the standard version on disk in the staging area (i.e. where the DLL in question resides).
Yes, you can use this approach too.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”