|
32 | 32 | Building into an exe (on Windows):
|
33 | 33 | - pipx install pyinstaller (note: you can try without pipx, but this didn't work for me)
|
34 | 34 | - Run:
|
35 |
| - - CMD: `pyinstaller --onefile --name install-betterfox install.py && move %cd%\dist\install-betterfox.exe %cd% && del install-betterfox.spec && rmdir /S /Q build && rmdir dist` |
| 35 | + - CMD: `pyinstaller --onefile --name install-betterfox install.py && move %cd%\\dist\\install-betterfox.exe %cd% && del install-betterfox.spec && rmdir /S /Q build && rmdir dist` |
36 | 36 | - BASH: `pyinstaller --onefile --name install-betterfox install.py && && mv dist/install-betterfox.exe . && rm install-betterfox.spec && rm -rf ./build/ && rmdir dist`
|
37 | 37 | (Sorry, didn't want to add a .gitignore solely for the install script)
|
38 | 38 | - Done!
|
@@ -66,12 +66,25 @@ def _get_default_profile_folder():
|
66 | 66 | config_parser = ConfigParser(strict=False)
|
67 | 67 | config_parser.read(config_path)
|
68 | 68 |
|
| 69 | + path = None |
69 | 70 | for section in config_parser.sections():
|
70 | 71 | if "Default" in config_parser[section]:
|
71 |
| - if config_parser[section]["Default"] == "1": |
72 |
| - print("Default detected: " + section) |
73 |
| - return FIREFOX_ROOT.joinpath(config_parser[section]["Path"]) |
74 |
| - |
| 72 | + section_default_value = config_parser[section]["Default"] |
| 73 | + if section_default_value: |
| 74 | + print("Default detected from section: " + section) |
| 75 | + # Confirm whether a 0 value is possible, keep fallback until then |
| 76 | + if section_default_value == "0": |
| 77 | + continue |
| 78 | + if section_default_value == "1": |
| 79 | + path = config_parser[section]["Path"] |
| 80 | + else: |
| 81 | + path = section_default_value |
| 82 | + break |
| 83 | + |
| 84 | + if path is not None: |
| 85 | + return FIREFOX_ROOT.joinpath(path) |
| 86 | + else: |
| 87 | + raise Exception("Could not determine default Firefox profile! Exiting...") |
75 | 88 |
|
76 | 89 | def _get_releases(repository_owner, repository_name):
|
77 | 90 | releases = []
|
|
0 commit comments