Add brand-specific update channel and environment configuration
- Updated `brand_config.py` to include `WEBDROP_UPDATE_CHANNEL` in the environment variables. - Enhanced `build_macos.sh` to create a bundled `.env` file with brand-specific defaults, including the update channel. - Implemented a method in `build_windows.py` to create a bundled `.env` file for Windows builds, incorporating brand-specific runtime defaults. - Modified `config.py` to ensure the application can locate the `.env` file in various installation scenarios. - Added unit tests in `test_config.py` to verify the loading of the bootstrap `.env` from the PyInstaller runtime directory. - Generated new WiX object and script files for the Windows installer, including application shortcuts and registry entries.
This commit is contained in:
parent
de6e9838e5
commit
eab1009d8c
9 changed files with 3083 additions and 2886 deletions
|
|
@ -408,7 +408,15 @@ class Config:
|
|||
candidate_paths.append(Path(env_file).resolve())
|
||||
else:
|
||||
if getattr(sys, "frozen", False):
|
||||
candidate_paths.append(Path(sys.executable).resolve().parent / ".env")
|
||||
exe_dir = Path(sys.executable).resolve().parent
|
||||
# One-folder fallback: some packagers place data files in _internal.
|
||||
candidate_paths.append(exe_dir / ".env")
|
||||
candidate_paths.append(exe_dir / "_internal" / ".env")
|
||||
|
||||
# PyInstaller runtime extraction directory (one-file and one-folder).
|
||||
meipass = getattr(sys, "_MEIPASS", None)
|
||||
if meipass:
|
||||
candidate_paths.append(Path(meipass).resolve() / ".env")
|
||||
|
||||
candidate_paths.append(Path.cwd() / ".env")
|
||||
candidate_paths.append(Path(__file__).resolve().parents[2] / ".env")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue