From ffd796a11d91a5108089ca1897fca43072380630 Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Wed, 27 Sep 2023 09:09:42 +0300 Subject: [PATCH] =?UTF-8?q?ci:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D1=8F=D0=B5=D1=82=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D1=83=20sta?= =?UTF-8?q?tapp-onefile=20=D0=B8=20statapp=20(#17)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 5 +++-- statapp-onefile.spec | 37 +++++++++++++++++++++++++++++++++++ statapp.spec | 18 +++++++++++------ 3 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 statapp-onefile.spec diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 22f82c8..379441f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] + spec: [statapp-onefile, statapp] defaults: run: shell: bash @@ -36,11 +37,11 @@ jobs: - name: Установка зависимостей run: poetry install - name: Сборка - run: poetry run pyinstaller statapp.spec + run: poetry run pyinstaller ${{ matrix.spec }}.spec - name: Загрузка артефактов uses: actions/upload-artifact@v3 with: - name: ${{ matrix.os }} + name: ${{ matrix.os }}-${{ matrix.spec }} path: ./dist/statapp* release-please: diff --git a/statapp-onefile.spec b/statapp-onefile.spec new file mode 100644 index 0000000..bea3955 --- /dev/null +++ b/statapp-onefile.spec @@ -0,0 +1,37 @@ +# -*- mode: python ; coding: utf-8 -*- + + +a = Analysis( + ['statapp/__main__.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.datas, + [], + name='statapp', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +) diff --git a/statapp.spec b/statapp.spec index bea3955..247ce69 100644 --- a/statapp.spec +++ b/statapp.spec @@ -5,7 +5,7 @@ a = Analysis( ['statapp/__main__.py'], pathex=[], binaries=[], - datas=[], + datas=[('statapp/images/sticker.gif', 'images')], hiddenimports=[], hookspath=[], hooksconfig={}, @@ -18,20 +18,26 @@ pyz = PYZ(a.pure) exe = EXE( pyz, a.scripts, - a.binaries, - a.datas, [], + exclude_binaries=True, name='statapp', debug=False, bootloader_ignore_signals=False, strip=False, upx=True, - upx_exclude=[], - runtime_tmpdir=None, - console=False, + console=True, disable_windowed_traceback=False, argv_emulation=False, target_arch=None, codesign_identity=None, entitlements_file=None, ) +coll = COLLECT( + exe, + a.binaries, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='statapp', +)