mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
possible hotfix for missing portaudio
This commit is contained in:
parent
caaf613446
commit
f18604a38b
4 changed files with 26 additions and 9 deletions
6
.github/workflows/build_multiplatform.yml
vendored
6
.github/workflows/build_multiplatform.yml
vendored
|
@ -342,8 +342,8 @@ jobs:
|
||||||
if: ${{!startsWith(matrix.os, 'windows')}}
|
if: ${{!startsWith(matrix.os, 'windows')}}
|
||||||
working-directory: tnc
|
working-directory: tnc
|
||||||
run: |
|
run: |
|
||||||
if ! test -d "dist/_sounddevice_data"; then
|
if ! test -d "dist/tnc/_sounddevice_data"; then
|
||||||
git clone https://github.com/spatialaudio/portaudio-binaries dist/_sounddevice_data/portaudio-binaries
|
git clone https://github.com/spatialaudio/portaudio-binaries dist/tnc/_sounddevice_data/portaudio-binaries
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Download Portaudio binaries Windows
|
- name: Download Portaudio binaries Windows
|
||||||
|
@ -353,7 +353,7 @@ jobs:
|
||||||
if(Test-Path -Path "dist/_sounddevice_data"){
|
if(Test-Path -Path "dist/_sounddevice_data"){
|
||||||
echo "sounddevice folder already exists"
|
echo "sounddevice folder already exists"
|
||||||
} else {
|
} else {
|
||||||
git clone https://github.com/spatialaudio/portaudio-binaries dist/_sounddevice_data/portaudio-binaries
|
git clone https://github.com/spatialaudio/portaudio-binaries dist/tnc/_sounddevice_data/portaudio-binaries
|
||||||
}
|
}
|
||||||
|
|
||||||
- name: LIST ALL FILES
|
- name: LIST ALL FILES
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "FreeDATA",
|
"name": "FreeDATA",
|
||||||
"version": "0.6.12-alpha.2",
|
"version": "0.6.12-alpha.3",
|
||||||
"description": "FreeDATA ",
|
"description": "FreeDATA ",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -262,15 +262,30 @@ class DAEMON:
|
||||||
|
|
||||||
# safe data to config file
|
# safe data to config file
|
||||||
config.write_entire_config(data)
|
config.write_entire_config(data)
|
||||||
|
import os, sys
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Try running tnc from binary, else run from source
|
# Try running tnc from binary, else run from source
|
||||||
# This helps running the tnc in a developer environment
|
# This helps running the tnc in a developer environment
|
||||||
try:
|
try:
|
||||||
command = []
|
command = []
|
||||||
if sys.platform in ["linux", "darwin"]:
|
|
||||||
command.append("./freedata-tnc")
|
if getattr(sys, 'frozen', False):
|
||||||
elif sys.platform in ["win32", "win64"]:
|
# If the application is run as a bundle, the PyInstaller bootloader
|
||||||
command.append("freedata-tnc.exe")
|
# 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
|
command += options
|
||||||
proc = subprocess.Popen(command)
|
proc = subprocess.Popen(command)
|
||||||
|
@ -281,6 +296,7 @@ class DAEMON:
|
||||||
except FileNotFoundError as err1:
|
except FileNotFoundError as err1:
|
||||||
self.log.info("[DMN] worker: ", e=err1)
|
self.log.info("[DMN] worker: ", e=err1)
|
||||||
command = []
|
command = []
|
||||||
|
|
||||||
if sys.platform in ["linux", "darwin"]:
|
if sys.platform in ["linux", "darwin"]:
|
||||||
command.append("python3")
|
command.append("python3")
|
||||||
elif sys.platform in ["win32", "win64"]:
|
elif sys.platform in ["win32", "win64"]:
|
||||||
|
@ -288,6 +304,7 @@ class DAEMON:
|
||||||
|
|
||||||
command.append("main.py")
|
command.append("main.py")
|
||||||
command += options
|
command += options
|
||||||
|
print(command)
|
||||||
proc = subprocess.Popen(command)
|
proc = subprocess.Popen(command)
|
||||||
atexit.register(proc.kill)
|
atexit.register(proc.kill)
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ Not nice, suggestions are appreciated :-)
|
||||||
import subprocess
|
import subprocess
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
VERSION = "0.6.12-alpha.2"
|
VERSION = "0.6.12-alpha.3"
|
||||||
|
|
||||||
ENABLE_EXPLORER = False
|
ENABLE_EXPLORER = False
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue