34 行
1.0 KiB
PowerShell
34 行
1.0 KiB
PowerShell
# Create the tokens folder
|
|
$TOKENS_FOLDER_RELATIVE_PATH = Join-Path -Path $PSScriptRoot -ChildPath "..\samples\ComputeSharp.SwapChain.Uwp\Assets\ServiceTokens"
|
|
if(!(Test-Path -Path $TOKENS_FOLDER_RELATIVE_PATH)) {
|
|
New-Item -ItemType directory -Path $TOKENS_FOLDER_RELATIVE_PATH
|
|
}
|
|
$TOKENS_FOLDER_PATH = Resolve-Path -Path $TOKENS_FOLDER_RELATIVE_PATH
|
|
|
|
# AppCenter tokens
|
|
$APPCENTER_TOKENS_NAME = "App.AppCenter.cs"
|
|
$APPCENTER_TOKENS_PATH = Join-Path -Path $TOKENS_FOLDER_PATH -ChildPath $APPCENTER_TOKENS_NAME
|
|
if (!(Test-Path -Path $APPCENTER_TOKENS_PATH))
|
|
{
|
|
# Prepare the generated source
|
|
$APP_APPCENTER_TEXT =
|
|
@"
|
|
// <auto-generated/>
|
|
#pragma warning disable
|
|
#nullable enable
|
|
|
|
namespace ComputeSharp.SwapChain.Uwp;
|
|
|
|
/// <inheritdoc/>
|
|
partial class App
|
|
{
|
|
/// <summary>
|
|
/// The secret token for the AppService connection.
|
|
/// </summary>
|
|
private const string AppServiceSecret = "";
|
|
}
|
|
"@.Trim()
|
|
|
|
# Output the source to the target file
|
|
Add-Content $APP_APPCENTER_TEXT -Path $APPCENTER_TOKENS_PATH -NoNewline
|
|
} |