From 49879fda608659ba3cd6695542ebf886ac069fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=91=E8=B4=A8?= Date: Sat, 2 Dec 2023 18:17:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3linux=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=80=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 4 ++-- main_linux.spec | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 main_linux.spec diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b02cdef..58a0a57d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -185,7 +185,7 @@ jobs: run: | cp ./OlivOS/hook.py ./OlivOS/hook_bak.py cp ./OlivOS/hook_pack_debug.py ./OlivOS/hook.py - pyinstaller ./main_debug.spec + pyinstaller ./main_linux.spec - name: Run artifact run: | mkdir OlivOS-PKG @@ -374,7 +374,7 @@ jobs: run: | cp ./OlivOS/hook.py ./OlivOS/hook_bak.py cp ./OlivOS/hook_pack_debug.py ./OlivOS/hook.py - pyinstaller ./main_debug.spec + pyinstaller ./main_linux.spec - name: Run artifact run: | mkdir OlivOS-PKG diff --git a/main_linux.spec b/main_linux.spec new file mode 100644 index 00000000..cb44685e --- /dev/null +++ b/main_linux.spec @@ -0,0 +1,37 @@ +# -*- mode: python ; coding: utf-8 -*- + +block_cipher = None + + +a = Analysis(['main.py'], + pathex=['./'], + binaries=[], + datas=[], + hiddenimports=[ + 'websockets.legacy.auth', + 'websockets.legacy.client', + 'websockets.legacy.server' + ], + hookspath=['./hook'], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='main', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir='./runtime/', + console=True , icon='resource/favoricon.ico')