File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 44command=$1
55shift
66
7- " $command " $@
8-
7+ $( winepath --unix " $command " ) $@
8+ exit $?
Original file line number Diff line number Diff line change @@ -4,18 +4,27 @@ REM This batch file forwards commands to a Unix-like shell
44REM
55REM We need to work around what looks to be a MCVS bug: the final parameter is
66REM missing the terminating '"' when quoted
7+ SET commands = %* "
8+
9+ @ echo Invoking Unix command '%commands% '
10+
11+ REM Does this look like a wine environment?
12+ REM We guess this by looking for a common-ish Wine env var
13+ IF DEFINED WINEDEBUG (
14+ START /wait %~dp0 \invoke-unix-wine.exe %commands%
15+ EXIT %ERRORLEVEL%
16+ )
717
8- @ echo Invoking Unix command '%* " '
918
1019IF EXIST C:\Cygwin\bin (
1120 REM Obscure way to get the cmd.exe equivalent to `...` substitution
1221 FOR /F " usebackq tokens=*" %%x IN (`C:\Cygwin\bin\cygpath.exe %CD% `) DO SET cygwin_cd = %%x
1322 FOR /F " usebackq tokens=*" %%x IN (`C:\Cygwin\bin\cygpath.exe %* " `) DO SET cygwin_cmd=!cygwin_cmd! %%x
1423
1524 C:\Cygwin\bin\bash.exe -c 'cd !cygwin_cd! ^ &^ & !cygwin_cmd! '
16- ) ELSE (
17- invoke-unix-wine.exe %* "
25+ EXIT %ERRORLEVEL%
1826)
1927
20- EXIT %ERRORLEVEL%
28+ @ echo Could not find Cygwin or wine
29+ EXIT 1
2130
You can’t perform that action at this time.
0 commit comments