From 29bca68f13c09bccb16f2383e5d50f5b6f6a4da6 Mon Sep 17 00:00:00 2001 From: WestfW Date: Tue, 12 Dec 2017 01:02:44 -0800 Subject: [PATCH] Fixes for 64bit windows. In particular, shorten all the directory names added to the path to the 8.3 format, so they don't contain inconvenient characters like "()" that break the way cmd.exe parses commmand lines. --- optiboot/bootloaders/optiboot/omake.bat | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/optiboot/bootloaders/optiboot/omake.bat b/optiboot/bootloaders/optiboot/omake.bat index 4dcf24e..4c9b13d 100644 --- a/optiboot/bootloaders/optiboot/omake.bat +++ b/optiboot/bootloaders/optiboot/omake.bat @@ -14,7 +14,7 @@ REM Things are good; try to set the paths and run the compile REM -------------------------------------------------------- call :findArduino - DEBUG Using make %* + %DEBUG% Using make %* make %* exit /b 0 REM -------------------------------------------------------- @@ -132,8 +132,11 @@ REM setx will set a permanent path in the registry, but it won't take effect REM until the next invocation of cmd.exe REM setx PATH %bin%;%etc% REM -%DEBUG% echoing PATH %PATH%;%bin%;%etc% -PATH %%PATH%%;%bin%;%etc% +%DEBUG% adding arduin bin and etc to PATH %bin%;%etc% +call :shorten "%bin%" +PATH %PATH%;!shortout! +call :shorten "%etc%" +PATH %PATH%;!shortout! %DEBUG% Have utils = %utils% @@ -143,7 +146,8 @@ IF %utils% NEQ "" ( call :which make.exe if "%gotwhich%" EQU "" ( echo Found Make at %utils% - PATH %%PATH%%;%bin%;%etc%;%utils% + call :shorten %utils% + PATH %PATH%;!shortout! ) ) call :clearerrors @@ -205,4 +209,13 @@ REM Clear the ERRORLEVEL to 0, if it happened to be set :clearerrors exit /b 0 + +REM ---------------------------------------------------------------------- + +REM Shorten a pathname to 8.3 format filenames. + +:shorten + set shortout=%~s1 + exit /b 0 + :eof