-@rem ***********************************************************************
-@rem * *
-@rem * OCaml *
-@rem * *
-@rem * David Allsopp, OCaml Labs, Cambridge. *
-@rem * *
-@rem * Copyright 2017 MetaStack Solutions Ltd. *
-@rem * *
-@rem * All rights reserved. This file is distributed under the terms of *
-@rem * the GNU Lesser General Public License version 2.1, with the *
-@rem * special exception on linking described in the file LICENSE. *
-@rem * *
-@rem ***********************************************************************
-
-@rem BE CAREFUL ALTERING THIS FILE TO ENSURE THAT ERRORS PROPAGATE
-@rem IF A COMMAND SHOULD FAIL IT PROBABLY NEEDS TO END WITH
-@rem || exit /b 1
-@rem BASICALLY, DO THE TESTING IN BASH...
-
-@rem Do not call setlocal!
-@echo off
-
-goto %1
-
-goto :EOF
-
-:CheckPackage
-"%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %1" | findstr %1 > nul
-if %ERRORLEVEL% equ 1 (
- echo Cygwin package %1 will be installed
- set CYGWIN_INSTALL_PACKAGES=%CYGWIN_INSTALL_PACKAGES%,%1
-)
-goto :EOF
-
-:UpgradeCygwin
-if "%CYGWIN_INSTALL_PACKAGES%" neq "" "%CYG_ROOT%\setup-x86_64.exe" --quiet-mode --no-shortcuts --no-startmenu --no-desktop --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --packages %CYGWIN_INSTALL_PACKAGES:~1% > nul
-for %%P in (%CYGWIN_COMMANDS%) do "%CYG_ROOT%\bin\%%P.exe" --version > nul || set CYGWIN_UPGRADE_REQUIRED=1
-"%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %CYGWIN_PACKAGES%"
-if %CYGWIN_UPGRADE_REQUIRED% equ 1 (
- echo Cygwin package upgrade required - please go and drink coffee
- "%CYG_ROOT%\setup-x86_64.exe" --quiet-mode --no-shortcuts --no-startmenu --no-desktop --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --upgrade-also > nul
- "%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %CYGWIN_PACKAGES%"
-)
-goto :EOF
-
-:install
-chcp 65001 > nul
-rem This must be kept in sync with appveyor_build.sh
-set BUILD_PREFIX=🐫реализация
-git worktree add "..\%BUILD_PREFIX%-%PORT%" -b appveyor-build-%PORT%
-if "%PORT%" equ "msvc64" (
- git worktree add "..\%BUILD_PREFIX%-msvc32" -b appveyor-build-%PORT%32
-)
-
-cd "..\%BUILD_PREFIX%-%PORT%"
-if "%PORT%" equ "mingw32" (
- git submodule update --init flexdll
-)
-
-cd "%APPVEYOR_BUILD_FOLDER%"
-appveyor DownloadFile "https://github.com/alainfrisch/flexdll/archive/0.37.tar.gz" -FileName "flexdll.tar.gz" || exit /b 1
-appveyor DownloadFile "https://github.com/alainfrisch/flexdll/releases/download/0.37/flexdll-bin-0.37.zip" -FileName "flexdll.zip" || exit /b 1
-rem flexdll.zip is processed here, rather than in appveyor_build.sh because the
-rem unzip command comes from MSYS2 (via Git for Windows) and it has to be
-rem invoked via cmd /c in a bash script which is weird(er).
-mkdir "%APPVEYOR_BUILD_FOLDER%\..\flexdll"
-move flexdll.zip "%APPVEYOR_BUILD_FOLDER%\..\flexdll"
-cd "%APPVEYOR_BUILD_FOLDER%\..\flexdll" && unzip -q flexdll.zip
-
-rem CYGWIN_PACKAGES is the list of required Cygwin packages (cygwin is included
-rem in the list just so that the Cygwin version is always displayed on the log).
-rem CYGWIN_COMMANDS is a corresponding command to run with --version to test
-rem whether the package works. This is used to verify whether the installation
-rem needs upgrading.
-set CYGWIN_PACKAGES=cygwin make diffutils
-set CYGWIN_COMMANDS=cygcheck make diff
-if "%PORT%" equ "mingw32" (
- set CYGWIN_PACKAGES=%CYGWIN_PACKAGES% mingw64-i686-gcc-core
- set CYGWIN_COMMANDS=%CYGWIN_COMMANDS% i686-w64-mingw32-gcc
-)
-
-set CYGWIN_INSTALL_PACKAGES=
-set CYGWIN_UPGRADE_REQUIRED=0
-
-for %%P in (%CYGWIN_PACKAGES%) do call :CheckPackage %%P
-call :UpgradeCygwin
-
-"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh install" || exit /b 1
-
-goto :EOF
-
-:build
-if "%PORT%" equ "msvc64" (
- setlocal
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
-)
-rem Do the main build (either msvc64 or mingw32)
-"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh" || exit /b 1
-
-if "%PORT%" neq "msvc64" goto :EOF
-
-rem Reconfigure the environment and run the msvc32 partial build
-endlocal
-call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86
-"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh msvc32-only" || exit /b 1
-goto :EOF
-
-:test
-rem Reconfigure the environment for the msvc64 build
-call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
-"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh test" || exit /b 1
-goto :EOF
+@rem ***********************************************************************\r
+@rem * *\r
+@rem * OCaml *\r
+@rem * *\r
+@rem * David Allsopp, OCaml Labs, Cambridge. *\r
+@rem * *\r
+@rem * Copyright 2017 MetaStack Solutions Ltd. *\r
+@rem * *\r
+@rem * All rights reserved. This file is distributed under the terms of *\r
+@rem * the GNU Lesser General Public License version 2.1, with the *\r
+@rem * special exception on linking described in the file LICENSE. *\r
+@rem * *\r
+@rem ***********************************************************************\r
+\r
+@rem BE CAREFUL ALTERING THIS FILE TO ENSURE THAT ERRORS PROPAGATE\r
+@rem IF A COMMAND SHOULD FAIL IT PROBABLY NEEDS TO END WITH\r
+@rem || exit /b 1\r
+@rem BASICALLY, DO THE TESTING IN BASH...\r
+\r
+@rem Do not call setlocal!\r
+@echo off\r
+\r
+goto %1\r
+\r
+goto :EOF\r
+\r
+:CheckPackage\r
+"%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %1" | findstr %1 > nul\r
+if %ERRORLEVEL% equ 1 (\r
+ echo Cygwin package %1 will be installed\r
+ set CYGWIN_INSTALL_PACKAGES=%CYGWIN_INSTALL_PACKAGES%,%1\r
+)\r
+goto :EOF\r
+\r
+:UpgradeCygwin\r
+if "%CYGWIN_INSTALL_PACKAGES%" neq "" "%CYG_ROOT%\setup-x86_64.exe" --quiet-mode --no-shortcuts --no-startmenu --no-desktop --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --packages %CYGWIN_INSTALL_PACKAGES:~1% > nul\r
+for %%P in (%CYGWIN_COMMANDS%) do "%CYG_ROOT%\bin\%%P.exe" --version > nul || set CYGWIN_UPGRADE_REQUIRED=1\r
+"%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %CYGWIN_PACKAGES%"\r
+if %CYGWIN_UPGRADE_REQUIRED% equ 1 (\r
+ echo Cygwin package upgrade required - please go and drink coffee\r
+ "%CYG_ROOT%\setup-x86_64.exe" --quiet-mode --no-shortcuts --no-startmenu --no-desktop --only-site --root "%CYG_ROOT%" --site "%CYG_MIRROR%" --local-package-dir "%CYG_CACHE%" --upgrade-also > nul\r
+ "%CYG_ROOT%\bin\bash.exe" -lc "cygcheck -dc %CYGWIN_PACKAGES%"\r
+)\r
+goto :EOF\r
+\r
+:install\r
+chcp 65001 > nul\r
+rem This must be kept in sync with appveyor_build.sh\r
+set BUILD_PREFIX=🐫реализация\r
+git worktree add "..\%BUILD_PREFIX%-%PORT%" -b appveyor-build-%PORT%\r
+if "%PORT%" equ "msvc64" (\r
+ git worktree add "..\%BUILD_PREFIX%-msvc32" -b appveyor-build-%PORT%32\r
+)\r
+\r
+cd "..\%BUILD_PREFIX%-%PORT%"\r
+if "%PORT%" equ "mingw32" (\r
+ git submodule update --init flexdll\r
+)\r
+\r
+cd "%APPVEYOR_BUILD_FOLDER%"\r
+appveyor DownloadFile "https://github.com/alainfrisch/flexdll/archive/0.37.tar.gz" -FileName "flexdll.tar.gz" || exit /b 1\r
+appveyor DownloadFile "https://github.com/alainfrisch/flexdll/releases/download/0.37/flexdll-bin-0.37.zip" -FileName "flexdll.zip" || exit /b 1\r
+rem flexdll.zip is processed here, rather than in appveyor_build.sh because the\r
+rem unzip command comes from MSYS2 (via Git for Windows) and it has to be\r
+rem invoked via cmd /c in a bash script which is weird(er).\r
+mkdir "%APPVEYOR_BUILD_FOLDER%\..\flexdll"\r
+move flexdll.zip "%APPVEYOR_BUILD_FOLDER%\..\flexdll"\r
+cd "%APPVEYOR_BUILD_FOLDER%\..\flexdll" && unzip -q flexdll.zip\r
+\r
+rem CYGWIN_PACKAGES is the list of required Cygwin packages (cygwin is included\r
+rem in the list just so that the Cygwin version is always displayed on the log).\r
+rem CYGWIN_COMMANDS is a corresponding command to run with --version to test\r
+rem whether the package works. This is used to verify whether the installation\r
+rem needs upgrading.\r
+set CYGWIN_PACKAGES=cygwin make diffutils\r
+set CYGWIN_COMMANDS=cygcheck make diff\r
+if "%PORT%" equ "mingw32" (\r
+ set CYGWIN_PACKAGES=%CYGWIN_PACKAGES% mingw64-i686-gcc-core\r
+ set CYGWIN_COMMANDS=%CYGWIN_COMMANDS% i686-w64-mingw32-gcc\r
+)\r
+\r
+set CYGWIN_INSTALL_PACKAGES=\r
+set CYGWIN_UPGRADE_REQUIRED=0\r
+\r
+for %%P in (%CYGWIN_PACKAGES%) do call :CheckPackage %%P\r
+call :UpgradeCygwin\r
+\r
+"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh install" || exit /b 1\r
+\r
+goto :EOF\r
+\r
+:build\r
+if "%PORT%" equ "msvc64" (\r
+ setlocal\r
+ call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"\r
+)\r
+rem Do the main build (either msvc64 or mingw32)\r
+"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh" || exit /b 1\r
+\r
+if "%PORT%" neq "msvc64" goto :EOF\r
+\r
+rem Reconfigure the environment and run the msvc32 partial build\r
+endlocal\r
+call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86\r
+"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh msvc32-only" || exit /b 1\r
+goto :EOF\r
+\r
+:test\r
+rem Reconfigure the environment for the msvc64 build\r
+call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"\r
+"%CYG_ROOT%\bin\bash.exe" -lec "$APPVEYOR_BUILD_FOLDER/tools/ci/appveyor/appveyor_build.sh test" || exit /b 1\r
+goto :EOF\r