Programing

라이선스 페이지없이 최소 WiX 설치 프로그램 UI를 구축하는 방법은 무엇입니까?

lottogame 2020. 11. 4. 07:37
반응형

라이선스 페이지없이 최소 WiX 설치 프로그램 UI를 구축하는 방법은 무엇입니까?


WixUI_Minimal 설치 프로그램을 사용하고 싶지만 라이선스 페이지가 필요하지 않습니다. 어떻게 할 수 있습니까?


이미 생성 된 WiX UI 중 하나를 사용하고 시퀀스를 재정의합니다 (이전 설정을 재정의하도록 더 높게 설정).

    <Product> 
        ...
        <UI>
            <UIRef Id="WixUI_InstallDir" />

            <!-- Skip license dialog -->
            <Publish Dialog="WelcomeDlg"
                     Control="Next"
                     Event="NewDialog"
                     Value="InstallDirDlg"
                     Order="2">1</Publish>
            <Publish Dialog="InstallDirDlg"
                     Control="Back"
                     Event="NewDialog"
                     Value="WelcomeDlg"
                     Order="2">1</Publish>
        </UI>

        <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
        ...
    </Product>

핵심은 사용자 정의 UI를 만들고 다른 페이지를 연결하는 것입니다. WixWiki 페이지 참조

WixUI 최소 코드 를 가져 와서 약간 수정 하고 싶습니다 . WelcomeEulaDlg 시작 대화 상자 대신 WelcomeDlg를 사용하려고합니다. 참조를 조정하고 WelcomeDlg의 Next 버튼을 PrepareDlg가 될 스택의 다음 대화 상자에 연결합니다.

전체 코드 :

  <UI Id="WixUI_Minimal">
    <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
    <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
    <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />

    <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
    <Property Id="WixUI_Mode" Value="Minimal" />

    <DialogRef Id="ErrorDlg" />
    <DialogRef Id="FatalError" />
    <DialogRef Id="FilesInUse" />
    <DialogRef Id="MsiRMFilesInUse" />
    <DialogRef Id="PrepareDlg" />
    <DialogRef Id="ProgressDlg" />
    <DialogRef Id="ResumeDlg" />
    <DialogRef Id="UserExit" />

    <!-- This is the welcome dialog you specified-->
    <DialogRef Id="WelcomeDlg" /> 

    <!-- Hook the new welcome dialog to the next one in the stack-->
    <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="PrepareDlg">1</Publish> 

    <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>

    <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>

    <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>

    <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
    <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
    <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>

    <Property Id="ARPNOMODIFY" Value="1" />
  </UI>

  <UIRef Id="WixUI_Common" />

The low-tech way to get around this is simply to set the property LicenseAccepted to 1 and put some useful readme type information into the license box. This means the user doesn't have to click the box and you don't have to worry about creating an additional dialog :)

Example:

<Property Id="LicenseAccepted" Value="1"/>

See the answer to a related question, WiX script with only Welcome and Completed screens, for the simplest minimal UI:

  1. WelcomeDlg
  2. Installation progress
  3. Exit Dialog

@Ran Davidovitz 's answer is very good

but be carefully:

<Publish Dialog="InstallDirDlg"
         Control="Back"
         Event="NewDialog"
         Value="WelcomeDlg"
         Order="2">1</Publish> 

it must have Order="2",or it can't work.

참고URL : https://stackoverflow.com/questions/597025/how-to-build-a-minimal-wix-installer-ui-without-a-license-page

반응형