Git Product home page Git Product logo

nativeshell's Introduction

NativeShell (Experimental embedder for Flutter)

Sponsors

Features

  • Leverages existing Flutter desktop embedder on each platform
  • Unlike Flutter desktop embedders, NativeShell provides consistent platform agnostic API
  • Multi-window support
  • Window management
    • Adjusting window styles and geometry
    • Modal dialogs
    • Windows can be set to track content size and resize automatically when content changes
  • Platform menus (popup menu, menu bar)
  • Drag and Drop
  • Written in Rust, Flutter build transparently integrated with cargo

Status

  • This is project in a very experimental stage

Getting started

Prerequisites:

  1. Install Rust
  2. Install Flutter
  3. Enable Flutter desktop support

Clone and run examples:

git clone https://github.com/nativeshell/examples.git
cd examples
cargo run

For more information read the introductory post or go to nativeshell.dev.

Community

Feel free to join us on Slack or Discord and say hello ๐Ÿ‘‹.

nativeshell's People

Contributors

bernaferrari avatar bk-one avatar dvc94ch avatar hasali19 avatar jonas-schievink avatar knopp avatar thenextman avatar zicklag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nativeshell's Issues

Any way to use this without Dart?

I would really like to be able to build a Rust application with Flutter UI without writing code in Dart. Is this at all possible? (I'm willing to have to install dart and stuff, but I don't want to write the ui code in it)

Mobile Support

I know the point of nativeshell is to support desktop applications, but would it be possible to build nativeshell for iOS and Android, too, so that we could still use Rust to write mobile apps as well?

Add support for platform plugins

This issue tracks progress for platform plugins support.

NativeShell support Flutter packages, but it does not yet support packages that contain native code (plugins).

  • Support of macOS platform plugins
  • Support of Windows platform plugins
  • Support of Linux platform plugins

Build error under Linux

Hello!

Thanks for making nativeshell! It had me very curious, so following the README I cloned the example repository and tried to run it, only to find the following output:

examples on ๎‚  main [?] is ๐Ÿ“ฆ v0.1.0 via ๐ŸŽฏ v2.14.0-188.0.dev via ๐Ÿฆ€ v1.50.0
๐Ÿ”‹๐Ÿ”ฝ32% โฏ cargo run                                                                                                                     [22:22:53]
   Compiling nativeshell_examples v0.1.0 (/home/dureuill/flutter/examples)
   Compiling gtk v0.9.2
error: failed to run custom build command for `nativeshell_examples v0.1.0 (/home/dureuill/flutter/examples)`

Caused by:
  process didn't exit successfully: `/home/dureuill/flutter/examples/target/debug/build/nativeshell_examples-2bba2697ebaef4c9/build-script-build` (exit code: 101)
  --- stdout

  ** Build failed with error **

  Flutter artifact location path at "/bin/cache/artifacts/engine/linux-x64" does not exist! Try running 'flutter precache'

  --- stderr
  thread 'main' panicked at 'explicit panic', build.rs:26:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

I installed flutter, enabled desktop support and switched to the master channel following the readme, here is the output of flutter doctor:

examples on ๎‚  main [?] is ๐Ÿ“ฆ v0.1.0 via ๐ŸŽฏ v2.14.0-188.0.dev via ๐Ÿฆ€ v1.50.0 took 6s
๐Ÿ”‹๐Ÿ”ฝ32% โฏ flutter doctor                                                                                                                [22:23:01]
Doctor summary (to see all details, run flutter doctor -v):
[โœ“] Flutter (Channel master, 2.3.0-17.0.pre.265, on Manjaro Linux 5.10.36-2-MANJARO, locale fr_FR.UTF-8)
[โœ—] Android toolchain - develop for Android devices
    โœ— Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[โœ—] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[โœ“] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[โœ“] Connected device (1 available)

! Doctor found issues in 3 categories.

Running flutter -v create hello_world followed by a flutter run -d linux does result in me seeing the flutter hello world in my linux.

I also tried flutter precache like recommended, and it did something the first time around (not on subsequent runs), but this doesn't appear to solve the problem.

Anything I can do to fix the build?

I'm running manjaro with kernel 5.10.36-2.

I'm new to flutter, so apologies if I misstepped!

Associating a File type with application

When you right-click a .pdf file and hover over the "Open with" menu on macOS or Windows, a list of applications that can open the file show up. How can we set file associations in a Nativeshell application?

Error running template on Mac with Apple Silicon

I just tried to run the example project on an apple silicon mac, but cargo run produces this error:

Target debug_unpack_macos failed: Exception: Binary /Users/wilson/Developer/Play/examples/target/debug/build/nativeshell_examples-c8fe034cd50a97c9/out/flutter/./FlutterMacOS.framework/FlutterMacOS does not contain arm64.

All logs:

failed to run custom build command for `nativeshell_examples v0.1.0 (/Users/wilson/Developer/Play/examples)`

Caused by:
  process didn't exit successfully: `/Users/wilson/Developer/Play/examples/target/debug/build/nativeshell_examples-0c7a4a584dad4c99/build-script-build` (exit code: 101)
  --- stdout
  Build failed with error:
  Flutter Tool Failed!
  Status: ExitStatus(ExitStatus(256))
  Command: "\"flutter\" \"assemble\" \"--output=.\" \"--define=BuildMode=debug\" \"--define=TargetPlatform=darwin\" \"--define=DarwinArchs=arm64\" \"--define=TargetFile=../../../../../../lib/main.dart\" \"-v\" \"--suppress-analytics\" \"debug_macos_bundle_flutter_assets\""
  Stderr:
  [   +5 ms] Target debug_unpack_macos failed: Exception: Binary /Users/wilson/Developer/Play/examples/target/debug/build/nativeshell_examples-c8fe034cd50a97c9/out/flutter/./FlutterMacOS.framework/FlutterMacOS does not contain arm64. Running lipo -info:
             Non-fat file: /Users/wilson/Developer/Play/examples/target/debug/build/nativeshell_examples-c8fe034cd50a97c9/out/flutter/./FlutterMacOS.framework/FlutterMacOS is architecture: x86_64

             #0      UnpackMacOS._thinFramework (package:flutter_tools/src/build_system/targets/macos.dart:97:7)
             #1      UnpackMacOS.build (package:flutter_tools/src/build_system/targets/macos.dart:76:5)
             #2      _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:836:27)
             <asynchronous suspension>
             #3      Future.wait.<anonymous closure> (dart:async/future.dart)
             <asynchronous suspension>
             #4      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:774:32)
             <asynchronous suspension>
             #5      FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:603:16)
             <asynchronous suspension>
             #6      AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:314:32)
             <asynchronous suspension>
             #7      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1126:27)
             <asynchronous suspension>
             #8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #9      CommandRunner.runCommand (package:args/command_runner.dart:196:13)
             <asynchronous suspension>
             #10     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)
             <asynchronous suspension>
             #11     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #12     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)
             <asynchronous suspension>
             #13     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
             <asynchronous suspension>
             #14     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #15     main (package:flutter_tools/executable.dart:91:3)
             <asynchronous suspension>

  [   +4 ms] 
             #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
             #1      AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:331:7)
             <asynchronous suspension>
             #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1126:27)
             <asynchronous suspension>
             #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #4      CommandRunner.runCommand (package:args/command_runner.dart:196:13)
             <asynchronous suspension>
             #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)
             <asynchronous suspension>
             #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)
             <asynchronous suspension>
             #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
             <asynchronous suspension>
             #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #10     main (package:flutter_tools/executable.dart:91:3)
             <asynchronous suspension>



  Stdout:
  [ +150 ms] executing: sysctl hw.optional.arm64
  [  +38 ms] Exit code 0 from: sysctl hw.optional.arm64
  [   +3 ms] hw.optional.arm64: 1
  [   +7 ms] executing: [/Users/wilson/Developer/SDK/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
  [  +26 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
  [        ] 320f27713bc843be7024b8e4216ab31a67e352ad
  [   +1 ms] executing: [/Users/wilson/Developer/SDK/flutter/] git tag --points-at 320f27713bc843be7024b8e4216ab31a67e352ad
  [  +59 ms] Exit code 0 from: git tag --points-at 320f27713bc843be7024b8e4216ab31a67e352ad
  [   +2 ms] executing: [/Users/wilson/Developer/SDK/flutter/] git describe --match *.*.* --long --tags 320f27713bc843be7024b8e4216ab31a67e352ad
  [  +57 ms] Exit code 0 from: git describe --match *.*.* --long --tags 320f27713bc843be7024b8e4216ab31a67e352ad
  [        ] 2.3.0-16.0.pre-180-g320f27713b
  [  +10 ms] executing: [/Users/wilson/Developer/SDK/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
  [  +17 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
  [        ] origin/master
  [        ] executing: [/Users/wilson/Developer/SDK/flutter/] git ls-remote --get-url origin
  [  +16 ms] Exit code 0 from: git ls-remote --get-url origin
  [        ] https://github.com/flutter/flutter.git
  [  +81 ms] executing: [/Users/wilson/Developer/SDK/flutter/] git rev-parse --abbrev-ref HEAD
  [  +30 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
  [        ] master
  [   +7 ms] executing: sw_vers -productName
  [  +17 ms] Exit code 0 from: sw_vers -productName
  [        ] macOS
  [        ] executing: sw_vers -productVersion
  [  +16 ms] Exit code 0 from: sw_vers -productVersion
  [        ] 11.3
  [        ] executing: sw_vers -buildVersion
  [  +16 ms] Exit code 0 from: sw_vers -buildVersion
  [        ] 20E232
  [ +183 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
  [   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
  [ +127 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
  [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
  [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
  [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
  [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
  [   +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
  [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
  [        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
  [  +38 ms] Initializing file store
  [   +8 ms] Done initializing file store
  [  +47 ms] Skipping target: gen_localizations
  [  +16 ms] Skipping target: gen_dart_plugin_registrant
  [   +6 ms] Skipping target: debug_macos_framework
  [   +1 ms] debug_unpack_macos: Starting due to {}
  [ +441 ms] Skipping target: kernel_snapshot
  [   +6 ms] Persisting file store
  [   +9 ms] Done persisting file store
  [  +17 ms] "flutter assemble" took 772ms.
  [  +10 ms] ensureAnalyticsSent: 6ms
  [   +1 ms] Running shutdown hooks
  [        ] Shutdown hooks complete
  [   +2 ms] exiting with code 1


  --- stderr
  thread 'main' panicked at 'explicit panic', build.rs:26:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Build error under MacOS

Hello!

Thanks for making nativeshell! It had me very curious, so following the README I cloned the example repository and tried to (cargo run) run it, only to find the following output:

Compiling nativeshell v0.1.9
Compiling nativeshell_examples v0.1.0 (/Users/a123/Desktop/flutter-rust/examples)
error: failed to run custom build command for nativeshell_examples v0.1.0 (/Users/a123/Desktop/flutter-rust/examples)

Caused by:
process didn't exit successfully: /Users/a123/Desktop/flutter-rust/examples/target/release/build/nativeshell_examples-f63b5bb9205eb7e8/build-script-build (exit status: 101)
--- stdout

** Build failed with error **

External Tool Failed!
Status: ExitStatus(ExitStatus(256))
Command: "/usr/local/Caskroom/flutter/2.2.3/flutter/bin/flutter" "assemble" "--output=." "--define=BuildMode=release" "--define=TargetPlatform=darwin" "--define=DarwinArchs=x86_64" "--define=TargetFile=../../../../../../lib/main.dart" "-v" "--suppress-analytics" "release_macos_bundle_flutter_assets"
Stderr:
[+1362 ms] /usr/local/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/nativeshell-0.1.9/lib/src/key_interceptor.dart:46:3: Error: Type 'KeyMessageHandler' not found.
[ +1 ms] KeyMessageHandler? _previousHandler;
[ ] ^^^^^^^^^^^^^^^^^
[ +2 ms] /usr/local/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/nativeshell-0.1.9/lib/src/key_interceptor.dart:48:19: Error: Type 'KeyMessage' not found.
[ ] bool _onMessage(KeyMessage message) {
[ ] ^^^^^^^^^^
[+4437 ms] /usr/local/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/nativeshell-0.1.9/lib/src/key_interceptor.dart:15:35: Error: The getter 'keyEventManager' isn't defined for the class 'ServicesBinding'.
[ ] - 'ServicesBinding' is from 'package:flutter/src/services/binding.dart' ('/usr/local/Caskroom/flutter/2.2.3/flutter/packages/flutter/lib/src/services/binding.dart').
[ ] Try correcting the name to the name of an existing getter, or defining a getter or field named 'keyEventManager'.
[ ] ServicesBinding.instance!.keyEventManager.keyMessageHandler;
[ ] ^^^^^^^^^^^^^^^
[ ] /usr/local/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/nativeshell-0.1.9/lib/src/key_interceptor.dart:16:31: Error: The getter 'keyEventManager' isn't defined for the class 'ServicesBinding'.
[ ] - 'ServicesBinding' is from 'package:flutter/src/services/binding.dart' ('/usr/local/Caskroom/flutter/2.2.3/flutter/packages/flutter/lib/src/services/binding.dart').
[ ] Try correcting the name to the name of an existing getter, or defining a getter or field named 'keyEventManager'.
[ ] ServicesBinding.instance!.keyEventManager.keyMessageHandler = _onMessage;
[ ] ^^^^^^^^^^^^^^^
[ +1 ms] /usr/local/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/nativeshell-0.1.9/lib/src/key_interceptor.dart:46:3: Error: 'KeyMessageHandler' isn't a type.
[ ] KeyMessageHandler? _previousHandler;
[ ] ^^^^^^^^^^^^^^^^^
[ ] /usr/local/Caskroom/flutter/2.2.3/flutter/.pub-cache/hosted/pub.dartlang.org/nativeshell-0.1.9/lib/src/key_interceptor.dart:48:19: Error: 'KeyMessage' isn't a type.
[ ] bool _onMessage(KeyMessage message) {
[ ] ^^^^^^^^^^
[ +2 ms] Target kernel_snapshot failed: Exception
#0 KernelSnapshot.build (package:flutter_tools/src/build_system/targets/common.dart:291:7)

#1 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:828:9)

#2 Future.wait. (dart:async/future.dart)

#3 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:766:32)

#4 Future.wait. (dart:async/future.dart)

#5 _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:766:32)

#6 FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:595:16)

#7 AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:318:32)

#8 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1043:27)

#9 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#10 CommandRunner.runCommand (package:args/command_runner.dart:196:13)

#11 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)

#12 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#13 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)

#14 run.. (package:flutter_tools/runner.dart:62:9)

#15 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#16 main (package:flutter_tools/executable.dart:91:3)

[ +3 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:335:7)

#2 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1043:27)

#3 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#4 CommandRunner.runCommand (package:args/command_runner.dart:196:13)

#5 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)

#6 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)

#8 run.. (package:flutter_tools/runner.dart:62:9)

#9 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#10 main (package:flutter_tools/executable.dart:91:3)

Stdout:
[ +83 ms] executing: sysctl hw.optional.arm64
[ +16 ms] Exit code 1 from: sysctl hw.optional.arm64
[ ] sysctl: unknown oid 'hw.optional.arm64'
[ +5 ms] executing: [/usr/local/Caskroom/flutter/2.2.3/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +9 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] f4abaa0735eba4dfd8f33f73363911d63931fe03
[ ] executing: [/usr/local/Caskroom/flutter/2.2.3/flutter/] git tag --points-at f4abaa0735eba4dfd8f33f73363911d63931fe03
[ +15 ms] Exit code 0 from: git tag --points-at f4abaa0735eba4dfd8f33f73363911d63931fe03
[ ] 2.2.3
[ +5 ms] executing: [/usr/local/Caskroom/flutter/2.2.3/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +9 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/stable
[ ] executing: [/usr/local/Caskroom/flutter/2.2.3/flutter/] git ls-remote --get-url origin
[ +8 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +44 ms] executing: [/usr/local/Caskroom/flutter/2.2.3/flutter/] git rev-parse --abbrev-ref HEAD
[ +8 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] stable
[ +4 ms] executing: sw_vers -productName
[ +10 ms] Exit code 0 from: sw_vers -productName
[ ] Mac OS X
[ ] executing: sw_vers -productVersion
[ +10 ms] Exit code 0 from: sw_vers -productVersion
[ ] 10.15.7
[ ] executing: sw_vers -buildVersion
[ +10 ms] Exit code 0 from: sw_vers -buildVersion
[ ] 19H15
[ +40 ms] Unable to locate an Android SDK.
[ +48 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +97 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[ ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[ +15 ms] Initializing file store
[ +15 ms] Skipping target: gen_localizations
[ +16 ms] release_unpack_macos: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /usr/local/Caskroom/flutter/2.2.3/flutter/packages/flutter_tools/lib/src/build_system/targets/macos.dart,/usr/local/Caskroom/flutter/2.2.3/flutter/bin/internal/engine.version}
[ +108 ms] kernel_snapshot: Starting due to {}
[ +4 ms] release_unpack_macos: Complete
[ +130 ms] /usr/local/Caskroom/flutter/2.2.3/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /usr/local/Caskroom/flutter/2.2.3/flutter/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root /usr/local/Caskroom/flutter/2.2.3/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk_product/ --target=flutter --no-print-incremental-dependencies -Ddart.vm.profile=false -Ddart.vm.product=true --aot --tfa --packages /Users/a123/Desktop/flutter-rust/examples/target/release/build/nativeshell_examples-c28b0bf276745bf9/out/flutter/.dart_tool/package_config.json --output-dill /Users/a123/Desktop/flutter-rust/examples/target/release/build/nativeshell_examples-c28b0bf276745bf9/out/flutter/.dart_tool/flutter_build/dd7ba7ec51c453c0810a46bc877e770e/app.dill --depfile /Users/a123/Desktop/flutter-rust/examples/target/release/build/nativeshell_examples-c28b0bf276745bf9/out/flutter/.dart_tool/flutter_build/dd7ba7ec51c453c0810a46bc877e770e/kernel_snapshot.d package:nativeshell_examples/main.dart
[+4820 ms] Persisting file store
[ +2 ms] Done persisting file store
[ +10 ms] "flutter assemble" took 11,047ms.
[ +3 ms] ensureAnalyticsSent: 2ms
[ ] Running shutdown hooks
[ ] Shutdown hooks complete
[ +1 ms] exiting with code 1
And I notice the flutter PATH is Incorrect โ˜น๏ธ
Thank a lot

Building for apple silicon

MacOS apps created by Nativeshell are optimized for Intel macs by default. Is there any way to create a universal binary for release and/or debug?

Screenshot 2021-09-18 at 17 30 22

Webview Support on Desktop

I am writing a dictionary softwarewikit ,it will render word meaning in html format. But for now, flutter seems having no support for webview on desktop. My question is that will nativeshell support embeded webview?

Higher-level Plugin api akin to flutter-rs

I'm working on an application written in rust with flutter as the UI and was using flutter-rs until now.
I've implemented some custom channels and flutter-rs has a nice abstraction for flutter plugins as well as the different channel types.

Do you have any intentions to implement something similar?

Hot Reload

Have you thought about adding hot reload capabilities?
This would probably require moving parts of the build process into the runtime but would align the developer experience with the standard flutter process.
Obviously this would only work for the dart code and not the rust parts.

Requires "Developer mode" to be enabled on Windows for symlinks to work

This is looking great!

I decided to try out building and running the example on Windows too and hit an issue where permission was denied creating a symlink to flutter_export.h in the build process.

It turns out you can't create symlinks on Windows without elevated permissions unless you've enabled "Developer mode". It might be worth capturing this panic on Windows and pointing them at the official docs:
https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development

Is there any way to get response from window manager to check if titlebar buttons are to be shown or not?

@knopp Is there any way to get response from window manager to check if titlebar buttons are to be shown or not?

Use case:
on mobile linux with custom titlebar buttons, the visiblity of maximize, minimize and close button is not neccesary as it will always be controlled by window manager.

But because this was custom implementation inside flutter code so titlebar buttons will still be visible.

I want to get a callback from shell something like Window.of(context).isTitlebarButtonVisible.

This can also be used for windows phone and apps, I don't know about mac as it only have a desktop ui so this method will always return true on that.

For ios / android this method will return false as titlebar is not needed there.

Originally posted by @prateekmedia in #60 (comment)

Support for Event channels

Right now there is support for Method Channels but not for Event Channels.
I've looked a little bit into it but I'm unsure how it would fit into the existing architecture.

I feel like streams would be a perfect fit but this would require an async executor.

how to package a macos app?

i use cargo build --release ,create a folder full of alias and it can't run in other mac

open in other mac it shows "open /Users/hank/Downloads/release/Qtalk.app
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3762, _LSFunction=_LSOpenStuffCallLocal}"

Native shell debugger just like flutter for Vscode / android studio

Currently we have to run the app manually using cargo run, It would be interesting to see if there will be a debugger for this.

This will make this package developer friendly and also in future when you add hot restart or reload, then we don't have to use the terminal instead use the debugger in our IDE(vscode is more general then android-studio for desktop).

Create issues for roadmap items

It would be nice to be able to get notified on progress of certain roadmap items. I was about to create the issues for you but opted to create this meta issue first as you might prefer to create them yourself. I will add some more feature requests meanwhile if you don't mind :)

Thank you very much for this project btw!

build failed

I'm using Ubuntu, run cargo run then appears:

warning: "pkg-config" "--libs" "--cflags" "glib-2.0" "glib-2.0 >= 2.48" did not exit successfully: exit code: 1

error: failed to run custom build command for glib-sys v0.14.0

Caused by:
process didn't exit successfully: /home/floatingrain/project/examples/target/debug/build/glib-sys-96150614ea46d8b2/build-script-build (exit code: 1)
--- stdout
cargo:rerun-if-env-changed=GLIB_2.0_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=GLIB_2.0_STATIC
cargo:rerun-if-env-changed=GLIB_2.0_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:warning="pkg-config" "--libs" "--cflags" "glib-2.0" "glib-2.0 >= 2.48" did not exit successfully: exit code: 1
--- stderr
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'glib-2.0' found

Window Resize area too large on linux

OS: Elementary os odin

As you can see my cursor[bottom-center] I can resize window from 2-3 cm away too, which is not the case for normal windows.

nativeshell-windowresizebug

Examples segfault on linux

The following actions in the examples app trigger a segfault on Linux:

  • moving/resizing windows
  • clicking on menu bar item
  • opening the menu

I think when the application looses focus it breaks as well but I'm not totally certain.
Right now I've only tested it on my Desktop running Arch with stable Rust 1.53.0 and Flutter 2.2.2.

Distribute binaries easily

I know this is in the roadmap of nativeshell, but still currently if I run cargo build --release then it works but when I try to open the executable then it result in the error:

./target/release/appimagepool: error while loading shared libraries: liburl_launcher_linux_plugin.so: cannot open shared object file: No such file or directory

and doesn't launches. Same goes if I run debug mode executable from /target/debug/appimagepool.
On the other hand cargo run works fine.

Is there any way to fix this behavior, I can just pack it to appimage by myself afterwards.

Pod install command fails on arch -x86_64

On apple silicon macs, the pod install build command fails. This should be fixed by using arch -x86_64 pod install instead of pod install but nativeshell doesn't provide a way to change that command.

Related: CocoaPods/CocoaPods#10723

error: failed to run custom build command for `app_template v0.1.0 (/Users/wilson/Developer/Projects/example)`

Caused by:
  process didn't exit successfully: `/Users/wilson/Developer/Projects/example/target/debug/build/app_template-21e5268b40846ea2/build-script-build` (exit status: 101)
  --- stdout

  ** Build failed with error **

  External Tool Failed!
  Status: ExitStatus(ExitStatus(256))
  Command: "\"pod\" \"install\""
  Stderr:
  /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'ffi' (>= 1.15.0) among 80 total gem(s) (Gem::MissingSpecError)
  Checked in 'GEM_PATH=/Users/wilson/.gem/ruby/2.6.0:/Library/Ruby/Gems/2.6.0:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0', execute `gem env` for more information
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1449:in `block in activate_dependencies'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1452:in `block in activate_dependencies'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1452:in `block in activate_dependencies'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1452:in `block in activate_dependencies'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `each'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1438:in `activate_dependencies'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1420:in `activate'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:304:in `block in activate_bin_path'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:303:in `synchronize'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems.rb:303:in `activate_bin_path'
        from /usr/local/bin/pod:23:in `<main>'

  Stdout:


  --- stderr
  thread 'main' panicked at 'explicit panic', build.rs:26:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Unable to integrate into workspace

I doubt this is a NativeShell issue specifically; but I'm struggling to understand the problem and hope you might have some insight. As an aside - have you considered setting up a Discord (or similar) server for project discussion?

I cloned the app_template and added it to my cargo workspace, so it's built alongside our main project crate. However - it no longer compiles:

[workspace]
members = [
    "frontend", # NativeShell app_template
    "libcompany/rust", # Existing business logic
]
default-members = [
    "frontend",
    "libcompany/rust",
]

cargo build

error[E0277]: *const Class cannot be sent between threads safely
--> /Users/me/.cargo/registry/src/github.com-1ecc6299db9ec823/nativeshell-0.1.9/src/shell/platform/macos/app_delegate.rs:156:1
|
156 | / lazy_static! {
157 | | static ref APPLICATION_DELEGATE_CLASS: ApplicationDelegateClass = unsafe {
158 | | let superclass = class!(NSObject);
159 | | let mut decl = ClassDecl::new("IMApplicationDeleagte", superclass).unwrap();
... |
247 | | };
248 | | }
| |_^ *const Class cannot be sent between threads safely
|
= help: within ApplicationDelegateClass, the trait Send is not implemented for *const Class
note: required because it appears within the type ApplicationDelegateClass
--> /Users/me/.cargo/registry/src/github.com-1ecc6299db9ec823/nativeshell-0.1.9/src/shell/platform/macos/app_delegate.rs:153:8
|
153 | struct ApplicationDelegateClass(*const Class);
| ^^^^^^^^^^^^^^^^^^^^^^^^
= note: required because of the requirements on the impl of Sync for spin::once::Once<ApplicationDelegateClass>
= note: required because it appears within the type lazy_static::lazy::Lazy<ApplicationDelegateClass>
= note: shared static variables must have a type that implements Sync
= note: this error originates in the macro __lazy_static_create (in Nightly builds, run with -Z macro-backtrace for more info)

And the same for MenuItemTargetClass, WindowClass and WindowDelegateClass

What I've tried:

  • Deleting the workspace level Cargo.lock
  • Checking that the versions of lazy_static is consistent between nativeshell and my project crate (it is - 1.4.0)

I wondered if that might be an issue with the objc crate; but I see something similar on Windows:

error[E0277]: std::rc::Weak<WindowClass> cannot be sent between threads safely
--> C:\Users\Administrator.cargo\registry\src\github.com-1ecc6299db9ec823\nativeshell-0.1.9\src\shell\platform\win32\window_adapter.rs:14:1
|
14 | / lazy_static! {
15 | | static ref GLOBAL: Global = Global {
16 | | window_class: RefCell::new(Weak::new()),
17 | | };
18 | | }
| |_^ std::rc::Weak<WindowClass> cannot be sent between threads safely
|
= help: the trait Send is not implemented for std::rc::Weak<WindowClass>
= note: required because of the requirements on the impl of Send for RefCell<std::rc::Weak<WindowClass>>
note: required because it appears within the type window_adapter::Global
--> C:\Users\Administrator.cargo\registry\src\github.com-1ecc6299db9ec823\nativeshell-0.1.9\src\shell\platform\win32\window_adapter.rs:8:8
|
8 | struct Global {
| ^^^^^^
= note: required because of the requirements on the impl of Sync for spin::once::Once<window_adapter::Global>
= note: required because it appears within the type lazy_static::lazy::Lazy<window_adapter::Global>
= note: shared static variables must have a type that implements Sync
= note: this error originates in the macro __lazy_static_create (in Nightly builds, run with -Z macro-backtrace for more info)

I do understand what the error is telling me, but struggling to see how I end up in this position.

Configuring Mac files

I'd like to know how we can tinker with macOS configuration files like the Podfile or Release.entitlements. Is there any way to edit files like these?

Error connecting to the service protocol: failed to connect.

I've seen this error a lot lately. Whenever I try to attach Vscode to my Nativeshell app, this error is returned:

Error connecting to the service protocol: failed to connect to http://127.0.0.1:49925/wGGO2vRhFfw=/.

Running a normal Flutter app works fine. Cleaning flutter and restarting my computer has no effect. It seems to randomly start and stop working.

Support for transparent window styles

Support for transparent window styles would be an awesome feature, as well as other common window styles (always on top etc.).

I'm not entirely sure how this is achieved on linux and osx, but for windows, you can leverage layered windows, through the WS_EX_LAYERED window style. Alternatively there is also an undocumented function call that can achieve the same effect SetWindowCompositionAttribute, which doesn't require the WS_EX_LAYERED window style, however I'm unsure about the support for mouse click passthrough for transparent parts of the window when using this approach over the layered window approach.

Menu bar glitch on fullscreen window change

When swapping between fullscreen windows on macOS, the menubar's title briefly changes to "App" before switching back to the application's actual name.

You can see it happening in this screen recording.

Screen.Recording.2021-09-05.at.12.59.55.mov

Working with the MacOS "Emoji & Symbols" popup

Clicking the fn (globe) key or selecting the "Emoji & Symbols" menu under the edit menu on macOS opens up the emojis and symbols popup.

At the moment, adding symbols works with EditableText in Flutter. However, the popup is not positioned next to the caret and doesn't leave the screen even after clicking a symbol. (I also can't pinpoint what is responsible for accepting a symbol from the popup).

Is there any way to manually provide an anchor to the popup and retrieve the selected symbol using NativeShell?

Screen.Recording.2021-08-29.at.11.59.42.mov

Can't use fonts

I can't seem to add a custom font to my project built with nativeshell. Trying to add a font to the pubspec.yaml causes the build to fail with this error:

Stderr:
  [  +67 ms] Error: unable to locate asset entry in pubspec.yaml: "fonts/Inter/Inter-Regular.ttf".
  [  +11 ms] Target debug_macos_bundle_flutter_assets failed: Exception: Failed to bundle asset files.
             #0      copyAssets (package:flutter_tools/src/build_system/targets/assets.dart:61:5)

I have confirmed the path to the asset is correct, and I have used the exact same configuration on another project to be sure.

how to set macos mini sdk version ?

Hi:

I am also have native codes from myself, and it's showing error : dependency were found, but they required a higher minimum deployment target.

Unhandled Exception: '_currentHandle != null && _materializer != null': is not true.

In my application, I update the Window menu whenever a ChangeNotifier notifies its listeners. It looks something like this:

  @override
  void initState() {
    super.initState();
    notifier.addListener(_onDocumentOrComposerUpdated);
  }
  void _onDocumentOrComposerUpdated() {
      window.setWindowMenu(Menu(_buildMenu));
  }

This works, but I keep getting this error in the console:

Error and Stacktrace
[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: 'package:nativeshell/src/menu_internal.dart': Failed assertion: line 118 pos 12: '_currentHandle != null && _materializer != null': is not true.
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
#2      MenuState._doUnmaterialize (package:nativeshell/src/menu_internal.dart:118:12)
#3      MenuState._unmaterializeLocked (package:nativeshell/src/menu_internal.dart:114:28)
#4      MenuState.unmaterialize.<anonymous closure> (package:nativeshell/src/menu_internal.dart:29:32)
#5      Mutex.protect (package:nativeshell/src/mutex.dart:15:34)
<asynchronous suspension>
#6      MenuState.unmaterialize (package:nativeshell/src/menu_internal.dart:29:5)
<asynchronous suspension>
#7      LocalWindow.setWindowMenu (package:nativeshell/src/window.dart:253:7)
<asynchronous suspension>

Error when building with github CI

cargo build --release ended with error on github ci

Final Logs
error: failed to run custom build command for `appimagepool v2.1.0 (/home/runner/work/appimagepool/appimagepool)`

Caused by:
  process didn't exit successfully: `/home/runner/work/appimagepool/appimagepool/target/release/build/appimagepool-3ccdf5477e6f6792/build-script-build` (exit status: 101)
  --- stdout

  ** Build failed with error **

  External Tool Failed!
  Status: ExitStatus(ExitStatus(256))
  Command: "/opt/hostedtoolcache/flutter/2.5.0-5.2.pre-beta/x64/bin/flutter" "assemble" "--output=." "--define=BuildMode=release" "--define=TargetPlatform=linux-x64" "--define=DarwinArchs=" "--define=TargetFile=../../../../../../lib/main.dart" "-v" "--suppress-analytics" "release_bundle_linux-x64_assets"
  Stderr:
  [  +27 ms] Target unpack_linux failed: Exception: Unsupported file type "notFound" for /opt/hostedtoolcache/flutter/2.5.0-5.2.pre-beta/x64/bin/cache/artifacts/engine/linux-x64-release/libflutter_linux_gtk.so
             #0      unpackDesktopArtifacts (package:flutter_tools/src/build_system/targets/desktop.dart:33:7)
             #1      UnpackLinux.build (package:flutter_tools/src/build_system/targets/linux.dart:72:29)
             #2      _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:836:27)
             <asynchronous suspension>
             #3      Future.wait.<anonymous closure> (dart:async/future.dart)
             <asynchronous suspension>
             #4      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:774:32)
             <asynchronous suspension>
             #5      FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:603:16)
             <asynchronous suspension>
             #6      AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:314:32)
             <asynchronous suspension>
             #7      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1125:27)
             <asynchronous suspension>
             #8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #9      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
             <asynchronous suspension>
             #10     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
             <asynchronous suspension>
             #11     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #12     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
             <asynchronous suspension>
             #13     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
             <asynchronous suspension>
             #14     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #15     main (package:flutter_tools/executable.dart:92:3)
             <asynchronous suspension>

  [   +5 ms] Target aot_elf_release failed: ProcessException: Failed to find "/opt/hostedtoolcache/flutter/2.5.0-5.2.pre-beta/x64/bin/cache/artifacts/engine/linux-x64-release/gen_snapshot" in the search path.
               Command: /opt/hostedtoolcache/flutter/2.5.0-5.2.pre-beta/x64/bin/cache/artifacts/engine/linux-x64-release/gen_snapshot 
             #0      LocalProcessManager.start (package:process/src/interface/local_process_manager.dart:58:7)
             #1      ErrorHandlingProcessManager.start.<anonymous closure> (package:flutter_tools/src/base/error_handling_io.dart:691:24)
             #2      _run (package:flutter_tools/src/base/error_handling_io.dart:567:20)
             #3      ErrorHandlingProcessManager.start (package:flutter_tools/src/base/error_handling_io.dart:690:12)
             #4      _DefaultProcessUtils.start (package:flutter_tools/src/base/process.dart:425:28)
             #5      _DefaultProcessUtils.stream (package:flutter_tools/src/base/process.dart:444:35)
             #6      GenSnapshot.run (package:flutter_tools/src/base/build.dart:73:26)
             #7      AOTSnapshotter.build (package:flutter_tools/src/base/build.dart:207:56)
             #8      AotElfBase.build (package:flutter_tools/src/build_system/targets/common.dart:276:52)
             #9      _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:836:27)
             <asynchronous suspension>
             #10     Future.wait.<anonymous closure> (dart:async/future.dart)
             <asynchronous suspension>
             #11     _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:774:32)
             <asynchronous suspension>
             #12     Future.wait.<anonymous closure> (dart:async/future.dart)
             <asynchronous suspension>
             #13     _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:774:32)
             <asynchronous suspension>
             #14     FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:603:16)
             <asynchronous suspension>
             #15     AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:314:32)
             <asynchronous suspension>
             #16     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1125:27)
             <asynchronous suspension>
             #17     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #18     CommandRunner.runCommand (package:args/command_runner.dart:209:13)
             <asynchronous suspension>
             #19     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
             <asynchronous suspension>
             #20     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #21     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
             <asynchronous suspension>
             #22     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
             <asynchronous suspension>
             #23     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #24     main (package:flutter_tools/executable.dart:92:3)
             <asynchronous suspension>

  [   +4 ms] 
             #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
             #1      AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:331:7)
             <asynchronous suspension>
             #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1125:27)
             <asynchronous suspension>
             #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #4      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
             <asynchronous suspension>
             #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
             <asynchronous suspension>
             #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
             <asynchronous suspension>
             #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
             <asynchronous suspension>
             #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
             <asynchronous suspension>
             #10     main (package:flutter_tools/executable.dart:92:3)
             <asynchronous suspension>

how can we use this framework without cargo?

Hi:

how can we use this framework as a normal pub? without any rust related things(cargo, rust sources)

if used cargo run to launch app, looks like the IDEA Flutter plugin can not works.

Working with Macos Specific Menu Items

On macOS, there are special menus you can find in most apps with features that aren't application-specific. For example, the "Share" menu item...

Screenshot 2021-09-20 at 14 56 29

...as well as the "Look up" menu item and the recent "Translate" menu item.
Screenshot 2021-09-20 at 14 57 29

I've noticed that Nativeshell already does this to some extent via MenuItemRole. And some menus with children inherit default items.

For example, the Window menu on macOS inherits default window menu items like "Move to [device]"

Screenshot 2021-09-20 at 14 59 36

Even the "Edit" menu inherits a few default menu items, like "Start Dictation" and "Emojis & Symbols"

Screenshot 2021-09-20 at 15 05 50

Is there any way to use other macOS-specific menu items?

[Linux] How to change dbus name or application id of a nativeshell app

In normal flutter app we can specify it by setting Application ID in CMakeLists.txt but how can we set it in nativeshell.

//flutter way
set(APPLICATION_ID "com.prateekmedia.app")

Also this id should be reverse domain like com.prateekmedia.app and not just the app. But I can't set it neither on Cargo.toml nor using rregister_observatory_listener.

`WindowFrame.noTitle` doesn't remove title from title bar

Setting the window style to WindowFrame.noTitle should remove the title and the title bar. But after setting the title of the window with Window.setTitle, the title still appears on the window.

Screenshot 2021-09-07 at 15 54 10

As far as I know, the title of the window is necessary for window management in the application.

Screenshot 2021-09-07 at 16 06 06

Because of this, it would be great if there was a way to remove the title from the title bar, but make sure the window remains named.

On window resize, it drags window with it on windows os.

Hi @knopp, I tried this on Windows OS, and while testing I found that if you try to resize the window from the left-hand side towards the right. It starts to drag the whole window towards the right.

The expected behavior is to keep the window in the same place and not moving it.

I have tried this on latest examples folder.

Hot restart is broken on linux

After pressing hot restart the window reloads, flutter gives output, but the window becomes transparent and I cannot see any content of the window, not even the borders and shadows around it.

Create a community space

NOTE: This is a meta issue, and not related to technical functionality.

It would be nice to have a community space for chatting and resolving issues. I'm quite interested in the project, but at the moment its hard to reach out in an interactive chat. Questions in general often don't belong into github issues and are better answered in an interactive conversation.

My suggestion would be to use the issue tracker on Github as a bug tracker and have a separate chat instance (possibly a discord) as a community space for showcasing and discussion. If the project gains more attention, this would become a huge benefit opposed to just having issues.

Thanks for the project, lets give it a proper community space!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.