Update Git-Python_embeded.bat
Browse files- Git-Python_embeded.bat +49 -47
Git-Python_embeded.bat
CHANGED
|
@@ -1,48 +1,50 @@
|
|
| 1 |
-
@echo off
|
| 2 |
-
setlocal
|
| 3 |
-
chcp 65001 > nul
|
| 4 |
-
set target_dir=%~dp0
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
call :ColorText "
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
%py%python.exe -
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
rem %py%
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
|
|
|
|
|
|
| 48 |
exit /b
|
|
|
|
| 1 |
+
@echo off
|
| 2 |
+
setlocal
|
| 3 |
+
chcp 65001 > nul
|
| 4 |
+
set target_dir=%~dp0
|
| 5 |
+
set py=%target_dir%python_embeded\
|
| 6 |
+
set PATH=%target_dir%git\;%target_dir%git\bin\;%target_dir%git\libexec\;%py%;%py%Scripts\
|
| 7 |
+
|
| 8 |
+
call :ColorText "=============================================================" "Yellow"
|
| 9 |
+
call :ColorText ".bat file for installing git/python for ComfyUI by Skiffbox" "Green"
|
| 10 |
+
|
| 11 |
+
call :ColorText "=============================================================" "Yellow"
|
| 12 |
+
%target_dir%wget.exe -c -q -O git.zip https://huggingface.co/iRedHat/iBat-ComfyUI/resolve/main/git.zip
|
| 13 |
+
rem https://github.com/git-for-windows/git-for-windows.github.io
|
| 14 |
+
call :ColorText "Download git.zip" "Green"
|
| 15 |
+
set "zipfile=%target_dir%git.zip"
|
| 16 |
+
set "dest=%target_dir%git"
|
| 17 |
+
echo UnZip git.zip
|
| 18 |
+
powershell -command "Expand-Archive -Path '%zipfile%' -DestinationPath '%dest%'"
|
| 19 |
+
del /f /q "%target_dir%git.zip"
|
| 20 |
+
call :ColorText "Install git complete" "Green"
|
| 21 |
+
|
| 22 |
+
cd %target_dir%
|
| 23 |
+
%target_dir%wget.exe -c -q -O python_embeded.zip https://www.python.org/ftp/python/3.11.9/python-3.11.9-embed-amd64.zip
|
| 24 |
+
call :ColorText "Download python_embeded.zip" "Green"
|
| 25 |
+
set "zipfile1=%target_dir%python_embeded.zip"
|
| 26 |
+
set "dest1=%target_dir%python_embeded"
|
| 27 |
+
echo UnZip python_embeded.zip
|
| 28 |
+
powershell -command "Expand-Archive -Path '%zipfile1%' -DestinationPath '%dest1%'"
|
| 29 |
+
del /f /q "%target_dir%python_embeded.zip"
|
| 30 |
+
mv %py%python311._pth %py%python311.pth
|
| 31 |
+
echo import site>> %py%python311.pth
|
| 32 |
+
mkdir %py%DLLs
|
| 33 |
+
|
| 34 |
+
%target_dir%wget.exe -c -q -O get-pip.py https://bootstrap.pypa.io/get-pip.py
|
| 35 |
+
%py%python.exe get-pip.py
|
| 36 |
+
del /f /q "%target_dir%get-pip.py"
|
| 37 |
+
%py%python.exe -m pip install virtualenv
|
| 38 |
+
rem %py%python.exe -m virtualenv %py%testenv
|
| 39 |
+
rem cp %py%python311.zip %py%testenv\Scripts\
|
| 40 |
+
rem %py%testenv\Scripts\Activate.ps1
|
| 41 |
+
|
| 42 |
+
endlocal
|
| 43 |
+
exit /b
|
| 44 |
+
|
| 45 |
+
:ColorText
|
| 46 |
+
setlocal
|
| 47 |
+
set text=%~1
|
| 48 |
+
set color=%~2
|
| 49 |
+
powershell -NoProfile -ExecutionPolicy Bypass -Command "Write-Host '%text%' -ForegroundColor %color%"
|
| 50 |
exit /b
|