Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
27 changes: 23 additions & 4 deletions src/PackageUploader.UI/Resources/Strings/MainPage.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/PackageUploader.UI/Resources/Strings/MainPage.resx
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@
<data name="Msixvc2ButtonText" xml:space="preserve">
<value>Get started</value>
</data>
<data name="Msixvc2SubtitleText" xml:space="preserve">
<value>MSIXVC2 Preview</value>
</data>
<data name="Msixvc2BodyTextWithLink" xml:space="preserve">
<value>Point to your loose file directory containing a MicrosoftGame.config for your PC game. Your files will be packaged and uploaded using the MSIXVC2 format — no pre-built package required.
Learn more: https://aka.ms/MSIXVC2</value>
</data>
<data name="MakePkg2NotFoundErrorMsg" xml:space="preserve">
<value>MSIXVC2 upload requires makepkg2 tools, available as a preview in the April 2026 GDK. Install the April 2026 GDK to get started.</value>
</data>
Expand Down
20 changes: 18 additions & 2 deletions src/PackageUploader.UI/View/MainPageView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,29 @@
Margin="6,0,0,0"
VerticalAlignment="Center"
Visibility="{Binding IsCompactMode, Converter={StaticResource BooleanToVisibilityConverter}}"
ToolTip="{x:Static strings:MainPage.Msixvc2BodyText}">
ToolTip="{x:Static strings:MainPage.Msixvc2BodyTextWithLink}">
<Path Data="{StaticResource InfoIconGeometry}"
Stroke="{DynamicResource SecondaryTextBrush}" StrokeThickness="1.2"
Width="14" Height="14" Stretch="Uniform"/>
</Button>
</StackPanel>

<TextBlock Margin="0, 2, 0, 0"
Foreground="{DynamicResource SecondaryTextBrush}"
FontSize="12"
Visibility="{Binding IsCompactMode, Converter={StaticResource BooleanToVisibilityConverter}, ConverterParameter=Invert}">
<Run Text="{x:Static strings:MainPage.Msixvc2SubtitleText}"
d:Text="MSIXVC2 Preview"/>
<Hyperlink Command="{Binding PackagingLearnMoreURL}"
CommandParameter="https://aka.ms/MSIXVC2">
<TextBlock Text="{x:Static strings:MainPage.MakeAPackageBodyURLText}"
d:Text="(learn more)"
Foreground="{DynamicResource SecondaryTextBrush}"
TextDecorations="Underline"
FontSize="12"/>
</Hyperlink>
</TextBlock>

<TextBlock Margin="0, 10, 0, 0" TextWrapping="Wrap"
Text="{x:Static strings:MainPage.Msixvc2BodyText}"
d:Text="Point to your loose file directory containing a MicrosoftGame.config for your PC game. Your files will be packaged and uploaded using the MSIXVC2 format — no pre-built package required."
Expand Down Expand Up @@ -347,7 +363,7 @@
<Button Grid.Column="1"
Style="{StaticResource WindowControlButtonStyle}"
Width="24" Height="24" Margin="6,0,0,0"
ToolTip="{x:Static strings:MainPage.Msixvc2BodyText}">
ToolTip="{x:Static strings:MainPage.Msixvc2BodyTextWithLink}">
<Path Data="{StaticResource InfoIconGeometry}"
Stroke="{DynamicResource SecondaryTextBrush}" StrokeThickness="1.2"
Width="14" Height="14" Stretch="Uniform"/>
Expand Down
6 changes: 5 additions & 1 deletion src/PackageUploader.UI/View/Msixvc2UploadView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ public Msixvc2UploadView(Msixvc2UploadViewModel viewModel)
_viewModel = viewModel;

// Register drag drop event handlers after control is initialized
this.Loaded += (s, e) => RegisterDragDropHandlers();
this.Loaded += (s, e) =>
{
RegisterDragDropHandlers();
_viewModel.RefreshBranchesAsync();
};
}

private void RegisterDragDropHandlers()
Expand Down
48 changes: 48 additions & 0 deletions src/PackageUploader.UI/ViewModel/Msixvc2UploadViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,54 @@ private async void GetProductInfoAsync()
}
}

public async void RefreshBranchesAsync()
{
if (_gameProduct == null || string.IsNullOrEmpty(BigId) || BigId == "None")
{
return;
}

string previousSelection = BranchOrFlightDisplayName;

IsLoadingBranchesAndFlights = true;
BranchOrFlightErrorMessage = string.Empty;

try
{
_branchesAndFlights = await _uploaderService.GetPackageBranchesAsync(_gameProduct, CancellationToken.None);

List<string> displayNames = [];
foreach (var branch in _branchesAndFlights)
{
if (branch.BranchType == GamePackageBranchType.Branch)
displayNames.Add("Branch: " + branch.Name);
else if (branch.BranchType == GamePackageBranchType.Flight)
displayNames.Add("Flight: " + branch.Name);
}
BranchAndFlightNames = [.. displayNames];

if (!string.IsNullOrEmpty(previousSelection) && displayNames.Contains(previousSelection))
{
BranchOrFlightDisplayName = previousSelection;
}
else
{
string mainBranch = displayNames.FirstOrDefault(n => n.Equals("Branch: Main", StringComparison.OrdinalIgnoreCase), string.Empty);
BranchOrFlightDisplayName = !string.IsNullOrEmpty(mainBranch) ? mainBranch : BranchAndFlightNames.FirstOrDefault(string.Empty);
}
OnPropertyChanged(nameof(BranchOrFlightDisplayName));
}
catch (Exception ex)
{
_logger.LogError(ex, "Error refreshing branches for BigId {BigId}.", BigId);
BranchOrFlightErrorMessage = $"Error refreshing branches: {ex.Message}";
}
finally
{
IsLoadingBranchesAndFlights = false;
}
}

private async void UpdateMarketGroups()
{
if (_branchesAndFlights == null)
Expand Down
Loading