Browse Source

Remove cbox from build system

Nils 6 months ago
  1. 32
  2. 6
  3. 16


@ -5,45 +5,22 @@
#This is a makefile and needs tabs, not spaces.
.PHONY: install uninstall clean gitclean resources calfbox
.PHONY: install uninstall clean gitclean resources
all: | calfbox
#Our Program
mkdir -p build
cd build && printf "prefix = \"$(PREFIX)\"" >
#Only copy the needed files
cp -r "$(PROGRAM)" engine qtgui sitepackages template build
#We only need the installed calfbox in local sitepackages. The repo in template is full with build data anyway, don't zip that in.
rm -rf build/template/calfbox
cp -r "$(PROGRAM)" engine qtgui template build
#Clean all pycache in build
cd build && find . -type d -name "__pycache__" -exec rm -r {} +
python3 -m zipapp "build" --output="$(PROGRAM).bin" --python="/usr/bin/env python3"
rm build/
#A mode that just compiles calfbox locally so you can run the whole program standalone
mkdir -p sitepackages
#First build the shared lib. Instead of running make install we create the lib ourselves directly
cd template/calfbox && echo $(shell pwd)
#cd template/calfbox && make && make install DESTDIR=$(shell pwd)/../../sitepackages
cd template/calfbox && make
cp template/calfbox/.libs/ sitepackages/"lib$(PROGRAM).so.$(VERSION)"
#We need to be in the directory, make uses subshells which will forget the work-dir in the next line. So here is a trick:
#cd template/calfbox && python3 build && python3 install --user --install-lib ../../sitepackages
#The line above is too much for our specialized use-case. We just copy the few files we need manually.
mkdir -p sitepackages/calfbox
cp template/calfbox/py/ sitepackages/calfbox
cp template/calfbox/py/ sitepackages/calfbox
cp template/calfbox/py/ sitepackages/calfbox
cp template/calfbox/py/ sitepackages/calfbox
cp template/calfbox/py/ sitepackages/calfbox
cp template/calfbox/py/ sitepackages/calfbox
cd template/calfbox && make distclean && rm -rf build
cd template/calfbox && rm -rf .deps/ aclocal.m4 autom4te.cache/ compile config.guess config.sub configure depcomp install-sh missing
rm -rf build/
rm -rf sitepackages
rm -f "$(PROGRAM).bin"
rm Makefile
find . -type d -name "__pycache__" -exec rm -r {} +
@ -78,8 +55,6 @@ install:
install -D -m 644 desktop/images/256x256.png $(DESTDIR)$(PREFIX)/share/pixmaps/$(PROGRAM).png
install -D -m 755 sitepackages/lib$(PROGRAM).so.$(VERSION) -t $(DESTDIR)$(PREFIX)/lib/$(PROGRAM)
install -d $(DESTDIR)$(PREFIX)/share/$(PROGRAM)
cp -r engine/resources/* $(DESTDIR)$(PREFIX)/share/$(PROGRAM)/
install -D -m 644 template/engine/resources/metronome/* -t $(DESTDIR)$(PREFIX)/share/$(PROGRAM)/template/metronome
@ -89,7 +64,6 @@ uninstall:
rm -rf $(DESTDIR)$(PREFIX)/share/template/$(PROGRAM)
rm -rf $(DESTDIR)$(PREFIX)/share/doc/$(PROGRAM)
rm -rf $(DESTDIR)$(PREFIX)/share/$(PROGRAM)
rm -rf $(DESTDIR)$(PREFIX)/lib/$(PROGRAM)
rm -f $(DESTDIR)$(PREFIX)/bin/$(PROGRAM)


@ -46,12 +46,6 @@ python3 -c 'import PyQt5' >/dev/null 2>&1 || { echo >&2 "PyQt for Python3 >= $re
PYQTVERSION=$(python3 -c 'from PyQt5.QtCore import QT_VERSION_STR; print(QT_VERSION_STR)')
if version_gt $required_version_pyqt $PYQTVERSION; then echo "PyQt must be version >= $required_version_pyqt but is $PYQTVERSION. Aborting."; exit 1; fi
echo "Sub-Configure for calfbox"
set -e
#We need to be in the directory,
cd template/calfbox && ./ && ./configure --prefix=$(pwd)/../../sitepackages --without-ncurses --without-python --without-libusb $cboxconfigure > /dev/null
cd ../..
echo "generating makefile"
printf "PREFIX=$prefix\nPROGRAM=$program\nVERSION=$version\n" >Makefile


@ -33,19 +33,15 @@ It is possible to clone a git repository.
`git clone<shortname>.git`
## Dependencies
* Glibc
* Python 3.6 (maybe earlier)
* PyQt5 for Python 3
* DejaVu Sans Sarif TTF (Font) (recommended, but not technically necessary)
* libcalfbox-lss
#### Build Dependencies
* Bash
* GCC (development is done on 8.2, but most likely you can use a much earlier version)
### Environment:
* Jack Audio Connection Kit must be running
* Agordejo / New Session Manager ("NSM")
* Optional: Agordejo / New Session Manager ("NSM")
## Build
./configure --prefix=/usr/local
@ -90,13 +86,6 @@ prompt to save changes.
## From source directory
You can run <name> after extracting the release archive or cloning from git, without installation.
### Calfbox
"Calfbox" is the name of our internal realtime midi/audio python module.
* It is bundled with the application for a normal install.
* Or you could run `./configure` and `make calfbox` without subsequent install, which creates a `sitepackages` directory in the source dir. You can then run `./<shortname>` directly from the source.
* A third option is `./<shortname> --mute` which runs without sound at all and does not need calfbox.
### From source directory with NSM
The developer uses this way to develop and use the software, so it will always be as stable as the
compiled version. But it is a bit less performant than building and installing it.
@ -120,4 +109,3 @@ Or even shorter:
This is the minimal run mode which is only useful for testing and development. But if you only want
to look at the GUI and are not in the mood to install anything -including dependencies-, go ahead.