diff --git a/.flutter-engine-revision b/.flutter-engine-revision index 2f38f4a..dcf4e2f 100644 --- a/.flutter-engine-revision +++ b/.flutter-engine-revision @@ -1 +1 @@ -ef0cd00091 +13e658725d diff --git a/.gitmodules b/.gitmodules index b348016..a86abed 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "Sources/CxxFlutterSwift/flutter-embedded-linux"] path = Sources/CxxFlutterSwift/flutter-embedded-linux - url = https://github.com/sony/flutter-embedded-linux + url = https://github.com/flutter-elinux/flutter-embedded-linux diff --git a/README.md b/README.md index 5c21a97..3142a82 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ It consists of three components: * An idiomatic, [Codable](https://developer.apple.com/documentation/foundation/archives_and_serialization/encoding_and_decoding_custom_types), [asynchronous](https://docs.swift.org/swift-book/documentation/the-swift-programming-language/concurrency/) Swift implementation of Flutter [platform channels](https://docs.flutter.dev/platform-integration/platform-channels) * Wrappers to integrate with the platform event loop and Flutter embedding's runner -* On [eLinux](https://github.com/sony/flutter-embedded-linux), a pure Swift runner that hosts your application +* On [eLinux](https://github.com/flutter-elinux/flutter-embedded-linux), a pure Swift runner that hosts your application The end-goal is to allow Flutter to be used for the UI, and Swift the business logic, in a cross-platform manner. Currently supported targets are macOS, iOS, Android and eLinux. diff --git a/TODO.md b/TODO.md index 3d32b43..09338ec 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,6 @@ - remove checked in Wayland sources, write a SwiftPM extension to generate them - fix `libflutter_engine.so` binary artifact -- [build steps](https://github.com/sony/flutter-embedded-linux/wiki/Building-Flutter-apps#cross-build-for-arm64-targets-on-x64-hosts) +- [build steps](https://github.com/flutter-elinux/flutter-embedded-linux/wiki/Building-Flutter-apps#cross-build-for-arm64-targets-on-x64-hosts) - warnings * FlutterSwift/Client/FlutterEngine.swift:40:77: warning: passing argument of non-sendable type 'FlutterDesktopEngineRef' (aka 'OpaquePointer') into actor-isolated context may introduce data races diff --git a/build-elinux.sh b/build-elinux.sh index b7f031e..c5241f6 100755 --- a/build-elinux.sh +++ b/build-elinux.sh @@ -27,6 +27,8 @@ ${DART_CACHE_BINDIR}/dartaotruntime \ --no-print-incremental-dependencies \ -Ddart.vm.profile=false \ -Ddart.vm.product=true \ + --delete-tostring-package-uri=dart:ui \ + --delete-tostring-package-uri=package:flutter \ --aot \ --tfa \ --target-os linux \ @@ -39,21 +41,20 @@ ${DART_CACHE_BINDIR}/dartaotruntime \ # Build AOT image. if [ "X${FLUTTER_SWIFT_BUILD_CONFIG}" == "Xrelease" ]; then echo "Building AOT image..." - ${FLUTTER_CACHE_ENGINEDIR}/linux-${ARCH}-release/gen_snapshot \ + ${DART_CACHE_BINDIR}/utils/gen_snapshot \ --deterministic \ --snapshot_kind=app-aot-elf \ - --elf=.dart_tool/flutter_build/flutter-embedded-linux/app.so \ + --elf=${BUNDLE_DIR}/lib/libapp.so \ --strip \ .dart_tool/flutter_build/flutter-embedded-linux/app.dill - cp .dart_tool/flutter_build/flutter-embedded-linux/app.so ${BUNDLE_DIR}/lib/libapp.so ls -al ${BUNDLE_DIR}/lib/libapp.so # remove these artefacts to ensure we don't accidentally start in JIT mode echo "Removing JIT artifacts..." - rm -rf ${BUNDLE_DIR}/data/flutter_assets/kernel_blob.bin - rm -rf ${BUNDLE_DIR}/data/flutter_assets/isolate_snapshot_data - rm -rf ${BUNDLE_DIR}/data/flutter_assets/vm_snapshot_data + rm -f ${BUNDLE_DIR}/data/flutter_assets/kernel_blob.bin + rm -f ${BUNDLE_DIR}/data/flutter_assets/isolate_snapshot_data + rm -f ${BUNDLE_DIR}/data/flutter_assets/vm_snapshot_data fi echo "Building Swift component..." diff --git a/download-engine.sh b/download-engine.sh index d403aa9..5db726a 100755 --- a/download-engine.sh +++ b/download-engine.sh @@ -1,7 +1,7 @@ #!/bin/bash ENGINE_REVISION=$(cat .flutter-engine-revision) -ENGINE_URL="https://github.com/sony/flutter-embedded-linux/releases/download/${ENGINE_REVISION}" +ENGINE_URL="https://github.com/flutter-elinux/flutter-embedded-linux/releases/download/${ENGINE_REVISION}" tmp_dir=$(mktemp -d -t engine-XXXXXXXXXX) artifact_dir="$tmp_dir/flutter-engine.artifactbundle" diff --git a/flutter-engine.artifactbundle.zip b/flutter-engine.artifactbundle.zip index c2d4bc1..f45139a 100644 Binary files a/flutter-engine.artifactbundle.zip and b/flutter-engine.artifactbundle.zip differ diff --git a/run-elinux.sh b/run-elinux.sh index 2e7d6bf..94d51be 100755 --- a/run-elinux.sh +++ b/run-elinux.sh @@ -2,10 +2,7 @@ source build-defaults.inc -# prefer the cached release versions to the ones that are included in the -# FlutterSwift zip (which are debug versions) - -export LD_LIBRARY_PATH="${FLUTTER_CACHE_ENGINEDIR}/elinux-${ARCH}-${FLUTTER_SWIFT_BUILD_CONFIG}" +export LD_LIBRARY_PATH="${BUNDLE_DIR}/lib" export LD_PRELOAD="${LD_LIBRARY_PATH}/libflutter_engine.so" .build/$FLUTTER_SWIFT_BUILD_CONFIG/counter ${BUNDLE_DIR}