iRedHat commited on
Commit
3678903
·
verified ·
1 Parent(s): b19b8b2

Update Git-Python_embeded.bat

Browse files
Files changed (1) hide show
  1. 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
- call :ColorText "=============================================================" "Yellow"
7
- call :ColorText ".bat file for installing git/python for ComfyUI by Skiffbox" "Green"
8
-
9
- call :ColorText "=============================================================" "Yellow"
10
- %target_dir%wget.exe -c -q -O git.zip https://huggingface.co/iRedHat/iBat-ComfyUI/resolve/main/git.zip
11
- rem https://github.com/git-for-windows/git-for-windows.github.io
12
- call :ColorText "Download git.zip" "Green"
13
- set "zipfile=%target_dir%git.zip"
14
- set "dest=%target_dir%git"
15
- echo UnZip git.zip
16
- powershell -command "Expand-Archive -Path '%zipfile%' -DestinationPath '%dest%'"
17
- del /f /q "%target_dir%git.zip"
18
- call :ColorText "Install git complete" "Green"
19
-
20
- cd %target_dir%
21
- %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
22
- call :ColorText "Download python_embeded.zip" "Green"
23
- set "zipfile1=%target_dir%python_embeded.zip"
24
- set "dest1=%target_dir%python_embeded"
25
- echo UnZip python_embeded.zip
26
- powershell -command "Expand-Archive -Path '%zipfile1%' -DestinationPath '%dest1%'"
27
- del /f /q "%target_dir%python_embeded.zip"
28
- mv %py%python311._pth %py%python311.pth
29
- echo import site>> %py%python311.pth
30
- mkdir %py%DLLs
31
-
32
- %target_dir%wget.exe -c -q -O get-pip.py https://bootstrap.pypa.io/get-pip.py
33
- %py%python.exe get-pip.py
34
- del /f /q "%target_dir%get-pip.py"
35
- %py%python.exe -m pip install virtualenv
36
- rem %py%python.exe -m virtualenv %py%testenv
37
- rem cp %py%python311.zip %py%testenv\Scripts\
38
- rem %py%testenv\Scripts\Activate.ps1
39
-
40
- endlocal
41
- exit /b
42
-
43
- :ColorText
44
- setlocal
45
- set text=%~1
46
- set color=%~2
47
- powershell -NoProfile -ExecutionPolicy Bypass -Command "Write-Host '%text%' -ForegroundColor %color%"
 
 
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