Skip to content

Instantly share code, notes, and snippets.

@sandyarmstrong
Created June 28, 2010 23:50
Show Gist options
  • Save sandyarmstrong/456565 to your computer and use it in GitHub Desktop.
Save sandyarmstrong/456565 to your computer and use it in GitHub Desktop.
wix question
I have this in http://git.gnome.org/browse/tomboy/tree/Setup/Setup.wxs
<Condition Message="This setup requires Gtk# for .NET (version 2.12.8 or higher). Please download the latest installer from http://ftp.novell.com/pub/mono/gtk-sharp/ ">
<![CDATA[GTKSHARPNOVELLINSTALLVERSION >= "2.12.8" OR REMOVE ~= "ALL"]]>
</Condition>
Now unfortunately, because this version check is
a string comparison, when GTKSHARPNOVELLINSTALLVERSION
is "2.12.10", that does not pass the >= "2.12.8" test.
I'd like to do a more elaborate check...maybe I could
check that if the string starts with "2.12.", and the
string length is greater than 6?
I'd like to make sure that we don't allow install
with gtk-sharp < 2.12.8 if it's not too hard.
@jpobst
Copy link

jpobst commented Jun 29, 2010

GTKSHARPNOVELLINSTALLVERSION >= "2.12.8" OR
(GTKSHARPNOVELLINSTALLVERSION << "2.12.1" AND GTKSHARPNOVELLINSTALLVERSION <> "2.12.1") OR
REMOVE ~= "ALL"

That should at least work until we release 2.12.20. ;)

@sandyarmstrong
Copy link
Author

Thanks! I've always had trouble reading through wix/msi docs. This one was clearly stated here but I had trouble finding the page:

http://msdn.microsoft.com/en-us/library/aa368012.aspx (see Substring Operators section)

Your fix works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment