开发者

Conditionally include file based on project configuration

I have a number of editions of the project for which I am making a Visual Studio setup project (installer).

For each edition there is a separate license agreement that should be shown in the default License Agreement window.

What I want to do is to point the LicenseFile of the License Agreement window to a file somewhere on the client FS.

But the license file itself should be conditionally included into the setup package based on either condition开发者_如何转开发al compilation symbol (EDITION_FREE, EDITION_GOLD etc) or just a name of the Configuration.

Not sure how I would do that and what conditions are available for the Condition property for files?

Thanks,

Dmitriy.


You can create separate versions of the same file with different extensions. Lets assume that your license file is License.txt, so you will need to create several ones more, one per each configuration and give them following names:

License.free.txt

License.gold.txt etc

Then you need to create build configurations with the same name as file suffix (free, gold) and use this-like post build script. Please look at this question too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜