From 299f3619978ca7c181bf58a465bc79af8c59e0a6 Mon Sep 17 00:00:00 2001 From: lixianjing Date: Mon, 18 Dec 2023 17:41:46 +0800 Subject: [PATCH] improve release.py --- docs/changes.md | 1 + scripts/project_scripts/release.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/changes.md b/docs/changes.md index 1b8cce753..076b1969f 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -2,6 +2,7 @@ 2023/12/18 * 修复lldb获取变量的时候返回为空值的问(感谢智明提供补丁) + * 修复打包release资源路径不正常的问题(感谢智明提供补丁) 2023/12/16 * 修复stm32编译警告。 diff --git a/scripts/project_scripts/release.py b/scripts/project_scripts/release.py index 23a8cfa54..3d7608b61 100644 --- a/scripts/project_scripts/release.py +++ b/scripts/project_scripts/release.py @@ -4,6 +4,7 @@ import platform import shutil import json import collections +import fnmatch def join_path(root, subdir): @@ -11,7 +12,7 @@ def join_path(root, subdir): OS_NAME = platform.system() -PRJ_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +PRJ_DIR = os.getcwd(); OUTPUT_DIR = join_path(PRJ_DIR, 'release') BIN_DIR = join_path(PRJ_DIR, 'bin') @@ -73,7 +74,9 @@ def release(): res_root = to_file_system_coding(assets['outputDir']) assets_root = join_path(PRJ_DIR, res_root + '/assets') - exeName = CONFIG['appExeName'] + exeName = ''; + if 'appExeName' in CONFIG : + exeName = CONFIG['appExeName'] if exeName == '': exeName = 'demo' exeName = exeName + '.exe' if OS_NAME == 'Windows' else exeName