mirror of
https://github.com/hyb-oyqq/FRAISEMOE-Addons-Installer-NEXT.git
synced 2026-01-01 03:30:45 +00:00
ci(build-release): 添加图标文件验证步骤并修复图标路径配置
在构建发布工作流中添加了图标文件存在性验证步骤,确保构建时图标文件存在。 同时修改了 build.spec 文件中的图标路径配置方式,使用相对路径替代原有的绝对路径拼接方式, 以提高配置的可靠性和可维护性。
This commit is contained in:
11
.github/workflows/build-release.yml
vendored
11
.github/workflows/build-release.yml
vendored
@@ -31,6 +31,17 @@ jobs:
|
||||
$version = "${{ github.ref_name }}"
|
||||
echo "VERSION=$version" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- name: Verify icon file
|
||||
run: |
|
||||
cd source
|
||||
if (Test-Path "assets/images/ICO/icon.ico") {
|
||||
Write-Host "Icon file found"
|
||||
Get-Item "assets/images/ICO/icon.ico"
|
||||
} else {
|
||||
Write-Host "Icon file NOT found!"
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Build with PyInstaller
|
||||
run: |
|
||||
cd source
|
||||
|
||||
@@ -6,9 +6,7 @@ from PyInstaller.utils.hooks import collect_submodules, collect_data_files
|
||||
|
||||
block_cipher = None
|
||||
|
||||
# 获取spec文件所在目录的绝对路径
|
||||
SPEC_ROOT = os.path.dirname(os.path.abspath(SPEC))
|
||||
ICON_PATH = os.path.join(SPEC_ROOT, 'assets', 'images', 'ICO', 'icon.ico')
|
||||
|
||||
|
||||
# 收集所有子模块
|
||||
hiddenimports = []
|
||||
@@ -71,5 +69,5 @@ exe = EXE(
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
icon=ICON_PATH,
|
||||
icon=os.path.join('assets', 'images', 'ICO', 'icon.ico'),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user