mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Merge branch 'main' of github.com:DJ2LS/FreeDATA into ls-gui
This commit is contained in:
commit
8a183d5cf9
19
.github/workflows/build_multiplatform.yml
vendored
19
.github/workflows/build_multiplatform.yml
vendored
|
@ -294,8 +294,8 @@ jobs:
|
|||
# now build tnc binaries
|
||||
pyinstaller -y freedata.spec
|
||||
# and to some final cleanup
|
||||
cp -r -f dist/tnc/* dist/
|
||||
rm -r dist/tnc
|
||||
# cp -r -f dist/tnc/* dist/
|
||||
# rm -r dist/tnc
|
||||
|
||||
- name: Build binaries Linux and Windows
|
||||
if: ${{!startsWith(matrix.os, 'macos')}}
|
||||
|
@ -338,10 +338,23 @@ jobs:
|
|||
- name: LIST ALL FILES
|
||||
run: ls -R
|
||||
|
||||
- name: Download Portaudio binaries
|
||||
- name: Download Portaudio binaries Linux macOS
|
||||
if: ${{!startsWith(matrix.os, 'windows')}}
|
||||
working-directory: tnc
|
||||
run: |
|
||||
if ! test -d "dist/tnc/_sounddevice_data"; then
|
||||
git clone https://github.com/spatialaudio/portaudio-binaries dist/tnc/_sounddevice_data/portaudio-binaries
|
||||
fi
|
||||
|
||||
- name: Download Portaudio binaries Windows
|
||||
if: ${{startsWith(matrix.os, 'windows')}}
|
||||
working-directory: tnc
|
||||
run: |
|
||||
if(Test-Path -Path "dist/_sounddevice_data"){
|
||||
echo "sounddevice folder already exists"
|
||||
} else {
|
||||
git clone https://github.com/spatialaudio/portaudio-binaries dist/tnc/_sounddevice_data/portaudio-binaries
|
||||
}
|
||||
|
||||
- name: LIST ALL FILES
|
||||
run: ls -R
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "FreeDATA",
|
||||
"version": "0.6.12-alpha.1",
|
||||
"version": "0.6.12-alpha.6",
|
||||
"description": "FreeDATA ",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -60,17 +60,20 @@ def freedv_get_mode_name_by_value(mode: int) -> str:
|
|||
|
||||
|
||||
# Check if we are running in a pyinstaller environment
|
||||
if hasattr(sys, "_MEIPASS"):
|
||||
sys.path.append(getattr(sys, "_MEIPASS"))
|
||||
else:
|
||||
sys.path.append(os.path.abspath("."))
|
||||
#if hasattr(sys, "_MEIPASS"):
|
||||
# sys.path.append(getattr(sys, "_MEIPASS"))
|
||||
#else:
|
||||
sys.path.append(os.path.abspath("."))
|
||||
|
||||
log.info("[C2 ] Searching for libcodec2...")
|
||||
if sys.platform == "linux":
|
||||
files = glob.glob(r"**/*libcodec2*", recursive=True)
|
||||
files.append("libcodec2.so")
|
||||
elif sys.platform == "darwin":
|
||||
files = glob.glob(r"**/*libcodec2*.dylib", recursive=True)
|
||||
if hasattr(sys, "_MEIPASS"):
|
||||
files = glob.glob(getattr(sys, "_MEIPASS") + '/**/*libcodec2*', recursive=True)
|
||||
else:
|
||||
files = glob.glob(r"**/*libcodec2*.dylib", recursive=True)
|
||||
elif sys.platform in ["win32", "win64"]:
|
||||
files = glob.glob(r"**\*libcodec2*.dll", recursive=True)
|
||||
else:
|
||||
|
|
|
@ -262,15 +262,30 @@ class DAEMON:
|
|||
|
||||
# safe data to config file
|
||||
config.write_entire_config(data)
|
||||
import os, sys
|
||||
import sys
|
||||
|
||||
|
||||
|
||||
|
||||
# Try running tnc from binary, else run from source
|
||||
# This helps running the tnc in a developer environment
|
||||
try:
|
||||
command = []
|
||||
if sys.platform in ["linux", "darwin"]:
|
||||
command.append("./freedata-tnc")
|
||||
elif sys.platform in ["win32", "win64"]:
|
||||
command.append("freedata-tnc.exe")
|
||||
|
||||
if (getattr(sys, 'frozen', False) or hasattr(sys, "_MEIPASS")) and sys.platform in ["darwin"]:
|
||||
# If the application is run as a bundle, the PyInstaller bootloader
|
||||
# extends the sys module by a flag frozen=True and sets the app
|
||||
# path into variable _MEIPASS'.
|
||||
application_path = sys._MEIPASS
|
||||
command.append(application_path + '/freedata-tnc')
|
||||
|
||||
else:
|
||||
|
||||
if sys.platform in ["linux", "darwin"]:
|
||||
command.append("./freedata-tnc")
|
||||
elif sys.platform in ["win32", "win64"]:
|
||||
command.append("freedata-tnc.exe")
|
||||
|
||||
command += options
|
||||
proc = subprocess.Popen(command)
|
||||
|
@ -281,6 +296,7 @@ class DAEMON:
|
|||
except FileNotFoundError as err1:
|
||||
self.log.info("[DMN] worker: ", e=err1)
|
||||
command = []
|
||||
|
||||
if sys.platform in ["linux", "darwin"]:
|
||||
command.append("python3")
|
||||
elif sys.platform in ["win32", "win64"]:
|
||||
|
@ -288,6 +304,7 @@ class DAEMON:
|
|||
|
||||
command.append("main.py")
|
||||
command += options
|
||||
print(command)
|
||||
proc = subprocess.Popen(command)
|
||||
atexit.register(proc.kill)
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ Not nice, suggestions are appreciated :-)
|
|||
import subprocess
|
||||
from enum import Enum
|
||||
|
||||
VERSION = "0.6.12-alpha.1"
|
||||
VERSION = "0.6.12-alpha.6"
|
||||
|
||||
ENABLE_EXPLORER = False
|
||||
|
||||
|
|
Loading…
Reference in a new issue