This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-paramedic.git


The following commit(s) were added to refs/heads/master by this push:
     new de7e6f0  feat!: remove deprecated windows platform (#277)
de7e6f0 is described below

commit de7e6f0df9a9de3b464014cc086cc48224ec3d1b
Author: エリス <[email protected]>
AuthorDate: Fri Dec 5 02:26:16 2025 +0900

    feat!: remove deprecated windows platform (#277)
---
 README.md                                  | 22 ++---------------
 conf/pr/local/windows-10-store.config.json |  8 -------
 debug-mode-plugin/package.json             | 13 ----------
 debug-mode-plugin/plugin.xml               | 34 --------------------------
 lib/ParamedicApp.js                        |  5 ----
 lib/ParamedicAppUninstall.js               | 20 ----------------
 lib/ParamedicConfig.js                     |  9 -------
 lib/ParamedicKill.js                       |  4 ----
 lib/ParamedicLogCollector.js               | 21 +----------------
 lib/ParamedicTargetChooser.js              | 38 +-----------------------------
 lib/paramedic.js                           |  6 ++---
 lib/utils/utilities.js                     |  1 -
 package.json                               |  1 -
 sample-config/.paramedic.config.js         |  4 ++--
 14 files changed, 8 insertions(+), 178 deletions(-)

diff --git a/README.md b/README.md
index 9a208c4..f37cecf 100644
--- a/README.md
+++ b/README.md
@@ -61,13 +61,10 @@ Cordova Paramedic is currently used to automatically run 
all plugin tests on CI.
       - [`--timeout` (optional)](#--timeout-optional)
       - [`--outputDir` (optional)](#--outputdir-optional)
       - [`--cleanUpAfterRun` (optional)](#--cleanupafterrun-optional)
-      - [`--logMins` (optional)](#--logmins-optional)
       - [`--tccDb` (optional)](#--tccdb-optional)
       - [`--args` (optional)](#--args-optional)
   - [Configuration file](#configuration-file)
   - [API Interface](#api-interface)
-  - [Quirks](#quirks)
-    - [Windows](#windows)
 
 <!--<small><i><a href='http://ecotrust-canada.github.io/markdown-toc/'>Table 
of contents generated with markdown-toc</a></i></small>-->
 
@@ -76,7 +73,6 @@ Cordova Paramedic is currently used to automatically run all 
plugin tests on CI.
 - Android
 - Browser
 - iOS
-- Windows
 
 ## What does it do?
 
@@ -312,14 +308,6 @@ Flag to indicate the sample application folder must be 
deleted.
 cordova-paramedic --platform ios --plugin cordova-plugin-inappbrowser 
--cleanUpAfterRun
 ```
 
-#### `--logMins` (optional)
-
-Windows only parameter to indicate the duration for which the device logs to 
be fetched.
-
-```shell
-cordova-paramedic --platform windows --plugin cordova-plugin-inappbrowser 
--logMins 15
-```
-
 #### `--tccDb` (optional)
 
 iOS only parameter. The path to the sample TCC DB file, with permissions, to 
be copied to the simulator.
@@ -354,9 +342,9 @@ module.exports = {
     "plugins": [
         "https://github.com/apache/cordova-plugin-inappbrowser";
     ],
-    "platform": "windows",
+    "platform": "android",
     "action": "run",
-    "args": "--archs=x64 -- --appx=uap"
+    "args": ""
 }
 ```
 
@@ -370,9 +358,3 @@ You can also use `cordova-paramedic` as a module directly:
 var paramedic = require('cordova-paramedic');
 paramedic.run(config);
 ```
-
-## Quirks
-
-### Windows
-
-For Paramedic to work correctly for Windows apps you'll need to allow the 
loopback for "HelloCordova" app using [Windows Loopback Exemption 
Manager](https://github.com/tiagonmas/Windows-Loopback-Exemption-Manager) 
([download](https://github.com/piksel/Windows-Loopback-Exemption-Manager/releases/tag/v1.0.0.1)).
diff --git a/conf/pr/local/windows-10-store.config.json 
b/conf/pr/local/windows-10-store.config.json
deleted file mode 100644
index 60e2031..0000000
--- a/conf/pr/local/windows-10-store.config.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-    "platform": "windows@latest",
-    "action": "run",
-    "args": " -- --appx=uap --archs=x64",
-    "cleanUpAfterRun": true,
-    "logMins": 15,
-    "verbose": true
-}
diff --git a/debug-mode-plugin/package.json b/debug-mode-plugin/package.json
deleted file mode 100644
index 7f822e5..0000000
--- a/debug-mode-plugin/package.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-  "name": "cordova-paramedic-debug-mode",
-  "version": "0.5.0",
-  "license": "Apache 2.0",
-  "description": "Plugin to enable package debugging to allow app run without 
active local/remote desktop session",
-  "engines" : {
-      "node" : ">=0.11.2"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/apache/cordova-paramedic.git"
-  }
-}
diff --git a/debug-mode-plugin/plugin.xml b/debug-mode-plugin/plugin.xml
deleted file mode 100644
index a78e173..0000000
--- a/debug-mode-plugin/plugin.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-
-<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0";
-        id="debug-mode-plugin"
-        version="1.0.0-dev">
-
-    <name>Windows debug mode plugin</name>
-    <description>Plugin to enable package debugging to allow app run without 
active local/remote desktop session</description>
-    <license>Apache 2.0</license>
-
-    <platform name="windows">
-        <hook type="after_plugin_install" src="scripts/enable-debug-mode.js" />
-        <hook type="before_plugin_uninstall" 
src="scripts/disable-debug-mode.js" />
-    </platform>
-
-</plugin>
diff --git a/lib/ParamedicApp.js b/lib/ParamedicApp.js
index de8f750..f863602 100644
--- a/lib/ParamedicApp.js
+++ b/lib/ParamedicApp.js
@@ -37,7 +37,6 @@ class ParamedicApp {
         this.isAndroid = this.platformId === utilities.ANDROID;
         this.isBrowser = this.platformId === utilities.BROWSER;
         this.isIos = this.platformId === utilities.IOS;
-        this.isWindows = this.platformId === utilities.WINDOWS;
 
         
logger.info('---------------------------------------------------------');
         logger.info('1. Create Cordova app with platform and plugin(s) to 
test');
@@ -69,10 +68,6 @@ class ParamedicApp {
 
         const ciFrameworkPlugins = 
['github:apache/cordova-plugin-test-framework', path.join(__dirname, '..', 
'paramedic-plugin')];
 
-        if (this.isWindows) {
-            ciFrameworkPlugins.push(path.join(__dirname, '..', 
'debug-mode-plugin'));
-        }
-
         if (this.isIos) {
             ciFrameworkPlugins.push(path.join(__dirname, '..', 
'ios-geolocation-permissions-plugin'));
         }
diff --git a/lib/ParamedicAppUninstall.js b/lib/ParamedicAppUninstall.js
index 23e69b8..febe6a8 100644
--- a/lib/ParamedicAppUninstall.js
+++ b/lib/ParamedicAppUninstall.js
@@ -17,8 +17,6 @@
     under the License.
 */
 
-const path = require('path');
-const fs = require('fs');
 const Q = require('q');
 const { logger, exec, utilities } = require('./utils');
 
@@ -38,9 +36,6 @@ class ParamedicAppUninstall {
         case utilities.IOS:
             return this.uninstallAppIOS(targetObj, app);
 
-        case utilities.WINDOWS:
-            return this.uninstallAppWindows(targetObj, app);
-
         default:
             return Q();
         }
@@ -51,21 +46,6 @@ class ParamedicAppUninstall {
         return this.executeUninstallCommand(uninstallCommand);
     }
 
-    uninstallAppWindows (targetObj) {
-        const platformPath = path.join(this.appPath, 'platforms', 'windows');
-        const packageJSPath = path.join(platformPath, 'cordova', 'lib', 
'package.js');
-        const programFilesPath = process.env['ProgramFiles(x86)'] || 
process.env.ProgramFiles;
-        const appDeployPath = path.join(programFilesPath, 'Microsoft SDKs', 
'Windows Phone', 'v8.1', 'Tools', 'AppDeploy', 'AppDeployCmd.exe');
-
-        if (fs.existsSync(packageJSPath)) {
-            const packageJS = require(packageJSPath);
-            const appId = packageJS.getAppId(platformPath);
-            const uninstallCommand = '"' + appDeployPath + '"' + ' /uninstall 
' + appId + ' /targetdevice:' + targetObj.target;
-            return this.executeUninstallCommand(uninstallCommand);
-        }
-        return Q();
-    }
-
     /**
      * Uninstalls the Application form target by Bundle Identifier
      *
diff --git a/lib/ParamedicConfig.js b/lib/ParamedicConfig.js
index f55e732..5a9833a 100644
--- a/lib/ParamedicConfig.js
+++ b/lib/ParamedicConfig.js
@@ -118,14 +118,6 @@ class ParamedicConfig {
         return DEFAULT_TIMEOUT;
     }
 
-    getLogMins () {
-        return this._config.logMins;
-    }
-
-    setLogMins (logMins) {
-        this._config.logMins = logMins;
-    }
-
     setTccDb (tccDb) {
         this._config.tccDb = tccDb;
     }
@@ -186,7 +178,6 @@ ParamedicConfig.parseFromArguments = function (argv) {
         endPort: argv.endport || argv.port,
         externalServerUrl: argv.externalServerUrl,
         outputDir: argv.outputDir ? argv.outputDir : null,
-        logMins: argv.logMins ? argv.logMins : null,
         tccDb: argv.tccDbPath ? argv.tccDb : null,
         cleanUpAfterRun: !!argv.cleanUpAfterRun,
         skipMainTests: argv.skipMainTests,
diff --git a/lib/ParamedicKill.js b/lib/ParamedicKill.js
index 56d1b7b..67bc0a9 100644
--- a/lib/ParamedicKill.js
+++ b/lib/ParamedicKill.js
@@ -50,10 +50,6 @@ class ParamedicKill {
         let tasks = [];
 
         switch (platformName) {
-        case utilities.WINDOWS:
-            tasks = ['WWAHost.exe', 'Xde.exe'];
-            break;
-
         case utilities.IOS:
             tasks = ['Simulator', 'iOS Simulator'];
             break;
diff --git a/lib/ParamedicLogCollector.js b/lib/ParamedicLogCollector.js
index 65f1c43..41c6d45 100644
--- a/lib/ParamedicLogCollector.js
+++ b/lib/ParamedicLogCollector.js
@@ -51,21 +51,6 @@ class ParamedicLogCollector {
         }
     }
 
-    logWindows (appPath, logMins) {
-        const logScriptPath = path.join(appPath, 'platforms', 'windows', 
'cordova', 'log.bat');
-
-        if (fs.existsSync(logScriptPath)) {
-            let mins = utilities.DEFAULT_LOG_TIME;
-
-            if (logMins) {
-                mins = logMins + utilities.DEFAULT_LOG_TIME_ADDITIONAL;
-            }
-
-            const logCommand = logScriptPath + ' --dump --mins ' + mins;
-            this.generateLogs(logCommand);
-        }
-    }
-
     logAndroid () {
         if (!this.targetObj) {
             logger.warn('It looks like there is no target to get logs from.');
@@ -107,7 +92,7 @@ class ParamedicLogCollector {
         return path.join(this.outputDir, this.platform + '_logs.txt');
     }
 
-    collectLogs (logMins) {
+    collectLogs () {
         shelljs.config.fatal = false;
         shelljs.config.silent = false;
 
@@ -120,10 +105,6 @@ class ParamedicLogCollector {
             this.logIOS(this.appPath);
             break;
 
-        case utilities.WINDOWS:
-            this.logWindows(this.appPath, logMins);
-            break;
-
         default:
             logger.info('Logging is unsupported for ' + this.platform + ', 
skipping...');
             break;
diff --git a/lib/ParamedicTargetChooser.js b/lib/ParamedicTargetChooser.js
index f6cba52..2e78add 100644
--- a/lib/ParamedicTargetChooser.js
+++ b/lib/ParamedicTargetChooser.js
@@ -19,7 +19,7 @@
 
 const Q = require('q');
 const path = require('path');
-const { logger, exec, utilities } = require('./utils');
+const { logger, utilities } = require('./utils');
 const ParamedicKill = require('./ParamedicKill');
 const ANDROID_RETRY_TIMES = 3;
 const ANDROID_TIME_OUT = 300000; // 5 Minutes
@@ -43,10 +43,6 @@ class ParamedicTargetChooser {
             targetObj = this.chooseTargetForIOS(emulator, target);
             break;
 
-        case utilities.WINDOWS:
-            targetObj = this.chooseTargetForWindows(emulator, target);
-            break;
-
         default:
             break;
         }
@@ -101,38 +97,6 @@ class ParamedicTargetChooser {
             });
     }
 
-    chooseTargetForWindows (emulator, target) {
-        logger.info('cordova-paramedic: Choosing Target for Windows');
-        const windowsCommand = this.cli + ' run --list --emulator' + 
utilities.PARAMEDIC_COMMON_CLI_ARGS;
-
-        logger.info('cordova-paramedic: Running command: ' + windowsCommand);
-
-        const devicesResult = exec(windowsCommand);
-        if (devicesResult.code > 0) {
-            logger.error('Failed to get the list of devices for Windows');
-            return Q({ target: undefined });
-        }
-
-        const lines = devicesResult.stdout.split(/\n/);
-        if (lines.length <= 1) {
-            logger.error('No devices/emulators available for Windows');
-            return Q({ target: undefined });
-        }
-
-        let targets = lines.filter(line => /^\d+\.\s+/.test(line));
-
-        if (target) {
-            for (const t in targets) {
-                if (Object.prototype.hasOwnProperty.call(targets, t) && 
t.indexOf(target) >= 0) {
-                    targets = [t];
-                    break;
-                }
-            }
-        }
-
-        return Q({ target: targets[0].split('. ')[0].trim() });
-    }
-
     chooseTargetForIOS (emulator, target) {
         logger.info('cordova-paramedic: Choosing Target for iOS');
 
diff --git a/lib/paramedic.js b/lib/paramedic.js
index 45e04e8..1009def 100644
--- a/lib/paramedic.js
+++ b/lib/paramedic.js
@@ -45,7 +45,6 @@ class ParamedicRunner {
         this.targetObj = undefined;
 
         this.isBrowser = this.config.getPlatformId() === utilities.BROWSER;
-        this.isWindows = this.config.getPlatformId() === utilities.WINDOWS;
         this.isIos = this.config.getPlatformId() === utilities.IOS;
 
         exec.setVerboseLevel(config.isVerbose());
@@ -312,7 +311,7 @@ class ParamedicRunner {
 
         if (this.isBrowser) {
             return cmd.join(' ');
-        } else if (this.config.getAction() === 'build' || (this.isWindows && 
this.config.getArgs().indexOf('appx=8.1-phone') < 0)) {
+        } else if (this.config.getAction() === 'build') {
             // The app is to be run as a store app or just build. So no need 
to choose a target.
             return Q(cmd.join(' '));
         }
@@ -373,9 +372,8 @@ class ParamedicRunner {
     collectDeviceLogs () {
         logger.info('Collecting logs for the devices.');
         const outputDir = this.config.getOutputDir() ? 
this.config.getOutputDir() : this.tempFolder.name;
-        const logMins = this.config.getLogMins() ? this.config.getLogMins() : 
utilities.DEFAULT_LOG_TIME;
         const paramedicLogCollector = new 
ParamedicLogCollector(this.config.getPlatformId(), this.tempFolder.name, 
outputDir, this.targetObj);
-        paramedicLogCollector.collectLogs(logMins);
+        paramedicLogCollector.collectLogs();
     }
 
     uninstallApp () {
diff --git a/lib/utils/utilities.js b/lib/utils/utilities.js
index 11a5c24..524dd9c 100644
--- a/lib/utils/utilities.js
+++ b/lib/utils/utilities.js
@@ -242,7 +242,6 @@ function getConfigPath (config) {
 module.exports = {
     ANDROID: 'android',
     IOS: 'ios',
-    WINDOWS: 'windows',
     BROWSER: 'browser',
     PARAMEDIC_DEFAULT_APP_NAME: 'io.cordova.hellocordova',
     PARAMEDIC_COMMON_CLI_ARGS: ' --no-telemetry --no-update-notifier',
diff --git a/package.json b/package.json
index d9ce3bd..ee23eb9 100644
--- a/package.json
+++ b/package.json
@@ -20,7 +20,6 @@
     "test-local-on-windows": "npm run test-browser && npm run test-android",
     "test-android": "node main.js --platform android --plugin 
./spec/testable-plugin/",
     "test-ios": "node main.js --platform ios --plugin ./spec/testable-plugin/ 
--verbose",
-    "test-windows": "node main.js --platform windows --plugin 
./spec/testable-plugin/",
     "test-browser": "node main.js --platform browser --plugin 
./spec/testable-plugin/"
   },
   "keywords": [
diff --git a/sample-config/.paramedic.config.js 
b/sample-config/.paramedic.config.js
index e0a1ea5..38fe36f 100644
--- a/sample-config/.paramedic.config.js
+++ b/sample-config/.paramedic.config.js
@@ -24,7 +24,7 @@ module.exports = {
     "plugins": [
         "https://github.com/apache/cordova-plugin-inappbrowser";
     ],
-     "platform": "windows@latest",
+     "platform": "android",
      "action": "run",
-     "args": "--archs=x64 -- --appx=uap"
+     "args": ""
 };


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to