if version_gt $required_version_pyqt $PYQTVERSION; then echo "PyQt must be version >= $required_version_pyqt but is $PYQTVERSION. Aborting."; exit 1; fi
command -v nuitka3 >/dev/null 2>&1 || { echo >&2 "Nuitka3 is required but it's not installed. Aborting."; exit 1; }
if version_gt $required_version_nuitka $NUITKAVERSION; then echo "Nuitka3 must be version >= $required_version_nuitka but is $NUITKAVERSION. Aborting."; exit 1; fi
@ -37,7 +37,6 @@ It is possible to clone a git repository.
#### Build Dependencies
* Bash
* Nuitka >= 0.6 (maybe earlier. Optional when running from source dir)
* GCC (development is done on 8.2, but most likely you can use a much earlier version)
### Environment:
@ -90,7 +89,7 @@ You can run <name> after extracting the release archive or cloning from git, wit
### Calfbox
"Calfbox" is the name of our internal realtime midi/audio python module.
* You can either choose to install the module systemwide, which will make running all Laborejo Software Suite programs more convenient (when run from the source dir). Please consult https://github.com/kfoltman/calfbox
* You can either choose to install the module systemwide, which will make running all Laborejo Software Suite programs more convenient (when run from the source dir). Please consult https://github.com/kfoltman/calfbox
* Or you just run `./configure` and `make calfbox` without subsequent install, which creates a `site-packages` directory in the source dir.
* A third option is `<shortname> --mute` which runs without sound at all and does not need calfbox.
##assert os.path.exists(os.path.join(executableDir, executableName)) not valid anymore with zipapp. But it worked for years, so I guess the code is ok.
argv[0]=os.path.join(executableDir,executableName)#NSM speciality. nsmclient exlicitely checks for this
logger.info("Extracting shared library to temporary directory")
zipfilePath=get_script_dir().rstrip("/template")
assertzipfile.is_zipfile(zipfilePath),(zipfilePath)#in our tests this worked. but in lss this results not in a zip file header. linux file also says it is no zip. However, unzip works.
#Extract included .so to tmp dir, tmp dir gets garbage collected at the end of our program.
startSingleNSMServer(path)#provides NSM_URL environment variable and a limited drop-in replacement for NSM that will only answer to our application
assertgetenv("NSM_URL")
sys.path.append("site-packages")# If you compiled but did not install you can still run with the local build of cbox in our temp dir site-packages. Add path to the last place, in case there is an installed or bundled version
sys.path.append("sitepackages")# If you compiled but did not install you can still run with the local build of cbox in our temp dir sitepackages. Add path to the last place, in case there is an installed or bundled version
ifargs.directory:
#Switch to the mode without NSM.
@ -338,25 +356,37 @@ if args.mute:
#Make sure calfbox is available.
pycboxfound=False
if"CALFBOXLIBABSPATH"inos.environ:
logger.info("Looking for calfbox shared library in absolute path: {}".format(os.environ["CALFBOXLIBABSPATH"]))
else:
logger.info("Looking for calfbox shared library systemwide through ctypes.util.find_library")
try:
fromcalfboximportcbox
logger.info("{}: using cbox python module from {} . Local version has higher priority than system wide.".format(METADATA["name"],os.path.abspath(cbox.__file__)))
logger.info("{}: using cbox python module from {} . Local version has higher priority than system wide.".format(METADATA["name"],os.path.abspath(cbox.__file__)))
pycboxfound=True
exceptExceptionase:
print(e)
ifnotpycboxfound:
print("Here is some information. Please show this to the developers.")