feat: Add toolbar icon configuration and update handling for Agravity
Some checks are pending
Tests & Quality Checks / Test on Python 3.11 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.10 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-2 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-2 (push) Waiting to run
Tests & Quality Checks / Build Artifacts (push) Blocked by required conditions
Tests & Quality Checks / Build Artifacts-1 (push) Blocked by required conditions
Some checks are pending
Tests & Quality Checks / Test on Python 3.11 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-1 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.10 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.11-2 (push) Waiting to run
Tests & Quality Checks / Test on Python 3.12-2 (push) Waiting to run
Tests & Quality Checks / Build Artifacts (push) Blocked by required conditions
Tests & Quality Checks / Build Artifacts-1 (push) Blocked by required conditions
This commit is contained in:
parent
eab1009d8c
commit
df76cb9b36
8 changed files with 112 additions and 15 deletions
|
|
@ -29,6 +29,10 @@ class BrandConfig:
|
|||
dialog_bmp: Path
|
||||
banner_bmp: Path
|
||||
license_rtf: Path
|
||||
toolbar_icon_home: str
|
||||
toolbar_icon_reload: str
|
||||
toolbar_icon_open: str
|
||||
toolbar_icon_openwith: str
|
||||
|
||||
def windows_installer_name(self, version: str) -> str:
|
||||
return f"{self.asset_prefix}-{version}-win-x64.msi"
|
||||
|
|
@ -58,6 +62,10 @@ DEFAULT_BRAND_VALUES: dict[str, Any] = {
|
|||
"dialog_bmp": "resources/icons/background.bmp",
|
||||
"banner_bmp": "resources/icons/banner.bmp",
|
||||
"license_rtf": "resources/license.rtf",
|
||||
"toolbar_icon_home": "resources/icons/home.ico",
|
||||
"toolbar_icon_reload": "resources/icons/reload.ico",
|
||||
"toolbar_icon_open": "resources/icons/open.ico",
|
||||
"toolbar_icon_openwith": "resources/icons/openwith.ico",
|
||||
}
|
||||
|
||||
DEFAULT_BRAND_ID = str(DEFAULT_BRAND_VALUES["brand_id"])
|
||||
|
|
@ -125,6 +133,18 @@ def load_brand_config(
|
|||
dialog_bmp=resolve_asset("dialog_bmp"),
|
||||
banner_bmp=resolve_asset("banner_bmp"),
|
||||
license_rtf=resolve_asset("license_rtf"),
|
||||
toolbar_icon_home=str(
|
||||
values.get("toolbar_icon_home", DEFAULT_BRAND_VALUES["toolbar_icon_home"])
|
||||
),
|
||||
toolbar_icon_reload=str(
|
||||
values.get("toolbar_icon_reload", DEFAULT_BRAND_VALUES["toolbar_icon_reload"])
|
||||
),
|
||||
toolbar_icon_open=str(
|
||||
values.get("toolbar_icon_open", DEFAULT_BRAND_VALUES["toolbar_icon_open"])
|
||||
),
|
||||
toolbar_icon_openwith=str(
|
||||
values.get("toolbar_icon_openwith", DEFAULT_BRAND_VALUES["toolbar_icon_openwith"])
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -272,6 +292,10 @@ def cli_env(args: argparse.Namespace) -> int:
|
|||
"WEBDROP_UPDATE_CHANNEL": brand.update_channel,
|
||||
"WEBDROP_ICON_ICO": str(brand.icon_ico),
|
||||
"WEBDROP_ICON_ICNS": str(brand.icon_icns),
|
||||
"WEBDROP_TOOLBAR_ICON_HOME": brand.toolbar_icon_home,
|
||||
"WEBDROP_TOOLBAR_ICON_RELOAD": brand.toolbar_icon_reload,
|
||||
"WEBDROP_TOOLBAR_ICON_OPEN": brand.toolbar_icon_open,
|
||||
"WEBDROP_TOOLBAR_ICON_OPENWITH": brand.toolbar_icon_openwith,
|
||||
}
|
||||
for key, value in assignments.items():
|
||||
print(f'export {key}="{value}"')
|
||||
|
|
@ -324,6 +348,10 @@ def cli_show(args: argparse.Namespace) -> int:
|
|||
"config_dir_name": brand.config_dir_name,
|
||||
"msi_upgrade_code": brand.msi_upgrade_code,
|
||||
"update_channel": brand.update_channel,
|
||||
"toolbar_icon_home": brand.toolbar_icon_home,
|
||||
"toolbar_icon_reload": brand.toolbar_icon_reload,
|
||||
"toolbar_icon_open": brand.toolbar_icon_open,
|
||||
"toolbar_icon_openwith": brand.toolbar_icon_openwith,
|
||||
},
|
||||
indent=2,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -211,6 +211,10 @@ build_executable() {
|
|||
echo "BRAND_ID=\"$WEBDROP_BRAND_ID\""
|
||||
echo "APP_CONFIG_DIR_NAME=\"$WEBDROP_CONFIG_DIR_NAME\""
|
||||
echo "UPDATE_CHANNEL=\"$WEBDROP_UPDATE_CHANNEL\""
|
||||
echo "TOOLBAR_ICON_HOME=\"$WEBDROP_TOOLBAR_ICON_HOME\""
|
||||
echo "TOOLBAR_ICON_RELOAD=\"$WEBDROP_TOOLBAR_ICON_RELOAD\""
|
||||
echo "TOOLBAR_ICON_OPEN=\"$WEBDROP_TOOLBAR_ICON_OPEN\""
|
||||
echo "TOOLBAR_ICON_OPENWITH=\"$WEBDROP_TOOLBAR_ICON_OPENWITH\""
|
||||
} >> "$BUNDLED_ENV_FILE"
|
||||
|
||||
# Export env file for spec file to pick up
|
||||
|
|
|
|||
|
|
@ -113,6 +113,10 @@ class WindowsBuilder:
|
|||
"BRAND_ID": self.brand.brand_id,
|
||||
"APP_CONFIG_DIR_NAME": self.brand.config_dir_name,
|
||||
"UPDATE_CHANNEL": self.brand.update_channel,
|
||||
"TOOLBAR_ICON_HOME": self.brand.toolbar_icon_home,
|
||||
"TOOLBAR_ICON_RELOAD": self.brand.toolbar_icon_reload,
|
||||
"TOOLBAR_ICON_OPEN": self.brand.toolbar_icon_open,
|
||||
"TOOLBAR_ICON_OPENWITH": self.brand.toolbar_icon_openwith,
|
||||
}
|
||||
|
||||
output_env = self.temp_dir / ".env"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue