diff --git a/build.py b/build.py index 2654c72..ef58ea1 100644 --- a/build.py +++ b/build.py @@ -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 diff --git a/common/config.py b/common/config.py index de6c43a..12191cc 100644 --- a/common/config.py +++ b/common/config.py @@ -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):