diff --git a/src/PackageUploader.UI.Test/ViewModel/Msixvc2UploadViewModelTest.cs b/src/PackageUploader.UI.Test/ViewModel/Msixvc2UploadViewModelTest.cs new file mode 100644 index 00000000..2e0e04e0 --- /dev/null +++ b/src/PackageUploader.UI.Test/ViewModel/Msixvc2UploadViewModelTest.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using Microsoft.Extensions.Logging; +using Moq; +using PackageUploader.ClientApi; +using PackageUploader.UI.Providers; +using PackageUploader.UI.Utility; +using PackageUploader.UI.View; +using PackageUploader.UI.ViewModel; + +namespace PackageUploader.UI.Test.ViewModel; + +[TestClass] +public class Msixvc2UploadViewModelTest +{ + private Mock _mockWindowService; + private Mock _mockUploaderService; + private Mock> _mockLogger; + private ErrorModelProvider _errorModelProvider; + private PathConfigurationProvider _pathConfigurationProvider; + private PackageModelProvider _packageModelProvider; + + private Msixvc2UploadViewModel _viewModel; + + [TestInitialize] + public void Setup() + { + _mockWindowService = new Mock(); + _mockUploaderService = new Mock(); + _mockLogger = new Mock>(); + _errorModelProvider = new ErrorModelProvider(); + _pathConfigurationProvider = new PathConfigurationProvider(); + _packageModelProvider = new PackageModelProvider(); + + _viewModel = new Msixvc2UploadViewModel( + _mockWindowService.Object, + _mockUploaderService.Object, + _mockLogger.Object, + _errorModelProvider, + _pathConfigurationProvider, + _packageModelProvider + ); + } + + #region Constructor & Property initialization + + [TestMethod] + public void Constructor_InitializesProperties() + { + Assert.AreEqual(string.Empty, _viewModel.ContentPath); + Assert.IsNotNull(_viewModel.UploadPackageCommand); + Assert.IsNotNull(_viewModel.CancelButtonCommand); + Assert.IsNotNull(_viewModel.BrowseContentPathCommand); + } + + #endregion + + #region BuildUploadArguments Tests + + [TestMethod] + public void BuildUploadArguments_WithBranch() + { + _viewModel.ContentPath = @"C:\game\content"; + _viewModel.BranchOrFlightDisplayName = "Branch: Main"; + _viewModel.MarketGroupName = "default"; + _viewModel.BigId = "9ABC123DEF456"; + + string args = _viewModel.BuildUploadArguments(); + + Assert.IsTrue(args.StartsWith("upload /d \"C:\\game\\content\" /msixvc2")); + Assert.IsTrue(args.Contains("/branch \"Main\"")); + Assert.IsFalse(args.Contains("/flight")); + Assert.IsTrue(args.Contains("/market \"default\"")); + Assert.IsTrue(args.Contains("/storeid \"9ABC123DEF456\"")); + Assert.IsTrue(args.Contains("/auth CacheableBrowser")); + } + + [TestMethod] + public void BuildUploadArguments_WithFlight() + { + _viewModel.ContentPath = @"C:\game\content"; + _viewModel.BranchOrFlightDisplayName = "Flight: TestFlight"; + _viewModel.MarketGroupName = "default"; + _viewModel.BigId = "None"; + + string args = _viewModel.BuildUploadArguments(); + + Assert.IsTrue(args.Contains("/flight \"TestFlight\"")); + Assert.IsFalse(args.Contains("/branch")); + Assert.IsFalse(args.Contains("/storeid")); + } + + [TestMethod] + public void BuildUploadArguments_NoStoreId_NotIncluded() + { + _viewModel.ContentPath = @"C:\game\content"; + _viewModel.BranchOrFlightDisplayName = "Branch: Dev"; + _viewModel.MarketGroupName = "default"; + _viewModel.BigId = string.Empty; + + string args = _viewModel.BuildUploadArguments(); + + Assert.IsFalse(args.Contains("/storeid")); + } + #endregion + + #region CanUpload (via UploadPackageCommand.CanExecute) Tests + + [TestMethod] + public void CanUpload_ReturnsFalse_WhenContentPathEmpty() + { + _viewModel.ContentPath = string.Empty; + + Assert.IsFalse(_viewModel.UploadPackageCommand.CanExecute(null)); + } + + [TestMethod] + public void CanUpload_ReturnsFalse_WhenNoBranchSelected() + { + _viewModel.BranchOrFlightDisplayName = string.Empty; + + Assert.IsFalse(_viewModel.UploadPackageCommand.CanExecute(null)); + } + + [TestMethod] + public void CanUpload_ReturnsFalse_WhenNoMarketSelected() + { + _viewModel.MarketGroupName = string.Empty; + + Assert.IsFalse(_viewModel.UploadPackageCommand.CanExecute(null)); + } + + [TestMethod] + public void CanUpload_ReturnsFalse_WhenLoadingBranches() + { + _viewModel.IsLoadingBranchesAndFlights = true; + + Assert.IsFalse(_viewModel.UploadPackageCommand.CanExecute(null)); + } + + [TestMethod] + public void CanUpload_ReturnsFalse_WhenLoadingMarkets() + { + _viewModel.IsLoadingMarkets = true; + + Assert.IsFalse(_viewModel.UploadPackageCommand.CanExecute(null)); + } + + [TestMethod] + public void CanUpload_ReturnsFalse_WhenContentPathHasError() + { + _viewModel.ContentPathError = "Some error"; + + Assert.IsFalse(_viewModel.UploadPackageCommand.CanExecute(null)); + } + #endregion + + #region Error Handling Tests + + [TestMethod] + public void CancelButton_NavigatesToMainPage() + { + _viewModel.CancelButtonCommand.Execute(null); + + _mockWindowService.Verify(x => x.NavigateTo(typeof(MainPageView)), Times.Once); + } + + [TestMethod] + public void ErrorModelProvider_ReceivesCorrectValues_OnError() + { + // Verify the error model provider is the one we injected + Assert.IsNotNull(_errorModelProvider); + Assert.AreEqual(string.Empty, _errorModelProvider.Error.MainMessage); + } + #endregion +} diff --git a/src/PackageUploader.UI.Test/ViewModel/UploadingFinishedViewModelTest.cs b/src/PackageUploader.UI.Test/ViewModel/UploadingFinishedViewModelTest.cs index f71ea5bf..fc6ae3b9 100644 --- a/src/PackageUploader.UI.Test/ViewModel/UploadingFinishedViewModelTest.cs +++ b/src/PackageUploader.UI.Test/ViewModel/UploadingFinishedViewModelTest.cs @@ -39,17 +39,20 @@ public void Setup() // Setup mock package _mockPackage = new PackageModel { - PackageFilePath = Path.GetTempFileName(), - Version = "1.0.0.0", BigId = "12345678", - PackageType = "Xbox Game Package", + PackageType = "PC", BranchId = "branch-123", - PackagePreviewImage = new BitmapImage() + PackagePreviewImage = new BitmapImage(), + PackageName = "Test Game", + Destination = "Branch: main", + Market = "default", + PackageIdentityName = "Publisher.TestGame", + FolderSize = "1.04 GB", + UploadSize = "1.001 GB" }; _packageModelProvider.Package = _mockPackage; - // Setup App.GetLogFilePath for log tests typeof(App).GetField("_logFilePath", BindingFlags.NonPublic | BindingFlags.Static)?.SetValue(null, @"C:\test\logs\app.log"); @@ -72,26 +75,71 @@ public void Constructor_InitializesCommands() } [TestMethod] - public void OnAppearing_LoadsPackageInformation() + public void OnAppearing_LoadsAllPreviewFields() { - // Arrange - var packagePath = _mockPackage.PackageFilePath; - var fileInfo = new FileInfo(packagePath); - var mockFileLength = 1024 * 1024 * 10; // 10 MB - - // Use reflection to set private field values if necessary for file info - SetFileInfoLength(fileInfo, mockFileLength); - // Act _viewModel.OnAppearing(); // Assert Assert.AreEqual(_mockPackage.PackagePreviewImage, _viewModel.PackagePreviewImage); - Assert.AreEqual(_mockPackage.Version, _viewModel.VersionNum); - Assert.AreEqual(_mockPackage.BigId, _viewModel.StoreId); - Assert.AreEqual(Path.GetFileName(packagePath), _viewModel.PackageFileName); - Assert.AreEqual("0 B", _viewModel.PackageSize); // temp file is empty - Assert.AreEqual(_mockPackage.PackageType, _viewModel.PackageType); + Assert.AreEqual("Test Game", _viewModel.ProductName); + Assert.AreEqual("Branch: main", _viewModel.Destination); + Assert.AreEqual("default", _viewModel.Market); + Assert.AreEqual("Publisher.TestGame", _viewModel.PackageIdentityName); + Assert.AreEqual("12345678", _viewModel.StoreId); + Assert.AreEqual("1.04 GB", _viewModel.FolderSize); + Assert.AreEqual("PC", _viewModel.PackageType); + Assert.IsTrue(_viewModel.HasUploadSize); + Assert.AreEqual("1.001 GB", _viewModel.UploadSize); + } + + [TestMethod] + public void OnAppearing_WithoutUploadSize_HidesUploadSize() + { + // Arrange + _mockPackage.UploadSize = string.Empty; + + // Act + _viewModel.OnAppearing(); + + // Assert + Assert.IsFalse(_viewModel.HasUploadSize); + } + + [TestMethod] + public void OnAppearing_WithoutPackageName_FallsBackToFileName() + { + // Arrange - legacy path with file but no package name + string tempFile = Path.GetTempFileName(); + try + { + _mockPackage.PackageName = string.Empty; + _mockPackage.PackageFilePath = tempFile; + + // Act + _viewModel.OnAppearing(); + + // Assert + Assert.AreEqual(Path.GetFileName(tempFile), _viewModel.ProductName); + } + finally + { + File.Delete(tempFile); + } + } + + [TestMethod] + public void OnAppearing_WithNoNameOrFile_ShowsFallbackText() + { + // Arrange + _mockPackage.PackageName = string.Empty; + _mockPackage.PackageFilePath = string.Empty; + + // Act + _viewModel.OnAppearing(); + + // Assert + Assert.AreEqual("Loose content upload", _viewModel.ProductName); } [TestMethod] @@ -149,76 +197,9 @@ public void OnViewInPartnerCenter_OpensBrowserWithCorrectUrl() Times.Once); } - [TestMethod] - public void TranslateFileSize_FormatsCorrectly() - { - // Arrange & Act - Use reflection to call private static method - string bytesResult = InvokePrivateStaticMethod( - typeof(UploadingFinishedViewModel), "TranslateFileSize", 500L); - - string kbResult = InvokePrivateStaticMethod( - typeof(UploadingFinishedViewModel), "TranslateFileSize", 1500L); - - string mbResult = InvokePrivateStaticMethod( - typeof(UploadingFinishedViewModel), "TranslateFileSize", 1500 * 1024L); - - string gbResult = InvokePrivateStaticMethod( - typeof(UploadingFinishedViewModel), "TranslateFileSize", 1500 * 1024 * 1024L); - - // Assert - Assert.AreEqual("500 B", bytesResult); - Assert.AreEqual("1 KB", kbResult); - Assert.AreEqual("1 MB", mbResult); - Assert.AreEqual("1.46 GB", gbResult); - } - [TestCleanup] public void Cleanup() { - // Delete temp file - if (File.Exists(_mockPackage.PackageFilePath)) - { - File.Delete(_mockPackage.PackageFilePath); - } } - - #region Helper Methods - - private static void SetStaticProperty(Type type, string propertyName, object value) - { - var propertyInfo = type.GetProperty( - propertyName, - BindingFlags.Public | BindingFlags.Static); - - if (propertyInfo != null && propertyInfo.CanWrite) - { - propertyInfo.SetValue(null, value); - } - } - - private static void SetFileInfoLength(FileInfo fileInfo, long length) - { - // This is a hack for testing purposes since FileInfo length is read-only - // In real tests, you'd use a file system abstraction instead - var fieldInfo = typeof(FileInfo).GetField( - "length", - BindingFlags.NonPublic | BindingFlags.Instance); - - if (fieldInfo != null) - { - fieldInfo.SetValue(fileInfo, length); - } - } - - private static T InvokePrivateStaticMethod(Type type, string methodName, params object[] parameters) - { - var method = type.GetMethod( - methodName, - BindingFlags.NonPublic | BindingFlags.Static); - - return (T)method?.Invoke(null, parameters); - } - - #endregion } } \ No newline at end of file diff --git a/src/PackageUploader.UI/App.xaml.cs b/src/PackageUploader.UI/App.xaml.cs index 42db4f7d..0d8a78e2 100644 --- a/src/PackageUploader.UI/App.xaml.cs +++ b/src/PackageUploader.UI/App.xaml.cs @@ -64,6 +64,8 @@ public App() services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); // Register Views services.AddTransient(); @@ -74,6 +76,8 @@ public App() services.AddTransient(); services.AddTransient(); services.AddTransient(); + services.AddTransient(); + services.AddTransient(); // Register the main window services.AddSingleton(); diff --git a/src/PackageUploader.UI/Converters/Msixvc2UploadStageToVisibilityConverter.cs b/src/PackageUploader.UI/Converters/Msixvc2UploadStageToVisibilityConverter.cs new file mode 100644 index 00000000..608b1d35 --- /dev/null +++ b/src/PackageUploader.UI/Converters/Msixvc2UploadStageToVisibilityConverter.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using PackageUploader.UI.Model; +using System.Globalization; +using System.Windows; +using System.Windows.Data; + +namespace PackageUploader.UI.Converters; + +internal class Msixvc2UploadStageToVisibilityConverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is Msixvc2UploadStage stage && parameter is string stageName) + { + string[] range = stageName.Split('-'); + if (range.Length == 2) + { + if (Enum.TryParse(range[0], out var start) && + Enum.TryParse(range[1], out var stop)) + { + return stage >= start && stage <= stop ? Visibility.Visible : Visibility.Collapsed; + } + } + else if (Enum.TryParse(stageName, out var exact)) + { + return stage == exact ? Visibility.Visible : Visibility.Collapsed; + } + } + + return Visibility.Collapsed; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} diff --git a/src/PackageUploader.UI/Model/Msixvc2UploadStage.cs b/src/PackageUploader.UI/Model/Msixvc2UploadStage.cs new file mode 100644 index 00000000..05e0fe4a --- /dev/null +++ b/src/PackageUploader.UI/Model/Msixvc2UploadStage.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +namespace PackageUploader.UI.Model; + +public enum Msixvc2UploadStage +{ + NotStarted, + Preparing, + Uploading, + Validating, + Finalizing, + Done +} diff --git a/src/PackageUploader.UI/Model/PackageModel.cs b/src/PackageUploader.UI/Model/PackageModel.cs index de7b3a5d..d9caa6a4 100644 --- a/src/PackageUploader.UI/Model/PackageModel.cs +++ b/src/PackageUploader.UI/Model/PackageModel.cs @@ -19,4 +19,12 @@ public class PackageModel public string PackageType { get; set; } = string.Empty; public BitmapImage? PackagePreviewImage { get; set; } = null; public string BranchId { get; internal set; } = string.Empty; + public string PackageName { get; set; } = string.Empty; + public string UploadSize { get; set; } = string.Empty; + public string Destination { get; set; } = string.Empty; + public string Market { get; set; } = string.Empty; + public string PackageIdentityName { get; set; } = string.Empty; + public string FolderSize { get; set; } = string.Empty; + public string UploadArguments { get; set; } = string.Empty; + public string MakePkg2Path { get; set; } = string.Empty; } diff --git a/src/PackageUploader.UI/Providers/PathConfigurationProvider.cs b/src/PackageUploader.UI/Providers/PathConfigurationProvider.cs index f74d3044..ac67bb76 100644 --- a/src/PackageUploader.UI/Providers/PathConfigurationProvider.cs +++ b/src/PackageUploader.UI/Providers/PathConfigurationProvider.cs @@ -36,6 +36,20 @@ public string BaseSubValPath } } + private string _makePkg2Path = string.Empty; + public string MakePkg2Path + { + get => _makePkg2Path; + set + { + if (_makePkg2Path != value) + { + _makePkg2Path = value; + OnPropertyChanged(); + } + } + } + private string _packageUploaderPath = string.Empty; public string PackageUploaderPath { diff --git a/src/PackageUploader.UI/Resources/Strings/MainPage.Designer.cs b/src/PackageUploader.UI/Resources/Strings/MainPage.Designer.cs index 706e96b4..994a08f7 100644 --- a/src/PackageUploader.UI/Resources/Strings/MainPage.Designer.cs +++ b/src/PackageUploader.UI/Resources/Strings/MainPage.Designer.cs @@ -168,6 +168,42 @@ public static string MinimizeWindow { } } + /// + /// Looks up a localized string similar to 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.. + /// + public static string Msixvc2BodyText { + get { + return ResourceManager.GetString("Msixvc2BodyText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get started. + /// + public static string Msixvc2ButtonText { + get { + return ResourceManager.GetString("Msixvc2ButtonText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSIXVC2 upload requires makepkg2 tools, available as a preview in the April 2026 GDK. Install the April 2026 GDK to get started.. + /// + public static string MakePkg2NotFoundErrorMsg { + get { + return ResourceManager.GetString("MakePkg2NotFoundErrorMsg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload Loose Files (PC only). + /// + public static string Msixvc2TextBlockTitle { + get { + return ResourceManager.GetString("Msixvc2TextBlockTitle", resourceCulture); + } + } + /// /// Looks up a localized string similar to Sign in. /// diff --git a/src/PackageUploader.UI/Resources/Strings/MainPage.resx b/src/PackageUploader.UI/Resources/Strings/MainPage.resx index 5f511d96..1d944b64 100644 --- a/src/PackageUploader.UI/Resources/Strings/MainPage.resx +++ b/src/PackageUploader.UI/Resources/Strings/MainPage.resx @@ -188,4 +188,16 @@ Game packages speed up uploads, ensure secure installations, and optimize Xbox performance. Just add build files and a config file The part of the string that needs to come before the hyperlink (if any) + + Upload Loose Files (PC only) + + + 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. + + + Get started + + + MSIXVC2 upload requires makepkg2 tools, available as a preview in the April 2026 GDK. Install the April 2026 GDK to get started. + \ No newline at end of file diff --git a/src/PackageUploader.UI/Resources/Strings/Msixvc2Upload.Designer.cs b/src/PackageUploader.UI/Resources/Strings/Msixvc2Upload.Designer.cs new file mode 100644 index 00000000..365d7a8d --- /dev/null +++ b/src/PackageUploader.UI/Resources/Strings/Msixvc2Upload.Designer.cs @@ -0,0 +1,315 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace PackageUploader.UI.Resources.Strings { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Msixvc2Upload { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Msixvc2Upload() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PackageUploader.UI.Resources.Strings.Msixvc2Upload", typeof(Msixvc2Upload).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Additional details. + /// + public static string AdditionalDetailsTitle { + get { + return ResourceManager.GetString("AdditionalDetailsTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Browse to the content directory.. + /// + public static string BrowseContentPathHelpText { + get { + return ResourceManager.GetString("BrowseContentPathHelpText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Browse. + /// + public static string BrowseText { + get { + return ResourceManager.GetString("BrowseText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Locate your loose file directory containing a MicrosoftGame.config. Add a layout file under Additional Details.. + /// + public static string BuildLocationText { + get { + return ResourceManager.GetString("BuildLocationText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Build location. + /// + public static string BuildLocationTitle { + get { + return ResourceManager.GetString("BuildLocationTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cancel and return to the home page.. + /// + public static string CancelButtonHelpText { + get { + return ResourceManager.GetString("CancelButtonHelpText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cancel. + /// + public static string CancelContentText { + get { + return ResourceManager.GetString("CancelContentText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Select or enter the content map location. + /// + public static string ContentMapPathBoxDefaultText { + get { + return ResourceManager.GetString("ContentMapPathBoxDefaultText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Select or enter the content directory. + /// + public static string ContentPathBoxDefaultText { + get { + return ResourceManager.GetString("ContentPathBoxDefaultText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Content path. + /// + public static string ContentPathTitleText { + get { + return ResourceManager.GetString("ContentPathTitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Select a destination and market for the package upload.. + /// + public static string DestinationSubtitleText { + get { + return ResourceManager.GetString("DestinationSubtitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Destination. + /// + public static string DestinationTitleText { + get { + return ResourceManager.GetString("DestinationTitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Family. + /// + public static string FamilyTitleText { + get { + return ResourceManager.GetString("FamilyTitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Folder size. + /// + public static string FolderSizeTitleText { + get { + return ResourceManager.GetString("FolderSizeTitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Layout file/content map. + /// + public static string LayoutFileMapTitle { + get { + return ResourceManager.GetString("LayoutFileMapTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Market. + /// + public static string MarketTitleText { + get { + return ResourceManager.GetString("MarketTitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Optional. + /// + public static string OptionalText { + get { + return ResourceManager.GetString("OptionalText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package Identity name. + /// + public static string PackageIdentityNameTitleText { + get { + return ResourceManager.GetString("PackageIdentityNameTitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Product name. + /// + public static string ProductNameText { + get { + return ResourceManager.GetString("ProductNameText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Required. + /// + public static string RequiredText { + get { + return ResourceManager.GetString("RequiredText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Store ID. + /// + public static string StoreIdTitleText { + get { + return ResourceManager.GetString("StoreIdTitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Point to your loose file directory for your PC game containing a MicrosoftGame.config and we will package and upload using the MSIXVC2 format.. + /// + public static string SubtitleText { + get { + return ResourceManager.GetString("SubtitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload Loose Files (PC only). + /// + public static string TitleText { + get { + return ResourceManager.GetString("TitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload Package. + /// + public static string UploadButtonContentText { + get { + return ResourceManager.GetString("UploadButtonContentText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start packaging and uploading the loose files.. + /// + public static string UploadButtonHelpText { + get { + return ResourceManager.GetString("UploadButtonHelpText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload Preview. + /// + public static string UploadPreviewTitleText { + get { + return ResourceManager.GetString("UploadPreviewTitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Select or enter the folder path for SubmissionValidator.dll. + /// + public static string ValidatorPathBoxDefaultText { + get { + return ResourceManager.GetString("ValidatorPathBoxDefaultText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Folder path for SubmissionValidator.dll. + /// + public static string ValidatorPathTitleText { + get { + return ResourceManager.GetString("ValidatorPathTitleText", resourceCulture); + } + } + } +} diff --git a/src/PackageUploader.UI/Resources/Strings/Msixvc2Upload.resx b/src/PackageUploader.UI/Resources/Strings/Msixvc2Upload.resx new file mode 100644 index 00000000..3a256f27 --- /dev/null +++ b/src/PackageUploader.UI/Resources/Strings/Msixvc2Upload.resx @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Additional details + + + Browse to the content directory. + + + Browse + + + Locate your loose file directory containing a MicrosoftGame.config. Add a layout file under Additional Details. + + + Build location + + + Cancel and return to the home page. + + + Cancel + + + Select or enter the content map location + + + Select or enter the content directory + + + Content path + + + Select a destination and market for the package upload. + + + Destination + + + Family + + + Folder size + + + Layout file/content map + + + Market + + + Optional + + + Package Identity name + + + Product name + + + Required + + + Store ID + + + Point to your loose file directory for your PC game containing a MicrosoftGame.config and we will package and upload using the MSIXVC2 format. + + + Upload Loose Files (PC only) + + + Upload Package + + + Start packaging and uploading the loose files. + + + Upload Preview + + + Select or enter the folder path for SubmissionValidator.dll + + + Folder path for SubmissionValidator.dll + + diff --git a/src/PackageUploader.UI/Resources/Strings/Msixvc2Uploading.Designer.cs b/src/PackageUploader.UI/Resources/Strings/Msixvc2Uploading.Designer.cs new file mode 100644 index 00000000..28ce404e --- /dev/null +++ b/src/PackageUploader.UI/Resources/Strings/Msixvc2Uploading.Designer.cs @@ -0,0 +1,135 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace PackageUploader.UI.Resources.Strings { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Msixvc2Uploading { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Msixvc2Uploading() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PackageUploader.UI.Resources.Strings.Msixvc2Uploading", typeof(Msixvc2Uploading).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Cancel upload. + /// + public static string CancelUploadButtonText { + get { + return ResourceManager.GetString("CancelUploadButtonText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Finalizing upload.... + /// + public static string FinalizingText { + get { + return ResourceManager.GetString("FinalizingText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to % complete. + /// + public static string PercentCompleteText { + get { + return ResourceManager.GetString("PercentCompleteText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing package.... + /// + public static string PreparingText { + get { + return ResourceManager.GetString("PreparingText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uploading package to Partner Center. + /// + public static string TitleText { + get { + return ResourceManager.GetString("TitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uploading content.... + /// + public static string UploadingContentText { + get { + return ResourceManager.GetString("UploadingContentText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uploading. + /// + public static string UploadingText { + get { + return ResourceManager.GetString("UploadingText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Validating package.... + /// + public static string ValidatingText { + get { + return ResourceManager.GetString("ValidatingText", resourceCulture); + } + } + } +} diff --git a/src/PackageUploader.UI/Resources/Strings/Msixvc2Uploading.resx b/src/PackageUploader.UI/Resources/Strings/Msixvc2Uploading.resx new file mode 100644 index 00000000..c331803f --- /dev/null +++ b/src/PackageUploader.UI/Resources/Strings/Msixvc2Uploading.resx @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Uploading package to Partner Center + + + Uploading + + + % complete + + + Preparing package... + + + Uploading content... + + + Validating package... + + + Finalizing upload... + + + Cancel upload + + diff --git a/src/PackageUploader.UI/Resources/Strings/UploadingFinished.Designer.cs b/src/PackageUploader.UI/Resources/Strings/UploadingFinished.Designer.cs index 9c7f9d9c..be2c445c 100644 --- a/src/PackageUploader.UI/Resources/Strings/UploadingFinished.Designer.cs +++ b/src/PackageUploader.UI/Resources/Strings/UploadingFinished.Designer.cs @@ -60,6 +60,15 @@ internal UploadingFinished() { } } + /// + /// Looks up a localized string similar to Destination. + /// + public static string DestinationTitleText { + get { + return ResourceManager.GetString("DestinationTitleText", resourceCulture); + } + } + /// /// Looks up a localized string similar to Family. /// @@ -78,6 +87,15 @@ public static string FileNameTitleText { } } + /// + /// Looks up a localized string similar to Folder size. + /// + public static string FolderSizeTitleText { + get { + return ResourceManager.GetString("FolderSizeTitleText", resourceCulture); + } + } + /// /// Looks up a localized string similar to Home. /// @@ -87,6 +105,42 @@ public static string GoHomeButtonContent { } } + /// + /// Looks up a localized string similar to Market. + /// + public static string MarketTitleText { + get { + return ResourceManager.GetString("MarketTitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package Identity name. + /// + public static string PackageIdentityNameTitleText { + get { + return ResourceManager.GetString("PackageIdentityNameTitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package Name. + /// + public static string PackageNameTitleText { + get { + return ResourceManager.GetString("PackageNameTitleText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Product name. + /// + public static string ProductNameTitleText { + get { + return ResourceManager.GetString("ProductNameTitleText", resourceCulture); + } + } + /// /// Looks up a localized string similar to Size. /// @@ -114,6 +168,15 @@ public static string UploadCompleteTitleText { } } + /// + /// Looks up a localized string similar to Upload Size. + /// + public static string UploadSizeTitleText { + get { + return ResourceManager.GetString("UploadSizeTitleText", resourceCulture); + } + } + /// /// Looks up a localized string similar to View logs. /// diff --git a/src/PackageUploader.UI/Resources/Strings/UploadingFinished.resx b/src/PackageUploader.UI/Resources/Strings/UploadingFinished.resx index b0be8fd1..a26997b4 100644 --- a/src/PackageUploader.UI/Resources/Strings/UploadingFinished.resx +++ b/src/PackageUploader.UI/Resources/Strings/UploadingFinished.resx @@ -117,15 +117,33 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Destination + Family File name + + Folder size + Home + + Market + + + Package Identity name + + + Package Name + + + Product name + Size @@ -135,6 +153,9 @@ Upload complete + + Upload Size + View logs diff --git a/src/PackageUploader.UI/View/MainPageView.xaml b/src/PackageUploader.UI/View/MainPageView.xaml index 5e2646ac..28dd74df 100644 --- a/src/PackageUploader.UI/View/MainPageView.xaml +++ b/src/PackageUploader.UI/View/MainPageView.xaml @@ -35,6 +35,8 @@ + + @@ -115,6 +117,7 @@ @@ -178,6 +182,40 @@ Width="133" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +