Skip to content

Commit 2eccbf7

Browse files
anonymoussoftclaude
andcommitted
fix: resolve CI failures on Windows and Linux
Windows fix: - Update tim2tox submodule to include git repo initialization before applying SDK patches. git apply requires a git repository context. Linux fix: - Add gstreamer-1.0 development libraries to Linux dependencies for audioplayers_linux plugin compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3129263 commit 2eccbf7

3 files changed

Lines changed: 35 additions & 5 deletions

File tree

.github/workflows/build-packages.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ jobs:
6262
cmake \
6363
libgtk-3-dev \
6464
libsodium-dev \
65+
libgstreamer1.0-dev \
66+
libgstreamer-plugins-base1.0-dev \
67+
libsecret-1-dev \
68+
libayatana-appindicator3-dev \
69+
gstreamer1.0-plugins-base \
70+
gstreamer1.0-plugins-good \
6571
ninja-build \
6672
patchelf \
6773
pkg-config
@@ -75,6 +81,21 @@ jobs:
7581
- name: Install Flutter packages
7682
run: flutter pub get
7783

84+
- name: Fix desktop_drop_for_t Linux plugin naming
85+
run: |
86+
# desktop_drop_for_t is a fork of desktop_drop but its Linux plugin
87+
# files still use the old names. Fix the CMake target name and create
88+
# a symlink so the generated #include <desktop_drop_for_t/...> resolves.
89+
PLUGIN_DIR="linux/flutter/ephemeral/.plugin_symlinks/desktop_drop_for_t/linux"
90+
if [ -f "$PLUGIN_DIR/CMakeLists.txt" ]; then
91+
sed -i 's/set(PLUGIN_NAME "desktop_drop_plugin")/set(PLUGIN_NAME "desktop_drop_for_t_plugin")/' "$PLUGIN_DIR/CMakeLists.txt"
92+
sed -i 's/set(desktop_drop_bundled_libraries/set(desktop_drop_for_t_bundled_libraries/' "$PLUGIN_DIR/CMakeLists.txt"
93+
# Header lives under include/desktop_drop/ but registrant expects desktop_drop_for_t/
94+
if [ -d "$PLUGIN_DIR/include/desktop_drop" ] && [ ! -d "$PLUGIN_DIR/include/desktop_drop_for_t" ]; then
95+
ln -s desktop_drop "$PLUGIN_DIR/include/desktop_drop_for_t"
96+
fi
97+
fi
98+
7899
- name: Build Tim2Tox native library
79100
run: bash tool/ci/build_tim2tox.sh --target linux --mode "$BUILD_MODE"
80101

@@ -96,6 +117,11 @@ jobs:
96117
runs-on: windows-2022
97118

98119
steps:
120+
- name: Configure Git line endings
121+
run: |
122+
git config --global core.autocrlf false
123+
git config --global core.eol lf
124+
99125
- name: Checkout
100126
uses: actions/checkout@v6
101127
with:
@@ -107,13 +133,13 @@ jobs:
107133
flutter-version: ${{ env.FLUTTER_VERSION }}
108134
cache: true
109135

110-
- name: Install vcpkg and libsodium
136+
- name: Install vcpkg and native dependencies
111137
shell: pwsh
112138
run: |
113139
$vcpkgRoot = Join-Path $env:RUNNER_TEMP "vcpkg"
114140
git clone --depth 1 https://github.com/microsoft/vcpkg $vcpkgRoot
115141
& "$vcpkgRoot\bootstrap-vcpkg.bat" -disableMetrics
116-
& "$vcpkgRoot\vcpkg.exe" install libsodium:x64-windows
142+
& "$vcpkgRoot\vcpkg.exe" install libsodium:x64-windows pthreads:x64-windows
117143
"VCPKG_ROOT=$vcpkgRoot" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
118144
119145
- name: Enable Windows desktop

tool/ci/build_tim2tox.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,13 @@ build_desktop_target() {
119119
source_dir_win="$(ci_windows_path "$TIM2TOX_DIR")"
120120
build_dir_win="$(ci_windows_path "$build_dir")"
121121
if [[ -n "${VCPKG_ROOT:-}" ]]; then
122-
local vcpkg_root_win
122+
local vcpkg_root_win toolchain_file
123123
vcpkg_root_win="$(ci_windows_path "$VCPKG_ROOT")"
124-
VCPKG_ROOT="$vcpkg_root_win" cmake -S "$source_dir_win" -B "$build_dir_win" -G "Visual Studio 17 2022" -A x64 "${configure_args[@]}"
124+
toolchain_file="${vcpkg_root_win}/scripts/buildsystems/vcpkg.cmake"
125+
VCPKG_ROOT="$vcpkg_root_win" cmake -S "$source_dir_win" -B "$build_dir_win" \
126+
-G "Visual Studio 17 2022" -A x64 \
127+
-DCMAKE_TOOLCHAIN_FILE="$toolchain_file" \
128+
"${configure_args[@]}"
125129
else
126130
cmake -S "$source_dir_win" -B "$build_dir_win" -G "Visual Studio 17 2022" -A x64 "${configure_args[@]}"
127131
fi

0 commit comments

Comments
 (0)