simvx.editor.export_controller¶
Export controller – dispatches export requests to backend targets.
Defines ExportTarget, ExportRequest, ExportProgress, and
run_export which routes a request to the correct backend:
Desktop wheel/folder -> :class:
simvx.core.export.ProjectExporterWeb HTML -> :func:
simvx.web.export.export_webStandalone exe -> PyInstaller subprocess (host OS only)
Standalone Nuitka -> placeholder, always fails
Android APK ->
android/build.shsubprocess
Also provides :func:save_request_to_toml and
- func:
load_request_from_tomlfor round-tripping throughsimvx.toml.
Module Contents¶
Classes¶
Target-agnostic export request captured from the dialog form. |
|
Functions¶
Return ‘linux’, ‘windows’, or ‘macos’ based on |
|
Dispatch an export request. Calls |
|
Write target-specific fields of req into settings sub-tables. |
|
Construct an :class: |
Data¶
API¶
- simvx.editor.export_controller.log¶
‘getLogger(…)’
- simvx.editor.export_controller.__all__¶
[‘ExportTarget’, ‘ExportRequest’, ‘ExportProgress’, ‘run_export’, ‘save_request_to_toml’, ‘load_requ…
- class simvx.editor.export_controller.ExportTarget[source]¶
Bases:
str,enum.Enum- DESKTOP_WHEEL¶
‘desktop_wheel’
- DESKTOP_FOLDER¶
‘desktop_folder’
- WEB_HTML¶
‘web_html’
- STANDALONE_EXE¶
‘standalone_exe’
- STANDALONE_NUITKA¶
‘standalone_nuitka’
- ANDROID_APK¶
‘android_apk’
- __add__()¶
- __contains__()¶
- __delattr__()¶
- __dir__()¶
- __eq__()¶
- __format__()¶
- __ge__()¶
- __getattribute__()¶
- __getitem__()¶
- __getnewargs__()¶
- __getstate__()¶
- __gt__()¶
- __hash__()¶
- __iter__()¶
- __le__()¶
- __len__()¶
- __lt__()¶
- __mod__()¶
- __mul__()¶
- __ne__()¶
- __new__()¶
- __reduce__()¶
- __reduce_ex__()¶
- __repr__()¶
- __rmod__()¶
- __rmul__()¶
- __setattr__()¶
- __sizeof__()¶
- __str__()¶
- __subclasshook__()¶
- capitalize()¶
- casefold()¶
- center()¶
- count()¶
- encode()¶
- endswith()¶
- expandtabs()¶
- find()¶
- format()¶
- format_map()¶
- index()¶
- isalnum()¶
- isalpha()¶
- isascii()¶
- isdecimal()¶
- isdigit()¶
- isidentifier()¶
- islower()¶
- isnumeric()¶
- isprintable()¶
- isspace()¶
- istitle()¶
- isupper()¶
- join()¶
- ljust()¶
- lower()¶
- lstrip()¶
- partition()¶
- removeprefix()¶
- removesuffix()¶
- replace()¶
- rfind()¶
- rindex()¶
- rjust()¶
- rpartition()¶
- rsplit()¶
- rstrip()¶
- split()¶
- splitlines()¶
- startswith()¶
- strip()¶
- swapcase()¶
- title()¶
- translate()¶
- upper()¶
- zfill()¶
- __deepcopy__(memo)¶
- __copy__()¶
- name()¶
- value()¶
- simvx.editor.export_controller.detect_host_os() str[source]¶
Return ‘linux’, ‘windows’, or ‘macos’ based on
sys.platform.
- class simvx.editor.export_controller.ExportRequest[source]¶
Target-agnostic export request captured from the dialog form.
- target: simvx.editor.export_controller.ExportTarget¶
None
- project_dir: pathlib.Path¶
None
- output_dir: pathlib.Path¶
None
- package_name: str¶
None
- version: str¶
‘0.1.0’
- entry_point: str¶
‘main.py’
- os_label: str¶
‘linux’
- build_wheel: bool¶
False
- create_zip: bool¶
False
- icon_path: str | None¶
None
- web_width: int¶
800
- web_height: int¶
600
- web_responsive: bool¶
False
- pyodide_version: str¶
None
- extra_packages: list[str]¶
‘field(…)’
- root_class: str | None¶
None
- title: str¶
‘SimVX’
- exe_onefile: bool¶
True
- exe_console: bool¶
False
- exe_name: str = <Multiline-String>¶
- exe_host_os: str¶
‘field(…)’
- android_package: str = <Multiline-String>¶
- android_min_sdk: int¶
26
- android_mode: str¶
‘debug’
- class simvx.editor.export_controller.ExportProgress[source]¶
- fraction: float¶
None
- status: str¶
None
- finished: bool¶
False
- success: bool¶
False
- result_path: pathlib.Path | None¶
None
- error: str | None¶
None
- simvx.editor.export_controller.run_export(req: simvx.editor.export_controller.ExportRequest, progress: collections.abc.Callable[[simvx.editor.export_controller.ExportProgress], None]) simvx.editor.export_controller.ExportProgress[source]¶
Dispatch an export request. Calls
progresswith checkpoints.Returns the final :class:
ExportProgress(success or failure).
- simvx.editor.export_controller.save_request_to_toml(req: simvx.editor.export_controller.ExportRequest, settings: simvx.core.project.ProjectSettings) None[source]¶
Write target-specific fields of req into settings sub-tables.
- simvx.editor.export_controller.load_request_from_toml(target: simvx.editor.export_controller.ExportTarget, settings: simvx.core.project.ProjectSettings, project_dir: pathlib.Path) simvx.editor.export_controller.ExportRequest[source]¶
Construct an :class:
ExportRequestfor target seeded from settings.