Skip to content

Commit

Permalink
add advinstMsi installer type
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Pirvulescu committed Dec 19, 2024
1 parent e66581b commit 0cfc90f
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 9 deletions.
6 changes: 4 additions & 2 deletions schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
"burn",
"pwa",
"portable",
"advinstExe"
"advinstExe",

Check warning on line 69 in schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json

View workflow job for this annotation

GitHub Actions / Check Spelling

`advinst` is not a recognized word. (unrecognized-spelling)
"advinstMsi"

Check warning on line 70 in schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json

View workflow job for this annotation

GitHub Actions / Check Spelling

`advinst` is not a recognized word. (unrecognized-spelling)
],
"description": "Enumeration of supported installer types. InstallerType is required in either root level or individual Installer level"
},
Expand All @@ -82,7 +83,8 @@
"wix",
"burn",
"portable",
"advinstExe"
"advinstExe",

Check warning on line 86 in schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json

View workflow job for this annotation

GitHub Actions / Check Spelling

`advinst` is not a recognized word. (unrecognized-spelling)
"advinstMsi"

Check warning on line 87 in schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json

View workflow job for this annotation

GitHub Actions / Check Spelling

`advinst` is not a recognized word. (unrecognized-spelling)
],
"description": "Enumeration of supported nested installer types contained inside an archive file"
},
Expand Down
6 changes: 4 additions & 2 deletions schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@
"burn",
"pwa",
"portable",
"advinstExe"
"advinstExe",

Check warning on line 171 in schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json

View workflow job for this annotation

GitHub Actions / Check Spelling

`advinst` is not a recognized word. (unrecognized-spelling)
"advinstMsi"
],
"description": "Enumeration of supported installer types. InstallerType is required in either root level or individual Installer level"
},
Expand All @@ -184,7 +185,8 @@
"wix",
"burn",
"portable",
"advinstExe"
"advinstExe",
"advinstMsi"
],
"description": "Enumeration of supported nested installer types contained inside an archive file"
},
Expand Down
3 changes: 3 additions & 0 deletions src/AppInstallerCLICore/Workflows/DownloadFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ namespace AppInstaller::CLI::Workflow
return L".exe"sv;
case InstallerTypeEnum::Msi:
case InstallerTypeEnum::Wix:
case InstallerTypeEnum::AdvinstMsi:
return L".msi"sv;
case InstallerTypeEnum::Msix:
// Note: We may need to distinguish between .msix and .msixbundle in the future.
Expand Down Expand Up @@ -224,6 +225,8 @@ namespace AppInstaller::CLI::Workflow
case InstallerTypeEnum::Portable:
case InstallerTypeEnum::Wix:
case InstallerTypeEnum::Zip:
case InstallerTypeEnum::AdvinstExe:
case InstallerTypeEnum::AdvinstMsi:
context << DownloadInstallerFile;
break;
case InstallerTypeEnum::Msix:
Expand Down
3 changes: 3 additions & 0 deletions src/AppInstallerCLICore/Workflows/InstallFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ namespace AppInstaller::CLI::Workflow
case InstallerTypeEnum::Nullsoft:
case InstallerTypeEnum::Wix:
case InstallerTypeEnum::AdvinstExe:
case InstallerTypeEnum::AdvinstMsi:
return true;
default:
return false;
Expand All @@ -65,6 +66,7 @@ namespace AppInstaller::CLI::Workflow
{
case InstallerTypeEnum::Msi:
case InstallerTypeEnum::Wix:
case InstallerTypeEnum::AdvinstMsi:
return isSilentInstall || ExperimentalFeature::IsEnabled(ExperimentalFeature::Feature::DirectMSI);
default:
return false;
Expand Down Expand Up @@ -408,6 +410,7 @@ namespace AppInstaller::CLI::Workflow
case InstallerTypeEnum::Nullsoft:
case InstallerTypeEnum::Wix:
case InstallerTypeEnum::AdvinstExe:
case InstallerTypeEnum::AdvinstMsi:
if (doUninstallPrevious)
{
context <<
Expand Down
2 changes: 2 additions & 0 deletions src/AppInstallerCLICore/Workflows/RepairFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ namespace AppInstaller::CLI::Workflow
break;
case InstallerTypeEnum::Msi:
case InstallerTypeEnum::Wix:
case InstallerTypeEnum::AdvinstMsi:
{
context <<
RepairMsiBasedInstaller;
Expand Down Expand Up @@ -389,6 +390,7 @@ namespace AppInstaller::CLI::Workflow
// MSI based installers, for installed package all gets mapped to msi extension.
case InstallerTypeEnum::Msi:
case InstallerTypeEnum::Wix:
case InstallerTypeEnum::AdvinstMsi:
{
context <<
SetProductCodesInContext;
Expand Down
2 changes: 2 additions & 0 deletions src/AppInstallerCLICore/Workflows/UninstallFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ namespace AppInstaller::CLI::Workflow
}
case InstallerTypeEnum::Msi:
case InstallerTypeEnum::Wix:
case InstallerTypeEnum::AdvinstMsi:
{
// Uninstall strings for MSI don't include UI level (/q) needed to avoid interactivity,
// so we handle them differently.
Expand Down Expand Up @@ -337,6 +338,7 @@ namespace AppInstaller::CLI::Workflow
break;
case InstallerTypeEnum::Msi:
case InstallerTypeEnum::Wix:
case InstallerTypeEnum::AdvinstMsi:
context <<
Workflow::ShellExecuteMsiExecUninstall <<
ReportUninstallerResult("MsiExec", APPINSTALLER_CLI_ERROR_EXEC_UNINSTALL_COMMAND_FAILED);
Expand Down
28 changes: 24 additions & 4 deletions src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ namespace AppInstaller::Manifest
return CompatibilitySet::Exe;
case InstallerTypeEnum::Wix:
case InstallerTypeEnum::Msi:
case InstallerTypeEnum::AdvinstMsi:
return CompatibilitySet::Msi;
case InstallerTypeEnum::Msix:
case InstallerTypeEnum::MSStore:
Expand Down Expand Up @@ -167,6 +168,10 @@ namespace AppInstaller::Manifest
{
result = InstallerTypeEnum::AdvinstExe;
}
else if (inStrLower == "advinstmsi")

Check warning on line 171 in src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp

View workflow job for this annotation

GitHub Actions / Check Spelling

`advinstmsi` is not a recognized word. (unrecognized-spelling)
{
result = InstallerTypeEnum::AdvinstMsi;
}

return result;
}
Expand Down Expand Up @@ -590,6 +595,8 @@ namespace AppInstaller::Manifest
return "portable"sv;
case InstallerTypeEnum::AdvinstExe:
return "advinstexe"sv;
case InstallerTypeEnum::AdvinstMsi:
return "advinstmsi"sv;
}

return "unknown"sv;
Expand Down Expand Up @@ -896,7 +903,8 @@ namespace AppInstaller::Manifest
installerType == InstallerTypeEnum::Wix ||
installerType == InstallerTypeEnum::Burn ||
installerType == InstallerTypeEnum::Portable ||
installerType == InstallerTypeEnum::AdvinstExe
installerType == InstallerTypeEnum::AdvinstExe ||
installerType == InstallerTypeEnum::AdvinstMsi
);
}

Expand All @@ -910,7 +918,8 @@ namespace AppInstaller::Manifest
installerType == InstallerTypeEnum::Wix ||
installerType == InstallerTypeEnum::Burn ||
installerType == InstallerTypeEnum::Portable ||
installerType == InstallerTypeEnum::AdvinstExe
installerType == InstallerTypeEnum::AdvinstExe ||
installerType == InstallerTypeEnum::AdvinstMsi
);
}

Expand All @@ -923,7 +932,8 @@ namespace AppInstaller::Manifest
installerType == InstallerTypeEnum::Nullsoft ||
installerType == InstallerTypeEnum::Wix ||
installerType == InstallerTypeEnum::Burn ||
installerType == InstallerTypeEnum::AdvinstExe
installerType == InstallerTypeEnum::AdvinstExe ||
installerType == InstallerTypeEnum::AdvinstMsi
);
}

Expand Down Expand Up @@ -974,7 +984,8 @@ namespace AppInstaller::Manifest
nestedInstallerType == InstallerTypeEnum::Burn ||
nestedInstallerType == InstallerTypeEnum::Portable ||
nestedInstallerType == InstallerTypeEnum::Msix ||
nestedInstallerType == InstallerTypeEnum::AdvinstExe
nestedInstallerType == InstallerTypeEnum::AdvinstExe ||
nestedInstallerType == InstallerTypeEnum::AdvinstMsi
);
}

Expand Down Expand Up @@ -1041,6 +1052,14 @@ namespace AppInstaller::Manifest
{InstallerSwitchType::Log, ManifestInstaller::string_t("/l*v \"" + std::string(ARG_TOKEN_LOGPATH) + "\"")},
{InstallerSwitchType::InstallLocation, ManifestInstaller::string_t("APPDIR=\"" + std::string(ARG_TOKEN_INSTALLPATH) + "\"")}

Check warning on line 1053 in src/AppInstallerCommonCore/Manifest/ManifestCommon.cpp

View workflow job for this annotation

GitHub Actions / Check Spelling

`APPDIR` is not a recognized word. (unrecognized-spelling)
};
case InstallerTypeEnum::AdvinstMsi:
return
{
{InstallerSwitchType::Silent, ManifestInstaller::string_t("/quiet /norestart")},
{InstallerSwitchType::SilentWithProgress, ManifestInstaller::string_t("/passive /norestart")},
{InstallerSwitchType::Log, ManifestInstaller::string_t("/log \"" + std::string(ARG_TOKEN_LOGPATH) + "\"")},
{InstallerSwitchType::InstallLocation, ManifestInstaller::string_t("APPDIR=\"" + std::string(ARG_TOKEN_INSTALLPATH) + "\"")}
};
default:
return {};
}
Expand Down Expand Up @@ -1075,6 +1094,7 @@ namespace AppInstaller::Manifest
case InstallerTypeEnum::Wix:
case InstallerTypeEnum::Msi:
case InstallerTypeEnum::AdvinstExe:
case InstallerTypeEnum::AdvinstMsi:
// See https://docs.microsoft.com/windows/win32/msi/error-codes
return
{
Expand Down
1 change: 1 addition & 0 deletions src/AppInstallerCommonCore/Public/winget/ManifestCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ namespace AppInstaller::Manifest
MSStore,
Portable,
AdvinstExe,
AdvinstMsi
};

enum class UpdateBehaviorEnum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,10 @@ namespace AppInstaller::Repository::Rest::Schema::V1_0::Json
{
return InstallerTypeEnum::AdvinstExe;
}
else if (inStrLower == "advinstmsi")
{
return InstallerTypeEnum::AdvinstMsi;
}

return InstallerTypeEnum::Unknown;
}
Expand Down
6 changes: 5 additions & 1 deletion src/Microsoft.Management.Deployment/Converters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ namespace winrt::Microsoft::Management::Deployment::implementation
case ::AppInstaller::Manifest::InstallerTypeEnum::Zip:
return Microsoft::Management::Deployment::PackageInstallerType::Zip;
case ::AppInstaller::Manifest::InstallerTypeEnum::AdvinstExe:
return Microsoft::Management::Deployment::PackageInstallerType::AdvinstExe;
return Microsoft::Management::Deployment::PackageInstallerType::AdvinstExe;
case ::AppInstaller::Manifest::InstallerTypeEnum::AdvinstMsi:
return Microsoft::Management::Deployment::PackageInstallerType::AdvinstMsi;
case ::AppInstaller::Manifest::InstallerTypeEnum::Unknown:
return Microsoft::Management::Deployment::PackageInstallerType::Unknown;
}
Expand Down Expand Up @@ -320,6 +322,8 @@ namespace winrt::Microsoft::Management::Deployment::implementation
return ::AppInstaller::Manifest::InstallerTypeEnum::Zip;
case Microsoft::Management::Deployment::PackageInstallerType::AdvinstExe:
return ::AppInstaller::Manifest::InstallerTypeEnum::AdvinstExe;
case Microsoft::Management::Deployment::PackageInstallerType::AdvinstMsi:
return ::AppInstaller::Manifest::InstallerTypeEnum::AdvinstMsi;
case Microsoft::Management::Deployment::PackageInstallerType::Unknown:
return ::AppInstaller::Manifest::InstallerTypeEnum::Unknown;
}
Expand Down
2 changes: 2 additions & 0 deletions src/Microsoft.Management.Deployment/PackageManager.idl
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,8 @@ namespace Microsoft.Management.Deployment
Portable,
/// AdvancedInstaller exe type.
AdvinstExe,
/// AdvancedInstaller msi type.
AdvinstMsi,
};

/// The package installer scope.
Expand Down

0 comments on commit 0cfc90f

Please sign in to comment.