-
Notifications
You must be signed in to change notification settings - Fork 432
Expand file tree
/
Copy pathGeneratePushNotificationsOverrides.ps1
More file actions
86 lines (71 loc) · 2.67 KB
/
GeneratePushNotificationsOverrides.ps1
File metadata and controls
86 lines (71 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Generate PushNotifications overrides for use at build time
Param(
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[string]$Path
)
Set-StrictMode -Version 3.0
$ErrorActionPreference = 'Stop'
if (-not(Test-Path -Path $Path -PathType Container))
{
Write-Host "Creating $Path..."
$override = New-Item -Path $Path -ItemType Directory -Force
}
else
{
Write-Output "$Path exists"
}
# Generate the Push Notifications header file
$content_h=@"
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
// Rely on _STRINGIZE(x) in yvals_core.h
#ifndef _STRINGIZE
#define _STRINGIZEX(x) #x
#define _STRINGIZE(x) _STRINGIZEX(x)
#endif
#ifndef _WSTRINGIZE
#define _WSTRINGIZEXX(x) L ## #x
#define _WSTRINGIZEX(x) _WSTRINGIZEXX(x)
#define _WSTRINGIZE(x) _WSTRINGIZEX({ ## x ## })
#endif
#ifdef PUSHNOTIFICATIONS_LIBID_UUID
#undef PUSHNOTIFICATIONS_LIBID_UUID
#define PUSHNOTIFICATIONS_LIBID_UUID CE96C745-3017-460E-895B-4FD98E1194F2
#endif
#ifdef PUSHNOTIFICATIONS_IMPL_CLSID_UUID
#undef PUSHNOTIFICATIONS_IMPL_CLSID_UUID
#define PUSHNOTIFICATIONS_IMPL_CLSID_UUID E739C755-0D09-48DF-A468-A5DF0B5422DC
#endif
#ifdef PUSHNOTIFICATIONS_IMPL_CLSID_STRING
#undef PUSHNOTIFICATIONS_IMPL_CLSID_STRING
#define PUSHNOTIFICATIONS_IMPL_CLSID_STRING _STRINGIZE(PUSHNOTIFICATIONS_IMPL_CLSID_UUID)
#endif
#ifdef PUSHNOTIFICATIONS_IMPL_CLSID_WSTRING
#undef PUSHNOTIFICATIONS_IMPL_CLSID_WSTRING
#define PUSHNOTIFICATIONS_IMPL_CLSID_WSTRING _WSTRINGIZE(PUSHNOTIFICATIONS_IMPL_CLSID_UUID)
#endif
#ifdef PUSHNOTIFICATIONS_LRP_CLSID_UUID
#undef PUSHNOTIFICATIONS_LRP_CLSID_UUID
#define PUSHNOTIFICATIONS_LRP_CLSID_UUID 60FC21B2-B396-4D49-94F0-7555869FB93C
#endif
#ifdef PUSHNOTIFICATIONS_LRP_CLSID_STRING
#undef PUSHNOTIFICATIONS_LRP_CLSID_STRING
#define PUSHNOTIFICATIONS_LRP_CLSID_STRING _STRINGIZE(PUSHNOTIFICATIONS_LRP_CLSID_UUID)
#endif
#ifdef PUSHNOTIFICATIONS_LRP_CLSID_WSTRING
#undef PUSHNOTIFICATIONS_LRP_CLSID_WSTRING
#define PUSHNOTIFICATIONS_LRP_CLSID_WSTRING _WSTRINGIZE(PUSHNOTIFICATIONS_LRP_CLSID_UUID)
#endif
#ifdef PUSHNOTIFICATIONS_FOREGROUNDSINK_CLSID_UUID
#undef PUSHNOTIFICATIONS_FOREGROUNDSINK_CLSID_UUID
#define PUSHNOTIFICATIONS_FOREGROUNDSINK_CLSID_UUID 25604D55-9B17-426F-9D67-2B11B3A65598
#endif
#ifdef PUSHNOTIFICATIONS_FOREGROUNDSINK2_CLSID_UUID
#undef PUSHNOTIFICATIONS_FOREGROUNDSINK2_CLSID_UUID
#define PUSHNOTIFICATIONS_FOREGROUNDSINK2_CLSID_UUID 559B4205-F810-4947-B02B-3EA9A311C6AD
#endif
"@
$file_h = Join-Path $Path 'PushNotifications-Override.h'
Write-Output "Writing $file_h..."
"$content_h" | Out-File $file_h -Encoding utf8