INNER CODE UNIT · Python

create_portable_zip

CyrilPeng/Venera-Next · windows/build.py:53

def create_portable_zip(version):
    if not WINDOWS_RELEASE_DIR.is_dir():
        raise FileNotFoundError(WINDOWS_RELEASE_DIR)

    zip_path = WINDOWS_BUILD_DIR / f"VeneraNext-{version}-windows.zip"
    package_dir = WINDOWS_BUILD_DIR / f"VeneraNext-{version}-windows"
    if zip_path.exists():
        zip_path.unlink()
    if package_dir.exists():
        shutil.rmtree(package_dir)

    try:
        shutil.copytree(WINDOWS_RELEASE_DIR, package_dir)
        shutil.make_archive(
            str(zip_path.with_suffix("")),
            "zip",
            WINDOWS_BUILD_DIR,
            package_dir.name,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…