installer enhancements

- Detect when install failed for some reason and print helpful error
  message rather than stack trace.

- Detect window size and resize to minimum acceptable values to provide
  better display of configure and install forms.
This commit is contained in:
Lincoln Stein
2023-02-22 19:18:07 -05:00
parent 8b6196e0a2
commit 3083356cf0
5 changed files with 69 additions and 17 deletions

View File

@ -346,7 +346,21 @@ class InvokeAiInstance:
# NOTE: currently the config script does its own arg parsing! this means the command-line switches
# from the installer will also automatically propagate down to the config script.
# this may change in the future with config refactoring!
invokeai_configure.main()
succeeded = False
try:
invokeai_configure.main()
succeeded = True
except ConnectionError as e:
print(f'A network error was encountered during configuration and download: {str(e)}')
except OSError as e:
print(f'An OS error was encountered during configuration and download: {str(e)}')
except Exception as e:
print(f'A problem was encountered during the configuration and download steps: {str(e)}')
finally:
if not succeeded:
print('You may be able to finish the process by launching "invoke.sh" or "invoke.bat"')
print('from within the "invokeai" directory, and choosing options 5 and/or 6.')
print('Alternatively you can relaunch the installer.')
def install_user_scripts(self):
"""