• General
  • Not allow access to the source code of the program running at boot

Hi Bela colleagues and users!

I got started recently with Bela, and I have a very simple question for you guys: is there a way to share my Bela device with somebody, so they can test the program running at boot, but not allowing this person to check the source code of the program if he plugs my Bela device to his computer?

I know that Bela is all about open hardware and sharing, but there could be some scenarios where for whatever reason we just don't want someone to have our code. Isn't just possible to compile the program and upload it to Bela without it being available in the Bela IDE?

Thanks,
Pedro

if you create a file in /opt/Bela/local/bela_startup.sh and make it executable, it will be run on boot with the following environment variables set:
PROJECT the project name
ARGS the command-line arguments to pass to the project at runtime.

Keeping in mind that the project's folder is /root/Bela/projects/$PROJECT and the project's executable file is $PROJECT in that folder, if you put the following into /opt/Bela/local/bela_startup.sh :

#!/bin/bash

cd /root/Bela/projects/$PROJECT
./$PROJECT $ARGS

and make it executable with chmod +x /opt/Bela/local/bela_startup.sh, then all that will happen at boot is that the program will be executed without trying to build it. This means that you can remove any source files after building it and it will still run.