[dia/neduard/meson_fixes] #31 Update windows-bundler.sh to copy .mo (i18n) files from libraries.
- From: Eduard <neduard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia/neduard/meson_fixes] #31 Update windows-bundler.sh to copy .mo (i18n) files from libraries.
- Date: Fri, 1 Feb 2019 13:56:20 +0000 (UTC)
commit 233578296f68aebea394f24468b24d04147cc070
Author: Eduard <eddnicodei gmail com>
Date: Fri Feb 1 12:54:44 2019 +0000
#31 Update windows-bundler.sh to copy .mo (i18n) files from libraries.
This should enable translation of basic strings such as "Exit", "Quit"
which aren't specific to Dia.
build-aux/windows-bundler.sh | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
---
diff --git a/build-aux/windows-bundler.sh b/build-aux/windows-bundler.sh
index 4674e060..1a04624a 100644
--- a/build-aux/windows-bundler.sh
+++ b/build-aux/windows-bundler.sh
@@ -1,19 +1,30 @@
#!/usr/bin/env sh
-echo "Gathering dependencies. Please close dia once it has opened."
+echo "Gathering dependencies by instrumenting Dia. Please close once it has fully opened."
PYTHONHOME=/mingw64 strace -o strace-log env ${MESON_INSTALL_DESTDIR_PREFIX}/bin/dia.exe
+echo "Done!"
+
+echo "Saved strace log."
+
# Search for all .dlls which are loaded from mingw64
-grep 'mingw64' strace-log | awk '{print $5}' | tr '\' '/' | sed 's#C:#/c#' > win-lib-deps
+grep 'mingw64' strace-log | awk '{print $5}' | sed 's#\\#/#g;s#C:#/c#' > win-lib-deps
-# Filter out those which are in /bin/ and copy them to DESTDIR/bin
-grep '/mingw64/bin/' win-lib-deps | xargs -I{} cp '{}' ${MESON_INSTALL_DESTDIR_PREFIX}/bin/
+echo "Copying all external mingw64 dependencies to ${MESON_INSTALL_DESTDIR_PREFIX}/bin/"
+grep '/mingw64/bin/' win-lib-deps | xargs -r cp -t ${MESON_INSTALL_DESTDIR_PREFIX}/bin/
-# Copy the main dependency libraries
+echo "Copying gtk-2.0 gdk-pixbuf-2.0 and python libraries"
cp -r /c/msys64/mingw64/lib/{gtk-2.0,gdk-pixbuf-2.0,python2.7}/ ${MESON_INSTALL_DESTDIR_PREFIX}/lib/
+echo "Copying library translation files (.mo)"
+
+# We want to keep the parent directories when copying.
+cd /c/msys64/mingw64/share/locale/
+find ./ \( -name 'glib20.mo' -o -name 'gtk20.mo' -o -name 'gtk20-properties.mo' -o -name 'atk10.mo' \)
-print0 | xargs -r -0 cp --parents -t ${MESON_INSTALL_DESTDIR_PREFIX}/share/locale/
+cd -
-# Cleanup uneeded files.
+
+echo "Cleaning up uneeded files."
# No need for static libraries
# NOTE: this removes every .a file, might remove important things.
@@ -25,3 +36,5 @@ rm -r ${MESON_INSTALL_DESTDIR_PREFIX}/lib/gtk-2.0/include
# No source distribution or optimized modules.
find ${MESON_INSTALL_DESTDIR_PREFIX}/lib/python2.7/ -name '*.py' -delete
find ${MESON_INSTALL_DESTDIR_PREFIX}/lib/python2.7/ -name '*.pyo' -delete
+
+echo "Done!"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]