enhance the installer (#2299)

1. create_installers.sh now asks before tagging and committing the
   current repo
2. trailing whitespace removed from user-provided location of invokeai
   directory in install.bat
This commit is contained in:
Lincoln Stein 2023-01-14 19:28:14 -05:00 committed by GitHub
parent c73434c2a3
commit 746e97ea1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 8 deletions

View File

@ -9,15 +9,20 @@ VERSION="v${VERSION}${PATCH}"
echo "Be certain that you're in the 'installer' directory before continuing." echo "Be certain that you're in the 'installer' directory before continuing."
read -p "Press any key to continue, or CTRL-C to exit..." read -p "Press any key to continue, or CTRL-C to exit..."
git commit -a read -e -p "Commit and tag this repo with ${VERSION} and 'latest'? [n]: " input
RESPONSE=${input:='n'}
if [ "$RESPONSE" == 'y' ]; then
if ! git tag $VERSION ; then git commit -a
if ! git tag $VERSION ; then
echo "Existing/invalid tag" echo "Existing/invalid tag"
exit -1 exit -1
fi fi
git push origin :refs/tags/latest git push origin :refs/tags/latest
git tag -fa latest git tag -fa latest
fi
echo Building installer zip fles for InvokeAI $VERSION echo Building installer zip fles for InvokeAI $VERSION

View File

@ -33,7 +33,7 @@ echo 1. Install python 3.9 or higher.
echo 2. Double-click on the file WinLongPathsEnabled.reg in order to echo 2. Double-click on the file WinLongPathsEnabled.reg in order to
echo enable long path support on your system. echo enable long path support on your system.
echo 3. Install the Visual C++ core libraries. echo 3. Install the Visual C++ core libraries.
echo Pleaase download and install the libraries from: echo Please download and install the libraries from:
echo https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170 echo https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170
echo. echo.
echo See %INSTRUCTIONS% for more details. echo See %INSTRUCTIONS% for more details.
@ -78,6 +78,7 @@ set "selection="
set /p selection=Select the path to install InvokeAI's directory into [%UserProfile%]: set /p selection=Select the path to install InvokeAI's directory into [%UserProfile%]:
if not defined selection set selection=%UserProfile% if not defined selection set selection=%UserProfile%
set selection=%selection:"=% set selection=%selection:"=%
call :Trim selection !selection!
set dest="%selection%\invokeai" set dest="%selection%\invokeai"
if exist %dest% ( if exist %dest% (
set response=y set response=y
@ -96,6 +97,8 @@ goto :pick_rootdir
set rootdir=%rootdir:"=% set rootdir=%rootdir:"=%
@rem ---------------------- Initialize the runtime directory --------------------- @rem ---------------------- Initialize the runtime directory ---------------------
echo. echo.
echo *** Creating Runtime Directory %rootdir% *** echo *** Creating Runtime Directory %rootdir% ***
@ -150,6 +153,7 @@ if %errorlevel% neq 0 (
goto :err_exit goto :err_exit
) )
POPD POPD
copy .\templates\invoke.bat.in "%rootdir%\invoke.bat" copy .\templates\invoke.bat.in "%rootdir%\invoke.bat"
copy .\templates\update.bat.in "%rootdir%\update.bat" copy .\templates\update.bat.in "%rootdir%\update.bat"
@ -217,3 +221,10 @@ pause
exit /b exit /b
pause pause
:Trim
SetLocal EnableDelayedExpansion
set Params=%*
for /f "tokens=1*" %%a in ("!Params!") do EndLocal & set %1=%%b
exit /b