From 3ef857725e8ed26379a88bc6064bb60bf498e536 Mon Sep 17 00:00:00 2001 From: ZtRXR Date: Sun, 5 May 2024 22:27:17 +0800 Subject: [PATCH] update --- build.py | 17 +++++++++++++++++ pyproject.toml | 6 +++--- favicon.ico => webp_to_png/data/favicon.ico | Bin webp_to_png/favicon.ico | Bin 165662 -> 0 bytes 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 build.py rename favicon.ico => webp_to_png/data/favicon.ico (100%) delete mode 100644 webp_to_png/favicon.ico diff --git a/build.py b/build.py new file mode 100644 index 0000000..2897535 --- /dev/null +++ b/build.py @@ -0,0 +1,17 @@ +import os +import subprocess +import shutil +import sys + +script_dir = os.path.dirname(os.path.abspath(__file__)) +source_dir = os.path.join(script_dir,"webp_to_png","data") +des_dir = os.path.join(source_dir,"dist","pyinstaller") +if sys.platform.startswith('win32'): + des_dir = os.path.join(des_dir,"win_amd64") + print("You are on the windows platform,it will put data into",des_dir) +else: + print("you are on the other platform please put webp_to_png/data \"data\" directory into the exe directory") + +subprocess.run(["poetry","build"], check=True) + +shutil.copytree(source_dir,des_dir) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a0320c6..8578f95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [tool.poetry-pyinstaller-plugin.scripts] -webp_to_png = { source = "webp_to_png/__main__.pyw", type = "onefile", bundle = false, icon="../../../../favicon.ico"} +webp_to_png = { source = "webp_to_png/__main__.pyw", type = "onefile", bundle = false, icon="../../../../webp_to_png/data/favicon.ico", console=true} -[tool.poetry-pyinstaller-plugin.collect] +# [tool.poetry-pyinstaller-plugin.collect] # Collect all submodules, data files & binaries for 'package_A' and 'package_B' -data = ["webp_to_png"] +# all = ["webp_to_png"] [tool.poetry] diff --git a/favicon.ico b/webp_to_png/data/favicon.ico similarity index 100% rename from favicon.ico rename to webp_to_png/data/favicon.ico diff --git a/webp_to_png/favicon.ico b/webp_to_png/favicon.ico deleted file mode 100644 index 0853375db0955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