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
7 changes: 6 additions & 1 deletion common.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@

def get_host_machine_arch():
os.environ['HOST_ARCH'] = platform.machine()
return platform.machine()
machine = platform.machine()
if sys.platform == 'darwin':
os.environ['OS_LIBPATH'] = f'{machine}-apple-darwin'
else:
os.environ['OS_LIBPATH'] = f'{machine}-unknown-linux-gnu'
return machine


def get_flutter_arch():
Expand Down
68 changes: 15 additions & 53 deletions configs/desktop-homescreen.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"CC": "${LLVM_BINDIR}/clang",
"CXX": "${LLVM_BINDIR}/clang++",
"PATH": "${FLUTTER_WORKSPACE}/.tmp/toolchain-common-ninja:${FLUTTER_WORKSPACE}/.tmp/toolchain-common-cmake/bin:$PATH",
"LD_LIBRARY_PATH": "${LLVM_LIBDIR}:${FLUTTER_WORKSPACE}/.tmp/toolchain-common-cmake/lib",
"LD_LIBRARY_PATH": "${LLVM_LIBDIR}:${LLVM_LIBDIR}/${OS_LIBPATH}:${FLUTTER_WORKSPACE}/.tmp/toolchain-common-cmake/lib",
"HOMESCREEN_SRC_DIR": "${FLUTTER_WORKSPACE}/app/ivi-homescreen",
"HOMESCREEN_BUILD_DIR": "${FLUTTER_WORKSPACE}/app/ivi-homescreen/build",
"PLUGINS_DIR": "${FLUTTER_WORKSPACE}/app/ivi-homescreen-plugins/plugins",
Expand Down Expand Up @@ -95,72 +95,34 @@
"shell": true,
"cmds": [
"sudo-apt-workspace update -y",
"sudo-apt-workspace install -yq --no-install-recommends libsystemd-dev",
"sudo-apt-workspace install -yq --no-install-recommends libpugixml-dev libsystemd-dev",
"if [ -n \"$GITHUB_ACTIONS\" ]; then sudo-apt-workspace install -yq flatpak libflatpak-dev gnome-software-plugin-flatpak; fi",
"if [ -n \"$GITHUB_ACTIONS\" ]; then sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo; fi",
"if [ -n \"$GITHUB_ACTIONS\" ]; then flatpak remotes; fi"
],
"20.04": {
"cmds": [
"echo \"Ubuntu 20.04\"",
"sudo-apt-workspace install -yq --no-install-recommends libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-gl",
"pkg-config --modversion gstreamer-1.0 gstreamer-audio-1.0"
]
},
"22.04": {
"cmds": [
"echo \"Ubuntu 22.04\"",
"sudo-apt-workspace install -yq --no-install-recommends libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-gl",
"pkg-config --modversion gstreamer-1.0 gstreamer-audio-1.0"
]
},
"24.04": {
"cmds": [
"echo \"Ubuntu 24.04\"",
"sudo-apt-workspace install -yq --no-install-recommends libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-gl",
"pkg-config --modversion gstreamer-1.0 gstreamer-audio-1.0"
]
}
"if [ -n \"$GITHUB_ACTIONS\" ]; then flatpak remotes; fi",
"sudo-apt-workspace install -yq --no-install-recommends libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-gl",
"pkg-config --modversion gstreamer-1.0 gstreamer-audio-1.0"
]
}
},
"x86_64": {
"ubuntu": {
"shell": true,
"cmds": [
"sudo-apt-workspace update -y",
"sudo-apt-workspace install -yq --no-install-recommends libsystemd-dev",
"sudo-apt-workspace install -yq --no-install-recommends libpugixml-dev libsystemd-dev",
"if [ -n \"$GITHUB_ACTIONS\" ]; then sudo-apt-workspace install -yq flatpak libflatpak-dev gnome-software-plugin-flatpak; fi",
"if [ -n \"$GITHUB_ACTIONS\" ]; then sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo; fi",
"if [ -n \"$GITHUB_ACTIONS\" ]; then flatpak remotes; fi"
],
"20.04": {
"cmds": [
"echo \"Ubuntu 20.04\"",
"sudo-apt-workspace install -yq --no-install-recommends libgstreamer1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-gl",
"pkg-config --modversion gstreamer-1.0 gstreamer-audio-1.0"
]
},
"22.04": {
"cmds": [
"echo \"Ubuntu 22.04\"",
"sudo-apt-workspace install -yq --no-install-recommends libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-gl",
"pkg-config --modversion gstreamer-1.0 gstreamer-audio-1.0"
]
},
"24.04": {
"cmds": [
"echo \"Ubuntu 24.04\"",
"sudo-apt-workspace install -yq --no-install-recommends libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-gl",
"pkg-config --modversion gstreamer-1.0 gstreamer-audio-1.0"
]
}
"if [ -n \"$GITHUB_ACTIONS\" ]; then flatpak remotes; fi",
"sudo-apt-workspace install -yq --no-install-recommends libgstreamer1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-gl",
"pkg-config --modversion gstreamer-1.0 gstreamer-audio-1.0"
]
},
"fedora": {
"shell": true,
"cmds": [
"sudo-dnf-workspace update -y",
"sudo-dnf-workspace -yq install SDL2-devel libsecret-devel zenity systemd-devel ",
"sudo-dnf-workspace -yq install libunwind-devel gstreamer1-devel gstreamer1-plugins-base-devel gstreamer1-plugins-bad-free-devel gstreamer1-plugins-bad-free-extras gstreamer1-plugins-base-tools gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly-free",
"sudo-dnf-workspace -yq install SDL2-devel libsecret-devel zenity systemd-devel libatomic",
"sudo-dnf-workspace -yq install pugixml-devel libunwind-devel gstreamer1-devel gstreamer1-plugins-base-devel gstreamer1-plugins-bad-free-devel gstreamer1-plugins-bad-free-extras gstreamer1-plugins-base-tools gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly-free",
"sudo-dnf-workspace -yq install flatpak",
"if command -v flatpak >/dev/null 2>&1; then flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo || echo 'Flatpak remote add failed, continuing...'; fi",
"if command -v flatpak >/dev/null 2>&1; then flatpak update --noninteractive --user || echo 'Flatpak update failed, continuing...'; fi",
Expand All @@ -170,8 +132,8 @@
"rhel": {
"cmds": [
"sudo-dnf-workspace update -y",
"sudo-dnf-workspace -y install zenity systemd-devel",
"sudo-dnf-workspace -y install libunwind-devel gstreamer1-devel gstreamer1-plugins-base-devel gstreamer1-plugins-bad-free-devel gstreamer1-plugins-base-tools gstreamer1-plugins-good gstreamer1-plugins-ugly-free",
"sudo-dnf-workspace -y install zenity systemd-devel libatomic",
"sudo-dnf-workspace -y install pugixml-devel libunwind-devel gstreamer1-devel gstreamer1-plugins-base-devel gstreamer1-plugins-bad-free-devel gstreamer1-plugins-base-tools gstreamer1-plugins-good gstreamer1-plugins-ugly-free",
"sudo-dnf-workspace -y install flatpak",
"if command -v flatpak >/dev/null 2>&1; then flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo || echo 'Flatpak remote add failed, continuing...'; fi",
"if command -v flatpak >/dev/null 2>&1; then flatpak update --noninteractive --user || echo 'Flatpak update failed, continuing...'; fi",
Expand Down
7 changes: 5 additions & 2 deletions configs/toolchain-llvm18_18.1.8.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"LLVM_CONFIG": "${LLVM_BINDIR}/llvm-config",
"PATH": "${LLVM_BINDIR}:$PATH",
"CXXFLAGS": "-stdlib=libc++ -lc++abi",
"LD_LIBRARY_PATH": "${LLVM_LIBDIR}:$LD_LIBRARY_PATH"
"LD_LIBRARY_PATH": "${LLVM_LIBDIR}:${LLVM_LIBDIR}/${OS_LIBPATH}:$LD_LIBRARY_PATH",
"LIBRARY_PATH": "${LLVM_LIBDIR}/${OS_LIBPATH}:$LIBRARY_PATH"
},
"append_to_runtime_env": {
"common": [
Expand Down Expand Up @@ -55,6 +56,7 @@
"cwd": "${LLVM_BASE_DIR}",
"shell": true,
"cmds": [
"sudo-apt-workspace install -yq lsb-release wget software-properties-common gnupg apt-file build-essential libtool",
"if [ $(lsb_release -rs) = \"22.04\" ]; then sudo-apt-workspace install -yq libtinfo5; fi",
"sudo-apt-workspace remove libunwind-* -yq || true",
"mkdir -p ${LLVM_BASE_DIR}",
Expand Down Expand Up @@ -115,8 +117,9 @@
"cwd": "${LLVM_BASE_DIR}",
"shell": true,
"cmds": [
"sudo-apt-workspace install -yq lsb-release wget software-properties-common gnupg apt-file build-essential libtool",
"if [ $(lsb_release -rs) = \"22.04\" ]; then sudo-apt-workspace install -yq libtinfo5; fi",
"if [ $(lsb_release -rs) = \"24.04\" ]; then wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb -O /tmp/libtinfo5_6.3-2ubuntu0.1_amd64.deb && sudo apt install /tmp/libtinfo5_6.3-2ubuntu0.1_amd64.deb; fi",
"if [ $(lsb_release -rs) = \"24.04\" ]; then wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.2_amd64.deb -O /tmp/libtinfo5_6.3-2ubuntu0.2_amd64.deb && sudo apt install /tmp/libtinfo5_6.3-2ubuntu0.2_amd64.deb; fi",
"sudo-apt-workspace remove libunwind-* -yq || true",
"mkdir -p ${LLVM_BASE_DIR}",
"tar -xf \"${ARTIFACTS_DIR}/clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-18.04.tar.xz\" --strip-components=1",
Expand Down
4 changes: 0 additions & 4 deletions configs/wayland-mesa.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
"shell": true,
"cmds": [
"sudo-apt-workspace install -yq lsb-release wget software-properties-common gnupg build-essential libtool",
"sudo add-apt-repository -y ppa:kisak/kisak-mesa",
"sudo-apt-workspace update -yq",
"sudo-apt-workspace install -yq libxkbcommon-dev libwayland-dev wayland-protocols mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev mesa-utils libsecret-1-dev libsdl2-dev libjpeg-dev zenity"
]
},
Expand All @@ -37,8 +35,6 @@
"shell": true,
"cmds": [
"sudo-apt-workspace install -yq lsb-release wget software-properties-common gnupg build-essential libtool",
"sudo add-apt-repository -y ppa:kisak/kisak-mesa",
"sudo-apt-workspace update -yq",
"sudo-apt-workspace install -yq libxkbcommon-dev libwayland-dev wayland-protocols mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev mesa-utils libsecret-1-dev libsdl2-dev libjpeg-dev zenity"
]
},
Expand Down
11 changes: 9 additions & 2 deletions flutter_workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,17 @@ def main():
flutter_bin_cache = os.path.join(flutter_sdk_path, 'bin', 'cache')
sdk_cache_dir = str(get_cache_folder() / 'flutter-sdk-cache')
os.makedirs(sdk_cache_dir, exist_ok=True)
if not os.path.islink(flutter_bin_cache):
# Use a relative symlink so it resolves correctly regardless of mount point (e.g. Docker).
rel_cache_target = os.path.relpath(sdk_cache_dir, os.path.dirname(flutter_bin_cache))
if os.path.islink(flutter_bin_cache):
# Remove and recreate if the existing symlink doesn't match the desired relative target.
if os.readlink(flutter_bin_cache) != rel_cache_target:
os.remove(flutter_bin_cache)
os.symlink(rel_cache_target, flutter_bin_cache)
else:
if os.path.isdir(flutter_bin_cache):
shutil.rmtree(flutter_bin_cache)
os.symlink(sdk_cache_dir, flutter_bin_cache)
os.symlink(rel_cache_target, flutter_bin_cache)

# force tool rebuild
force_tool_rebuild(flutter_sdk_folder)
Expand Down
Loading