Flutter as GUI on Linux (non-Android) - linux

I am thinking about creating a GUI for an embedded system using Flutter/Dart. The system will be a plain non-android system running on ARM.
The GUI will be the only piece of software visible on the screen, so there will be no need for a desktop environment.
I have done this before using QT embedded/C++, but the design requirements for the new device's GUI are such that this approach would be inefficient.
I was wondering if anyone might have succeeded in such an effort and would be willing to share.
Thanks.

The official Flutter documentation and examples for building a desktop shell is at:
https://flutter.dev/desktop
Desktop, embedded system, and web are still experimental and not yet fully supported, but building upon what others have attempted and links shared from the comments, so as mentioned:
There’s https://github.com/google/flutter-desktop-embedding, though some parts have been merged into the main Flutter SDK, others parts are still currently relevant for launching desktop apps, such as /example/linux inside flutter-desktop-embedding/example/.
Nov 2018, medium/Flutter on Raspberry Pi (mostly) from scratch, involves a Flutter engine built for ARMv7 and the embedder as https://github.com/chinmaygarde/flutter_from_scratch.
And one more, Oct 2019, medium/Flutter mobile, web and desktop, most recent and perhaps most useful since it demonstrates across three platforms (though not quite your requirements, since it runs in a desktop environment).
but I was able to get this sample running on Chrome and my Linux desktop following this, it will involve flutter-desktop-embedding/example/linux.
Otherwise, working examples are few and far between.
(there is another medium/Flutter for Desktop: Create and Run a Desktop Application, but is not recommended because it is based on an even older version, prone to various issues)

Updated 2020:
https://elinux.org/ELC_Europe_2020_Presentations, on the page, search "Graphical User Interface Using Flutter in Embedded Systems" for the pdf slides and youtube video.
the companion source code seems to be on https://github.com/sony/flutter-embedded-linux. (very active, should be more progress in 2021)

Related

Does Visual Studio 2022 have the same ability to open a javascript/nodejs project folder in a WSL2 Linux as VS Code is able to do?

If I'm in my WSL2 Ubuntu filesystem I can simply navigate to a javascript/nodejs folder and type code . to open that project folder and thanks to VS Code's Remote extensions, I'm essentially remoting into the Linux environment and ready to code.
Now Visual Studio 2022 has been released, I was wondering if it too supports the same level of cross-platform IDE capability as VS Code?
How, for instance, when in my WSL2 Ubuntu project in Windows Terminal, can I open my javascript/nodejs project in the Linux filesystem using VS2022, or is this not supported because VS Code is the only cross-platform IDE that can do this?
So its not really possible to do how your thinking. The problem here is that you your not understanding the difference between a "Code Editor", and an "Integrated Development Environment (IDE)", which is totally understandable, as the line that separates the two has become blurred in recent years, and also a topic of debate. There was a far more explicit distinction between the 2 10-15 years ago, however, Microsoft has done a good job at separating the two, where JetBrains will release a piece of software that can be used as an IDE, but is more often than not, used as an editor, but will still call it an IDE, even though its not an IDE in a pure sense.
How is all this related to your question?
When you open your Node.js project in VSCode via the code . command, you are opening it in an editor that implements Intelli-code, as well as a wealth of other tools, but essentially, the editor, and all the tools extract the names & file extensions of your documents, parse them (usually turning much of the info into an AST, where many extensions will make use of that info to offer the various tooling capabilities/features. The point is at the end of the day, the editor just parses all of your code, gives you info, and you make any changes as needed to your code. And again, this is what your doing with code .
With Visual Studio 2022, you can't open a project with it, unless its a project type the IDE supports, and enables the IDE, to embed its-self into your project. This includes things like built in environment, built in cache, built in build system, the files needed to bootstrap its-self. With an IDE, the IDE is part of the project.
So then why does Visual Stdio 2022 work with Node?
It works with node, to create Node.js applications within a windows environment, and it offers the ability to access different Windows SDK features via Node. These are things you could never do using server-side Linux builds with Node. When you build a Cpp application for windows, you package the entire thing in a .sin file, I haven't built a windows app in node, but I know that Node also uses the .sin file build system, which requires Visual Studio & Windows SDK to do, and parts of Visual Studio/Windows to be embedded into the project, for the project to be able to work in a Windows OS, and take advantage of MS Windows features.
Long story short, V.S. Code is the right tool for what your doing, why would Microsoft invest in two identical tools any way? If you ever want to build something for Windows, or for MS mobile device using Node, you will probably want to change your environment, to VS2022.

Run Google Native Client (nacl_sdk) on Samsung Chromebook

I was trying to follow the the installation tutorial of the Native Client SDK found here. However, my Samsung Chromebook (in developer mode) does not want to run ./naclsdk (chmod +x done), but instead returns the following:
32-bit runtime environment was not found on this
system. Specifically the 32-bit dynamic loader which is needed by the NaCl
compilers was not found ('/lib/ld-linux.so.2'). On modern debian/ubuntu
systems this is included in the 'libc6:i386' package.
On here they write that the PNaCl should run on ARM computers, however, on some other forums I read that wasn't the case. I've tried enabling two flags, as described on a site which I can't post due to a lack of reputation, but it looks like that'll only change things when using PNaCl, not during the installation of the SDK.
Is it possible to install that SDK on my Chromebook and, if so, how?
There's a bit of confusion: when the documentation says "PNaCl and NaCl work on ARM", it means the part that runs inside of Chrome which users would use. The SDK is currently only built for x86-64 Windows/Linux/OSX, and not for ARM. The main reason is that it's never been requested, probably because ARM machines are quite slow compared to usual development machines.
That being said, I don't think it's silly to use ARM as a development machine, and I've built my own PNaCl toolchain for ARM in the past. There are build instructions for the toolchain. I haven't built it recently, and it may have bitrotted a bit so if you run into issues I suggest emailing the team or better yet sending a patch! I expect any issue to be fairly minor, especially if you only want to use pnacl-clang or nacl-clang (as opposed to the GCC toolchain).

Implementing an Alternative to Adobe AIR in for Linux

I use a product called ReadCube on my desktop, and the creators haven't developed a version for Linux because AIR for Linux does not include many features the same way the Mac and Windows versions do, and so the development of a Linux version would be difficult for them to do. From reading adobe's website, it looks like there won't be any updated version of AIR for linux anytime soon.
I'd like to know if it would be feasible for one person to develop an alternative to AIR for Linux that app developers could build upon. I'm not sure what this would entail as I can't see the source code for AIR so I'm not sure what technology is involved aside from the short wiki description that it allows developers to combine HTML, Javascript, Flash and other things to make applications.

Is there a cross platform desktop framework that would utilize native libraries such at .NET and Cocoa?

I am starting a project that is heavily graphics related (think, paint app with layers).
Anyway, I have a long history in C#, Java, JavaScript and Ruby. This application will be open source.
But what I'm looking for is a "build once, use everywhere" framework. Most of the platforms I've looked into either seem to be far too outdated, too complicated, or just not a right fit.
I've looked into Swing, WindowBuilder, wxRuby, etc. So many choices and none seem modern enough, have good documentation, etc.
I was a C# desktop developer for years so if I were targeting Windows only, I would go that route easily. But I want my app to run on Macs too. But, I would like the Mac version to look like it was designed for a Mac and the Windows version designed for Windows, etc. I'm looking at the Mono Project currently. But the idea of my Mac users installing Mono doesn't appeal to me.
Anything Ruby based would be cool but not required.
Anyway, what are some recommendations? I use NetBeans, Eclipse and Visual Studio. So I'm not concerned with learning new IDE's if I had to. I even thought about doing it all in JavaScript and using the canvas but since I need to work with large, local binary files, I didn't know if that would be a good option.
Thanks for any suggestions.
Real Studio can create cross-platform desktop apps for OS X, Windows and Linux. It can also create Cocoa apps and you can use it to interface with Cocoa directly when needed.
However, Real Studio creates Win32 apps, not .NET apps so you cannot directly interface with .NET libraries.

Make a game with Cocos2dx on Linux

I'm some familiar with Cocos2d and Cocos2dx.
But only I worked in Mac, I know which is possible work with this engine (Cocos2dx) in Windows, but I don't know if is possible develop a game on Linux.
By the way:
I'm not talking about a port, I want develop a Videogame multiplataform on Linux.
Would be great know the way of how start my game on Linux.
Thanks!
While I haven't tried it, cocos-2dx is, according to their documentation, is usable on Linux although my understanding is that this means one can build android projects using cocos2d on Linux.
In terms of where to start, I've used both SFML and SDL as both are well supported on Linux. Both are cross platform although SDL supports a wider range of platforms - I have an SDL2 game in progress that runs on Linux and android for instance whereas SFML does not yet have android or iOS support. Coming from cocos2d though I think you'll find the SFML API easiest to pick up.
As a fair warning, the landscape is a bit confusing at present because both SFML and SDL have a popular stable release (1.6 for SFML and 1.2 for SDL) with one API along side a popular development release (2.0 for SFML and 1.3/2.0 for SDL) that has a similar but not identical API. This is particularly noticeable with SDL where the documentation for 1.2 is much better than the documentation for the development API. In terms of choosing one over the other, the stable releases are precisely that - stable. In both cases the development releases have been under way for some time so if you are willing to dig for documentation a bit and ask questions it's worth getting the new features.
There is book that provides a nice introduction to Linux game development that, while dated, might be a good first step if this is your first outing with games on Linux, especially if you decide to use SDL Programming Linux Games.
Update:
I saw the directions here and after (roughly) following them cocos2dx does build on my Ubuntu 12.04 x64 machine. The "Set up Environment" directions seem sound but the makefile information appears to be out of date as there is no build_linux.sh instead there is a make-all-linux-project.sh. After this finished pulling in missing deps and building I changed into the samples/HelloCpp/proj.linux directory and ran make. This created a HelloCpp binary in samples/HelloCpp/proj.linux/bin/debug. Running that popped a HelloWorld cocos2d screen. According to the output the verison is:
cocos2d-x debug info [cocos2d: cocos2d-2.1beta3-x-2.1.0]
That said, I don't see a lot of documentation for the linux port and most of the related community entries seem to be out of date so you may find more support from using one of the libraries I already mentioned.
Download cocos2d-x project there is a test sample games which compiles on all platform android, windows, iOS , Windows Phone ...See you are going to code in c++ that's it then whether you build it in linux or any other platform doesnt matter for cocos2d-x kind of engine
so i suggest start with the sample projects of cocos2d-x .... and as you want to do it in linux ...make something then compile it in linux like I do ...

Resources