优化windows下程序运行效果

This commit is contained in:
Tlntin
2022-11-19 11:47:45 +08:00
parent 79905ad161
commit c116082fa6
46 changed files with 3 additions and 5 deletions

View File

@@ -56,7 +56,7 @@ for app_info in "${app_list[@]}"; do
fi
echo "update ico with 32x32 pictue"
cp "src-tauri/png/${package_name}_32.png" "src-tauri/icons/icon.ico"
cp "src-tauri/png/${package_name}_32.ico" "src-tauri/icons/icon.ico"
if [[ "$OSTYPE" =~ ^linux ]]; then
echo "update desktop"

View File

@@ -26,9 +26,9 @@ if __name__ == "__main__":
image_32 = image.copy().resize((32, 32))
image_name = os.path.splitext(file)[0]
image_512_path = os.path.join(png_dir, image_name + "_512.png")
image_32_path = os.path.join(png_dir, image_name + "_32.png")
image_32_path = os.path.join(png_dir, image_name + "_32.ico")
image_512.save(image_512_path, "PNG")
image_32.save(image_32_path, "PNG")
image_32.save(image_32_path, "ICO")
print("png file write success.")
print(f"There are {len(os.listdir(png_dir))} png picture in ", png_dir)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src-tauri/png/code_32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src-tauri/png/fanfou_32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src-tauri/png/flomo_32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src-tauri/png/fone_32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src-tauri/png/jdread_32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src-tauri/png/jike_32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 B

BIN
src-tauri/png/notion_32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src-tauri/png/roam_32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src-tauri/png/tool_32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src-tauri/png/v2ex_32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src-tauri/png/vercel_32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src-tauri/png/weread_32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src-tauri/png/yuque_32.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -4,8 +4,6 @@ extern crate image;
use tauri_utils::config::{Config, WindowConfig};
#[cfg(target_os = "macos")]
use wry::application::platform::macos::WindowBuilderExtMacOS;
#[cfg(target_os = "windows")]
use wry::application::platform::windows::WindowBuilderExtWindows;
#[cfg(target_os="macos")]
use wry::{