A tiny, shared graphical installer shell for SimplyPrint's CAD integrations. It provides one consistent Tkinter flow — Welcome → Choose location → Installing → Done (with an Error screen) — driven entirely by a small per-product descriptor. Each integration (Fusion 360, SolidWorks, …) says what to install and where; the UI, navigation, and error handling are identical across all of them.
Pure standard library (Tkinter ships with CPython); no third-party dependencies.
integration_installer/ # this repo
├── integration_installer/ # the importable package
│ ├── __init__.py # re-exports ProductDescriptor, InstallerApp, run
│ ├── shell.py # the Tk screens + InstallerApp
│ ├── payload.py # find_payload() — locate the bundled add-in zip
│ └── product.py # ProductDescriptor dataclass (the contract)
├── pyproject.toml
├── LICENSE
└── README.md
Each integration repo mounts this repo as a submodule at shared/ and adds
that directory to sys.path, so the package imports as integration_installer:
# inside an integration repo (e.g. solidworks-integration)
git submodule add https://github.com/SimplyPrint/integration_installer.git sharedThe integration's installer/__main__.py then does:
import sys, os
sys.path.insert(0, os.path.join(REPO_ROOT, "shared")) # the submodule
from integration_installer import run
import product_solidworks # the per-product descriptor
run(product_solidworks.build_descriptor())Cloning an integration afterwards needs the submodule too:
git clone --recurse-submodules <integration-repo>
# or, in an existing clone:
git submodule update --initPyInstaller bundles the package via the integration's installer.spec
(pathex includes the shared/ dir; hiddenimports lists integration_installer*).
run(descriptor) renders the shell from a ProductDescriptor:
| field | purpose |
|---|---|
product_name |
shown as the Welcome title |
payload_name |
the add-in zip filename to locate (find_payload) |
default_dest() |
suggested install directory |
install(zip, dest, log) -> path |
the install strategy; log(msg) streams progress |
read_version(zip) |
version string for the Welcome screen |
target_for(dest) |
(optional) concrete install path, for the "will overwrite" hint |
dev_dist_dirs |
extra dirs to search for the payload in dev mode |
welcome_body / path_hint / done_lead / done_steps |
UI copy |
launch_host / launch_button_label |
(optional) "Open " button on Done |
from integration_installer import ProductDescriptor, run
def install(zip_path, dest, log):
log("Extracting…")
# ...unzip / register / copy...
return dest
run(ProductDescriptor(
product_name="SimplyPrint for MyCAD",
payload_name="SimplyPrintMyCAD.zip",
default_dest=lambda: "/opt/mycad/addins",
install=install,
done_steps="Enable the add-in in MyCAD ▸ Add-Ins.",
))Real descriptors live in the integration repos, e.g. product_fusion.py
(copy-a-folder strategy) and product_solidworks.py (extract + regasm).
MIT — see LICENSE.