[WiX-users] Custom dialog control enable / disable

2007-05-28 Thread Milan Tomeš
Hi all,

I'm writing my very first installation script using WiX and I'm having 
some troubles with that. I have my own setup dialog (which sets some 
properties of database server) and on that dialog I want to enable / 
disable controls in order of running environment / user choices. So I 
have a radio group with options Service (Value = 1) and Standalone 
application (Value = 0). RadioGroup is linked to property 
_ServiceInstall which has value VersionNT. I guess that will result in 
1 if VersionNT is set and 0 if not right ? If its true so why my code 
isn't working ? If I set 1 instead if VersionNT in _ServiceInstall 
property value its working ok.

Can anybody help me ? I'm really tired of trying this features.

Here is source code for my dialog:

  Dialog Id=FBServerParamsDlg Width=370 Height=270 
Title=$(loc.FBServerParamsDlg_Title)
Control Id=ServerTypeLabel Type=Text X=12 Y=54 
Width=154 Height=15 TabSkip=yes RightAligned=no
  TextChoose server type to install/Text
/Control
Control Id=ServerTypeGrp Type=RadioButtonGroup X=174 
Y=48 Width=150 Height=36 Property=_ServerType
  RadioButtonGroup Property=_ServerType
RadioButton Height=12 Text=Super server 
Value=superserver Width=126 X=6 Y=6 /
RadioButton Height=12 Text=Classic server 
Value=classicserver Width=126 X=6 Y=20 /
  /RadioButtonGroup
/Control
Control Id=ServerPortLabel Type=Text X=12 Y=88 
Width=154 Height=9 TabSkip=yes RightAligned=no
  TextPort/Text
/Control
Control Id=ServerPort Type=MaskedEdit X=180 Y=87 
Width=40 Height=15 Property=_ServerPort TabSkip=no 
RightAligned=yes Integer=no Text=% Indirect=no
  Text#/Text
/Control
Control Id=ServerInstallTypeGrp Property=_ServiceInstall 
Type=RadioButtonGroup X=6 Y=102 Height=93 Width=168
  RadioButtonGroup Property=_ServiceInstall
RadioButton Text=Service Value=1 X=6 Y=6 
Height=12 Width=150 /
RadioButton Text=Standalone application Value=0 X=6 
Y=75 Height=12 Width=150 /
  /RadioButtonGroup
/Control
Control Id=ServiceNameLabel Type=Text X=36 Y=126 
Width=130 Height=12 TabSkip=yes RightAligned=no
  TextService name/Text
/Control
Control Id=ServiceName Type=Edit X=180 Y=123 
Width=180 Height=18 Property=_ServiceName TabSkip=no 
Text=[DefaultServerServiceName] Disabled=no
  TextFirebirdServerDefaultInstance/Text
  Condition Action=disable(_ServiceInstall lt;gt; 
1)/Condition
  Condition Action=enable(_ServiceInstall = 1)/Condition
/Control
Control Id=ServiceUserNameLabel Type=Text X=36 Y=141 
Width=130 Height=12 TabSkip=yes RightAligned=no
  TextService user-friendly name/Text
/Control
Control Id=ServiceUserName Type=Edit X=180 Y=139 
Width=180 Height=18 Property=_ServiceUserName TabSkip=no 
Text=[DefaultServerServiceUserName] Disabled=no
  TextFirebirdServer - DefaultInstance/Text
  Condition Action=enable(_ServiceInstall = 1)/Condition
  Condition Action=disable(_ServiceInstall lt;gt; 
1)/Condition
/Control
Control Id=UseGuardian Type=CheckBox Text=Use Firebird 
Guardian X=36 Y=156 Height=12 Width=240 
Property=_ServerUseGuardian CheckBoxValue=1 TabSkip=no
  Condition Action=disable(_ServiceName lt;gt; 
DefaultServerServiceName) OR (_ServiceUserName lt;gt; 
DefaultServerServiceUserName)/Condition
  Condition Action=enable(_ServiceName = 
DefaultServerServiceName) AND (_ServiceUserName = 
DefaultServerServiceUserName)/Condition
/Control
Control Id=Back Height=17 Text=$(loc.WixUIBack) 
Type=PushButton Width=56 X=180 Y=243
  Publish Event=NewDialog 
Value=CustomizeDlgWixUI_InstallMode = InstallCustom/Publish
  Publish Event=NewDialog 
Value=SetupTypeDlgWixUI_InstallMode = InstallComplete/Publish
/Control
Control Id=Cancel Cancel=yes Height=17 
Text=$(loc.WixUICancel) Type=PushButton Width=56 X=304 Y=243
  Publish Event=SpawnDialog Value=CancelDlg1/Publish
/Control
Control Id=Next Default=yes Height=17 
Text=$(loc.WixUINext) Type=PushButton Width=56 X=236 Y=243
  Publish Value=ServerPortErrorDlg 
Property=SpawnDialog(_ServerPort lt; 1024) or (_ServerPort gt; 
65535)/Publish
/Control
Control Id=Title Height=15 NoPrefix=yes 
Text=$(loc.FBServerParamsDlgTitle) Transparent=yes Type=Text 
Width=200 X=15 Y=6 /
Control Id=Description Height=20 NoPrefix=yes 
Text=$(loc.FBServerParamsDlgDescription) Transparent=yes Type=Text 
Width=280 X=20 Y=20 /
Control Id=BottomLine Height=0 Type=Line Width=370 
X=0 Y=234 /
Control Id=BannerLine Height=0 Type=Line Width=370 
X=0 Y=44 /
Control Id=BannerBitmap Height=44 TabSkip=no 
Text=$(loc.CustomizeDlgBannerBitmap) Type=Bitmap Width=370 X=0 
Y=0
/Control
  /Dialog


Thanks

Milan


Re: [WiX-users] Custom dialog control enable / disable

2007-05-28 Thread Stefan Pavlik
Hi Milan,...

Milan Tomeš wrote:
 Hi all,
 
 RadioGroup is linked to property 
 _ServiceInstall which has value VersionNT. I guess that will result in 
 1 if VersionNT is set and 0 if not right ? If its true so why my code 
 isn't working ? If I set 1 instead if VersionNT in _ServiceInstall 
 property value its working ok.

You didn't post the code for initial setting of _ServiceInstall
property.

I think it should be the custom action (type 51), sequenced before
displaying of the dialog and conditioned by the VersionNT property.


Property Id='_ServiceInstall' Value='0' / !-- default value --

CustomAction Id=PROPCA__ServiceInstall Property=_ServiceInstall
Value=1 Execute=immediate /

InstallUISequence
Custom Id='PROPCA__ServiceInstall' Before='...' VersionNT/Custom
/InstallUISequence

Hope that it will help you.

Regards

Stefan

-- 
Stefan Pavlik | [EMAIL PROTECTED]
Whitestein Technologies s.r.o. | www.whitestein.com
Panenska 28 | 811 03 Bratislava | Slovak Republic
Main +421 2 5443-5502 | Direct +421 2 5930-0735

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Re: [WiX-users] Custom dialog control enable / disable

2007-05-28 Thread Milan Tomeš




Hi Stefan

Thanks a lot but I've already solved my problem. The problem was
between chair and keyboard of course :)
I've used VersionNT in wrong way - I took result value like 500 or so
but I wanted boolean result (if property is set or not) and that was my
problem.
Now I have 2 custom actions and they sets my property and uses
condition like VersionNT / NOT VersionNT.

Thanks anyway for your time

Milan

Stefan Pavlik napsal(a):

  Hi Milan,...

Milan Tomeš wrote:
  
  
Hi all,

RadioGroup is linked to property 
_ServiceInstall which has value "VersionNT". I guess that will result in 
1 if VersionNT is set and 0 if not right ? If its true so why my code 
isn't working ? If I set 1 instead if VersionNT in _ServiceInstall 
property value its working ok.

  
  
You didn't post the code for initial setting of _ServiceInstall
property.

I think it should be the custom action (type 51), sequenced before
displaying of the dialog and conditioned by the VersionNT property.


Property Id='_ServiceInstall' Value='0' / !-- default value --

CustomAction Id="PROPCA__ServiceInstall" Property="_ServiceInstall"
Value="1" Execute="immediate" /

InstallUISequence
Custom Id='PROPCA__ServiceInstall' Before='...' VersionNT/Custom
/InstallUISequence

Hope that it will help you.

Regards

Stefan

  




-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users