Merge branch 'main' into ls-gui

This commit is contained in:
Mashintime 2023-01-21 16:11:31 -05:00 committed by GitHub
commit 88577d3b10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 95 additions and 83 deletions

View file

@ -100,9 +100,6 @@ jobs:
name: libcodec2_${{ matrix.os }}_${{ matrix.platform.name }}_${{ matrix.architecture }}.${{ matrix.platform.file }} name: libcodec2_${{ matrix.os }}_${{ matrix.platform.name }}_${{ matrix.architecture }}.${{ matrix.platform.file }}
path: codec2/tempfiles/* path: codec2/tempfiles/*
BUILD_ARM: BUILD_ARM:
# The host should always be linux # The host should always be linux
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -199,6 +196,7 @@ jobs:
name: Build FreeDATA packages name: Build FreeDATA packages
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
fail-fast: false
matrix: matrix:
os: [ubuntu-20.04, macos-11, windows-latest] os: [ubuntu-20.04, macos-11, windows-latest]
include: include:
@ -236,7 +234,7 @@ jobs:
- name: Install Node.js, NPM and Yarn - name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 16 node-version: 18
- name: Create tnc/dist - name: Create tnc/dist
working-directory: tnc working-directory: tnc
@ -282,27 +280,25 @@ jobs:
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -r requirements.txt pip install -r requirements.txt
- name: Add MacOS certs
if: ${{startsWith(matrix.os, 'macos')}}
run: chmod +x add-osx-cert.sh && ./add-osx-cert.sh
env:
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
# - name: Install Pyaudio Windows - name: Build binaries macOS
# if: ${{startsWith(matrix.os, 'windows')}} if: ${{startsWith(matrix.os, 'macos')}}
# working-directory: tnc/lib/pyaudio/windows working-directory: tnc
# run: | run: |
# pip install PyAudio-0.2.11-cp39-cp39-win_amd64.whl # now build tnc binaries
pyinstaller -y freedata.spec
# and to some final cleanup
cp -r -f dist/tnc/* dist/
rm -r dist/tnc
# - name: Display structure of downloaded files - name: Build binaries Linux and Windows
# run: ls -R if: ${{!startsWith(matrix.os, 'macos')}}
# - name: cleanup codec2
# working-directory: tnc/lib/
# run: |
# mkdir codec2
# cd codec2
# - uses: actions/download-artifact@v3
# with:
# path: tnc/lib/codec2
- name: Build binaries
working-directory: tnc working-directory: tnc
run: | run: |
# pyinstaller freedata.spec # pyinstaller freedata.spec
@ -311,8 +307,8 @@ jobs:
python3 -m nuitka --enable-plugin=numpy --assume-yes-for-downloads --standalone daemon.py python3 -m nuitka --enable-plugin=numpy --assume-yes-for-downloads --standalone daemon.py
python3 -m nuitka --enable-plugin=numpy --assume-yes-for-downloads --standalone main.py python3 -m nuitka --enable-plugin=numpy --assume-yes-for-downloads --standalone main.py
- name: Copy binaries - Linux and MacOS - name: Copy binaries - Linux
if: ${{!startsWith(matrix.os, 'windows')}} if: ${{startsWith(matrix.os, 'ubuntu')}}
working-directory: tnc working-directory: tnc
run: | run: |
cp -r -f daemon.dist/* dist/tnc cp -r -f daemon.dist/* dist/tnc
@ -327,6 +323,8 @@ jobs:
cp -r -Force main.dist/* dist/tnc cp -r -Force main.dist/* dist/tnc
- name: Rename tnc binaries - name: Rename tnc binaries
# we don't need renaming for pyinstaller builds as output name is defined
if: ${{!startsWith(matrix.os, 'macos')}}
working-directory: tnc working-directory: tnc
run: | run: |
mv dist/tnc/daemon* dist/tnc/${{ matrix.daemon_binary_name }} mv dist/tnc/daemon* dist/tnc/${{ matrix.daemon_binary_name }}
@ -336,6 +334,7 @@ jobs:
with: with:
path: tnc/dist/tnc path: tnc/dist/tnc
- name: LIST ALL FILES - name: LIST ALL FILES
run: ls -R run: ls -R
@ -347,51 +346,18 @@ jobs:
- name: LIST ALL FILES - name: LIST ALL FILES
run: ls -R run: ls -R
#- name: Compress TNC - name: cleanup on macos before code signing
# # if: ${{!startsWith(matrix.os, 'windows') }} if: ${{startsWith(matrix.os, 'macos')}}
# shell: bash run: |
# run: | ls -l
# cd ./tnc/dist # find . -type d -name .git -exec rm -r {} \;
# zip -r ./${{ matrix.zip_name }}.zip * find . -type d -o -name ".git" -delete
##- name: Copy TNC to GUI
## run: |
## # cp -R ./tnc/dist/tnc ./gui/tnc
## cp -R ./tnc/dist ./gui/tnc
##- name: LIST ALL FILES
## run: ls -R
##- name: Compress TNC
## uses: thedoctor0/zip-release@master
## with:
## type: 'zip'
## filename: '${{ matrix.zip_name }}'
## # directory: ./tnc/dist/tnc
## directory: ./tnc/dist/tnc
## path: .
## # exclusions: '*.git* /*node_modules/* .editorconfig'
##- name: LIST ALL FILES
## run: ls -R
##- name: Upload TNC artifacts
## uses: actions/upload-artifact@v3
## with:
## name: ${{ matrix.zip_name }}.zip
## # path: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip
## path: ./tnc/dist/${{ matrix.zip_name }}.zip
##- name: Release TNC
## uses: softprops/action-gh-release@v1
## if: startsWith(github.ref, 'refs/tags/v')
## with:
## files: ./tnc/dist/tnc/${{ matrix.zip_name }}.zip
## #files: ./tnc/dist/${{ matrix.zip_name }}.zip
- name: Build/release Electron app - name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1 uses: samuelmeuli/action-electron-builder@v1
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
with: with:
package_root: "./gui/" package_root: "./gui/"
github_token: ${{ secrets.github_token }} github_token: ${{ secrets.github_token }}
@ -399,6 +365,7 @@ jobs:
# release the app after building # release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }} release: ${{ startsWith(github.ref, 'refs/tags/v') }}
args: ${{ matrix.electron_parameters }} args: ${{ matrix.electron_parameters }}
max_attempts: 3
- name: Compress TNC - name: Compress TNC
uses: thedoctor0/zip-release@master uses: thedoctor0/zip-release@master

View file

@ -21,6 +21,7 @@ jobs:
- python-version: "3.9" - python-version: "3.9"
- python-version: "3.10" - python-version: "3.10"
- python-version: "3.11" - python-version: "3.11"
- python-version: "3.12-dev"
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

23
add-osx-cert.sh Normal file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env sh
KEY_CHAIN=build.keychain
CERTIFICATE_P12=certificate.p12
# Recreate the certificate from the secure environment variable
echo $CERTIFICATE_OSX_APPLICATION | base64 --decode > $CERTIFICATE_P12
#create a keychain
security create-keychain -p actions $KEY_CHAIN
# Make the keychain the default so identities are found
security default-keychain -s $KEY_CHAIN
# Unlock the keychain
security unlock-keychain -p actions $KEY_CHAIN
security import $CERTIFICATE_P12 -k $KEY_CHAIN -P $CERTIFICATE_PASSWORD -T /usr/bin/codesign;
security set-key-partition-list -S apple-tool:,apple: -s -k actions $KEY_CHAIN
# remove certs
rm -fr *.p12

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
<key>com.apple.security.automation.apple-events</key>
<true/>
</dict>
</plist>

View file

@ -1,6 +1,6 @@
{ {
"name": "FreeDATA", "name": "FreeDATA",
"version": "0.6.11-alpha.2", "version": "0.6.11-alpha.5",
"description": "FreeDATA ", "description": "FreeDATA ",
"main": "main.js", "main": "main.js",
"scripts": { "scripts": {
@ -28,6 +28,9 @@
}, },
"homepage": "https://freedata.app", "homepage": "https://freedata.app",
"dependencies": { "dependencies": {
"@electron/asar": "^3.2.3",
"@electron/osx-sign": "^1.0.4",
"@popperjs/core": "^2.11.6",
"blob-util": "^2.0.2", "blob-util": "^2.0.2",
"bootstrap": "^5.2.3", "bootstrap": "^5.2.3",
"bootstrap-icons": "^1.10.3", "bootstrap-icons": "^1.10.3",
@ -50,31 +53,30 @@
"uuid": "^9.0.0" "uuid": "^9.0.0"
}, },
"devDependencies": { "devDependencies": {
"electron": "^22.0.2", "electron": "^22.0.2",
"electron-builder": "^23.6.0" "electron-builder": "^23.6.0"
"@electron/notarize": "^1.2.3",
"electron-builder-notarize": "^1.5.0"
}, },
"build": { "build": {
"productName": "FreeDATA", "productName": "FreeDATA",
"appId": "app.freedata", "appId": "app.freedata",
"afterSign": "electron-builder-notarize",
"npmRebuild": "false", "npmRebuild": "false",
"directories": { "directories": {
"buildResources": "build", "buildResources": "build",
"output": "dist" "output": "dist"
}, },
"dmg": { "mac": {
"target": [
"default"
],
"icon": "build/icon.png", "icon": "build/icon.png",
"contents": [ "hardenedRuntime": true,
{ "entitlements": "build/entitlements.plist",
"x": 130, "entitlementsInherit": "build/entitlements.plist",
"y": 220 "gatekeeperAssess": false
},
{
"x": 410,
"y": 220,
"type": "link",
"path": "/Applications"
}
]
}, },
"win": { "win": {
"icon": "build/icon.png", "icon": "build/icon.png",
@ -98,7 +100,8 @@
"from": "../tnc/dist/tnc/", "from": "../tnc/dist/tnc/",
"to": "tnc", "to": "tnc",
"filter": [ "filter": [
"**/*" "**/*",
"!**/.git"
] ]
} }
] ]

View file

@ -25,6 +25,7 @@ daemon_exe = EXE(daemon_pyz,
[], [],
exclude_binaries=True, exclude_binaries=True,
name='freedata-daemon', name='freedata-daemon',
bundle_identifier='com.dj2ls.freedata-daemon',
debug=False, debug=False,
bootloader_ignore_signals=False, bootloader_ignore_signals=False,
strip=False, strip=False,
@ -62,6 +63,7 @@ tnc_exe = EXE(tnc_pyz,
[], [],
exclude_binaries=True, exclude_binaries=True,
name='freedata-tnc', name='freedata-tnc',
bundle_identifier='com.dj2ls.freedata-tnc',
debug=False, debug=False,
bootloader_ignore_signals=False, bootloader_ignore_signals=False,
strip=False, strip=False,

View file

@ -11,7 +11,7 @@ Not nice, suggestions are appreciated :-)
import subprocess import subprocess
from enum import Enum from enum import Enum
VERSION = "0.6.11-alpha.2" VERSION = "0.6.11-alpha.5"
ENABLE_EXPLORER = False ENABLE_EXPLORER = False