Comments (26)
@Tienisto
Hi, I used a brand new Debian Docker to try compiling and running, and correctly switched the Flutter environment to 3.10.5. This time, the above error did not occur. Damn it, every one in this issues ended up being caused by the Flutter version, which makes me very unhappy.
Now there is only one final issue left, I seem to be unable to display my language (zh_CN) correctly. From the settings, the language configuration loading should be correct, and I guess there is no correct font to call. This may be related to the Linux version I am using, after all, the system of the arm64 device is diverse.
I don't know how localsend uses fonts on Linux or if it calls system fonts. I'm trying to copy some Chinese font files to ./ Data/fluent_ Assets/fonts, but obviously invalid, I don't know the correct font file name.
I am finally able to use localsend on arm Linux, after so many twists and turns and even bypassing Flutter-eLinux.
Please help me solve this last step, thank you very much.
from localsend.
1、Add font library
$ ll assets/fonts/NotoSansCJK-Regular.ttc
2、Change file:pubspec.yaml
93 flutter:
94 uses-material-design: true
95
96 assets:
97 - assets/img/
98 - assets/web/
99 - assets/CHANGELOG.md
100
101 fonts:
102 - family: NotoSansCJKsc
103 fonts:
104 - asset: assets/fonts/NotoSansCJK-Regular.ttc
3、Change file:lib/theme.dart
46 } else {
47 fontFamily = 'NotoSansCJKsc';
48 }
According to the above configuration, I can display it normally on the arm64 architecture.
from localsend.
Hi Tien, I could send you a Raspberry Pi 4 for free. Would you be interested in that / would that make it possible for you to provide aarch64 builds? Cheers.
from localsend.
Thanks @jayna37
I already have a mac with ARM so I should be able to virtualize this.
I actually tried to host a Github Runner on an ARM linux server with Hetzner but the Github Runner somehow didn't work.
This is actually my goal because almost all binaries are compiled on the CI, compiling them locally would require too much time for me.
from localsend.
I have uploaded an arm64 compilation file on Github for everyone to test if it can be used.
https://github.com/kero990/my_html/raw/master/localsend_1.10.0_linux_arm64.tar.gz
**的同胞可以在蓝奏云下载
https://kero990.lanzoum.com/i82Ip1e3593g
But I must clarify that when using this version, some images failed to be transmitted and cannot be opened after transmission. I am not sure if it is a problem with the arm64 platform or just the version.
I am researching the use of Flutter cross compilation to compile arm64 programs on the x86 platform, and can further use github action scripts to automatically generate them.
@jayna37 @LeisureLinux @Tienisto
from localsend.
There are now ARM64 binaries in v1.13.0
.
I also have noticed font issues on non-latin languages but I think that's a separate issue.
from localsend.
I have no ARM computer and Github actions do not provide ARM runners AFAIK.
from localsend.
You're right. Cross-compilation of Linux binaries is not yet possible for Flutter: ferraridamiano/ConverterNOW#205
from localsend.
I have no ARM computer and Github actions do not provide ARM runners AFAIK.
Flutter itself does not support arm64 linux, but there are well-known third-party support
https://github.com/sony/flutter-elinux
But when I use flutter-elinux to compile, there are many scrolling errors, like this
lib/main.dart:6:8: Error: Error when reading 'lib/gen/strings.g.dart': No such file or directory
import 'package:localsend_app/gen/strings.g.dart';lib/pages/tabs/settings_tab.dart:192:18: Error: The getter 't' isn't defined for the class
'_SettingsTabState'.
I don't know if it's because of my environment configuration, because of the arm64 platform, or because this project is not compatible with arm. Looking forward to someone can perfect it.
from localsend.
@kero990 Lots of Flutter apps rely on code generation. You need to generate them first: flutter pub run build_runner build -d
from localsend.
I reconfigured the environment and executed the above commands, and also attempted to use Flutter elinux. But the current errors for both are consistent.
I encountered a mismatch between the SDK and some dependency versions during construction, and I modified pubspec.yaml, but I am not sure if they will really work properly.
The current errors are as follows
Compilation to SkSL failed.
/root/flutter-elinux/flutter/packages/flutter/lib/src/material/shaders/ink_sparkle.frag: GLSL to SPIRV failed;
Compilation error. 3 error(s) and 1 warning(s).
/root/flutter-elinux/flutter/packages/flutter/lib/src/material/shaders/ink_sparkle.frag: warning: (version,
profile) forced to be (460, core), while in source code it is (320, es)
/root/flutter-elinux/flutter/packages/flutter/lib/src/material/shaders/ink_sparkle.frag:9: error: '#include' :
Included file not found. for header name: flutter/runtime_effect.glsl
/root/flutter-elinux/flutter/packages/flutter/lib/src/material/shaders/ink_sparkle.frag:93: error:
'FlutterFragCoord' : no matching overloaded function found
/root/flutter-elinux/flutter/packages/flutter/lib/src/material/shaders/ink_sparkle.frag:93: error: '=' :
cannot convert from ' const float' to ' temp 2-component vector of float'
I have limited knowledge of Flutter, and my only interest is that I have a high-performance arm64 device. So now I can't determine if the problem is on Flutter, Flutter eLinux, or the project. I hope someone can give me some help.
from localsend.
@Tienisto
Latest progress
I reconfigured the flutter environment and the above bug has been fixed in flutter3.10.x
Now you can compile correctly with flutter-elinux, but it still won't work. The current error is as follows
flutter: Initializing tray failed: MissingPluginException(No implementation found for method InitSystemTray on channel flutter/system_tray/tray)
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method ensureInitialized on channel window_manager)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:308)
<asynchronous suspension>
#1 WindowManager.ensureInitialized (package:window_manager/src/window_manager.dart:91)
<asynchronous suspension>
#2 preInit (package:localsend_app/init.dart:88)
<asynchronous suspension>
#3 main (package:localsend_app/main.dart:28)
<asynchronous suspension>
Since the compilation has been successful, it is estimated that the compilation process can not be solved, looking forward to adapting the arm platform
from localsend.
Seems like a bug in the window_manager package. I have no ARM64 Linux so I cannot reproduce it yet
from localsend.
In fact, you can test it with an ARM64 virtual machine locally: https://www.redhat.com/sysadmin/vm-arm64-fedora
from localsend.
@kero990 Glad that you managed to have a running version on ARM!
It seems that the default font doesn't support Chinese language correctly, you can try to change to another font in this file:
https://github.com/localsend/localsend/blob/main/lib/theme.dart#L82
The font just need to be installed on your system.
from localsend.
@Tienisto Hi, I used a brand new Debian Docker to try compiling and running, and correctly switched the Flutter environment to 3.10.5. This time, the above error did not occur. Damn it, every one in this issues ended up being caused by the Flutter version, which makes me very unhappy.
Now there is only one final issue left, I seem to be unable to display my language (zh_CN) correctly. From the settings, the language configuration loading should be correct, and I guess there is no correct font to call. This may be related to the Linux version I am using, after all, the system of the arm64 device is diverse.
I don't know how localsend uses fonts on Linux or if it calls system fonts. I'm trying to copy some Chinese font files to ./ Data/fluent_ Assets/fonts, but obviously invalid, I don't know the correct font file name.
I am finally able to use localsend on arm Linux, after so many twists and turns and even bypassing Flutter-eLinux. Please help me solve this last step, thank you very much.
Can you please share the build steps?
from localsend.
@Tienisto Hi, I used a brand new Debian Docker to try compiling and running, and correctly switched the Flutter environment to 3.10.5. This time, the above error did not occur. Damn it, every one in this issues ended up being caused by the Flutter version, which makes me very unhappy.嗨,我使用了一个全新的 Debian Docker 来尝试编译和运行,并正确地将 Flutter 环境切换到 3.10.5。这一次,上述错误没有发生。该死的,这个问题中的每一个最终都是由 Flutter 版本引起的,这让我非常不开心。
Now there is only one final issue left, I seem to be unable to display my language (zh_CN) correctly. From the settings, the language configuration loading should be correct, and I guess there is no correct font to call. This may be related to the Linux version I am using, after all, the system of the arm64 device is diverse.现在只剩下一个问题了,我似乎无法正确显示我的语言(zh_CN)。从设置中,语言配置加载应该是正确的,我想没有正确的字体可以调用。这可能与我使用的Linux版本有关,毕竟arm64设备的系统是多种多样的。
I don't know how localsend uses fonts on Linux or if it calls system fonts. I'm trying to copy some Chinese font files to ./ Data/fluent_ Assets/fonts, but obviously invalid, I don't know the correct font file name.我不知道localsend如何在Linux上使用字体,或者它是否调用系统字体。我正在尝试将一些中文字体文件复制到./数据/fluent_资产/字体,但显然无效,我不知道正确的字体文件名。
I am finally able to use localsend on arm Linux, after so many twists and turns and even bypassing Flutter-eLinux. Please help me solve this last step, thank you very much.我终于能够在 arm Linux 上使用 localsend,经过如此多的曲折,甚至绕过 Flutter-eLinux。请帮我解决最后一步,非常感谢。
Can you please share the build steps?你能分享一下构建步骤吗?
@Tienisto Hi, I used a brand new Debian Docker to try compiling and running, and correctly switched the Flutter environment to 3.10.5. This time, the above error did not occur. Damn it, every one in this issues ended up being caused by the Flutter version, which makes me very unhappy.嗨,我使用了一个全新的 Debian Docker 来尝试编译和运行,并正确地将 Flutter 环境切换到 3.10.5。这一次,上述错误没有发生。该死的,这个问题中的每一个最终都是由 Flutter 版本引起的,这让我非常不开心。
Now there is only one final issue left, I seem to be unable to display my language (zh_CN) correctly. From the settings, the language configuration loading should be correct, and I guess there is no correct font to call. This may be related to the Linux version I am using, after all, the system of the arm64 device is diverse.现在只剩下一个问题了,我似乎无法正确显示我的语言(zh_CN)。从设置中,语言配置加载应该是正确的,我想没有正确的字体可以调用。这可能与我使用的Linux版本有关,毕竟arm64设备的系统是多种多样的。
I don't know how localsend uses fonts on Linux or if it calls system fonts. I'm trying to copy some Chinese font files to ./ Data/fluent_ Assets/fonts, but obviously invalid, I don't know the correct font file name.我不知道localsend如何在Linux上使用字体,或者它是否调用系统字体。我正在尝试将一些中文字体文件复制到./数据/fluent_资产/字体,但显然无效,我不知道正确的字体文件名。
I am finally able to use localsend on arm Linux, after so many twists and turns and even bypassing Flutter-eLinux. Please help me solve this last step, thank you very much.我终于能够在 arm Linux 上使用 localsend,经过如此多的曲折,甚至绕过 Flutter-eLinux。请帮我解决最后一步,非常感谢。
Can you please share the build steps?你能分享一下构建步骤吗?
In fact, the current use of Flutter on arm64 is no different from that of x86. As I mentioned above, all errors reported on this appeal issue come from using the wrong version of Flutter.
When I compile correctly, the entire process is exactly the same as other platforms.
I am confident in using [email protected] Ability to compile projects normally
from localsend.
Days ago bought an OrangePi Zero3 for about 89 RMB from JD.com, which had bluetooth and wifi. Would like to install localsend, but just noticed localsend don't have arm64 version.
I can contribute 100 RMB if the Arm64 built version could released soon.
from localsend.
I tried out to use ARM64 on the temporary sever but there is no official Flutter binary.
https://docs.flutter.dev/release/archive?tab=linux
@proletarius101 @kero990 @wuzhaohui100 have you compiled the Flutter engine yourself?
from localsend.
I tried out to use ARM64 on the temporary sever but there is no official Flutter binary.
https://docs.flutter.dev/release/archive?tab=linux
@proletarius101 @kero990 @wuzhaohui100 have you compiled the Flutter engine yourself?
Maybe use Docker image ? fischerscode/flutter
from localsend.
I tried out to use ARM64 on the temporary sever but there is no official Flutter binary.我尝试在临时服务器上使用 ARM64,但没有官方的 Flutter 二进制文件。
https://docs.flutter.dev/release/archive?tab=linux
@proletarius101 @kero990 @wuzhaohui100 have you compiled the Flutter engine yourself?你自己编译过 Flutter 引擎吗?
The Flutter engine does not require compilation, and the so-called release has no architectural limitations. It is just a script file. You can download and extract the official compressed package, extract it anywhere and add the $PATH environment variable, or the git clone official repository. In short, it works no different from x64, although the official link states that the architecture is x64.
~$ which flutter
/opt/runtime/flutter/bin/flutter
~$ file /opt/runtime/flutter/bin/flutter
/opt/runtime/flutter/bin/flutter: Bourne-Again shell script, ASCII text executable
from localsend.
@Tienisto
In addition, I found the option of cross compilation in Flutter's cli help, and it seems that Flutter can cross compile arm64 release files in an x64 environment. However, currently there are no tutorials available on the entire network, and it seems that cross compiled sysboot is needed. You can give it a try and perhaps write the compilation script for github actions directly.
$ flutter build linux --help
Build a Linux desktop application.
Global options:
-h, --help Print this usage information.
-v, --verbose Noisy logging, including all shell commands executed.
If used with "--help", shows hidden options. If used with "flutter doctor", shows
additional diagnostic information. (Use "-vv" to force verbose logging in those
cases.)
-d, --device-id Target device id or name (prefixes allowed).
--version Reports the version of this tool.
--suppress-analytics Suppress analytics reporting for the current CLI invocation.
--disable-telemetry Disable telemetry reporting each time a flutter or dart command runs, until it is
re-enabled.
--enable-telemetry Enable telemetry reporting each time a flutter or dart command runs.
Usage: flutter build linux [arguments]
-h, --help Print this usage information.
--debug Build a debug version of your app.
--profile Build a version of your app specialized for
performance profiling.
--release Build a release version of your app (default mode).
--[no-]obfuscate In a release build, this flag removes identifiers
and replaces them with randomized values for the
purposes of source code obfuscation. This flag must
always be combined with "--split-debug-info"
option, the mapping between the values and the
original identifiers is stored in the symbol map
created in the specified directory. For an app
built with this flag, the "flutter symbolize"
command with the right program symbol file is
required to obtain a human readable stack trace.
Because all identifiers are renamed, methods like
Object.runtimeType, Type.toString, Enum.toString,
Stacktrace.toString, Symbol.toString (for constant
symbols or those generated by runtime system) will
return obfuscated results. Any code or tests that
rely on exact names will break.
--split-debug-info=<v1.2.3/> In a release build, this flag reduces application
size by storing Dart program symbols in a separate
file on the host rather than in the application.
The value of the flag should be a directory where
program symbol files can be stored for later use.
These symbol files contain the information needed
to symbolize Dart stack traces. For an app built
with this flag, the "flutter symbolize" command
with the right program symbol file is required to
obtain a human readable stack trace.
This flag cannot be combined with "--analyze-size".
--[no-]tree-shake-icons Tree shake icon fonts so that only glyphs used by
the application remain.
(defaults to on)
--[no-]analyze-size Whether to produce additional profile information
for artifact output size. This flag is only
supported on "--release" builds. When building for
Android, a single ABI must be specified at a time
with the "--target-platform" flag. When building
for iOS, only the symbols from the arm64
architecture are used to analyze code size.
By default, the intermediate output files will be
placed in a transient directory in the build
directory. This can be overridden with the
"--code-size-directory" option.
This flag cannot be combined with
"--split-debug-info".
--code-size-directory The location to write code size analysis files. If
this is not specified, files are written to a
temporary directory under the build directory.
--dart-define=<foo=bar> Additional key-value pairs that will be available
as constants from the String.fromEnvironment,
bool.fromEnvironment, and int.fromEnvironment
constructors.
Multiple defines can be passed by repeating
"--dart-define" multiple times.
--dart-define-from-file=<use-define-config.json|.env> The path of a .json or .env file containing
key-value pairs that will be available as
environment variables.
These can be accessed using the
String.fromEnvironment, bool.fromEnvironment, and
int.fromEnvironment constructors.
Multiple defines can be passed by repeating
"--dart-define-from-file" multiple times.
Entries from "--dart-define" with identical keys
take precedence over entries from these files.
--[no-]pub Whether to run "flutter pub get" before executing
this command.
(defaults to on)
-t, --target=<path> The main entry-point file of the application, as
run on the device.
If the "--target" option is omitted, but a file
name is provided on the command line, then that is
used instead.
(defaults to "lib/main.dart")
--[no-]track-widget-creation Track widget creation locations. This enables
features such as the widget inspector. This
parameter is only functional in debug mode (i.e.
when compiling JIT, not AOT).
(defaults to on)
--build-number An identifier used as an internal version number.
Each build must have a unique identifier to
differentiate it from previous builds.
It is used to determine whether one build is more
recent than another, with higher numbers indicating
more recent build.
On Android it is used as "versionCode".
On Xcode builds it is used as "CFBundleVersion".
On Windows it is used as the build suffix for the
product and file versions.
--build-name=<x.y.z> A "x.y.z" string used as the version number shown
to users.
For each new version of your app, you will provide
a version number to differentiate it from previous
versions.
On Android it is used as "versionName".
On Xcode builds it is used as
"CFBundleShortVersionString".
On Windows it is used as the major, minor, and
patch parts of the product and file versions.
--target-platform The target platform for which the app is compiled.
[linux-arm64 (default), linux-x64]
--target-sysroot The root filesystem path of target platform for
which the app is compiled. This option is valid
only if the current host and target architectures
are different.
(defaults to "/")
Run "flutter help" to see global options.
from localsend.
On my Fedora system:
$ ./localsend_app
./localsend_app: error while loading shared libraries: libayatana-appindicator3.so.1: cannot open shared object file: No such file or directory
Could not find a package to install that provides it.
from localsend.
Thanks @kero990 , I will look into this.
@jayna37, LocalSend requires libayatana-appindicator3
to run. You can look into the AppImage builder: https://github.com/localsend/localsend/blob/ed127c97e1c6c22b02c1bfc95cc50950a2cdb29c/AppImageBuilder.yml#L32C9-L32C33
I don't know how this package is called on your Linux distribution so unfortunately, I cannot help in that regard.
from localsend.
Thanks @kero990 , I will look into this.谢谢,我会调查这个。
No need, I tried and the result shows that cross compilation is still not supported. It seems that we still need to try compiling in the local environment. There are some Github actions that utilize Docker or QEMU cross compilation, although their performance is poor, they should at least be usable.
from localsend.
Thank you. Apparently Fedora does not package this library at all. Bummer but that's what it is.
neutralinojs/neutralinojs#840
from localsend.
Related Issues (20)
- [Feature request]: Add SFTP server HOT 2
- DIoException [unknown]: null Error: HttpException: Content size below specified contentLength
- localsend HOT 1
- flutter run not working as intended (on linux) HOT 5
- 能不能添加一下iPhone自带的分享,好像是 Flutter iOS extension HOT 4
- "Share via link" still keeps the file open on Windows
- Rename files if the characters are not supported on the receiving operating system
- Multiple configurable save locations depending on file's mime type
- [Feature request] A way to send files using "open with" and "share" option in Windows HOT 2
- Feature request: README.md: Add social sharing badges to encourage community engagement.
- Possibly Necessary: Transition to Newer Version Number?
- Feature request: support wifi direct to accelerate transfer HOT 3
- The Windows system tray icon does not disappear after manually quitting the program. Installed using MSIX.
- Bug report 【dont have chinese in lanuage option when install ,but can automatically switch to chinese after installed】 HOT 2
- [500] 无法保存文件 HOT 1
- Shortcuts to send selected/copied text (or media/files) to fixed device or one chosen on the fly from available ones
- 我觉得文档中构建那里有个错误 HOT 2
- [Bug report] Error occurs when sending the same file from PC to android phone.
- I hope to package Android “armeabi-v7a” applications separately from "arm64-v8a" applications, thank you!
- Option to set default file directory for files to be sent
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from localsend.