Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions print_designer/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ def make_chromium_executable(executable):


def find_or_download_chromium_executable():

"""Fetch from common site config, if present"""
site_config = frappe.get_common_site_config()
chromium_binary_path = site_config.get("chromium_binary_path", "")
if chromium_binary_path:
exec_path = Path(chromium_binary_path)
if exec_path.exists():
return str(exec_path)
else:
click.echo("Chromium is not available at the configured path. Downloading...")
download_chromium()

"""Finds the Chromium executable or downloads if not found."""
bench_path = frappe.utils.get_bench_path()
"""Determine the path to the Chromium executable."""
Expand Down