From 9ae30a06078410598a703a08d845c3c115a68354 Mon Sep 17 00:00:00 2001 From: Maxim Logaev Date: Tue, 26 Mar 2024 22:48:19 +0300 Subject: [PATCH] Added workaround for bug #17 Signed-off-by: Maxim Logaev --- .gitignore | 3 ++- build-win64.sh | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a7611a38..06558868 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ windows-installer/win64-dist/ *.dll *.flatpak flatpak-dist -.flatpak-builder \ No newline at end of file +.flatpak-builder +*.zst \ No newline at end of file diff --git a/build-win64.sh b/build-win64.sh index 4143a154..5df7947e 100644 --- a/build-win64.sh +++ b/build-win64.sh @@ -28,6 +28,20 @@ download_yolort() rm -f "$file_name" } +download_gtk4_git() +{ + # FIXME: The bug fix https://gitlab.gnome.org/GNOME/gtk/-/issues/3749 is currently only available in the main branch, + # so GTK4 was builded from it. Needs to be replaced with a package from the MSYS2 repository when the changes get there. + url="https://github.com/mxlgv/mingw-w64-gtk4-git/releases/download/rel1" + gtk_pkg="mingw-w64-x86_64-gtk4-git-4.14.1.r62.gb1eed1c153-1-any.pkg.tar.zst" + gtk_gstreamer_pkg="mingw-w64-x86_64-gtk4-media-gstreamer-git-4.14.1.r62.gb1eed1c153-1-any.pkg.tar.zst" + + curl -L -o "$gtk_pkg" "$url/$gtk_pkg" + curl -L -o "$gtk_gstreamer_pkg" "$url/$gtk_gstreamer_pkg" + + pacman -U --needed --noconfirm "$gtk_pkg" "$gtk_gstreamer_pkg" +} + prepare() { msg "Installing MINGW64 build dependencies" @@ -36,7 +50,6 @@ prepare() mingw64/mingw-w64-x86_64-gcc \ mingw64/mingw-w64-x86_64-cmake \ mingw64/mingw-w64-x86_64-ninja \ - mingw64/mingw-w64-x86_64-gtk4 \ mingw64/mingw-w64-x86_64-libadwaita \ mingw64/mingw-w64-x86_64-sqlite3 \ mingw64/mingw-w64-x86_64-openssl \ @@ -63,6 +76,9 @@ prepare() unzip \ curl + msg "Downloading and install git versions of gtk4 and gtk4-media-gstreamer packages" + download_gtk4_git + msg "Successfully installed!" msg "Download YoloRT headers"