Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Or you can use any other tools that you would normally use when building for Linux.

That's not super helpful if you've never built anything for Linux before.



Ok, let me try to be a bit more helpful then.

On Linux there are two big desktop environments, (GUIs, desktops etc. on macOS/Windows there's no choice, only one).

These environments are called GNOME and KDE.

The Librem5 will by default ship with a GNOME-based environment, customized for phones. On GNOME, you program GUI applications using a widget library called GTK, now at version 3. Think of this akin to Cocoa/WinForms.

There are two main programming languages to develop GTK apps, C and Vala, (Vala's akin to C#), however there are bindings to many other languages including Python and JavaScript, so unlike on macOS/Windows, you're not as restricted when it comes to your development environment.

GNOME has an IDE for building applications intended to run on it called Builder, akin to Xcode/Visual Studio. You'd normally use this IDE to develop your app. You'd want to select the Flatpak project type. Flatpak is a way to ship apps that will be supported on the phone. There's a library called libhandy you can use to make sure your app fits nicely on the phone ie is responsive.

The reference GNOME docs can be found at https://developer.gnome.org, the Librem 5 dev docs, which are WIP are at https://developer.puri.sm/Librem5 and the libhandy API docs are at https://honk.sigxcpu.org/projects/libhandy/doc

Now because this phone is GNU/Linux and is open, you're not restricted to what I laid out above, that's just the most sanctioned way to develop apps.

The phone will be able to run any Linux binary that can be compiled for ARM, so as long as the compiler you're using can do that you can use pretty much any language, framework etc. You can even draw your graphics via OpenGL or ship a command line app or anything else you may wish.

You're not as restricted, but also not as guided as on iOS/Android.


Sorry, I realized my comment was probably snarkier than I mean it and made it look like I was fishing for a "more helpful" answer. :)

That said, this is a great comment! Thanks for summarizing!


No problem, honestly I was just a bit lazy with my first comment, you pushed me to stop being lazy, so thanks. :-)


iOS and Android basically provide a sandbox for Apps (where the user can set permissions). Does Librem5 do the same, or does it install programs like, say, apt-get would do, that is, without sandbox per application?


Flatpak is what provides you with a way to package applications with all of its dependencies and also provides a per-application sandbox. You'd normally install an application via the Flatpak app store that is going to be on the phone.

apt would remain an option for those who want it, but for regular users they'd install the Flatpaks via an app store like interface.


Wouldn't you go the Builder route then?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: