diff --git a/pyproject.toml b/pyproject.toml index 38f9c15..a0320c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,10 @@ [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="../../../../favicon.ico"} + +[tool.poetry-pyinstaller-plugin.collect] +# Collect all submodules, data files & binaries for 'package_A' and 'package_B' +data = ["webp_to_png"] + [tool.poetry] name = "webp-to-png" diff --git a/webp_to_png/__main__.pyw b/webp_to_png/__main__.pyw index b995376..30693c5 100644 --- a/webp_to_png/__main__.pyw +++ b/webp_to_png/__main__.pyw @@ -1,6 +1,6 @@ import threading import PySimpleGUI as sg -from tools import convert_webp_to_png +from webp_to_png.tools import convert_webp_to_png layout = [ [sg.Text("请选择webp文件夹:"),sg.Text("未选择文件夹"),sg.FolderBrowse("点击选择文件夹",key="input_folder")], @@ -9,7 +9,12 @@ layout = [ [sg.Text("完成进度:"),sg.ProgressBar(max_value=100,key="bar",size=(50,20),)] ] -window = sg.Window("批量webp格式转化为png格式 -by Zengtudor",layout,size=(800,400),resizable=True) +window = sg.Window("批量webp格式转化为png格式 -by Zengtudor", + layout, + size=(800,400), + resizable=True, + icon="favicon.ico" + ) bar = window["bar"] def main() -> None: diff --git a/webp_to_png/favicon.ico b/webp_to_png/favicon.ico new file mode 100644 index 0000000..0853375 Binary files /dev/null and b/webp_to_png/favicon.ico differ