Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Raspberry: Deploy application once cross build finished
Forum Updated to NodeBB v4.3 + New Features

Raspberry: Deploy application once cross build finished

Scheduled Pinned Locked Moved Solved Installation and Deployment
10 Posts 3 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Andreagugu
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • sneubertS Offline
      sneubertS Offline
      sneubert
      wrote on last edited by
      #2

      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.

      A 1 Reply Last reply
      0
      • A Offline
        A Offline
        Andreagugu
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • sneubertS Offline
          sneubertS Offline
          sneubert
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Andreagugu
            wrote on last edited by
            #5

            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?

            jsulmJ 1 Reply Last reply
            0
            • sneubertS Offline
              sneubertS Offline
              sneubert
              wrote on last edited by
              #6

              Can you run your application from terminal? The output may give hints why it does not start. Maybe some environment variable missing.

              1 Reply Last reply
              0
              • A Andreagugu

                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?

                jsulmJ Online
                jsulmJ Online
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Andreagugu You can do

                ldd your_app
                

                to see which libraries ir requires and then copy those to your target as well.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  Andreagugu
                  wrote on last edited by
                  #8

                  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?

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    Andreagugu
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    • sneubertS sneubert

                      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.

                      A Offline
                      A Offline
                      Andreagugu
                      wrote on last edited by
                      #10

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

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved