From 459b9428d46d392d4b3452096d855ec18ce2658f Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 7 Mar 2023 21:16:05 +0530 Subject: [PATCH] Remove bootstrap.bat, since it's only needed during installation (and the current installer contains it, and this installer will soon be phased out) --- scripts/Start Stable Diffusion UI.cmd | 5 +- scripts/bootstrap.bat | 78 --------------------------- scripts/on_env_start.bat | 1 - 3 files changed, 1 insertion(+), 83 deletions(-) delete mode 100644 scripts/bootstrap.bat diff --git a/scripts/Start Stable Diffusion UI.cmd b/scripts/Start Stable Diffusion UI.cmd index d720328d..4f8555ea 100644 --- a/scripts/Start Stable Diffusion UI.cmd +++ b/scripts/Start Stable Diffusion UI.cmd @@ -25,15 +25,12 @@ if exist "on_sd_start.bat" ( @rem set legacy installer's PATH, if it exists if exist "installer" set PATH=%cd%\installer;%cd%\installer\Library\bin;%cd%\installer\Scripts;%cd%\installer\Library\usr\bin;%PATH% -@rem Setup the packages required for the installer -call scripts\bootstrap.bat - @rem set new installer's PATH, if it downloaded any packages if exist "installer_files\env" set PATH=%cd%\installer_files\env;%cd%\installer_files\env\Library\bin;%cd%\installer_files\env\Scripts;%cd%\installer_files\Library\usr\bin;%PATH% set PYTHONPATH=%cd%\installer;%cd%\installer_files\env -@rem Test the bootstrap +@rem Test the core requirements call where git call git --version diff --git a/scripts/bootstrap.bat b/scripts/bootstrap.bat deleted file mode 100644 index d3cdd19f..00000000 --- a/scripts/bootstrap.bat +++ /dev/null @@ -1,78 +0,0 @@ -@echo off -setlocal enabledelayedexpansion - -@rem This script will install git and conda (if not found on the PATH variable) -@rem using micromamba (an 8mb static-linked single-file binary, conda replacement). -@rem For users who already have git and conda, this step will be skipped. - -@rem This enables a user to install this project without manually installing conda and git. - -@rem config -set MAMBA_ROOT_PREFIX=%cd%\installer_files\mamba -set INSTALL_ENV_DIR=%cd%\installer_files\env -set LEGACY_INSTALL_ENV_DIR=%cd%\installer -set MICROMAMBA_DOWNLOAD_URL=https://github.com/cmdr2/stable-diffusion-ui/releases/download/v1.1/micromamba.exe -set umamba_exists=F - -set OLD_APPDATA=%APPDATA% -set OLD_USERPROFILE=%USERPROFILE% -set APPDATA=%cd%\installer_files\appdata -set USERPROFILE=%cd%\profile - -@rem figure out whether git and conda needs to be installed -if exist "%INSTALL_ENV_DIR%" set PATH=%INSTALL_ENV_DIR%;%INSTALL_ENV_DIR%\Library\bin;%INSTALL_ENV_DIR%\Scripts;%INSTALL_ENV_DIR%\Library\usr\bin;%PATH% - -set PACKAGES_TO_INSTALL= - -if not exist "%LEGACY_INSTALL_ENV_DIR%\etc\profile.d\conda.sh" ( - if not exist "%INSTALL_ENV_DIR%\etc\profile.d\conda.sh" set PACKAGES_TO_INSTALL=%PACKAGES_TO_INSTALL% conda python=3.8.5 -) - -call git --version >.tmp1 2>.tmp2 -if "!ERRORLEVEL!" NEQ "0" set PACKAGES_TO_INSTALL=%PACKAGES_TO_INSTALL% git - -call "%MAMBA_ROOT_PREFIX%\micromamba.exe" --version >.tmp1 2>.tmp2 -if "!ERRORLEVEL!" EQU "0" set umamba_exists=T - -@rem (if necessary) install git and conda into a contained environment -if "%PACKAGES_TO_INSTALL%" NEQ "" ( - @rem download micromamba - if "%umamba_exists%" == "F" ( - echo "Downloading micromamba from %MICROMAMBA_DOWNLOAD_URL% to %MAMBA_ROOT_PREFIX%\micromamba.exe" - - mkdir "%MAMBA_ROOT_PREFIX%" - call curl -Lk "%MICROMAMBA_DOWNLOAD_URL%" > "%MAMBA_ROOT_PREFIX%\micromamba.exe" - - if "!ERRORLEVEL!" NEQ "0" ( - echo "There was a problem downloading micromamba. Cannot continue." - pause - exit /b - ) - - mkdir "%APPDATA%" - mkdir "%USERPROFILE%" - - @rem test the mamba binary - echo Micromamba version: - call "%MAMBA_ROOT_PREFIX%\micromamba.exe" --version - ) - - @rem create the installer env - if not exist "%INSTALL_ENV_DIR%" ( - call "%MAMBA_ROOT_PREFIX%\micromamba.exe" create -y --prefix "%INSTALL_ENV_DIR%" - ) - - echo "Packages to install:%PACKAGES_TO_INSTALL%" - - call "%MAMBA_ROOT_PREFIX%\micromamba.exe" install -y --prefix "%INSTALL_ENV_DIR%" -c conda-forge %PACKAGES_TO_INSTALL% - - if not exist "%INSTALL_ENV_DIR%" ( - echo "There was a problem while installing%PACKAGES_TO_INSTALL% using micromamba. Cannot continue." - pause - exit /b - ) -) - -@rem revert to the old APPDATA. only needed it for bypassing a bug in micromamba (with special characters) -set APPDATA=%OLD_APPDATA% -set USERPROFILE=%OLD_USERPROFILE% diff --git a/scripts/on_env_start.bat b/scripts/on_env_start.bat index 5bc1885d..57dc5da0 100644 --- a/scripts/on_env_start.bat +++ b/scripts/on_env_start.bat @@ -52,7 +52,6 @@ if "%update_branch%"=="" ( @xcopy sd-ui-files\ui ui /s /i /Y /q @copy sd-ui-files\scripts\on_sd_start.bat scripts\ /Y -@copy sd-ui-files\scripts\bootstrap.bat scripts\ /Y @copy sd-ui-files\scripts\check_modules.py scripts\ /Y @copy "sd-ui-files\scripts\Start Stable Diffusion UI.cmd" . /Y @copy "sd-ui-files\scripts\Developer Console.cmd" . /Y