diff --git a/scripts/bootstrap.bat b/scripts/bootstrap.bat index 5e1ddc97..afe4564e 100644 --- a/scripts/bootstrap.bat +++ b/scripts/bootstrap.bat @@ -9,6 +9,7 @@ @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 @rem figure out whether git and conda needs to be installed @@ -16,7 +17,9 @@ if exist "%INSTALL_ENV_DIR%" set PATH=%INSTALL_ENV_DIR%;%INSTALL_ENV_DIR%\Librar set PACKAGES_TO_INSTALL= -if not exist "%INSTALL_ENV_DIR%\etc\profile.d\conda.sh" set PACKAGES_TO_INSTALL=%PACKAGES_TO_INSTALL% conda +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 +) call git --version >.tmp1 2>.tmp2 if "%ERRORLEVEL%" NEQ "0" set PACKAGES_TO_INSTALL=%PACKAGES_TO_INSTALL% git diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index b1a153fb..936af41f 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -27,6 +27,7 @@ if [ "$OS_NAME" == "linux" ] && [ "$OS_ARCH" == "arm64" ]; then OS_ARCH="aarch64 # config export MAMBA_ROOT_PREFIX="$(pwd)/installer_files/mamba" INSTALL_ENV_DIR="$(pwd)/installer_files/env" +LEGACY_INSTALL_ENV_DIR="$(pwd)/installer/env" MICROMAMBA_DOWNLOAD_URL="https://micro.mamba.pm/api/micromamba/${OS_NAME}-${OS_ARCH}/latest" # figure out whether git and conda needs to be installed @@ -34,7 +35,7 @@ if [ -e "$INSTALL_ENV_DIR" ]; then export PATH="$INSTALL_ENV_DIR/bin:$PATH"; fi PACKAGES_TO_INSTALL="" -if [ ! -e "$INSTALL_ENV_DIR/etc/profile.d/conda.sh" ]; then PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL conda"; fi +if [ ! -e "$LEGACY_INSTALL_ENV_DIR/etc/profile.d/conda.sh" ] && [ ! -e "$INSTALL_ENV_DIR/etc/profile.d/conda.sh" ]; then PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL conda"; fi if ! hash "git" &>/dev/null; then PACKAGES_TO_INSTALL="$PACKAGES_TO_INSTALL git"; fi # (if necessary) install git and conda into a contained environment