Raspberry: Deploy application once cross build finished



  • Hello,
    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?

    Thanks
    Andrea



  • Hi Andreagugu,

    if you´re running on some distribution like raspbian you can use cron to start your application after system boot. Runsudo crontab -e.
    and add a line like @reboot /path/to/your/application to 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?
    Thanks



  • 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 target.path.



  • 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.


  • Moderators

    @Andreagugu You can do

    ldd your_app
    

    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?!?

    Ideas?



  • SOLVED!!
    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.

    it was:

    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 !!
    :-D

    Thanks a lot for help



  • @sneubert
    It worls also the call in crontab so now after boot the application starts automatically! Good.
    Thanks


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.