@nativescript/windows 0.1.0-alpha.75 → 0.1.0-alpha.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2
+ <!-- Default property values for manifest overrides.
3
+ Override these in Directory.Build.props or via /p: properties. -->
4
+ <PropertyGroup>
5
+ <AppDisplayName Condition=" '$(AppDisplayName)' == '' ">__PROJECT_NAME__</AppDisplayName>
6
+ <AppDescription Condition=" '$(AppDescription)' == '' ">A NativeScript Windows application</AppDescription>
7
+ <Square150x150Logo Condition=" '$(Square150x150Logo)' == '' ">Assets\Square150x150Logo.png</Square150x150Logo>
8
+ <Square44x44Logo Condition=" '$(Square44x44Logo)' == '' ">Assets\Square44x44Logo.png</Square44x44Logo>
9
+ <Wide310x150Logo Condition=" '$(Wide310x150Logo)' == '' ">Assets\Wide310x150Logo.png</Wide310x150Logo>
10
+ <StoreLogo Condition=" '$(StoreLogo)' == '' ">Assets\StoreLogo.png</StoreLogo>
11
+ <LockScreenLogo Condition=" '$(LockScreenLogo)' == '' ">Assets\LockScreenLogo.png</LockScreenLogo>
12
+ <SplashBackgroundColor Condition=" '$(SplashBackgroundColor)' == '' ">#65ADF1</SplashBackgroundColor>
13
+ <SplashImage Condition=" '$(SplashImage)' == '' ">Assets\SplashScreen.png</SplashImage>
14
+ </PropertyGroup>
15
+ </Project>
@@ -0,0 +1,153 @@
1
+ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2
+ <!-- Directory.Build.targets for the Windows project template.
3
+ This file applies manifest overrides at build time using XmlPoke.
4
+ Place in the template root so generated projects inherit it. -->
5
+ <!-- Default properties are provided in Directory.Build.props so they can be
6
+ easily overridden per-app or via MSBuild /p: properties. -->
7
+
8
+ <!-- Inline merge task: will merge App_Resources/Windows/Package.appxmanifest or Package.appxmanifest.partial.xml into the generated Package.appxmanifest -->
9
+ <UsingTask TaskName="MergeAppxManifest" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
10
+ <ParameterGroup>
11
+ <SourceManifest ParameterType="System.String" Required="true" />
12
+ <TargetManifest ParameterType="System.String" Required="true" />
13
+ </ParameterGroup>
14
+ <Task>
15
+ <Reference Include="System.Core" />
16
+ <Reference Include="System.Xml" />
17
+ <Reference Include="System.Xml.Linq" />
18
+ <Using Namespace="System" />
19
+ <Using Namespace="System.IO" />
20
+ <Using Namespace="System.Linq" />
21
+ <Using Namespace="System.Xml.Linq" />
22
+ <Code Type="Fragment" Language="cs"><![CDATA[
23
+ try {
24
+ if (!File.Exists(SourceManifest)) { Log.LogMessage(MessageImportance.Low, "No source manifest found: " + SourceManifest); return true; }
25
+ if (!File.Exists(TargetManifest)) { Log.LogMessage(MessageImportance.Low, "No target manifest found: " + TargetManifest); return true; }
26
+ XDocument src = XDocument.Load(SourceManifest);
27
+ XDocument dest = XDocument.Load(TargetManifest);
28
+
29
+ Func<XElement, XElement, bool> mergeElement = null;
30
+ mergeElement = (srcElem, destParent) => {
31
+ XElement match = destParent.Elements().FirstOrDefault(c => c.Name.LocalName == srcElem.Name.LocalName);
32
+ if (match == null) {
33
+ destParent.Add(new XElement(srcElem));
34
+ return true;
35
+ }
36
+ // copy/overwrite attributes
37
+ foreach (var a in srcElem.Attributes()) { match.SetAttributeValue(a.Name, a.Value); }
38
+ // merge children
39
+ foreach (var child in srcElem.Elements()) {
40
+ // skip if identical child exists
41
+ bool exists = match.Elements().Any(mc => mc.Name.LocalName == child.Name.LocalName && mc.ToString() == child.ToString());
42
+ if (exists) { continue; }
43
+ // try to find same-named child to merge into
44
+ XElement matchChild = match.Elements().FirstOrDefault(mc => mc.Name.LocalName == child.Name.LocalName);
45
+ if (matchChild != null) { mergeElement(child, matchChild); } else { match.Add(new XElement(child)); }
46
+ }
47
+ return true;
48
+ };
49
+
50
+ // Merge VisualElements (common case) into the Application node
51
+ var srcVisuals = src.Descendants().Where(e => e.Name.LocalName == "VisualElements");
52
+ foreach (var ve in srcVisuals) {
53
+ var destApp = dest.Descendants().FirstOrDefault(e => e.Name.LocalName == "Application");
54
+ if (destApp == null) { dest.Root.Add(new XElement(ve)); }
55
+ else { mergeElement(ve, destApp); }
56
+ }
57
+
58
+ // Merge Capabilities (if present)
59
+ var srcCaps = src.Descendants().Where(e => e.Name.LocalName == "Capabilities");
60
+ foreach (var cap in srcCaps) {
61
+ var destCaps = dest.Descendants().FirstOrDefault(e => e.Name.LocalName == "Capabilities");
62
+ if (destCaps == null) { dest.Root.Add(new XElement(cap)); }
63
+ else { mergeElement(cap, destCaps); }
64
+ }
65
+
66
+ // Merge other top-level sections present in src (e.g., Extensions) by local-name
67
+ foreach (var top in src.Root.Elements()) {
68
+ if (top.Name.LocalName == "Dependencies" || top.Name.LocalName == "Applications") { continue; }
69
+ var existing = dest.Root.Elements().FirstOrDefault(e => e.Name.LocalName == top.Name.LocalName);
70
+ if (existing == null) { dest.Root.Add(new XElement(top)); }
71
+ else {
72
+ // merge children of this section
73
+ foreach (var child in top.Elements()) {
74
+ bool exists = existing.Elements().Any(ec => ec.Name.LocalName == child.Name.LocalName && ec.ToString() == child.ToString());
75
+ if (!exists) { existing.Add(new XElement(child)); }
76
+ }
77
+ }
78
+ }
79
+
80
+ dest.Save(TargetManifest);
81
+ Log.LogMessage(MessageImportance.High, $"Merged manifest from {SourceManifest} into {TargetManifest}");
82
+ return true;
83
+ } catch (Exception ex) { Log.LogErrorFromException(ex); return false; }
84
+ ]]></Code>
85
+ </Task>
86
+ </UsingTask>
87
+
88
+ <Target Name="MergeAppResourcesManifest" AfterTargets="ApplyManifestOverrides" Condition="Exists('$(MSBuildProjectDirectory)\Package.appxmanifest')">
89
+ <PropertyGroup>
90
+ <_AppResourcesManifest>$(MSBuildProjectDirectory)\App_Resources\Windows\Package.appxmanifest</_AppResourcesManifest>
91
+ <!-- Allow CLI or callers to override the source manifest via MSBuild property 'AppResourcesManifestPath' -->
92
+ <_AppResourcesManifest Condition="'$(AppResourcesManifestPath)' != ''">$(AppResourcesManifestPath)</_AppResourcesManifest>
93
+ <!-- Fallback template manifest name (no '.partial' suffix) -->
94
+ <_PartialManifest>$(MSBuildProjectDirectory)\Package.appxmanifest</_PartialManifest>
95
+ </PropertyGroup>
96
+ <Message Text="Merging app manifest (if present) into generated Package.appxmanifest (app wins)" Importance="Low" />
97
+ <MergeAppxManifest SourceManifest="$([System.IO.File]::Exists('$(_AppResourcesManifest)') ? '$(_AppResourcesManifest)' : '$(_PartialManifest)')" TargetManifest="$(MSBuildProjectDirectory)\Package.appxmanifest" Condition=" $([System.IO.File]::Exists('$(_AppResourcesManifest)')) Or $([System.IO.File]::Exists('$(_PartialManifest)')) " />
98
+ </Target>
99
+
100
+ <Target Name="ApplyManifestOverrides" BeforeTargets="BeforeBuild" Condition="Exists('$(MSBuildProjectDirectory)\Package.appxmanifest')">
101
+ <Message Text="Applying manifest overrides (VisualElements, logos, splash) via XmlPoke..." Importance="High" />
102
+
103
+ <!-- DisplayName -->
104
+ <XmlPoke XmlInputPath="$(MSBuildProjectDirectory)\Package.appxmanifest"
105
+ Query="/*[local-name()='Package']/*[local-name()='Applications']/*[local-name()='Application']/*[local-name()='VisualElements']/@DisplayName"
106
+ Value="$(AppDisplayName)"
107
+ Condition="'$(AppDisplayName)' != ''" />
108
+
109
+ <!-- Description -->
110
+ <XmlPoke XmlInputPath="$(MSBuildProjectDirectory)\Package.appxmanifest"
111
+ Query="/*[local-name()='Package']/*[local-name()='Applications']/*[local-name()='Application']/*[local-name()='VisualElements']/@Description"
112
+ Value="$(AppDescription)"
113
+ Condition="'$(AppDescription)' != ''" />
114
+
115
+ <!-- Logos -->
116
+ <XmlPoke XmlInputPath="$(MSBuildProjectDirectory)\Package.appxmanifest"
117
+ Query="/*[local-name()='Package']/*[local-name()='Applications']/*[local-name()='Application']/*[local-name()='VisualElements']/@Square150x150Logo"
118
+ Value="$(Square150x150Logo)"
119
+ Condition="'$(Square150x150Logo)' != ''" />
120
+
121
+ <XmlPoke XmlInputPath="$(MSBuildProjectDirectory)\Package.appxmanifest"
122
+ Query="/*[local-name()='Package']/*[local-name()='Applications']/*[local-name()='Application']/*[local-name()='VisualElements']/@Square44x44Logo"
123
+ Value="$(Square44x44Logo)"
124
+ Condition="'$(Square44x44Logo)' != ''" />
125
+
126
+ <XmlPoke XmlInputPath="$(MSBuildProjectDirectory)\Package.appxmanifest"
127
+ Query="/*[local-name()='Package']/*[local-name()='Applications']/*[local-name()='Application']/*[local-name()='VisualElements']/*[local-name()='DefaultTile']/@Wide310x150Logo"
128
+ Value="$(Wide310x150Logo)"
129
+ Condition="'$(Wide310x150Logo)' != ''" />
130
+
131
+ <XmlPoke XmlInputPath="$(MSBuildProjectDirectory)\Package.appxmanifest"
132
+ Query="/*[local-name()='Package']/*[local-name()='Applications']/*[local-name()='Application']/*[local-name()='VisualElements']/@StoreLogo"
133
+ Value="$(StoreLogo)"
134
+ Condition="'$(StoreLogo)' != ''" />
135
+
136
+ <XmlPoke XmlInputPath="$(MSBuildProjectDirectory)\Package.appxmanifest"
137
+ Query="/*[local-name()='Package']/*[local-name()='Applications']/*[local-name()='Application']/*[local-name()='VisualElements']/@LockScreenLogo"
138
+ Value="$(LockScreenLogo)"
139
+ Condition="'$(LockScreenLogo)' != ''" />
140
+
141
+ <!-- BackgroundColor and SplashScreen image -->
142
+ <XmlPoke XmlInputPath="$(MSBuildProjectDirectory)\Package.appxmanifest"
143
+ Query="/*[local-name()='Package']/*[local-name()='Applications']/*[local-name()='Application']/*[local-name()='VisualElements']/@BackgroundColor"
144
+ Value="$(SplashBackgroundColor)"
145
+ Condition="'$(SplashBackgroundColor)' != ''" />
146
+
147
+ <XmlPoke XmlInputPath="$(MSBuildProjectDirectory)\Package.appxmanifest"
148
+ Query="/*[local-name()='Package']/*[local-name()='Applications']/*[local-name()='Application']/*[local-name()='VisualElements']/*[local-name()='SplashScreen']/@Image"
149
+ Value="$(SplashImage)"
150
+ Condition="'$(SplashImage)' != ''" />
151
+
152
+ </Target>
153
+ </Project>
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript/windows",
3
- "version": "0.1.0-alpha.75",
3
+ "version": "0.1.0-alpha.76",
4
4
  "description": "NativeScript for using Windows v8",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,55 +0,0 @@
1
- [
2
- {
3
- "typeName": "TemplateNamedJsonObject",
4
- "className": "TemplateNamedJsonObject",
5
- "namespace": null,
6
- "baseClass": "Windows.Data.Json.JsonObject",
7
- "methods": [
8
- {
9
- "name": "ToString",
10
- "returnType": "String",
11
- "parameters": []
12
- }
13
- ],
14
- "properties": [],
15
- "interfaces": [],
16
- "isAutoGeneratedName": false,
17
- "registeredAt": "2026-05-21T19:10:11.007Z"
18
- },
19
- {
20
- "typeName": "com.tns.gen.winrt.windows.data.json.JsonObject_AutoProxy_2",
21
- "className": "JsonObject_AutoProxy_2",
22
- "namespace": "com.tns.gen.winrt.windows.data.json",
23
- "baseClass": "Windows.Data.Json.JsonObject",
24
- "methods": [
25
- {
26
- "name": "ToString",
27
- "returnType": "String",
28
- "parameters": []
29
- }
30
- ],
31
- "properties": [],
32
- "interfaces": [],
33
- "isAutoGeneratedName": false,
34
- "registeredAt": "2026-05-21T19:10:11.024Z"
35
- },
36
- {
37
- "typeName": "com.tns.gen.winrt.windows.Object_AutoProxy_3",
38
- "className": "Object_AutoProxy_3",
39
- "namespace": "com.tns.gen.winrt.windows",
40
- "baseClass": "Object",
41
- "methods": [
42
- {
43
- "name": "ToString",
44
- "returnType": "String",
45
- "parameters": []
46
- }
47
- ],
48
- "properties": [],
49
- "interfaces": [
50
- "Windows.Foundation.IStringable"
51
- ],
52
- "isAutoGeneratedName": false,
53
- "registeredAt": "2026-05-21T19:10:11.042Z"
54
- }
55
- ]