mirror of
https://github.com/rbreu/beeref.git
synced 2026-03-11 08:54:28 +00:00
Run build.yml on all platforms
This commit is contained in:
parent
6c6616ee30
commit
0ab9b365cf
2 changed files with 29 additions and 25 deletions
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
|
|
@ -7,7 +7,10 @@ jobs:
|
|||
build:
|
||||
name: build
|
||||
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: ['ubuntu-20.04', 'macos-10.15', 'windows-latest']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
|
|
|||
49
build.py
49
build.py
|
|
@ -4,9 +4,11 @@
|
|||
from distutils.sysconfig import get_python_lib
|
||||
import os.path
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
import PyInstaller.__main__
|
||||
|
||||
from beeref import constants
|
||||
|
||||
|
||||
|
|
@ -15,32 +17,31 @@ def datapath(src, dest):
|
|||
|
||||
|
||||
pyqt_dir = os.path.join(get_python_lib(), 'PyQt6', 'Qt6')
|
||||
appname= f'{constants.APPNAME}-{constants.VERSION}'
|
||||
appname = f'{constants.APPNAME}-{constants.VERSION}'
|
||||
|
||||
subprocess.run(
|
||||
[
|
||||
'pyinstaller',
|
||||
'--noconfirm',
|
||||
'--onedir',
|
||||
'--windowed',
|
||||
'--name', appname,
|
||||
'--hidden-import', 'PyQt6.sip',
|
||||
'--hidden-import', 'PyQt6.QtPrintSupport',
|
||||
'--icon', os.path.join('beeref', 'assets', 'logo.png'),
|
||||
'--paths', os.path.join(pyqt_dir, 'bin'),
|
||||
'--add-data', datapath(
|
||||
[pyqt_dir, 'plugins', 'platforms'], ['platforms']),
|
||||
'--add-data', datapath([pyqt_dir, 'lib'], ['.']),
|
||||
'--add-data', datapath(
|
||||
['beeref', 'documentation'], ['beeref', 'documentation']),
|
||||
'--add-data', datapath(
|
||||
['beeref', 'assets', '*.png'], ['beeref', 'assets']),
|
||||
'beeref/__main__.py'
|
||||
])
|
||||
PyInstaller.__main__.run([
|
||||
'--noconfirm',
|
||||
'--onedir',
|
||||
'--windowed',
|
||||
'--name', appname,
|
||||
'--hidden-import', 'PyQt6.sip',
|
||||
'--hidden-import', 'PyQt6.QtPrintSupport',
|
||||
'--icon', os.path.join('beeref', 'assets', 'logo.png'),
|
||||
'--paths', os.path.join(pyqt_dir, 'bin'),
|
||||
'--add-data', datapath(
|
||||
[pyqt_dir, 'plugins', 'platforms'], ['platforms']),
|
||||
'--add-data', datapath([pyqt_dir, 'lib'], ['.']),
|
||||
'--add-data', datapath(
|
||||
['beeref', 'documentation'], ['beeref', 'documentation']),
|
||||
'--add-data', datapath(
|
||||
['beeref', 'assets', '*.png'], ['beeref', 'assets']),
|
||||
'beeref/__main__.py'
|
||||
])
|
||||
|
||||
print('Zipping output...')
|
||||
outfilename = os.path.join('dist', f'{appname}-{sys.platform}')
|
||||
print(f'Zipping output to {outfilename}.zip')
|
||||
shutil.make_archive(
|
||||
os.path.join('dist', appname),
|
||||
outfilename,
|
||||
'zip',
|
||||
root_dir='dist',
|
||||
base_dir=appname)
|
||||
|
|
|
|||
Loading…
Reference in a new issue