Skip to content

Commit 8aca98b

Browse files
authored
Add files via upload
1 parent 6eb2e04 commit 8aca98b

3 files changed

Lines changed: 63 additions & 3 deletions

File tree

characters.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
"稀有度": "3",
220220
"攻击类型": "爆发",
221221
"防御类型": "重装甲",
222-
"站位": "后排",
222+
"站位": "SPECIAL",
223223
"职能定位": "输出",
224224
"限定": ""
225225
},

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# 基本信息
1515
setup(
16-
name="BAguesser反向查询",
16+
name="BAslover v1.1",
1717
version="1.0",
1818
description="蔚蓝档案人物反向查询工具",
1919
options={"build_exe": build_exe_options},
@@ -22,7 +22,7 @@
2222
"baslover.py",
2323
base="Win32GUI", # 使用Windows GUI模式,不显示控制台
2424
icon="icon.ico", # 设置图标
25-
target_name="BAguesser反向查询.exe" # 生成的EXE文件名
25+
target_name="BAslover v1.1.exe" # 生成的EXE文件名
2626
)
2727
]
2828
)

setup_with_tkinter_icon.py

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import tkinter as tk
2+
from tkinter import ttk, messagebox
3+
import json
4+
import os
5+
import sys
6+
from PIL import Image, ImageTk
7+
import requests
8+
from io import BytesIO
9+
import threading
10+
import webbrowser
11+
12+
# 创建一个临时图标文件
13+
def create_temp_icon():
14+
try:
15+
# 如果icon.ico不存在,创建一个简单的图标
16+
if not os.path.exists("icon.ico"):
17+
print("创建临时图标文件...")
18+
# 使用tkinter创建一个简单的图标
19+
root = tk.Tk()
20+
root.withdraw() # 隐藏主窗口
21+
22+
# 创建一个画布
23+
canvas = tk.Canvas(root, width=32, height=32)
24+
canvas.create_oval(4, 4, 28, 28, fill="blue", outline="")
25+
canvas.create_text(16, 16, text="BA", fill="white", font=("Arial", 10, "bold"))
26+
27+
# 保存为临时图标
28+
canvas.postscript(file="temp_icon.ps", colormode="color")
29+
30+
# 使用PIL将PostScript转换为ICO
31+
from PIL import Image, ImageTk
32+
img = Image.open("temp_icon.ps")
33+
img.save("icon.ico")
34+
35+
# 清理临时文件
36+
os.remove("temp_icon.ps")
37+
print("临时图标已创建: icon.ico")
38+
39+
root.destroy()
40+
return True
41+
except Exception as e:
42+
print(f"创建临时图标失败: {e}")
43+
return False
44+
45+
# 主函数
46+
if __name__ == "__main__":
47+
# 检查图标文件是否存在,如果不存在则创建
48+
if not os.path.exists("icon.ico"):
49+
created = create_temp_icon()
50+
if created:
51+
print("已创建临时图标,现在可以运行打包脚本了")
52+
else:
53+
print("无法创建图标文件,程序将使用默认图标")
54+
else:
55+
print("图标文件已存在,可以继续打包")
56+
57+
print("\n请运行以下命令之一进行打包:")
58+
print("python pyinstaller_setup.py")
59+
print("或")
60+
print("python setup.py build")

0 commit comments

Comments
 (0)