Installing compiled App on Raspberry Pi

  1. 7 weeks ago

    Has anyone installed compiled apps on Raspberry Pi? I am not a Linux or Raspberry Pi guru and am struggling to figure out how to install applications and then have a "clean" way of updating them when needed. I get the impression that the only (or more or less correct) way is APT but the instructions for that make code signing and notarising by command line on MacOS look like child's play.

    @Niels dBoer That is the good news. What does not work is the .desktop file and a way to add an icon to the menu. I am able to add the executable to the menu and launch it, but not show the application icon.

    The .desktop is now corrected: I had a combination of minor errors in the .desktop files (some additional spaces seem to be the problem) as well as one additional step was needed which was to restart the lxde environment link text after the package install.

    The attached link is the demo project and package file structure which I tested if anyone is curious:
    https://1drv.ms/u/s!AvNnNHA7In4qqNtqEg_uudhj7Lbnfg?e=l6Qaut

    To build the package, use

    dpkg-deb -b Hello-1.0_0

    from the base folder. Transfer Hello-1.0_0.deb with FTP to the Downloads folder on Pi and then install using

    sudo dpkg -i Hello-1.0_0.deb

    Once installed, reset lxde environment on the Pi

    lxpanelctl restart
  2. Markus R

    Feb 15 Pre-Release Testers, Xojo Pro Europe / Germany / Lower Saxon...
    Edited 7 weeks ago

    you will give your app others?

    for my home Raspberry Pi i manage it via remote desktop from windows.
    i add Samba so it appear in my windows network.
    other file transfer tool for windows is WinSCP.
    or as Anthony said, with ms power shell you can reach your pi via ssh.
    the xojo runtime i installed with this shell command sudo apt-get install libunwind8

  3. Anthony C

    Feb 15 Pre-Release Testers, Xojo Pro, XDC Speakers, Third Party Store, Forum Moderators, MVP GraffitiSuite Developer

    I typically just:

    • ZIP the build
    • Upload via SSH
    • Stop old instance
    • Unzip
    • Set executable
    • And run.
  4. It will be an in-house app (installed on 2 raspberry pis) but it will be deployed 1000 km away from where I stay...

    The intention is to use a raspberry pi with 7" touch screen (no keyboard and mouse, except for initial configuration). At the moment I use ftp to copy over and install, but updates might have to be done when I am far away.

    If this works, I have a second application where we potentially use raspberry pi's at 100s of locations.

  5. Ivan T

    Feb 15 Pre-Release Testers

    In this case I just use the TeamViewer file transfer. To update; Stop the app, transfer new app (only updates modified files), set executable, run.

    Do you test already the app on the touch screen? Xojo has some bugs with them.

  6. Markus R

    Feb 15 Pre-Release Testers, Xojo Pro Europe / Germany / Lower Saxon...
    Edited 7 weeks ago

    @Niels dBoer If this works, I have a second application where we potentially use raspberry pi's at 100s of locations.

    and i guess you not get from any of this devices a user login?
    i think best practice would be provide a packed source (your ftp),
    add this to device and then it need execute some apt-get commands by script or xojo tool.
    i guess you not want add your app setup to a default raspberry packed source to spread it around the world.

  7. @Markus R i guess you not want add your app setup to a default raspberry packed source to spread it around the world.

    The 2nd app I would like to add as a default raspberry packed source. The first one not. The first app is urgent, the second is a longer term project.

    @Ivan T Do you test already the app on the touch screen? Xojo has some bugs with them.

    Partially. No problems yet, but I still need to add a QR code reader. I have some flexibility to work around issues. The interface needs to be extremely simple and that is one reason to use a Pi with touch screen and not a PC. QR code reader functionality is more critical than touch screen.

  8. Alex B

    Feb 15 Pre-Release Testers, Xojo Pro Vancouver - Canada

    I have a build script that allows me to enter important information like changes and version numbers. It then packs that into a zip file I can give to clients so they can put it on a USB stick. When they insert it into the PI it recognizes it and looks for the specific zip file with my code in it. An update is attempted but will auto revert if not successful. I always leave a copy of Teamviewer so if it all goes bad I can log in and fix it. As I don't want to expose the PI interface to the user, I have written an interface for connecting to wifi and turning on Teamviewer.

  9. Matthew S

    Feb 17 Pre-Release Testers, Xojo Pro

    @Niels dBoer I get the impression that the only (or more or less correct) way is APT but the instructions for that make code signing and notarising by command line on MacOS look like child's play.

    dpkg offers a pretty straightforward way to distribute pre-compiled binaries within a .deb package.

    There is the skeleton of a tutorial here If you do not need the systemv / systemd stuff you can just ignore it.

  10. Tim J

    Feb 17 Pre-Release Testers, Xojo Pro N. Phoenix, AZ

    If you have a specific layout that is required, the -P (upper case P) to tar can be your friend. You can configure your layout on a local Pi, create a tarball of the bits using "sudo tar =zcvPf MyApp_X.Y.Z.tgz /Path1 .Path2 /Path3 ..." and then when you extract it on the remote Pi, use "sudo tar -zxPvf MyApp_X.Y.Z.tgz" and your parts are all exactly where they should be.

    That takes a lot of "user error" out of installations where the "user" is not a Linuxphile™.

  11. 6 weeks ago

    @Matthew S dpkg offers a pretty straightforward way to distribute pre-compiled binaries within a .deb package.

    There is the skeleton of a tutorial here If you do not need the systemv / systemd stuff you can just ignore it.

    I am getting there slowly.

    I build a simple "Hello World" app which is a window and a close button.

    • Installed dpkg on Mac using brew so can develop packages on my development machine.
    • Was able to build the package, transfer to Pi and install - and run it using the file manager....
    • Was able to remove the package in full using uninstall function
    dpkg -r Hello

    I have not checked the upgrade process yet for installing a new version.

    That is the good news. What does not work is the .desktop file and a way to add an icon to the menu. I am able to add the executable to the menu and launch it, but not show the application icon.

  12. Niels d

    Feb 22 Answer
    Edited 6 weeks ago

    @Niels dBoer That is the good news. What does not work is the .desktop file and a way to add an icon to the menu. I am able to add the executable to the menu and launch it, but not show the application icon.

    The .desktop is now corrected: I had a combination of minor errors in the .desktop files (some additional spaces seem to be the problem) as well as one additional step was needed which was to restart the lxde environment link text after the package install.

    The attached link is the demo project and package file structure which I tested if anyone is curious:
    https://1drv.ms/u/s!AvNnNHA7In4qqNtqEg_uudhj7Lbnfg?e=l6Qaut

    To build the package, use

    dpkg-deb -b Hello-1.0_0

    from the base folder. Transfer Hello-1.0_0.deb with FTP to the Downloads folder on Pi and then install using

    sudo dpkg -i Hello-1.0_0.deb

    Once installed, reset lxde environment on the Pi

    lxpanelctl restart
  13. Tim J

    Feb 23 Pre-Release Testers, Xojo Pro N. Phoenix, AZ

    @Niels dBoer - please mark your message above as the answer

    @Jason P - please pin this under Linux as Niels' answer is a very helpful tip.

  14. 4 weeks ago

    Just to note: on the mac, one more step is needed: you need to delete the .DS_Store files before building the package:

    #!/bin/bash
    
    find ~/projectdir/setup/pi/packagename -iname .DS_Store -delete
    dpkg-deb -b packagename

    I created a small script to do this. If you don't do it you run into problems when doing an update (first install is ok, but then installing second package is not).

    On the pi I have a small update script mypackageupdate.sh

    wget http://mydomain.com/downloads/packagename.deb
    sudo dpkg -i packagename.deb
    lxpanelctl restart
    rm packagename.deb

    This makes updates easy.

  15. Tim J

    Mar 5 Pre-Release Testers, Xojo Pro N. Phoenix, AZ

    One note on this -

    If you don't open the app folder on the Mac before you copy it over, the .DS_Store file(s) won't be created.

or Sign Up to reply!