Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wix Burn-将文件夹选择从选项移动到安装页面_Wix_Burn_Wix3.8 - Fatal编程技术网

Wix Burn-将文件夹选择从选项移动到安装页面

Wix Burn-将文件夹选择从选项移动到安装页面,wix,burn,wix3.8,Wix,Burn,Wix3.8,我使用Wix3.8创建多个msi设置,并使用WixBurn将它们捆绑在一起。结合WixStandardBootstrapperApplication.HyperlinkLicense样式和自定义ThemeFile,它工作得非常好 唯一的问题是,folderselection隐藏在“选项”对话框中。我想把它移到第一页(安装页)。简单地复制FolderEdit框是行不通的,因为(我假设)只有在打开/关闭选项对话框时才会加载/保存这些值。有没有办法移动folderselection,或者我必须创建一个

我使用Wix3.8创建多个msi设置,并使用WixBurn将它们捆绑在一起。结合WixStandardBootstrapperApplication.HyperlinkLicense样式和自定义ThemeFile,它工作得非常好

唯一的问题是,folderselection隐藏在“选项”对话框中。我想把它移到第一页(安装页)。简单地复制FolderEdit框是行不通的,因为(我假设)只有在打开/关闭选项对话框时才会加载/保存这些值。有没有办法移动folderselection,或者我必须创建一个自定义引导程序

Bundle.wxs:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
    <Bundle Name="MyProject" Version="1.0.0.0" Manufacturer="CompanyName" UpgradeCode="xxx" IconSourceFile="icon.ico">
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense" xml:lang="de-de">
      <bal:WixStandardBootstrapperApplication
        LicenseUrl=""
        xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
        SuppressOptionsUI="no"
        LocalizationFile="German.wxl"
        ThemeFile="Theme.xml"
        ShowVersion="yes"
        />
    </BootstrapperApplicationRef>
    <WixVariable Id="WixStdbaLogo" Value="logo.jpg" />

    <Variable Name="InstallFolder" Type="string" Value="[WindowsVolume]test\mytestapp"/>
    <util:RegistrySearch
      Id="PreviousInstallFolderSearch"
      Root='HKLM'
      Key='Software\LANDWEHR\mytestapp'
      Value='InstallDir' 
      Variable='PreviousInstallFolder'/>
    <util:DirectorySearch
     Path='[PreviousInstallFolder]'
     Variable='InstallFolder'
     After='PreviousInstallFolderSearch'
     Condition='PreviousInstallFolder' />

        <Chain>
      <PackageGroupRef Id="NetFx45Web"/>

      <MsiPackage SourceFile="..\..\buildSetup\mytestapp\de-de\mytestapp.msi">
        <MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]" />
      </MsiPackage>

    </Chain>
    </Bundle>
</Wix>

Theme.xml:

<?xml version="1.0" encoding="utf-8"?>
<Theme xmlns="http://wixtoolset.org/schemas/thmutil/2010">
  <Window Width="500" Height="330" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
    <Font Id="0" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
    <Font Id="1" Height="-24" Weight="500" Foreground="000000">Segoe UI</Font>
    <Font Id="2" Height="-22" Weight="500" Foreground="666666">Segoe UI</Font>
    <Font Id="3" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
    <Font Id="4" Height="-12" Weight="500" Foreground="ff0000" Background="FFFFFF" Underline="yes">Segoe UI</Font>

    <Image X="11" Y="11" Width="64" Height="64" ImageFile="logo.png" Visible="yes"/>
    <Text X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Text>

    <Page Name="Help">
        <Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Text>
        <Text X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Text>
        <Button Name="HelpCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.HelpCloseButton)</Button>
    </Page>
    <Page Name="Install">
        <Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.InstallHeader)</Text>
        <Text X="11" Y="121" Width="-11" Height="-129" FontId="3" DisablePrefix="yes">#(loc.InstallMessage)</Text>
        <Checkbox Name="ServerInstall" X="17" Y="180" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.ServerInstall)</Checkbox>
        <Checkbox Name="ClientInstall" X="17" Y="200" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.ClientInstall)</Checkbox>
        <Text Name="InstallVersion" X="11" Y="-11" Width="246" Height="17" FontId="3" DisablePrefix="yes" HideWhenDisabled="yes">#(loc.InstallVersion)</Text>
        <Button Name="OptionsButton" X="-186" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.InstallOptionsButton)</Button>
        <Button Name="InstallButton" X="-91" Y="-11" Width="90" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
        <Button Name="WelcomeCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallCloseButton)</Button>
    </Page>
    <Page Name="Options">
        <Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Text>
        <Text X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Text>
        <Editbox Name="FolderEditbox" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
        <Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">#(loc.OptionsBrowseButton)</Button>
        <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsOkButton)</Button>
        <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsCancelButton)</Button>
    </Page>
    <Page Name="FilesInUse">
      <Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.FilesInUseHeader)</Text>
      <Text X="11" Y="121" Width="-11" Height="34" FontId="3" DisablePrefix="yes">#(loc.FilesInUseLabel)</Text>
      <Text Name="FilesInUseText" X="11" Y="150" Width="-11" Height="-86" FontId="3" DisablePrefix="yes" HexStyle="0x0000000C"></Text>

      <Button Name="FilesInUseCloseRadioButton" X="11" Y="-60" Width="-11" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" HexStyle="0x000009">#(loc.FilesInUseCloseRadioButton)</Button>
      <Button Name="FilesInUseDontCloseRadioButton" X="11" Y="-40" Width="-11" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" HexStyle="0x000009">#(loc.FilesInUseDontCloseRadioButton)</Button>

      <Button Name="FilesInUseOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FilesInUseOkButton)</Button>
      <Button Name="FilesInUseCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.FilesInUseCancelButton)</Button>
    </Page>
    <Page Name="Progress">
        <Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Text>
        <Text X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Text>
        <Text Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Text>
        <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
        <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
    </Page>
    <Page Name="Modify">
        <Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Text>
        <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
        <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
        <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyCloseButton)</Button>
    </Page>
    <Page Name="Success">
        <Text Name="SuccessHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessHeader)</Text>

        <Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>

        <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
        <Button Name="SuccessCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.SuccessCloseButton)</Button>
    </Page>
    <Page Name="Failure">
        <Text Name="FailureHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureHeader)</Text>
        <Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
        <Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
        <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
        <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.FailureCloseButton)</Button>
    </Page>
</Theme>

#(位置说明)
微软雅黑效果
微软雅黑效果
微软雅黑效果
微软雅黑效果
微软雅黑效果
#(参见标题)
#(位置:HelpHeader)
#(loc.HelpText)
#(定位帮助关闭按钮)
#(见附件1)
#(地址:InstallMessage)
#(位置:ServerInstall)
#(附件:ClientInstall)
#(loc.InstallVersion)
#(定位安装选项按钮)
#(定位安装按钮)
#(位置安装关闭按钮)
#(位置选项标题)
#(位置选项位置标签)
#(位置选项浏览按钮)
#(定位选项确认按钮)
#(定位选项取消按钮)
#(loc.FilesInUseHeader)
#(位置文件sinuselabel)
#(loc.FilesInUseCloseRadioButton)
#(loc.filesinusedcontincloseradiobutton)
#(loc.FilesInUseOkButton)
#(loc.FilesInUseCancelButton)
#(见标题)
#(见附件1)
#(位置:整体进度包装文本)
#(定位按钮)
#(位置修改标题)
#(位置修改按钮)
#(位置修改按钮)
#(位置修改关闭按钮)
#(位置:SuccessHeader)
#(定位成功启动按钮)
#(定位成功重启按钮)
#(定位成功关闭按钮)
#(定位故障标题)
#(位置故障HyperlinkLogText)
#(定位故障重启按钮)
#(定位故障关闭按钮)

编辑:正如您所说,FolderEdit框在WiX v3中似乎是特殊的,它是在选项OK处理程序中设置的,而不是在
保存页面设置中设置的。为了在WiX v3.x中实现这一点,必须有人向WiX团队提交功能请求,然后由WiX团队批准


从中可以看到,当按下选项、选项确定或安装按钮时,WixStdBA会保存设置(
SavePageSettings
)。在v3.10中,它被增强为在按下修复或卸载按钮时运行。在v4.0中,每一次页面转换都会节省时间。

感谢您提供的源代码链接,现在我对所发生的事情有了更好的了解。当我将FolderEdit框移动到安装页面时,不再加载/保存该值。SavePageSettings似乎对FolderEdit框具有特定的处理。请参阅:WIXSTDBA_CONTROL_FOLDER_EDITBOX!=pControl->wId