diff --git a/build.spec b/build.spec index e900b04..c8067c3 100644 --- a/build.spec +++ b/build.spec @@ -33,6 +33,8 @@ a = Analysis( ('new_tempemail.py', '.'), ('quit_cursor.py', '.'), ('cursor_register_manual.py', '.'), + ('oauth_auth.py', '.'), + ('utils.py', '.'), ('.env', '.'), ('block_domain.txt', '.') ], @@ -42,7 +44,9 @@ a = Analysis( 'new_signup', 'new_tempemail', 'quit_cursor', - 'cursor_register_manual' + 'cursor_register_manual', + 'oauth_auth', + 'utils' ], hookspath=[], hooksconfig={}, diff --git a/utils.py b/utils.py index ca9b2d1..5b3873e 100644 --- a/utils.py +++ b/utils.py @@ -13,6 +13,15 @@ def get_user_documents_path(): def get_default_chrome_path(): """Get default Chrome path""" if sys.platform == "win32": + # Trying to find chrome in PATH + try: + import shutil + chrome_in_path = shutil.which("chrome") + if chrome_in_path: + return chrome_in_path + except: + pass + # Going to default path return r"C:\Program Files\Google\Chrome\Application\chrome.exe" elif sys.platform == "darwin": return "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"