PINE64
Writing apps/programs for pine phone - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: General Discussion on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=127)
+--- Thread: Writing apps/programs for pine phone (/showthread.php?tid=14856)



Writing apps/programs for pine phone - katesfb - 09-09-2021

Hi,
Once an OS is installed on to the pine phone what is the actual process of getting an App/program loaded on it. For example if a write a program in python how do i get it to successfully run on the pine phone?

Cheers.


RE: Writing apps/programs for pine phone - NW_Dev - 09-09-2021

  • First you'll need a desktop file that gives the OS the information about your App.

Example of desktop file:

[Desktop Entry]
Name=Your Apps Name
Type=Application
Comment=Short Description of your App
Icon=/home/YOURUSER/MyApps/App/App.png
Exec=python3 /home/YOURUSER/MyApps/App/MyCoolApp.py
Categories=Games;
Terminal=false

  • Now save that as a desktop file: MyCoolApp.desktop
  • Next make a small icon for your App.
  • Once you have those 2 files and your App files in the same folder, put all of it somewhere like /home/YOURUSER/MyApps.
  • Finally move your MyCoolApp.desktop to /home/YOURUSER/.local/share/applications



RE: Writing apps/programs for pine phone - luney - 09-09-2021

(09-09-2021, 04:45 PM)katesfb Wrote: Hi,
Once an OS is installed on to the pine phone what is the actual process of getting an App/program loaded on it. For example if a write a program in python how do i get it to successfully run on the pine phone?

Cheers.

The simple answer is, the same way you would on linux. That doesn't apply to Nemo, Luneos, UT, Sailfish, or android, but it applies to all of the other linux distros.

I suspect that doesn't help you though. There is also myriad of ways to write programs for a linux system. C, Rust, python, java, etc., which all have different (though similar) ways of compiling and starting software. If you mean, how do you host or package software in a repository, for .deb, flathub, snap, or app-whatever-that-one-is-called, that is a different question.

Do you currently write software in python?


RE: Writing apps/programs for pine phone - TRS-80 - 09-10-2021

Like luney said, just like on any other GNU/Linux.  What NW_Dev said is more if you want an icon in your app drawer.

1. Copy files / dir to the phone by whatever method.

2. Open shell, navigate to that directory.

3. Make sure the file is executable:

Code:
chmod +x your_program

4. Execute the file:

Code:
./your_program

Let us know what you are trying to do, what you did, and where you are stuck (or, let us know you got it to work  Smile ),

EDIT: Also check out the link in my signature for even more ways (to make GUI apps).


RE: Writing apps/programs for pine phone - biketool - 10-20-2021

I would like to have a discussion involving Pine64, and the various OSs' communities.
We need to decide on how we can get as many users access to the many great user made programs.
At this point flatpak is probably the solution as it crosses OSs.
Most of the OSs, in particular I am familiar with Mobian, there is a strict vetting and requirements to support any submitted apps for their official repos.
We need something which approximates the setup for Maemo though in that case we had single OS and single hardware platform; there were 4 levels of repo for maemo5, the official OVI store, maemo extras, extras testing, and extras devel; the OVI/OTA updates official repo was replaced by a community seamless software update service.
This is an ongoing request for comment until we have established a reasonable way to accept pinephone/pinetab community software community contributions across as many OSs as possible.
What creative way would you suggest we incorporate pine community contributed software?


RE: Writing apps/programs for pine phone - sagaracharya - 10-20-2021

+1 biketool

I'd like to write an application for pinephone. However, I'm currently using mobian phosh and I'm deeply concerned about battery performance (pinephone uses too much in idle locked state) and software specially made for mobile instead of porting desktop applications to phone. I tried pmOS sxmo and was shocked by the amount of battery used by such a wm based system.

How is user experience managed since mouse and trackpad maneuvering is different from touch maneuvering? Are all apps designed on frameworks like Qt and GTK where resizing window to mobile size takes care of pinephone and normal aspect ratio takes care of desktops?


RE: Writing apps/programs for pine phone - RTP - 10-21-2021

(09-09-2021, 04:45 PM)katesfb Wrote: Hi,
Once an OS is installed on to the pine phone what is the actual process of getting an App/program loaded on it. For example if a write a program in python how do i get it to successfully run on the pine phone?

Cheers.

Example for loading Python script (opens the kgx terminal and runs 'mact' script when you 'tap' the icon) you could use a line like:

Code:
Exec=/usr/bin/kgx --command mact

Where 'mact' acts as a start script command (in /usr/bin or using the direct path with +x)

(for Exec line in the .desktop as in example NW_dev shared above)


RE: Writing apps/programs for pine phone - Emelia525 - 03-11-2024

Thanks for this