build: 尝试修复构建

This commit is contained in:
helloplhm-qwq 2023-12-02 13:39:10 +08:00
parent c3483d4982
commit c058b33a9d
No known key found for this signature in database
GPG Key ID: 6BE1B64B905567C7
2 changed files with 4 additions and 5 deletions

View File

@ -59,7 +59,7 @@ def build_test(fileName):
sys.exit(popen.returncode)
else:
print('[SUCCESS]: PyInstaller build success.')
print('FilePath: ' + os.getcwd() + os.sep + f'lx-music-api-server_{sha}.exe')
print('FilePath: ' + os.getcwd() + os.sep + os.listdir(os.getcwd() + '/dist')[0])
def build_release(fileName = ''):
os.environ['build'] = 'R'
@ -92,7 +92,7 @@ def build_release(fileName = ''):
sys.exit(popen.returncode)
else:
print('[SUCCESS]: PyInstaller build success.')
print('FilePath: ' + os.getcwd() + os.sep + f'lx-music-api-server_{vername}.exe')
print('FilePath: ' + os.getcwd() + os.sep + os.listdir(os.getcwd() + '/dist')[0])
argv = sys.argv

View File

@ -188,11 +188,10 @@ def handle_default_config():
f.write(json.dumps(default, indent=2, ensure_ascii=False,
escape_forward_slashes=False))
f.close()
if (not os.getenv('actions')):
if (not os.getenv('build')):
logger.info('首次启动或配置文件被删除,已创建默认配置文件')
logger.info(
f'\n请到{variable.workdir + os.path.sep}config.json修改配置后重新启动服务器')
sys.exit(0)
f'\n建议您到{variable.workdir + os.path.sep}config.json修改配置后重新启动服务器')
class ConfigReadException(Exception):