Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions dev/Deployment/DeploymentManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <TerminalVelocityFeatures-DeploymentAPI.h>
#include <Microsoft.Windows.ApplicationModel.WindowsAppRuntime.DeploymentManager.g.cpp>
#include <PushNotificationsLongRunningPlatform-Startup.h>
#include <AppModel.Identity.h>
#include "WindowsAppRuntime-License.h"

using namespace winrt;
Expand Down Expand Up @@ -75,19 +76,17 @@ namespace winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::implem
return Initialize(GetCurrentFrameworkPackageFullName(), options, true);
}

// Derives the short channel tag used in the Main/Singleton package family names
// (e.g. L"-experimentalA" -> L"-eA"). versionTag arrives with a leading '-'.
// Delegates to the canonical v2 derivation so the runtime, the DDLM/Bootstrap path,
// and the build (CreateBuildInfo.ps1) stay in agreement. See AB#63309642, AB#62727253.
std::wstring ExtractFormattedVersionTag(const std::wstring& versionTag)
{
std::wstring result{};
if (versionTag.size() > 1)
if (versionTag.size() <= 1)
Comment thread
agniuks marked this conversation as resolved.
{
result = std::wstring(L"-") + versionTag[1];
return {};
}
unsigned int numberBeforeUnderscore{};
if (swscanf_s(versionTag.c_str(), L"%*[^0-9]%u", &numberBeforeUnderscore) == 1)
{
result += std::to_wstring(numberBeforeUnderscore);
}
return result;
return L"-" + AppModel::Identity::GetVersionShortTagFromVersionTagV2(versionTag.c_str() + 1);
Comment thread
agniuks marked this conversation as resolved.
}

winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::DeploymentResult DeploymentManager::GetStatus(hstring const& packageFullName)
Expand Down
2 changes: 1 addition & 1 deletion specs/Deployment/MSIXPackages.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ where
* ReleaseMajor = project release major version number. See the [MSIX Package Versioning](https://github.com/microsoft/WindowsAppSDK/blob/main/specs/deployment/MSIXPackageVersioning.md) for more details.
* ShortVersionTag = short form of the VersionTag

ShortVersionTag is derived from a VersionTag by combining the 1st letter and up to the last 2 digit (depending on build number) for non-Stable channels (ShortVeresionTag is blank for the Stable channel, just like VersionTag).
ShortVersionTag is derived from a VersionTag by combining the 1st letter and up to 2 trailing base-36 characters (0-9, A-Z) of the channel build string for non-Stable channels (ShortVeresionTag is blank for the Stable channel, just like VersionTag).

## 3.3. Package Naming - Singleton

Expand Down