Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 303
Deqing Avatar asked Dec 06 '25 14:12

Deqing


1 Answers

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.

like image 64
Bob Arnson Avatar answered Dec 09 '25 23:12

Bob Arnson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!