MSBuild.NodeTools icon indicating copy to clipboard operation
MSBuild.NodeTools copied to clipboard

Packages incompatible with non-windows

Open iskiselev opened this issue 9 years ago • 6 comments

In Grunt, Gulp and Bower packages hardcoded ".cmd" in command file name. It is incompatible with Linux - there will be no extension for commands at all.

As Node/Npm packages use commands without .cmd extension, they correctly works on Linux (if $NodeJS environment variable provided).

iskiselev avatar Aug 15 '15 03:08 iskiselev

I guess there are more issues than the hard-coded .cmd when it comes to getting this to work on Linux. I also don't plan on adding support for it, but you are free to add a pull request :)

kevicency avatar Sep 14 '15 17:09 kevicency

I was able to run everything else on Unix when I removed .cmd and check for presence of files.

iskiselev avatar Sep 14 '15 17:09 iskiselev

Interesting. Guess it works when it doesn't try to find the executables using where.exe. Do you know a way to find out which OS MSBuild is running on?

kevicency avatar Sep 14 '15 22:09 kevicency

Something like:

  <PropertyGroup Condition=" '$(OS)' == 'Windows_NT' ">
    <DefineConstants>$(DefineConstants);WINDOWS</DefineConstants>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(OS)' == 'Unix' ">
    <DefineConstants>$(DefineConstants);UNIX</DefineConstants>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(OS)' == 'OSX' ">
    <DefineConstants>$(DefineConstants);OSX</DefineConstants>
  </PropertyGroup>

iskiselev avatar Sep 15 '15 04:09 iskiselev

Here is my modified version of targets: https://github.com/sq/JSIL/tree/master/JSIL.Libraries/Targets Here you can look on logs of executing them successfully on Unix: https://travis-ci.org/iskiselev/JSIL/builds/80366771

iskiselev avatar Sep 15 '15 04:09 iskiselev

In Unix call to where,exe probably should be replaced with which

iskiselev avatar Sep 15 '15 05:09 iskiselev