This commit is contained in:
ZtRXR 2024-05-05 22:51:28 +08:00
parent 05f746af6b
commit 355d520307
3 changed files with 4 additions and 3 deletions

View File

@ -3,11 +3,12 @@ import subprocess
import shutil import shutil
import sys import sys
dir_name = "program_data"
script_dir = os.path.dirname(os.path.abspath(__file__)) script_dir = os.path.dirname(os.path.abspath(__file__))
source_dir = os.path.join(script_dir,"webp_to_png","data") source_dir = os.path.join(script_dir,"webp_to_png",dir_name)
des_dir = os.path.join(script_dir,"dist","pyinstaller") des_dir = os.path.join(script_dir,"dist","pyinstaller")
if sys.platform.startswith('win32'): if sys.platform.startswith('win32'):
des_dir = os.path.join(des_dir,"win_amd64","data") des_dir = os.path.join(des_dir,"win_amd64",dir_name)
print("You are on the windows platform,it will put data into",des_dir) print("You are on the windows platform,it will put data into",des_dir)
else: else:
print("you are on the other platform please put webp_to_png/data \"data\" directory into the exe directory") print("you are on the other platform please put webp_to_png/data \"data\" directory into the exe directory")

View File

@ -16,7 +16,7 @@ window = sg.Window("批量webp格式转化为png格式 -by Zengtudor",
layout, layout,
size=(800,400), size=(800,400),
resizable=True, resizable=True,
icon=path.join(path.dirname(__file__),"data","favicon.ico") icon=path.join(path.dirname(__file__),"program_data","favicon.ico")
) )
bar = window["bar"] bar = window["bar"]

View File

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 162 KiB