Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/run-flutter-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@ jobs:
flutter pub get
flutter test

# The checked-in example overrides are relative monorepo paths. Real
# consumers of a Git or hosted package receive absolute file:/// root
# URIs in package_config.json, so exercise that resolution path too.
- name: Exercise absolute package URIs (Linux)
if: matrix.name == 'Linux'
shell: bash
run: |
sed -i "s|path: ../../../thermion_dart|path: ${GITHUB_WORKSPACE}/thermion_dart|" quickstart/pubspec.yaml
sed -i "s|path: ../../../thermion_dart|path: ${GITHUB_WORKSPACE}/thermion_dart|" picking/pubspec.yaml

- name: Build quickstart (Linux)
if: matrix.name == 'Linux'
run: cd quickstart && flutter pub get && flutter build linux
Expand Down
9 changes: 4 additions & 5 deletions thermion_flutter/thermion_flutter/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,10 @@ if(_PKG_CONFIG)
endforeach()

if(_td_rootUri)
# rootUri may be a file:/// URI (e.g. file:///D:/path on Windows,
# file:///home on Linux) or a relative path like "../../thermion_dart".
# Strip file:/// (3 slashes) first, then file:// (2 slashes) as fallback.
string(REGEX REPLACE "^file:///" "" _td_root "${_td_rootUri}")
string(REGEX REPLACE "^file://" "" _td_root "${_td_root}")
# rootUri may be an absolute file:/// URI or a relative path such as
# "../../thermion_dart". Strip only the file:// scheme prefix: the
# remaining slash is the root of an absolute Linux path.
string(REGEX REPLACE "^file://" "" _td_root "${_td_rootUri}")
if(NOT IS_ABSOLUTE "${_td_root}")
get_filename_component(_pkg_dir "${_PKG_CONFIG}" DIRECTORY)
get_filename_component(_td_root "${_pkg_dir}/${_td_root}" ABSOLUTE)
Expand Down
Loading