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
1 change: 1 addition & 0 deletions Operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
- **subValFilePath**: required - path to the SubVal File
- **symbolsFilePath**: optional - path to the Symbols File
- **discLayoutFilePath**: optional - path to the Disc Layout File
- **sodbFilePath**: optional - path to the SODB (Shader Object Database) file
- **minutesToWaitForProcessing**: optional (default 30) - it will check the package processing status every minute for this long, until it succeeds or fails
- **availabilityDate**: optional - if informed it will configure custom availability date for your XVC/MSIXVC packages [Learn more](http://go.microsoft.com/fwlink/?LinkId=825239)
- **isEnabled**: optional (default false) - it will enable/disable custom availability date
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ The following table has important arguments for running Package Uploader.
| **[GetProduct](https://github.com/microsoft/PackageUploader/blob/main/Operations.md#GetProduct)** | Gets metadata for the product. This is useful for getting the productId, BigId, and product name that's used in all configuration files. This also gets a list of the BranchFriendlyNames and FlightNames of the product. |
| **[GetPackages](https://github.com/microsoft/PackageUploader/blob/main/Operations.md#GetPackages)** | Gets a list of the packages in a branch or flight. |
| **[UploadUwpPackage](https://github.com/microsoft/PackageUploader/blob/main/Operations.md#UploadUwpPackage)** | Uploads a UWP game package. |
| **[UploadXvcPackage](https://github.com/microsoft/PackageUploader/blob/main/Operations.md#UploadXvcPackage)** | Uploads an XVC game package and assets, including EKB, SubVal, and layout files. |
| **[UploadXvcPackage](https://github.com/microsoft/PackageUploader/blob/main/Operations.md#UploadXvcPackage)** | Uploads an XVC game package and assets, including EKB, SubVal, layout, and SODB files. |
| **[RemovePackages](https://github.com/microsoft/PackageUploader/blob/main/Operations.md#RemovePackages)** | Removes game packages and assets from a branch. We recommend keeping only your 10 most recent packages to ensure optimal performance. |
| **[ImportPackages](https://github.com/microsoft/PackageUploader/blob/main/Operations.md#ImportPackages)** | Imports all game packages from a branch to a destination branch. Use this operation to copy your previously uploaded and published packages from one branch to another. |
| **[PublishPackages](https://github.com/microsoft/PackageUploader/blob/main/Operations.md#PublishPackages)** | Publishes all game packages from a branch or flight to a destination sandbox or flight. You can set specific availability times in the configuration file. |
Expand Down Expand Up @@ -295,7 +295,8 @@ Product: {
"ekbFilePath": "C:\\Users\\someone\\Desktop\\StubPackage\\Builds\\ TestPublisher.SomeDemoProductName_0.9.1.0_x64__fjtqkg6rpm1hy_Full_33ec8436-5a0e-4f0d-b1ce-3f29c3955039.ekb",
"subValFilePath": "C:\\Users\\someone\\Desktop\\StubPackage\\Builds\\Validator_ TestPublisher.SomeDemoProductName_0.9.1.0_x64__fjtqkg6rpm1hy.xml",
"symbolsFilePath": "",
"discLayoutFilePath": ""
"discLayoutFilePath": "",
"sodbFilePath": ""
},
"minutesToWaitForProcessing": 60,

Expand Down
4 changes: 4 additions & 0 deletions schemas/PackageUploaderOperationConfigSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@
"discLayoutFilePath": {
"description": "path to the Disc Layout File",
"type": "string"
},
"sodbFilePath": {
"description": "path to the SODB (Shader Object Database) file",
"type": "string"
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static string GetGamePackageAssetType(this GamePackageAssetType gamePacka
GamePackageAssetType.SubmissionValidatorLog => "EraSubmissionValidatorLog",
GamePackageAssetType.SymbolsZip => "EraSymbolFile",
GamePackageAssetType.DiscLayoutFile => "EraSubsetFile",
GamePackageAssetType.SodbFile => "SodbBinary",
_ => string.Empty,
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ public enum GamePackageAssetType
SubmissionValidatorLog,
SymbolsZip,
DiscLayoutFile,
SodbFile,
}
2 changes: 2 additions & 0 deletions src/PackageUploader.ClientApi/Models/GameAssets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ public class GameAssets
public string SymbolsFilePath { get; set; }

public string DiscLayoutFilePath { get; set; }

public string SodbFilePath { get; set; }
}
17 changes: 17 additions & 0 deletions src/PackageUploader.ClientApi/PackageUploaderService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,18 @@ public async Task<GamePackage> UploadGamePackageAsync(
{
throw new FileNotFoundException("Disc Layout file not found.", gameAssets.DiscLayoutFilePath);
}
if (!string.IsNullOrEmpty(gameAssets.SodbFilePath))
{
if (!packageFilePath.EndsWith(".msixvc", StringComparison.OrdinalIgnoreCase))
{
throw new InvalidOperationException(
$"SODB asset is only supported for MSIXVC packages (.msixvc). Package file '{Path.GetFileName(packageFilePath)}' is not an MSIXVC package.");
}
if (!File.Exists(gameAssets.SodbFilePath))
{
throw new FileNotFoundException("SODB file not found.", gameAssets.SodbFilePath);
}
}
}

// Calculate total size of all files to be uploaded
Expand All @@ -233,6 +245,10 @@ public async Task<GamePackage> UploadGamePackageAsync(
{
files.Add(new FileInfo(gameAssets.DiscLayoutFilePath));
}
if (!string.IsNullOrEmpty(gameAssets.SodbFilePath) && File.Exists(gameAssets.SodbFilePath))
{
files.Add(new FileInfo(gameAssets.SodbFilePath));
}
}
currentProgress.Stage = PackageUploadingProgressStage.ComputingDeltas;
progress?.Report(currentProgress);
Expand Down Expand Up @@ -323,6 +339,7 @@ void ReportProgress(ulong bytesUploaded)
await UploadAssetAsync(product, package, gameAssets.SymbolsFilePath, GamePackageAssetType.SymbolsZip, bytesProgress, ct);
await UploadAssetAsync(product, package, gameAssets.SubValFilePath, GamePackageAssetType.SubmissionValidatorLog, bytesProgress, ct);
await UploadAssetAsync(product, package, gameAssets.DiscLayoutFilePath, GamePackageAssetType.DiscLayoutFile, bytesProgress, ct);
await UploadAssetAsync(product, package, gameAssets.SodbFilePath, GamePackageAssetType.SodbFile, bytesProgress, ct);
}

// Set progress to 100% when complete
Expand Down
3 changes: 2 additions & 1 deletion templates/UploadXvcPackage.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"ekbFilePath": "{{ required }}",
"subValFilePath": "{{ required }}",
"symbolsFilePath": "{{ optional }}",
"discLayoutFilePath": "{{ optional }}"
"discLayoutFilePath": "{{ optional }}",
"sodbFilePath": "{{ optional }}"
},
"minutesToWaitForProcessing": 60,

Expand Down
Loading