[patch] 修改GUI页面布局以自适应横幅位置 与 横幅跳转功能实现
This commit is contained in:
@@ -16,7 +16,7 @@ def clean_build():
|
||||
|
||||
# 跳过进程结束步骤,避免影响当前脚本运行
|
||||
print("Skipping process termination step...")
|
||||
|
||||
|
||||
# 等待少量时间确保文件句柄释放
|
||||
import time
|
||||
print("Waiting for file handles to release...")
|
||||
@@ -43,7 +43,7 @@ def clean_build():
|
||||
print(f"ERROR: Failed to delete {dir_name}: {e}")
|
||||
else:
|
||||
print(f"INFO: {dir_name} does not exist, skipping")
|
||||
|
||||
|
||||
print("Cleaning phase completed")
|
||||
|
||||
|
||||
@@ -105,13 +105,13 @@ def build_with_command():
|
||||
try:
|
||||
old_exe = 'dist/MultiPlatformGUI/MultiPlatformGUI.exe'
|
||||
new_exe = 'dist/MultiPlatformGUI/main.exe'
|
||||
|
||||
|
||||
if os.path.exists(new_exe):
|
||||
os.remove(new_exe)
|
||||
|
||||
|
||||
os.rename(old_exe, new_exe)
|
||||
print("Main executable renamed: MultiPlatformGUI.exe -> main.exe")
|
||||
|
||||
|
||||
exe_size = os.path.getsize(new_exe) / 1024 / 1024
|
||||
print(f"Main executable verified: main.exe ({exe_size:.1f} MB)")
|
||||
except Exception as e:
|
||||
@@ -246,19 +246,20 @@ def verify_result():
|
||||
print("TIP: Please check if PyInstaller executed successfully")
|
||||
return False
|
||||
|
||||
|
||||
def _verify_directory(base_dir):
|
||||
"""验证指定目录的打包结果"""
|
||||
# 检查可能的 exe 名称
|
||||
exe_path = f"{base_dir}/main.exe"
|
||||
if not os.path.exists(exe_path):
|
||||
exe_path = f"{base_dir}/MultiPlatformGUI.exe"
|
||||
|
||||
|
||||
internal_dir = f"{base_dir}/_internal"
|
||||
dll_path = f"{base_dir}/_internal/Utils/PythonNew32/SaiNiuApi.dll"
|
||||
static_dir = f"{base_dir}/_internal/static"
|
||||
|
||||
print(f"Verifying directory: {base_dir}")
|
||||
|
||||
|
||||
# 检查主程序
|
||||
if os.path.exists(exe_path):
|
||||
size = os.path.getsize(exe_path) / 1024 / 1024 # MB
|
||||
@@ -304,8 +305,8 @@ def main():
|
||||
print("Checking build dependencies...")
|
||||
try:
|
||||
import subprocess
|
||||
result = subprocess.run(['pyinstaller', '--version'],
|
||||
capture_output=True, text=True, check=False)
|
||||
result = subprocess.run(['pyinstaller', '--version'],
|
||||
capture_output=True, text=True, check=False)
|
||||
if result.returncode == 0:
|
||||
print(f"PyInstaller version: {result.stdout.strip()}")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user