Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-paramedic/pull/5#discussion_r62729774
  
    --- Diff: lib/ParamedicAppUninstall.js ---
    @@ -0,0 +1,66 @@
    +var shelljs = require('shelljs');
    +var path    = require('path');
    +var fs      = require("fs");
    +var logger  = require('./utils').logger;
    +var util    = require('./utils').utilities;
    +
    +function ParamedicAppUninstall(appPath, platform) {
    +    this.appPath  = appPath;
    +    this.platform = platform;
    +}
    +
    +ParamedicAppUninstall.prototype.uninstallApp = function(targetObj, app) {
    +    if(!targetObj || !targetObj.target)
    +        return;
    +
    +    switch(this.platform) {
    +        case util.ANDROID:
    +            this.uninstallAppAndroid(targetObj, app);
    +            break;
    +        case util.IOS:
    +            this.uninstallAppIOS(targetObj, app);
    +            break;
    +        case util.WINDOWS:
    +            this.uninstallAppWindows(targetObj, app);
    +            break;
    +        default:
    +            break;
    +    }
    +}
    +
    +ParamedicAppUninstall.prototype.uninstallAppAndroid = function(targetObj, 
app) {
    +    var uninstallCommand = "adb -s " + targetObj.target + " uninstall " + 
app;
    +    this.executeUninstallCommand(uninstallCommand);
    +}
    +
    +ParamedicAppUninstall.prototype.uninstallAppWindows = function(targetObj, 
app) {
    +    var platformPath = path.join(this.appPath, "platforms", "windows");
    +    var packageJSPath = path.join(platformPath, "cordova", "lib", 
"package.js");
    +    var appDeployPath = path.join("C:", "Program Files (x86)", "Microsoft 
SDKs",
    --- End diff --
    
    This is hard-coded - We should at least look at the ProgramFiles 
environment variable and not hardcode to "C:\"
    
    The common way to do this process.env["ProgramFiles(x86)"] || 
process.env["ProgramFiles"] - this will ensure it works on both 32-bit & 64-bit 
systems.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to