[patch] 修正ks3问题且优化pillow依赖安装时间
This commit is contained in:
@@ -398,10 +398,10 @@ class DatabaseVersionManager:
|
||||
f"+{stats['lines_added']}/-{stats['lines_deleted']} 行")
|
||||
|
||||
# 6. 创建版本记录
|
||||
# 生成下载地址(KS3对象存储 - 广州节点)
|
||||
# 生成下载地址(KS3对象存储 - 广州节点,使用三级域名格式)
|
||||
installer_filename = f"ShuiDi_AI_Assistant_Setup_v{next_version}.exe"
|
||||
download_url = f"https://ks3-cn-guangzhou.ksyuncs.com/shuidrop-chat-server/installers/{installer_filename}"
|
||||
# 完整示例: https://ks3-cn-guangzhou.ksyuncs.com/shuidrop-chat-server/installers/ShuiDi_AI_Assistant_Setup_v1.5.0.exe
|
||||
download_url = f"https://shuidrop-chat-server.ks3-cn-guangzhou.ksyuncs.com/installers/{installer_filename}"
|
||||
# 完整示例: https://shuidrop-chat-server.ks3-cn-guangzhou.ksyuncs.com/installers/ShuiDi_AI_Assistant_Setup_v1.5.0.exe
|
||||
|
||||
version_record = {
|
||||
'version': next_version,
|
||||
|
||||
@@ -96,9 +96,10 @@ def upload_installer(connection, installer_path):
|
||||
policy='public-read' # Set ACL policy
|
||||
)
|
||||
|
||||
# Generate download URL (using HTTPS)
|
||||
# Generate download URL (using KS3 third-level domain format)
|
||||
# Format: https://{bucket}.{endpoint}/{key}
|
||||
protocol = 'https' if KS3_IS_SECURE else 'http'
|
||||
download_url = f"{protocol}://{KS3_ENDPOINT}/{KS3_BUCKET}/{ks3_key}"
|
||||
download_url = f"{protocol}://{KS3_BUCKET}.{KS3_ENDPOINT}/{ks3_key}"
|
||||
|
||||
logger.info(f"Upload successful!")
|
||||
logger.info(f"Download URL: {download_url}")
|
||||
|
||||
@@ -140,19 +140,32 @@ jobs:
|
||||
Write-Host "Step 4.5: Build production executable";
|
||||
Write-Host "==========================================";
|
||||
|
||||
# Ensure PyInstaller and Pillow are in the same Python environment
|
||||
Write-Host "Installing dependencies...";
|
||||
python -m pip install --upgrade pip --quiet;
|
||||
python -m pip install pyinstaller --upgrade --quiet;
|
||||
python -m pip install Pillow --quiet;
|
||||
# Check and install dependencies only if needed
|
||||
Write-Host "Checking dependencies...";
|
||||
|
||||
# Verify installation
|
||||
Write-Host "Python version:";
|
||||
python --version;
|
||||
Write-Host "PyInstaller version:";
|
||||
python -m PyInstaller --version;
|
||||
Write-Host "Pillow version:";
|
||||
python -c "from PIL import Image; print(Image.__version__)";
|
||||
# Check PyInstaller
|
||||
$pyinstallerInstalled = python -c "try: import PyInstaller; print('installed')`nexcept: print('not-installed')" 2>$null;
|
||||
if ($pyinstallerInstalled -ne "installed") {
|
||||
Write-Host "Installing PyInstaller...";
|
||||
python -m pip install pyinstaller --quiet;
|
||||
} else {
|
||||
Write-Host "PyInstaller: already installed";
|
||||
}
|
||||
|
||||
# Check Pillow
|
||||
$pillowInstalled = python -c "try: from PIL import Image; print('installed')`nexcept: print('not-installed')" 2>$null;
|
||||
if ($pillowInstalled -ne "installed") {
|
||||
Write-Host "Installing Pillow...";
|
||||
python -m pip install Pillow --quiet;
|
||||
} else {
|
||||
Write-Host "Pillow: already installed";
|
||||
}
|
||||
|
||||
Write-Host "";
|
||||
Write-Host "Environment ready:";
|
||||
Write-Host " Python:" (python --version);
|
||||
Write-Host " PyInstaller:" (python -m PyInstaller --version);
|
||||
Write-Host " Pillow:" (python -c "from PIL import Image; print(Image.__version__)");
|
||||
Write-Host "";
|
||||
|
||||
python build_production.py;
|
||||
|
||||
@@ -42,7 +42,7 @@ VERSION = "1.0"
|
||||
WINDOW_TITLE = "AI回复连接入口-V1.0"
|
||||
|
||||
# 应用版本号(用于版本检查)
|
||||
APP_VERSION = "1.5.11"
|
||||
APP_VERSION = "1.5.12"
|
||||
|
||||
# 平台特定配置
|
||||
PLATFORMS = {
|
||||
|
||||
@@ -146,8 +146,10 @@ class NSISInstaller:
|
||||
"""生成NSIS安装脚本"""
|
||||
print("Generating NSIS installer script...")
|
||||
|
||||
# 标准化安装包命名(不带时间戳,便于固定下载地址)
|
||||
installer_name = f"{self.app_name_en}_Setup_v{self.app_version}.exe"
|
||||
# 标准化安装包命名(不带时间戳和空格,便于固定下载地址)
|
||||
# 将应用名称中的空格替换为下划线
|
||||
app_name_safe = self.app_name_en.replace(' ', '_')
|
||||
installer_name = f"{app_name_safe}_Setup_v{self.app_version}.exe"
|
||||
# 示例: ShuiDi_AI_Assistant_Setup_v1.4.12.exe
|
||||
|
||||
print(f"Installer name: {installer_name}")
|
||||
|
||||
@@ -1,4 +1,20 @@
|
||||
[
|
||||
{
|
||||
"version": "1.5.12",
|
||||
"update_type": "patch",
|
||||
"content": "[patch] 修正ks3问题",
|
||||
"author": "Gitea Actions Bot",
|
||||
"commit_hash": "5c73bbf8bce718195e1d4b4f727ede53a3921c1a",
|
||||
"commit_short_hash": "5c73bbf8",
|
||||
"branch": "develop",
|
||||
"release_time": "2025-10-11 16:54:44",
|
||||
"download_url": "https://ks3-cn-guangzhou.ksyuncs.com/shuidrop-chat-server/installers/ShuiDi_AI_Assistant_Setup_v1.5.12.exe",
|
||||
"stats": {
|
||||
"files_changed": 3,
|
||||
"lines_added": 29,
|
||||
"lines_deleted": 13
|
||||
}
|
||||
},
|
||||
{
|
||||
"version": "1.5.11",
|
||||
"update_type": "patch",
|
||||
|
||||
Reference in New Issue
Block a user