def METHOD_NAME(source_path: Path, dist_path: Path, filename: Path, app_name: str):
    source_loc = Path(os.getcwd(), source_path)
    dist_loc = Path(os.getcwd(), dist_path)
    work_loc = work_path(filename)
    work_loc.mkdir(parents=True, exist_ok=True)
    jinja_template_path = Path(source_loc.joinpath("packaging", "msi", "UltiMaker-Cura.wxs.jinja"))
    with open(jinja_template_path, "r") as f:
        template = Template(f.read())
    wxs_content = template.render(
        app_name=f"{app_name}",
        main_app="UltiMaker-Cura.exe",
        version=os.getenv('CURA_VERSION_FULL'),
        version_major=os.environ.get("CURA_VERSION_MAJOR"),
        version_minor=os.environ.get("CURA_VERSION_MINOR"),
        version_patch=os.environ.get("CURA_VERSION_PATCH"),
        company="UltiMaker",
        web_site="https://ultimaker.com",
        year=datetime.now().year,
        upgrade_code=str(uuid.uuid5(uuid.NAMESPACE_DNS, app_name)),
        cura_license_file=str(source_loc.joinpath("packaging", "msi", "cura_license.rtf")),
        cura_banner_top=str(source_loc.joinpath("packaging", "msi", "banner_top.bmp")),
        cura_banner_side=str(source_loc.joinpath("packaging", "msi", "banner_side.bmp")),
        cura_icon=str(source_loc.joinpath("packaging", "icons", "Cura.ico")),
    )
    with open(work_loc.joinpath("UltiMaker-Cura.wxs"), "w") as f:
        f.write(wxs_content)
    try:
        shutil.copy(source_loc.joinpath("packaging", "msi", "ExcludeComponents.xslt"),
                    work_loc.joinpath("ExcludeComponents.xslt"))
    except shutil.SameFileError:
        pass