Skip to content

Commit

Permalink
build: 尝试修复构建
Browse files Browse the repository at this point in the history
  • Loading branch information
helloplhm-qwq committed Dec 2, 2023
1 parent c3483d4 commit c058b33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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

Expand Down
5 changes: 2 additions & 3 deletions common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit c058b33

Please sign in to comment.