summaryrefslogtreecommitdiffstats
path: root/install.bat
diff options
context:
space:
mode:
authorGrafting Rayman <156515434+GraftingRayman@users.noreply.github.com>2025-01-17 11:06:44 +0000
committerGitHub <noreply@github.com>2025-01-17 11:06:44 +0000
commite6bd5af6a8e306a1cdef63402a77a980a04ad6e1 (patch)
treed0732226bbc22feedad9e834b2218d7d0b0eff54 /install.bat
parent495ffc4777522e40941753e3b1b79c02f84b25b4 (diff)
downloadComfyui-reactor-node-main.tar.gz
Add files via uploadHEADmain
Diffstat (limited to 'install.bat')
-rw-r--r--install.bat37
1 files changed, 37 insertions, 0 deletions
diff --git a/install.bat b/install.bat
new file mode 100644
index 0000000..6ddc7c0
--- /dev/null
+++ b/install.bat
@@ -0,0 +1,37 @@
+@echo off
+setlocal enabledelayedexpansion
+
+:: Try to use embedded python first
+if exist ..\..\..\python_embeded\python.exe (
+ :: Use the embedded python
+ set PYTHON=..\..\..\python_embeded\python.exe
+) else (
+ :: Embedded python not found, check for python in the PATH
+ for /f "tokens=* USEBACKQ" %%F in (`python --version 2^>^&1`) do (
+ set PYTHON_VERSION=%%F
+ )
+ if errorlevel 1 (
+ echo I couldn't find an embedded version of Python, nor one in the Windows PATH. Please install manually.
+ pause
+ exit /b 1
+ ) else (
+ :: Use python from the PATH (if it's the right version and the user agrees)
+ echo I couldn't find an embedded version of Python, but I did find !PYTHON_VERSION! in your Windows PATH.
+ echo Would you like to proceed with the install using that version? (Y/N^)
+ set /p USE_PYTHON=
+ if /i "!USE_PYTHON!"=="Y" (
+ set PYTHON=python
+ ) else (
+ echo Okay. Please install manually.
+ pause
+ exit /b 1
+ )
+ )
+)
+
+:: Install the package
+echo Installing...
+%PYTHON% install.py
+echo Done^!
+
+@pause \ No newline at end of file