we don't need ext.msix any more

This commit is contained in:
vanzue
2025-12-11 14:21:38 +08:00
parent 54ffbe1b06
commit 51956c6f25
5 changed files with 0 additions and 131 deletions

View File

@@ -1352,47 +1352,6 @@ UINT __stdcall InstallCmdPalPackageCA(MSIHANDLE hInstall)
return WcaFinalize(er);
}
UINT __stdcall InstallCmdPalExtPowerToysPackageCA(MSIHANDLE hInstall)
{
using namespace winrt::Windows::Foundation;
using namespace winrt::Windows::Management::Deployment;
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
std::wstring installationFolder;
hr = WcaInitialize(hInstall, "InstallCmdPalExtPowerToysPackage");
hr = getInstallFolder(hInstall, installationFolder);
try
{
auto msix = package::FindMsixFile(installationFolder + L"\\WinUI3Apps\\CmdPalExtensions\\Microsoft.CmdPal.Ext.PowerToys\\", false);
auto dependencies = package::FindMsixFile(installationFolder + L"\\WinUI3Apps\\CmdPalExtensions\\Microsoft.CmdPal.Ext.PowerToys\\Dependencies\\", true);
if (!msix.empty())
{
auto msixPath = msix[0];
if (!package::RegisterPackage(msixPath, dependencies))
{
Logger::error(L"Failed to install CmdPal PowerToys extension package");
er = ERROR_INSTALL_FAILURE;
}
}
}
catch (std::exception &e)
{
std::string errorMessage{"Exception thrown while trying to install CmdPal PowerToys extension package: "};
errorMessage += e.what();
Logger::error(errorMessage);
er = ERROR_INSTALL_FAILURE;
}
er = er == ERROR_SUCCESS ? (SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE) : er;
return WcaFinalize(er);
}
UINT __stdcall UnRegisterCmdPalPackageCA(MSIHANDLE hInstall)
{
using namespace winrt::Windows::Foundation;
@@ -1427,39 +1386,6 @@ UINT __stdcall UnRegisterCmdPalPackageCA(MSIHANDLE hInstall)
return WcaFinalize(er);
}
UINT __stdcall UnRegisterCmdPalExtPowerToysPackageCA(MSIHANDLE hInstall)
{
using namespace winrt::Windows::Foundation;
using namespace winrt::Windows::Management::Deployment;
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;
hr = WcaInitialize(hInstall, "UnRegisterCmdPalExtPowerToysPackage");
try
{
std::wstring packageToRemoveDisplayName{L"Microsoft.CmdPal.Ext.PowerToys"};
if (!package::UnRegisterPackage(packageToRemoveDisplayName))
{
Logger::error(L"Failed to unregister package: " + packageToRemoveDisplayName);
er = ERROR_INSTALL_FAILURE;
}
}
catch (std::exception &e)
{
std::string errorMessage{"Exception thrown while trying to unregister the CmdPal PowerToys extension package: "};
errorMessage += e.what();
Logger::error(errorMessage);
er = ERROR_INSTALL_FAILURE;
}
er = er == ERROR_SUCCESS ? (SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE) : er;
return WcaFinalize(er);
}
UINT __stdcall UnRegisterContextMenuPackagesCA(MSIHANDLE hInstall)
{

View File

@@ -19,10 +19,8 @@ EXPORTS
InstallEmbeddedMSIXCA
InstallDSCModuleCA
InstallCmdPalPackageCA
InstallCmdPalExtPowerToysPackageCA
UnApplyModulesRegistryChangeSetsCA
UnRegisterCmdPalPackageCA
UnRegisterCmdPalExtPowerToysPackageCA
UnRegisterContextMenuPackagesCA
UninstallEmbeddedMSIXCA
UninstallDSCModuleCA

View File

@@ -1,47 +0,0 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<?include $(sys.CURRENTDIR)\Common.wxi?>
<?define CmdPalExtPowerToysBuildDir="$(var.BinDir)\WinUI3Apps\CmdPalExtensions\Microsoft.CmdPal.Ext.PowerToys\"?>
<?define CmdPalExtPowerToysVersion="$(var.CmdPalVersion)"?>
<Fragment>
<DirectoryRef Id="WinUI3AppsInstallFolder">
<Directory Id="CmdPalExtensionsInstallFolder" Name="CmdPalExtensions">
<Directory Id="CmdPalExtPowerToysInstallFolder" Name="Microsoft.CmdPal.Ext.PowerToys" />
</Directory>
</DirectoryRef>
<DirectoryRef Id="CmdPalExtensionsInstallFolder">
<Component Id="RemoveCmdPalExtensionsFolder" Guid="7F3E7A36-0F28-4BB5-9D68-8B7E0A6886C6" Bitness="always64">
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="RemoveCmdPalExtensionsFolder" Value="" KeyPath="yes" />
</RegistryKey>
<RemoveFile Id="RemoveFilesCmdPalExtensionsInstallDir" Directory="CmdPalExtensionsInstallFolder" Name="*" On="uninstall" />
<RemoveFolder Id="RemoveCmdPalExtensionsInstallFolder" Directory="CmdPalExtensionsInstallFolder" On="uninstall" />
</Component>
</DirectoryRef>
<DirectoryRef Id="CmdPalExtPowerToysInstallFolder" FileSource="$(var.CmdPalExtPowerToysBuildDir)AppPackages\Microsoft.CmdPal.Ext.PowerToys_$(var.CmdPalExtPowerToysVersion)_Test">
<Component Id="Module_CmdPal_Ext_PowerToys" Guid="1B7E5C7E-7F3B-40D4-BF57-6B9F5E3A6B02" Bitness="always64">
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="Module_CmdPal_Ext_PowerToys" Value="" KeyPath="yes" />
</RegistryKey>
<?if $(sys.BUILDARCH) = x64 ?>
<File Id="Microsoft.CmdPal.Ext.PowerToys___var.CmdPalExtPowerToysVersion_._x64.msix" Source="$(var.CmdPalExtPowerToysBuildDir)AppPackages\Microsoft.CmdPal.Ext.PowerToys_$(var.CmdPalExtPowerToysVersion)_Test\Microsoft.CmdPal.Ext.PowerToys_$(var.CmdPalExtPowerToysVersion)_x64.msix" />
<?else?>
<File Id="Microsoft.CmdPal.Ext.PowerToys___var.CmdPalExtPowerToysVersion_._arm64.msix" Source="$(var.CmdPalExtPowerToysBuildDir)AppPackages\Microsoft.CmdPal.Ext.PowerToys_$(var.CmdPalExtPowerToysVersion)_Test\Microsoft.CmdPal.Ext.PowerToys_$(var.CmdPalExtPowerToysVersion)_arm64.msix" />
<?endif?>
</Component>
</DirectoryRef>
<ComponentGroup Id="CmdPalExtPowerToysComponentGroup">
<Component Id="RemoveCmdPalExtPowerToysFolder" Guid="E09A8F26-74D8-42FD-88F1-9A3D6B5C7799" Directory="INSTALLFOLDER">
<RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
<RegistryValue Type="string" Name="RemoveCmdPalExtPowerToysFolder" Value="" KeyPath="yes" />
</RegistryKey>
<RemoveFile Id="RemoveFilesCmdPalExtPowerToysInstallDir" Directory="CmdPalExtPowerToysInstallFolder" Name="*" On="uninstall" />
<RemoveFolder Id="RemoveCmdPalExtPowerToysInstallDirFolder" Directory="CmdPalExtPowerToysInstallFolder" On="uninstall" />
</Component>
<ComponentRef Id="RemoveCmdPalExtensionsFolder" />
<ComponentRef Id="Module_CmdPal_Ext_PowerToys" />
</ComponentGroup>
</Fragment>
</Wix>

View File

@@ -114,7 +114,6 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
<Compile Include="Awake.wxs" />
<Compile Include="BaseApplications.wxs" />
<Compile Include="CmdPal.wxs" />
<Compile Include="CmdPalExtPowerToys.wxs" />
<Compile Include="ColorPicker.wxs" />
<Compile Include="EnvironmentVariables.wxs" />
<Compile Include="FileExplorerPreview.wxs" />

View File

@@ -69,7 +69,6 @@
<ComponentGroupRef Id="MonacoSRCHeatGenerated" />
<ComponentGroupRef Id="WorkspacesComponentGroup" />
<ComponentGroupRef Id="CmdPalComponentGroup" />
<ComponentGroupRef Id="CmdPalExtPowerToysComponentGroup" />
</Feature>
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLFOLDER]" After="CostFinalize" Sequence="execute" />
@@ -110,7 +109,6 @@
<Custom Action="DetectPrevInstallPath" After="AppSearch" />
<Custom Action="SetLaunchPowerToysParam" Before="LaunchPowerToys" />
<Custom Action="SetInstallCmdPalPackageParam" Before="InstallCmdPalPackage" />
<Custom Action="SetInstallCmdPalExtPowerToysPackageParam" Before="InstallCmdPalExtPowerToysPackage" />
<Custom Action="SetUninstallCommandNotFoundParam" Before="UninstallCommandNotFound" />
<Custom Action="SetUpgradeCommandNotFoundParam" Before="UpgradeCommandNotFound" />
<Custom Action="SetApplyModulesRegistryChangeSetsParam" Before="ApplyModulesRegistryChangeSets" />
@@ -126,7 +124,6 @@
<Custom Action="SetBundleInstallLocation" After="InstallFiles" Condition="NOT Installed OR WIX_UPGRADE_DETECTED" />
<Custom Action="ApplyModulesRegistryChangeSets" After="InstallFiles" Condition="NOT Installed" />
<Custom Action="InstallCmdPalPackage" After="InstallFiles" Condition="NOT Installed" />
<Custom Action="InstallCmdPalExtPowerToysPackage" After="InstallCmdPalPackage" Condition="NOT Installed" />
<Custom Action="InstallPackageIdentityMSIX" After="InstallFiles" Condition="NOT Installed" />
<Custom Action="override Wix4CloseApplications_$(sys.BUILDARCHSHORT)" Before="RemoveFiles" />
<Custom Action="RemovePowerToysSchTasks" After="RemoveFiles" />
@@ -146,7 +143,6 @@
<Custom Action="CleanPowerRenameRuntimeRegistry" Before="RemoveFiles" Condition="Installed AND (REMOVE=&quot;ALL&quot;)" />
<Custom Action="CleanNewPlusRuntimeRegistry" Before="RemoveFiles" Condition="Installed AND (REMOVE=&quot;ALL&quot;)" />
<Custom Action="UnsetAdvancedPasteAPIKey" Before="RemoveFiles" Condition="Installed AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE=&quot;ALL&quot;)" />
<Custom Action="UnRegisterCmdPalExtPowerToysPackage" Before="RemoveFiles" Condition="Installed AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE=&quot;ALL&quot;)" />
<Custom Action="UnRegisterCmdPalPackage" Before="RemoveFiles" Condition="Installed AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE=&quot;ALL&quot;)" />
<Custom Action="UninstallCommandNotFound" Before="RemoveFiles" Condition="Installed AND (NOT UPGRADINGPRODUCTCODE) AND (REMOVE=&quot;ALL&quot;)" />
<Custom Action="UpgradeCommandNotFound" After="InstallFiles" Condition="WIX_UPGRADE_DETECTED" />
@@ -170,7 +166,6 @@
<CustomAction Id="SetLaunchPowerToysParam" Property="LaunchPowerToys" Value="[INSTALLFOLDER]" />
<CustomAction Id="SetInstallCmdPalPackageParam" Property="InstallCmdPalPackage" Value="[INSTALLFOLDER]" />
<CustomAction Id="SetInstallCmdPalExtPowerToysPackageParam" Property="InstallCmdPalExtPowerToysPackage" Value="[INSTALLFOLDER]" />
<!-- Set InstallLocation for Bundle entry as well -->
<CustomAction Id="SetBundleInstallLocationData" Property="SetBundleInstallLocation" Value="[INSTALLFOLDER];[BUNDLEINFO];[InstallScope]" />
@@ -260,12 +255,10 @@
<CustomAction Id="CleanNewPlusRuntimeRegistry" Return="ignore" Impersonate="yes" Execute="deferred" DllEntry="CleanNewPlusRuntimeRegistryCA" BinaryRef="PTCustomActions" />
<CustomAction Id="UnRegisterCmdPalPackage" Return="ignore" Impersonate="yes" Execute="deferred" DllEntry="UnRegisterCmdPalPackageCA" BinaryRef="PTCustomActions" />
<CustomAction Id="UnRegisterCmdPalExtPowerToysPackage" Return="ignore" Impersonate="yes" Execute="deferred" DllEntry="UnRegisterCmdPalExtPowerToysPackageCA" BinaryRef="PTCustomActions" />
<CustomAction Id="CheckGPO" Return="check" Impersonate="yes" DllEntry="CheckGPOCA" BinaryRef="PTCustomActions" />
<CustomAction Id="InstallCmdPalPackage" Return="ignore" Impersonate="yes" Execute="deferred" DllEntry="InstallCmdPalPackageCA" BinaryRef="PTCustomActions" />
<CustomAction Id="InstallCmdPalExtPowerToysPackage" Return="ignore" Impersonate="yes" Execute="deferred" DllEntry="InstallCmdPalExtPowerToysPackageCA" BinaryRef="PTCustomActions" />
<CustomAction Id="SetBundleInstallLocation" Return="ignore" Impersonate="no" Execute="deferred" DllEntry="SetBundleInstallLocationCA" BinaryRef="PTCustomActions" />