def METHOD_NAME(filename: str,  dist_path: str, cura_version: str, app_name: str) -> None:
    """ Creates a pkg installer from {filename}.app called {filename}-Installer.pkg
    The final package structure is UltiMaker-Cura-XXX-Installer.pkg[UltiMaker-Cura.pkg[UltiMaker-Cura.app]]. The outer
    pkg file is a distributable pkg (Installer). Inside the distributable pkg there is a component pkg. The component
    pkg contains the .app file that will be installed in the users Applications folder.
    @param filename: The name of the app file and the app component package file without the extension
    @param dist_path: The location to read the app from and save the pkg to
    """
    filename_stem = Path(filename).stem
    cura_component_package_name = f"{filename_stem}-Component.pkg"  # This is a component package that is nested inside the installer, it contains the UltiMaker-Cura.app file This is the app file that will end up in your applications folder
    build_pkg(dist_path, app_name, cura_component_package_name, cura_version, filename)
    notarize = bool(os.environ.get("NOTARIZE_INSTALLER", "FALSE"))
    if notarize:
        notarize_file(dist_path, filename)