Skip to content

Commit

Permalink
use advanced UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Ying Chen committed Dec 7, 2023
1 parent 74d1643 commit 82a90bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
18 changes: 8 additions & 10 deletions scripts/installer/windows/product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -85,45 +85,43 @@
</InstallUISequence>

<CustomAction Id="StartPromptFlowService"
Directory="DynamicCliDir"
Directory="APPLICATIONFOLDER"
Execute="commit"
ExeCommand="PowerShell.exe -WindowStyle hidden Start-Process -FilePath pfs -NoNewWindow -Wait"
Return="asyncNoWait" />
<InstallExecuteSequence>
<Custom Action="StartPromptFlowService" Before="InstallFinalize">NOT Installed AND NOT WIX_UPGRADE_DETECTED</Custom>
</InstallExecuteSequence>

</Product>

<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.ProgramFilesFolder)" Name="PFiles">
<Directory Id="DynamicCliDir" Name="promptflow" />
<Directory Id="APPLICATIONFOLDER" Name="promptflow" />
</Directory>
</Directory>

<Property Id="WIXUI_INSTALLDIR" Value="DynamicCliDir" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_Advanced" />
</Fragment>

<Fragment>
<ComponentGroup Id="PromptflowCliSettingsGroup">
<Component Id="RemovePromptflowFolder" Directory="DynamicCliDir" Guid="$(var.RemovePromptflowFolderGuid)">
<RemoveFolder Id="DynamicCliDir" On="uninstall" />
<Component Id="RemovePromptflowFolder" Directory="APPLICATIONFOLDER" Guid="$(var.RemovePromptflowFolderGuid)">
<RemoveFolder Id="APPLICATIONFOLDER" On="uninstall" />
</Component>

<Component Id="PromptflowSystemPath" Directory="DynamicCliDir" Guid="$(var.PromptflowSystemPathGuid)">
<Component Id="PromptflowSystemPath" Directory="APPLICATIONFOLDER" Guid="$(var.PromptflowSystemPathGuid)">
<Environment Id="PromptflowAddedToPATH"
Name="PATH"
Value="[DynamicCliDir]"
Value="[APPLICATIONFOLDER]"
Permanent="no"
Part="first"
Action="set"
System="no" />
<CreateFolder />
</Component>
<Component Id="PromptflowCliVersion"
Directory="DynamicCliDir"
Directory="APPLICATIONFOLDER"
Guid="$(var.PromptflowCliVersionGuid)">
<RegistryValue Root="HKCU"
Key="Software\Microsoft\$(var.ProductName)"
Expand Down
2 changes: 1 addition & 1 deletion scripts/installer/windows/promptflow.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@
<Error Text="The WiX Toolset v3.10 build tools must be installed to build this project. To download the WiX Toolset, see https://wixtoolset.org/releases/v3.10/stable" />
</Target>
<Target Name="BeforeBuild">
<HeatDirectory Directory="$(PromptflowSource)" ToolPath="$(WixToolPath)" AutogenerateGuids="true" ComponentGroupName="PromptflowCliComponentGroup" SuppressRootDirectory="true" DirectoryRefId="DynamicCliDir" OutputFile="out\promptflow.wxs" PreprocessorVariable="var.PromptflowSource" />
<HeatDirectory Directory="$(PromptflowSource)" ToolPath="$(WixToolPath)" AutogenerateGuids="true" ComponentGroupName="PromptflowCliComponentGroup" SuppressRootDirectory="true" DirectoryRefId="APPLICATIONFOLDER" OutputFile="out\promptflow.wxs" PreprocessorVariable="var.PromptflowSource" />
</Target>
</Project>

0 comments on commit 82a90bb

Please sign in to comment.