Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion install_executorch.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@ECHO OFF
setlocal EnableDelayedExpansion

rem Copyright (c) Meta Platforms, Inc. and affiliates.
rem All rights reserved.
Expand All @@ -7,9 +8,24 @@ rem This batch file provides a basic functionality similar to the bash script.

cd /d "%~dp0"

rem Verify that Git checked out symlinks correctly. Without this the Python install
rem will fail when attempting to copy files from src\executorch.
where git >NUL 2>&1
if not errorlevel 1 (
set "GIT_SYMLINKS="
for /f "usebackq delims=" %%i in (`git config --get core.symlinks 2^>nul`) do set "GIT_SYMLINKS=%%i"
if /I not "!GIT_SYMLINKS!"=="true" (
echo ExecuTorch requires Git symlink support on Windows.
echo Enable Developer Mode and run: git config --global core.symlinks true
echo Re-clone the repository after enabling symlinks, then rerun install_executorch.bat.
exit /b 1
)
)

rem Under windows, it's always python
set PYTHON_EXECUTABLE=python

"%PYTHON_EXECUTABLE%" install_executorch.py %*

exit /b %ERRORLEVEL%
set "EXIT_CODE=%ERRORLEVEL%"
endlocal & exit /b %EXIT_CODE%
Loading