Dropsource / monarch

Monarch is a tool for building Flutter widgets in isolation. It makes it easy to build, test and debug complex UIs.
https://monarchapp.io
MIT License
437 stars 22 forks source link

Linux support #16

Closed MuathAmer closed 1 year ago

MuathAmer commented 3 years ago

Is there an ETA for Linux support? And is there currently a workaround to running Monarch on Linux?

fertrig commented 3 years ago

There is no ETA yet. And, unfortunately, no workaround. However, we are setting up our infrastructure to scale our build process. This infrastructure work will make Linux builds easier for us.

We also have an alternative experience in mind which would make it easier to support Linux, and which we may extend to other platforms.

Also, we are hoping the Flutter team will start work on supporting multiple flutter desktop windows soon. That would be a good option for the Monarch Linux UX as well.

I'll leave this issue open to post updates and to gauge interest in Linux. Feel free to +1.

datdefboi commented 3 years ago

Hello. I have good news image Waiting for the linux build...

mjablecnik commented 1 year ago

@fertrig So when do you will support Linux systems? Are any interesting news here? I would like to try Monarch in my Linux distro. :)

fertrig commented 1 year ago

The new Monarch architecture (released last week) will make it easier to add and maintain the Monarch Linux version. We are excited to leverage the new architecture for the Linux build.

We will prioritize our next chunk of work very soon. I'll post any Linux updates here. Stay tuned.

vHanda commented 1 year ago

@mjablecnik : I landed up moving to https://www.widgetbook.io/ in the end, since I needed Linux support.

The nice thing about WidgetBook is that you also get web support for free, which many of my clients have quite loved, especially the designers when they want to quickly look at what a screen looks like.

fertrig commented 1 year ago

Monarch now supports Linux! 🚀

We just merged the PR. We will update the website with setup instructions soon. In the meantime, if you would like to build Monarch yourself you can follow these steps:

Enjoy!

Update: For now you have to build Monarch using the flutter master channel. We are waiting for this Flutter Engine PR to make it to the beta or stable channels.

mjablecnik commented 1 year ago

@fertrig Hello, I tried build Monarch from source code but I have this error:

Building project using Ninja...
Ninja error building project
ninja: Entering directory `build/flutter_linux_3.3.10-stable'
[1/11] Generating /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/libflutter_linux_gtk.so, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_binary_codec.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_binary_messenger.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_dart_project.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_engine.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_json_message_codec.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_json_method_codec.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_message_codec.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_method_call.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_method_channel.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_method_codec.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_method_response.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_plugin_registry.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_string_codec.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_value.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/fl_view.h, /tmp/test/monarch/platform/linux/gen/flutter/ephemeral/flutter_linux/flutter_linux.h, _phony_
[2/11] Building CXX object CMakeFiles/monarch_linux_app.dir/tmp/test/monarch/platform/linux/src/logger.cc.o
[3/11] Building CXX object CMakeFiles/monarch_linux_app.dir/tmp/test/monarch/platform/linux/src/main.cc.o
[4/11] Building CXX object CMakeFiles/monarch_linux_app.dir/tmp/test/monarch/platform/linux/src/monarch_logical_resolution.cc.o
[5/11] Building CXX object CMakeFiles/monarch_linux_app.dir/tmp/test/monarch/platform/linux/src/channels.cc.o
[6/11] Building CXX object CMakeFiles/monarch_linux_app.dir/tmp/test/monarch/platform/linux/src/monarch_device.cc.o
[7/11] Building CXX object CMakeFiles/monarch_linux_app.dir/tmp/test/monarch/platform/linux/src/monarch_state.cc.o
[8/11] Building CXX object CMakeFiles/monarch_linux_app.dir/tmp/test/monarch/platform/linux/src/monarch_story_scale.cc.o
[9/11] Building CXX object CMakeFiles/monarch_linux_app.dir/tmp/test/monarch/platform/linux/src/monarch_application.cc.o
FAILED: CMakeFiles/monarch_linux_app.dir/tmp/test/monarch/platform/linux/src/monarch_application.cc.o
/usr/bin/c++ -DAPPLICATION_ID=\"com.dropsource.monarch_linux_app\" -I/tmp/test/monarch/platform/linux/gen/flutter/ephemeral -isystem /usr/include/gtk-3.0 -isystem /usr/include/at-spi2-atk/2.0 -isystem /usr/include/at-spi-2.0 -isystem /usr/include/dbus-1.0 -isystem /usr/lib/x86_64-linux-gnu/dbus-1.0/include -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/cairo -isystem /usr/include/pango-1.0 -isystem /usr/include/harfbuzz -isystem /usr/include/fribidi -isystem /usr/include/atk-1.0 -isystem /usr/include/pixman-1 -isystem /usr/include/uuid -isystem /usr/include/freetype2 -isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/libpng16 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem /usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include -g -Wall -Werror -pthread -MD -MT CMakeFiles/monarch_linux_app.dir/tmp/test/monarch/platform/linux/src/monarch_application.cc.o -MF CMakeFiles/monarch_linux_app.dir/tmp/test/monarch/platform/linux/src/monarch_application.cc.o.d -o CMakeFiles/monarch_linux_app.dir/tmp/test/monarch/platform/linux/src/monarch_application.cc.o -c /tmp/test/monarch/platform/linux/src/monarch_application.cc
/tmp/test/monarch/platform/linux/src/monarch_application.cc: In function ‘FlDartProject* init_dart_project(gchar*)’:
/tmp/test/monarch/platform/linux/src/monarch_application.cc:54:3: error: ‘fl_dart_project_set_assets_path’ was not declared in this scope; did you mean ‘fl_dart_project_get_assets_path’?
   54 |   fl_dart_project_set_assets_path(project, assets_path);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |   fl_dart_project_get_assets_path
/tmp/test/monarch/platform/linux/src/monarch_application.cc:55:3: error: ‘fl_dart_project_set_icu_data_path’ was not declared in this scope; did you mean ‘fl_dart_project_get_icu_data_path’?
   55 |   fl_dart_project_set_icu_data_path(project, icu_path);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |   fl_dart_project_get_icu_data_path
ninja: build stopped: subcommand failed.

Here are my Flutter and Linux Mint versions:

martin at probook-pc Programs >>> which flutter
/home/martin/fvm/default/bin/flutter
martin at probook-pc Programs >>> flutter --version
Flutter 3.3.10 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 135454af32 (7 weeks ago) • 2022-12-15 07:36:55 -0800
Engine • revision 3316dd8728
Tools • Dart 2.18.6 • DevTools 2.15.0

martin at probook-pc Programs >>> lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description:    Linux Mint 21.1
Release:        21.1
Codename:       vera

When do you will provide your official build for Linux? Thank you

fertrig commented 1 year ago

@mjablecnik: I'm sorry. I forgot to mention that you have to use the flutter master channel. Monarch needs some Flutter Engine APIs which are not yet available on the stable or beta channels yet.

We are waiting for this Flutter Engine PR to make it to the beta or stable channel. Once that PR is in, I can provide Linux builds. Unfortunately, for now, you have to use flutter master channel.