Foxboron / SublimeClojure

Sublime Text 2/3 Clojure support
25 stars 4 forks source link

Added build setting support for windows #9

Closed jeiea closed 10 years ago

Foxboron commented 10 years ago

Any reason why you need "windows": { "shell": true} on every command? Would seem like it would be enough with the top block

jeiea commented 10 years ago

Top level shell state wasn't enough. On my environment (Windows 8.1 x64) removing sublevel shell declaration generates [WinError 2] Unable to find the specified file.

Foxboron commented 10 years ago

I'll look at this tonight and just verify this dosn't fuck over anything! Thanks for the PR \o/

:shipit:

Foxboron commented 10 years ago

Hurm. This suddenly dosn't work on Windows7. I got no idea why. It complains that lein isn't a command, while it is in my path and working inside CMD.

Gotta work this out and try and figure out why.

Foxboron commented 10 years ago

@jeiea

{
  "cmd": ["lein", "compile", ":all"],
  "path": "${PATH}:/usr/local/bin:",
  "working_dir": "$project_path",
  "selector": "source.clojure",
  "encoding": "latin1",

  "windows": {
    "path": "${PATH}",
    "working_dir": "$project_path",
    "shell": true,
  },

  "variants": [
    { "cmd": ["lein", "marg", "-m", "-d", "docs"],
      "name": "Lein: Documentation",
    },
    { "cmd": ["lein", "clean"],
      "name": "Lein: Clean",
    },
    { "cmd": ["lein", "run"],
      "name": "Lein: Run",
    },
    { "cmd": ["lein", "test"],
      "name": "Lein: Test",
    },
    { "cmd": ["lein", "retest"],
      "name": "Lein: Re-test",
    },
    { "cmd": ["lein", "uberjar"],
      "name": "Lein: Uberjar",
    },
    { "cmd": ["lein", "jar"],
      "name": "Lein: Jar",
    },
    { "cmd": ["lein", "check"],
      "name": "Lein: Check",
    }
  ],
}

Could you play around with this and see if it works on Windows 8?

jeiea commented 10 years ago

I checked It works well too on WIndows 8.1. I just noticed sublevel shell declaration wasn't problem, the problem was empty windows block made by commenting out shell key-value. It worked well although I remove encoding and working_dir in windows block.