mirror of
https://github.com/nushell/nushell.git
synced 2025-06-20 09:58:15 +02:00
Add WindowsTerminalProfile feature for installation
This commit is contained in:
parent
9855085fb7
commit
deacd569ef
@ -29,6 +29,7 @@
|
|||||||
<BindPath Include="." />
|
<BindPath Include="." />
|
||||||
<Content Include="nu.ico" />
|
<Content Include="nu.ico" />
|
||||||
<Content Include="License.rtf" />
|
<Content Include="License.rtf" />
|
||||||
|
<Content Include="windows-terminal-profile.json" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
51
wix/main.wxs
51
wix/main.wxs
@ -54,6 +54,31 @@
|
|||||||
<Directory Id="BINDIR_USER" Name="bin" />
|
<Directory Id="BINDIR_USER" Name="bin" />
|
||||||
</Directory>
|
</Directory>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
<!-- Windows Terminal Profile Directories -->
|
||||||
|
<Directory Id="AppDataMicrosoftFolder" Name="Microsoft">
|
||||||
|
<Directory Id="AppDataWindowsTerminalFolder" Name="Windows Terminal">
|
||||||
|
<Directory Id="WindowsTerminalProfileFolder" Name="Fragments">
|
||||||
|
<Directory Id="WindowsTerminalProfileAppFolder" Name="nu">
|
||||||
|
<Component Id="WindowsTerminalProfile" Guid="957239F4-7B87-4399-9F91-7DF2ABE5ED8B">
|
||||||
|
<File Id="WindowsTerminalProfileFile"
|
||||||
|
Name="nu.json"
|
||||||
|
Source="$(var.ProjectDir)\windows-terminal-profile.json" />
|
||||||
|
<RegistryValue Root="HKCU"
|
||||||
|
Key="Software\nu"
|
||||||
|
Name="WindowsTerminalProfile"
|
||||||
|
Value="1"
|
||||||
|
Type="integer"
|
||||||
|
KeyPath="yes" />
|
||||||
|
<RemoveFolder Id="RemoveWindowsTerminalProfileFolderA" Directory="WindowsTerminalProfileAppFolder" On="uninstall" />
|
||||||
|
<RemoveFolder Id="RemoveWindowsTerminalProfileFolderB" Directory="WindowsTerminalProfileFolder" On="uninstall" />
|
||||||
|
<RemoveFolder Id="RemoveWindowsTerminalProfileFolderC" Directory="AppDataWindowsTerminalFolder" On="uninstall" />
|
||||||
|
<RemoveFolder Id="RemoveWindowsTerminalProfileFolderD" Directory="AppDataMicrosoftFolder" On="uninstall" />
|
||||||
|
</Component>
|
||||||
|
</Directory>
|
||||||
|
</Directory>
|
||||||
|
</Directory>
|
||||||
|
</Directory>
|
||||||
</StandardDirectory>
|
</StandardDirectory>
|
||||||
|
|
||||||
<ComponentGroup Id="NushellBinaries" Directory="BINDIR">
|
<ComponentGroup Id="NushellBinaries" Directory="BINDIR">
|
||||||
@ -132,6 +157,14 @@
|
|||||||
<ComponentRef Id="EnvironmentPathMachine" />
|
<ComponentRef Id="EnvironmentPathMachine" />
|
||||||
</Feature>
|
</Feature>
|
||||||
|
|
||||||
|
<!-- Windows Terminal Profile Feature -->
|
||||||
|
<Feature Id="WindowsTerminalProfile"
|
||||||
|
Title="Windows Terminal Profile"
|
||||||
|
Description="Add $(var.ProductName) profile to Windows Terminal."
|
||||||
|
Level="1">
|
||||||
|
<ComponentRef Id="WindowsTerminalProfile" />
|
||||||
|
</Feature>
|
||||||
|
|
||||||
<!-- Load Advanced UI -->
|
<!-- Load Advanced UI -->
|
||||||
<WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\License.rtf" />
|
<WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\License.rtf" />
|
||||||
<ui:WixUI Id="WixUI_Advanced" />
|
<ui:WixUI Id="WixUI_Advanced" />
|
||||||
@ -174,5 +207,23 @@
|
|||||||
After="AppSearch"
|
After="AppSearch"
|
||||||
Condition="ALLUSERS=1"
|
Condition="ALLUSERS=1"
|
||||||
Sequence="both" />
|
Sequence="both" />
|
||||||
|
|
||||||
|
<!-- Custom Action for Windows Terminal Profile -->
|
||||||
|
<SetProperty Id="ReplacePathsInWindowsTerminalProfile"
|
||||||
|
Sequence="execute"
|
||||||
|
Value=""[#nu.exe]" -c "let doc = (open `[#WindowsTerminalProfileFile]` | update profiles.commandline `[#nu.exe]` | update profiles.icon `[#nu.ico]`); $doc | save -f `[#WindowsTerminalProfileFile]`""
|
||||||
|
After="CostFinalize" />
|
||||||
|
|
||||||
|
<CustomAction Id="ReplacePathsInWindowsTerminalProfile"
|
||||||
|
Return="check"
|
||||||
|
Impersonate="yes"
|
||||||
|
Execute="deferred"
|
||||||
|
DllEntry="WixQuietExec"
|
||||||
|
BinaryRef="Wix4UtilCA_X64" />
|
||||||
|
|
||||||
|
<InstallExecuteSequence>
|
||||||
|
<Custom Action="ReplacePathsInWindowsTerminalProfile" Before="InstallFinalize"
|
||||||
|
Condition="(&WindowsTerminalProfile=3) OR ((!WindowsTerminalProfile=3) AND (REINSTALL<>""))"/>
|
||||||
|
</InstallExecuteSequence>
|
||||||
</Package>
|
</Package>
|
||||||
</Wix>
|
</Wix>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user