Deqing
Deqing

Reputation: 14632

Wix3.5: Undefined preprocessor variable '$(var.Platform)'

I'm trying to write MSI installer for x64 system

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

  <?if $(var.Platform)=x64 ?>
  <?define win64Flag = "yes" ?>
  <?else ?>
  <?define win64Flag = "no" ?>
  <?endif ?>

</Wix>

This should be a pretty straightforward way to use the build-in variable Platform, but it failed as follows:

D:\>candle m.wxs
Microsoft (R) Windows Installer Xml Compiler version 3.5.2519.0
Copyright (C) Microsoft Corporation. All rights reserved.

m.wxs
D:\m.wxs(4) : error CNDL0150 : Undefined preprocessor variable '$(var.Platform)'.

So it means this "Platform" is not a build-in variable? Or anything I did wrong?

Upvotes: 3

Views: 4637

Answers (1)

Bob Arnson
Bob Arnson

Reputation: 21886

No, it's not built in. You probably don't need it. See http://www.joyofsetup.com/2010/05/14/working-hard-or-hardly-working/ for how Candle handles most of the details for you.

Upvotes: 2

Related Questions