wix3 - WiX Condition on installing -
i've been scouring stackoverflow, blogs , firegiants tutorials clear answers few days now. seems has different way of doing things wix , there's never enough code answer issue i'm having.
i have installer create folders, copy files down, register dcom dlls, add services , registry keys. works fine. managed craft custom ui scratch that'll compile , doesn't have excessive dialogs annoy me.
what can't life of me figure out using condition tag have option either install client files, or both client , server.
i have dialog 2 buttons set property, , property used in condition on files install.
dlgwelcome.wxs:
<fragment> <ui id="welcomeui"> <property id="installclient" value="0" secure="yes"/> <property id="installserver" value="0" secure="yes"/> <dialog id="welcomedlg" width="370" height="270" title="!(loc.welcomedlgtitle)" nominimize="yes"> <control type="text" id="welcomedlgtxt" width="350" height="30" x="10" y="60" text="!(loc.welcomedlgtext)" /> <control type="pushbutton" id="installclient" width="350" height="50" x="10" y="90"> <text>!(loc.clientinstallbtntext)</text> <publish property="installclient" value="1"/> <publish event="newdialog" value="progressdlg"/> </control> <control type="pushbutton" id="installserver" width="350" height="50" x="10" y="150"> <text>(loc.installserverbtntext)</text> <publish property="installserver" value="1"/> <publish property="installclient" value="1"/> <publish event="newdialog" value="progressdlg" /> </control> </ui> </fragment>
product.wxs:
... <feature id="installation" title="install stuffs" display="expand"> <feature id="serverinstall" level="1" > <componentgroupref id="serverfiles" /> <componentref id="registryforserver"/> <condition level="0">installserver</condition> </feature> <feature id="clientinstall" level="1" > <componentgroupref id="clientfiles"/> <componentref id="registryforclient"/> <condition level="0">installclient</condition> </feature> </feature> <ui> <installuisequence> <costinitialize /> <filecost /> <costfinalize /> <show dialog="welcomedlg" after="costfinalize"/> <executeaction /> </installuisequence> </ui>
some of things i've tried i've seen verified solutions various posts have had apparently fix similar problem (can't confirm if have same version of wix in use or not, none work):
- had property declared in different ways: caps accessible command line(which don't use), , .... none of seem work.
- moved conditions individual components. did nothing.
- moved publish property tags around, before , after newdialog. no effect.
- made property secure. nothing.
so i'm @ wits end this. can point out doing wrong can finish installer , never @ wix ever again?
try this:
<control type="pushbutton" id="installclient" width="350" height="50" x="10" y="90"> <text>!(loc.clientinstallbtntext)</text> <publish property="installlevel" value="2"/> <publish event="newdialog" value="progressdlg"/> </control> <control type="pushbutton" id="installserver" width="350" height="50" x="10" y="150"> <text>(loc.installserverbtntext)</text> <publish property="installlevel" value="5"/> <publish event="newdialog" value="progressdlg" /> </control> ... <feature id="installation" title="install stuffs" display="expand"> <feature id="serverinstall" level="3" > <componentgroupref id="serverfiles" /> <componentref id="registryforserver"/> </feature> <feature id="clientinstall" level="1" > <componentgroupref id="clientfiles"/> <componentref id="registryforclient"/> </feature>
i don't think you're supposed modify installlevel this, might work now.
Comments
Post a Comment