Upload UmeAiRT-Install-ComfyUI.bat
Browse files- UmeAiRT-Install-ComfyUI.bat +77 -56
UmeAiRT-Install-ComfyUI.bat
CHANGED
|
@@ -1,57 +1,78 @@
|
|
| 1 |
-
@echo off
|
| 2 |
-
setlocal
|
| 3 |
-
|
| 4 |
-
:: ============================================================================
|
| 5 |
-
:: Section 1:
|
| 6 |
-
:: ============================================================================
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
::
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
echo
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
set "
|
| 29 |
-
|
| 30 |
-
::
|
| 31 |
-
if
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
:
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
pause
|
|
|
|
| 1 |
+
@echo off
|
| 2 |
+
setlocal
|
| 3 |
+
|
| 4 |
+
:: ============================================================================
|
| 5 |
+
:: Section 1: Set Installation Path (Modified)
|
| 6 |
+
:: ============================================================================
|
| 7 |
+
title UmeAiRT ComfyUI Installer
|
| 8 |
+
echo.
|
| 9 |
+
cls
|
| 10 |
+
echo ============================================================================
|
| 11 |
+
echo Welcome to the UmeAiRT ComfyUI Installer
|
| 12 |
+
echo ============================================================================
|
| 13 |
+
echo.
|
| 14 |
+
|
| 15 |
+
:: 1. Define the default path (the current directory)
|
| 16 |
+
set "DefaultPath=%~dp0"
|
| 17 |
+
if "%DefaultPath:~-1%"=="\" set "DefaultPath=%DefaultPath:~0,-1%"
|
| 18 |
+
|
| 19 |
+
echo Where would you like to install ComfyUI?
|
| 20 |
+
echo.
|
| 21 |
+
echo Current path: %DefaultPath%
|
| 22 |
+
echo.
|
| 23 |
+
echo Press ENTER to use the current path.
|
| 24 |
+
echo Or, enter a full path (e.g., D:\ComfyUI) and press ENTER.
|
| 25 |
+
echo.
|
| 26 |
+
|
| 27 |
+
:: 2. Prompt the user
|
| 28 |
+
set /p "InstallPath=Enter installation path: "
|
| 29 |
+
|
| 30 |
+
:: 3. If user entered nothing, use the default
|
| 31 |
+
if "%InstallPath%"=="" (
|
| 32 |
+
set "InstallPath=%DefaultPath%"
|
| 33 |
+
)
|
| 34 |
+
|
| 35 |
+
:: 4. Clean up the final path (in case the user added a trailing \)
|
| 36 |
+
if "%InstallPath:~-1%"=="\" set "InstallPath=%InstallPath:~0,-1%"
|
| 37 |
+
|
| 38 |
+
echo.
|
| 39 |
+
echo [INFO] Installing to: %InstallPath%
|
| 40 |
+
echo Press any key to begin...
|
| 41 |
+
pause > nul
|
| 42 |
+
|
| 43 |
+
:: ============================================================================
|
| 44 |
+
:: Section 2: Bootstrap downloader for all scripts (Original logic)
|
| 45 |
+
:: ============================================================================
|
| 46 |
+
|
| 47 |
+
set "ScriptsFolder=%InstallPath%\scripts"
|
| 48 |
+
set "BootstrapScript=%ScriptsFolder%\Bootstrap-Downloader.ps1"
|
| 49 |
+
set "BootstrapUrl=https://github.com/UmeAiRT/ComfyUI-Auto_installer/raw/feature-conda-integration/scripts/Bootstrap-Downloader.ps1"
|
| 50 |
+
|
| 51 |
+
:: Create scripts folder if it doesn't exist
|
| 52 |
+
if not exist "%ScriptsFolder%" (
|
| 53 |
+
echo [INFO] Creating the scripts folder: %ScriptsFolder%
|
| 54 |
+
mkdir "%ScriptsFolder%"
|
| 55 |
+
)
|
| 56 |
+
|
| 57 |
+
:: Download the bootstrap script
|
| 58 |
+
echo [INFO] Downloading the bootstrap script...
|
| 59 |
+
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri '%BootstrapUrl%' -OutFile '%BootstrapScript%'"
|
| 60 |
+
|
| 61 |
+
:: Run the bootstrap script to download all other files
|
| 62 |
+
echo [INFO] Running the bootstrap script to download all required files...
|
| 63 |
+
:: Pass the clean install path to the PowerShell script.
|
| 64 |
+
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%BootstrapScript%" -InstallPath "%InstallPath%"
|
| 65 |
+
echo [OK] Bootstrap download complete.
|
| 66 |
+
echo.
|
| 67 |
+
|
| 68 |
+
:: ============================================================================
|
| 69 |
+
:: Section 3: Running the main installation script (Original logic)
|
| 70 |
+
:: ============================================================================
|
| 71 |
+
echo [INFO] Launching the main installation script...
|
| 72 |
+
echo.
|
| 73 |
+
:: Pass the clean install path to the PowerShell script.
|
| 74 |
+
powershell.exe -ExecutionPolicy Bypass -File "%ScriptsFolder%\Install-ComfyUI-Phase1.ps1" -InstallPath "%InstallPath%"
|
| 75 |
+
|
| 76 |
+
echo.
|
| 77 |
+
echo [INFO] The script execution is complete.
|
| 78 |
pause
|