diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..0853375 Binary files /dev/null and b/favicon.ico differ diff --git a/pyproject.toml b/pyproject.toml index dcae4e3..38f9c15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry-pyinstaller-plugin.scripts] -webp_to_png = { source = "webp_to_png/__main__.pyw", type = "onedir", bundle = false } +webp_to_png = { source = "webp_to_png/__main__.pyw", type = "onefile", bundle = false, icon = "favicon.ico"} [tool.poetry] name = "webp-to-png" @@ -14,6 +14,11 @@ pillow = "^10.3.0" pysimplegui = "4.59" +[[tool.poetry.source]] +name = "mirrors" +url = "https://mirrors.cernet.edu.cn/pypi/web/simple/" +priority = "primary" + [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" diff --git a/webp_to_png/__main__.pyw b/webp_to_png/__main__.pyw index c39f9ef..b995376 100644 --- a/webp_to_png/__main__.pyw +++ b/webp_to_png/__main__.pyw @@ -32,7 +32,7 @@ def main() -> None: else : sg.popup("你还没有选择路径!") elif event == "bar": print("freshing bar") - bar.update(current_count=value["bar"]["current_count"]) + # bar.update(current_count=value["bar"]["current_count"]) # window.refresh() diff --git a/webp_to_png/tools.py b/webp_to_png/tools.py index b20ef8c..bb66cd2 100644 --- a/webp_to_png/tools.py +++ b/webp_to_png/tools.py @@ -23,5 +23,5 @@ def convert_webp_to_png(webp_dir:str, png_dir:str,window:Any)->None: # 更新进度条 times += 1 progress = int(times/nums*100) - window.write_event_value("bar",{"current_count":progress} ) + window["bar"].update(current_count=progress) print("Conversion completed.") \ No newline at end of file