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
|
|
@ -200,8 +200,21 @@ build_executable() {
|
|||
log_info "Building macOS executable with PyInstaller..."
|
||||
echo ""
|
||||
|
||||
# Create bundled runtime .env with brand defaults so first launch
|
||||
# uses brand-specific app name and config directory.
|
||||
BUNDLED_ENV_FILE="$TEMP_BUILD/.env"
|
||||
cp "$ENV_FILE" "$BUNDLED_ENV_FILE"
|
||||
{
|
||||
echo ""
|
||||
echo "# Brand-specific defaults added during packaging"
|
||||
echo "APP_NAME=\"$WEBDROP_APP_DISPLAY_NAME\""
|
||||
echo "BRAND_ID=\"$WEBDROP_BRAND_ID\""
|
||||
echo "APP_CONFIG_DIR_NAME=\"$WEBDROP_CONFIG_DIR_NAME\""
|
||||
echo "UPDATE_CHANNEL=\"$WEBDROP_UPDATE_CHANNEL\""
|
||||
} >> "$BUNDLED_ENV_FILE"
|
||||
|
||||
# Export env file for spec file to pick up
|
||||
export WEBDROP_ENV_FILE="$ENV_FILE"
|
||||
export WEBDROP_ENV_FILE="$BUNDLED_ENV_FILE"
|
||||
export WEBDROP_VERSION="$VERSION"
|
||||
export WEBDROP_BUNDLE_ID="$BUNDLE_IDENTIFIER"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue