update
This commit is contained in:
parent
3ef857725e
commit
edfb1ba32c
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,4 +2,5 @@
|
||||
/poetry.lock
|
||||
/build
|
||||
__pycache__/
|
||||
/.vscode
|
||||
/.vscode
|
||||
/test.py
|
9
build.py
9
build.py
@ -5,13 +5,14 @@ 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")
|
||||
des_dir = os.path.join(script_dir,"dist","pyinstaller")
|
||||
if sys.platform.startswith('win32'):
|
||||
des_dir = os.path.join(des_dir,"win_amd64")
|
||||
des_dir = os.path.join(des_dir,"win_amd64","data")
|
||||
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")
|
||||
exit(1)
|
||||
|
||||
subprocess.run(["poetry","build"], check=True)
|
||||
|
||||
# subprocess.run(["poetry","build"], check=True)
|
||||
print(f"copying {source_dir} to {des_dir}")
|
||||
shutil.copytree(source_dir,des_dir)
|
@ -1,3 +1,4 @@
|
||||
from os import path
|
||||
import threading
|
||||
import PySimpleGUI as sg
|
||||
from webp_to_png.tools import convert_webp_to_png
|
||||
@ -9,11 +10,13 @@ layout = [
|
||||
[sg.Text("完成进度:"),sg.ProgressBar(max_value=100,key="bar",size=(50,20),)]
|
||||
]
|
||||
|
||||
print(path.join(__file__,"data","favicon.ico"))
|
||||
|
||||
window = sg.Window("批量webp格式转化为png格式 -by Zengtudor",
|
||||
layout,
|
||||
size=(800,400),
|
||||
resizable=True,
|
||||
icon="favicon.ico"
|
||||
icon=path.join(path.dirname(__file__),"data","favicon.ico")
|
||||
)
|
||||
bar = window["bar"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user