瀏覽代碼

Fix windows manifest VisualElements tag

Sebastián Katzer 10 年之前
父節點
當前提交
b8da2b9467
共有 1 個文件被更改,包括 6 次插入11 次删除
  1. 6 11
      scripts/windows/setToastCapable.js

+ 6 - 11
scripts/windows/setToastCapable.js

@@ -55,14 +55,9 @@ function replace (filename, to_replace, replace_with) {
     fs.writeFileSync(filename, result, 'utf8');
     fs.writeFileSync(filename, result, 'utf8');
 }
 }
 
 
-// Paths to all manifest files where the permission needs to be set
-var manifests = [
-    'platforms/windows/package.phone.appxmanifest',
-    'platforms/windows/package.windows.appxmanifest',
-    'platforms/windows/package.windows80.appxmanifest'
-];
-
-// Includes the permission
-for (var i = 0; i < manifests.length; i++) {
-    replace(manifests[i], '<m3:VisualElements ', '<m3:VisualElements ToastCapable="true" ');
-}
+// Set ToastCapable for Windows Phone
+replace('platforms/windows/package.phone.appxmanifest', '<m3:VisualElements', '<m3:VisualElements ToastCapable="true"');
+// Set ToastCapable for Windows 8.1
+replace('platforms/windows/package.windows.appxmanifest', '<m2:VisualElements', '<m2:VisualElements ToastCapable="true"');
+// Set ToastCapable for Windows 8.0
+replace('platforms/windows/package.windows80.appxmanifest', '<VisualElements', '<VisualElements ToastCapable="true"');