changed build action

tnc and daemon now in subdirectory which is not build as single application for easier debugging.
This commit is contained in:
dj2ls 2022-01-16 17:57:31 +01:00
parent cb5b2233b6
commit 2157130f69
2 changed files with 101 additions and 21 deletions

View file

@ -58,7 +58,7 @@ jobs:
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
working-directory: tnc working-directory: tnc
run: | run: |
pyinstaller -F --add-binary="lib/codec2/windows/*;lib/codec2/windows/" --add-binary="lib/hamlib/win32/*;lib/hamlib/win32" --add-binary="lib/hamlib/win64/*;lib/hamlib/win64" main.py -n tnc pyinstaller -F --add-binary="libcodec2.dll;lib/codec2/windows/" --add-binary="lib/hamlib/win32/*;lib/hamlib/win32" --add-binary="lib/hamlib/win64/*;lib/hamlib/win64" main.py -n tnc
@ -186,9 +186,8 @@ jobs:
- name: Build codec2 Linux - name: Build codec2 Linux
if: matrix.os == 'ubuntu-20.04' if: matrix.os == 'ubuntu-20.04'
#working-directory: tnc working-directory: tnc
run: | run: |
cd ~
git clone https://github.com/drowe67/codec2.git git clone https://github.com/drowe67/codec2.git
cd codec2 && mkdir build_linux && cd build_linux cd codec2 && mkdir build_linux && cd build_linux
cmake ../ cmake ../
@ -199,14 +198,8 @@ jobs:
if: matrix.os == 'ubuntu-20.04' if: matrix.os == 'ubuntu-20.04'
working-directory: tnc working-directory: tnc
run: | run: |
pyinstaller -F --add-binary lib/hamlib/linux/libhamlib.so:./lib/hamlib/linux/ -n daemon daemon.py pyinstaller freedata.spec
- name: Build Linux TNC
if: matrix.os == 'ubuntu-20.04'
working-directory: tnc
run: |
pyinstaller -F --add-binary ~/codec2/build_linux/src/libcodec2.so.1.0:. --add-binary lib/hamlib/linux/libhamlib.so:./lib/hamlib/linux/ -n tnc main.py
- name: LIST ALL FILES - name: LIST ALL FILES
shell: bash shell: bash
run: | run: |
@ -226,17 +219,18 @@ jobs:
name: tnc-artifact name: tnc-artifact
path: ./tnc/dist/compressed/* path: ./tnc/dist/compressed/*
- name: Copy TNC to GUI Linux
if: matrix.os == 'ubuntu-20.04'
run: |
cp -R ./tnc/dist/tnc ./gui/tnc
ls -R
- name: Install Node.js, NPM and Yarn - name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: 14 node-version: 14
- name: Copy TNC to GUI Linux
if: matrix.os == 'ubuntu-20.04'
run: |
cp -R ./tnc/dist ./gui/tnc
ls -R
- name: Build/release Electron app - name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1 uses: samuelmeuli/action-electron-builder@v1
with: with:
@ -259,10 +253,9 @@ jobs:
run: | run: |
mkdir gui-bundle mkdir gui-bundle
cp ./gui/dist/*.AppImage gui-bundle cp ./gui/dist/*.AppImage gui-bundle
cp ./tnc/dist/daemon gui-bundle cp -R ./tnc/dist/tnc gui-bundle
cp ./tnc/dist/tnc gui-bundle chmod +x ./gui-bundle/tnc/tnc
chmod +x ./gui-bundle/tnc chmod +x ./gui-bundle/tnc/daemon
chmod +x ./gui-bundle/daemon
cd ./gui-bundle cd ./gui-bundle
zip -r FreeDATA_linux.zip . zip -r FreeDATA_linux.zip .
ls -R ls -R

87
tnc/freedata.spec Normal file
View file

@ -0,0 +1,87 @@
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
# DAEMON --------------------------------------------------
daemon_a = Analysis(['daemon.py'],
pathex=[],
binaries=[],
datas=[( './lib/hamlib/linux/python3.8/site-packages/libhamlib.so.4', '.' )],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
daemon_pyz = PYZ(daemon_a.pure, daemon_a.zipped_data,
cipher=block_cipher)
daemon_exe = EXE(daemon_pyz,
daemon_a.scripts,
[],
exclude_binaries=True,
name='daemon',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None )
# add lib folder to system path. We only need to do this once
daemon_a.datas += Tree('./lib', prefix='lib')
daemon_a.datas += Tree('./codec2', prefix='codec2')
# TNC --------------------------------------------------
tnc_a = Analysis(['main.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
tnc_pyz = PYZ(tnc_a.pure, tnc_a.zipped_data,
cipher=block_cipher)
tnc_exe = EXE(tnc_pyz,
tnc_a.scripts,
[],
exclude_binaries=True,
name='tnc',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None )
coll = COLLECT(daemon_exe,
daemon_a.binaries,
daemon_a.zipfiles,
daemon_a.datas,
tnc_exe,
tnc_a.binaries,
tnc_a.zipfiles,
tnc_a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='tnc')