Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linux build and startup #400

Open
wants to merge 94 commits into
base: master
Choose a base branch
from

Conversation

keinstein
Copy link

Finally, I managed to compile a version of Ctrlr that

  • works with Lua 5.1
  • doesn't crash on startup
  • replaces lua usb support using the system prvided libusb (which should avoid many problems)
  • documents which libraries must be installed inorder to build the program

TODO:

  • Conditional compilation of libraries: Some libraries like lua can be provided by the linux distrubution but may be not part of the Windows infrastructure.
  • ensure static linkage of the libraries

jmechnich and others added 30 commits October 13, 2021 12:14
- added vst2sdk to header search path
- use standard AU type 'aumi'
This patch circumvents program aborts when
 - The window is too small so that the text width may get negative
 - uiImageSlider is fully initialised, so that the slider range contains invalid data
…name.

When a Lua chank has a name, after the compilation an extended type of the
variable with the chunk's name is stored in the CtrlrLuaMethod object.
Errors are defined as additional types. This complies to the fact that a
Lua chunk can contain everything, not only a single functions.

The function isValid() changed its semantics from “running fine, so far”
to “no probable error has been detected, so far“. In this sense a named Lua
chunk that does not define a variable with the chunk's name is considered to
probably contain an error. The function isValid() is mainly used to inform
the Ctrlr user/programmer that a certain chunk is problematic in some way,
which meens colouring its name red if isValid() returns false.

In order to invalid calls to the Lua variable a function isCallable() has
been introduced. It returns true iff the Lua chunk defines a function with
the chunk's name that compiles fine and did not raise any Lua error so far.
So, isCallable() covers most of the cases where isValid() had been called
until this patch.

In order to avoid unnecessary confusion “json4lua“ has been renamed to “json”
and “debugger.lua” has been renamed to “debugger”.
This helps to find out to which panel an error message belongs to.
Especially on startup, when many panels are loaded at once.
A thread should be running either as detached thread or as joinable thread.
JUCE blurres this nomenclature with their own words.

In general creating and deleting a system thread is expensive.
So it should be deleted when it is save (i.e. not in realtime functions).

This patch solves several issues with the thread:
- the thread should exit if it gets signalled by setting a special
  variable. This variable is handled by JUCE.
- The main program should signal the thread to end its action. This is done
  by stopThread() by setting the status variable and waking up the thread.
- When the thread ends before the main program allows it to end,
  it must wait indefinitely. Otherwise an undefined state with a race
  condition is created, which may cause additional trouble.
	This allows the compiler to warn about unimplemented values.
	* using menu of the file editor
	* from the method tree context menu
The previous patches were developed against Lua 5.2
- Update luausb (now located in libs)
- Don't build included libusb (fixes RomanKubiak#321)
- Link against system provided libusb on LinuxMakefile

TODO: Windows, MacOS and Code::Blocks
- use system lua library
- use separate luausb library and system provided libusb
- drop linking against udev
- Fix ALSA initialisation in JUCE
- Set global include path for project files
- new libraries in libs instead of Source/Misc
  - ready to make new libraries into git subprojects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants