Raspberry: Deploy application once cross build finished
I'm developing an application for Raspberry cross building it from Ubuntu environment.
All is working fine, I can test the application and I almost done.
Well.. how to transfer the application resultant into Raspberry once I finished?
The application should start without it is launched by remote.. but how?
if you´re running on some distribution like raspbian you can use cron to start your application after system boot. Run
sudo crontab -e.
and add a line like
@reboot /path/to/your/applicationto the bottom of the crontab file.
Thanks a lot, but my doubt is one step before.. :-P
which files do I need inside my Raspberry (Rasbian distribution, sorry I omit) ?
I mean, for testing the application I'm calling RUN through cross compile on Ubuntu virtual machine, but at the end on Raspberry I don't have executable file to call "alone".. once I have, you are right I can call automatically it by script.
Which files I have to copy on Raspberry? There is a "deploy" command in QT IDE.. I was thinking that it moves files on target.. but not..
How to do?
If you can cross-compile and run your application all needed libraries and your application have to be deployed already. Take a look at you
.profile. The deploy path is given as
In the target.path I have one file.. yes.. but if I double click it doesn't start. The icon is a "paper-plane", it seems executable but nothing happens. Sorry if the question is basic. In the past I developed without cross compile, directly on Raspy and in this case the executable file was really there and working with double click.. Should I do something before with it?
Can you run your application from terminal? The output may give hints why it does not start. Maybe some environment variable missing.
@Andreagugu You can do
to see which libraries ir requires and then copy those to your target as well.
I tried but calling the file double clicking on it, the terminal starts and close immediately, no way to see nothing. Calling the "ldd file" from terminal I get "it's not dynamic executable file" (translated from Italian..)
But how it's possible that there isn't a command from IDE to deploy, install on target?!?
It was really a stupid thing.. the target.path had a space in the path.. the system (I was not aware of this behavior) created another path where the correct executable file was created.
target.path = /home/pi/Project/MyApp Debug
and I found a folder called "Debug" in home/pi/Debug
Inside the file was working.. but come on !!
Thanks a lot for help
It worls also the call in crontab so now after boot the application starts automatically! Good.