WrapEarnPass left a comment (geany/geany#4620)

As of https://github.com/geany/geany/pull/4632, my build process is (because I 
do not have a CI runner to play with:
Note: My cross compile sysroot is not in the standard ming location of /ucrt64. 
You will have to edit the checked in ```ucrt64.cross.ini``` and the following 
vars if you use a different sysroot.

```
#!/bin/bash
_DEST=/home/build/geany-windows
_SYSROOT=/usr/windows/ucrt64
_BUILD=/home/build/Projects/geany/build
_SRC=/home/build/Projects/geany/geany

export PKG_CONFIG="/usr/bin/pkg-config --define-prefix --env-only"
export PKG_CONFIG_PATH="${_SYSROOT}/lib/pkgconfig:${_SYSROOT}/share/pkgconfig"
export ARCH="x86_64"
export MINGW_ARCH="mingw32ucrt"
export HOST="x86_64-w64-mingw32ucrt"
export WINEPREFIX="$HOME/.wine"


export CFLAGS="-I/usr/x86_64-w64-mingw32ucrt/include -I${_SYSROOT}/include"
export CXXFLAGS="-I/usr/x86_64-w64-mingw32ucrt/include -I${_SYSROOT}/include"

rm -rf "${_DEST}/*"
rm -rf "${_BUILD}"
mkdir -p "${_BUILD}"
cd "${_BUILD}"
meson setup \
    --prefix="${_DEST}" \
    --wrap-mode=nodownload \
    --auto-features=enabled \
    --buildtype=plain \
    -Dhtml-docs=enabled \
    -Dpdf-docs=disabled \
    -Dapi-docs=disabled \
    -Dmac-integration=disabled \
    -Dgtkdoc=false \
    -Dplugins=true \
    -Dvte=false \
    -Dsocket=true \
    --cross-file "${_SRC}/ucrt64.cross.ini" \
    "${_SRC}"
    
meson compile || return
meson install || return

#cp dependencies
cd ${_DEST}
mkdir -p ${_DEST}/bin/
#needed for post-install updates
cp -pn ${_SYSROOT}/bin/update-mime-database.exe ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/fc-cache.exe ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/gio-querymodules.exe ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/glib-compile-schemas.exe ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/gtk-update-icon-cache.exe ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/gdk-pixbuf-query-loaders.exe ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/gtk-query-immodules-3.0.exe ${_DEST}/bin/

cp -pn ${_SYSROOT}/bin/libatk-1.0-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libbrotlicommon.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libbrotlidec.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libbz2-1.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libcairo-2.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libcairo-gobject-2.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libdatrie-1.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libdeflate.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libepoxy-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libexpat-1.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libffi-8.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libfontconfig-1.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libfreetype-6.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libfribidi-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libgcc_s_seh-1.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libgdk-3-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libgdk_pixbuf-2.0-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libgio-2.0-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libglib-2.0-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libgmodule-2.0-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libgobject-2.0-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libgraphite2.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libgtk-3-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libharfbuzz-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libiconv-2.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libintl-8.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libjbig-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libjpeg-8.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libLerc.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/liblzma-5.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libpango-1.0-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libpangocairo-1.0-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libpangoft2-1.0-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libpangowin32-1.0-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libpcre2-8-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libpixman-1-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libpng16-16.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libsharpyuv-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libstdc++-6.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/librsvg-2-2.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libthai-0.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libtiff-6.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libwebp-7.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libwinpthread-1.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libxml2-16.dll ${_DEST}/bin/
cp -pn ${_SYSROOT}/bin/libzstd.dll ${_DEST}/bin/
mkdir -p "${_DEST}/etc/fonts/"
cp -pnR ${_SYSROOT}/etc/fonts/. "${_DEST}/etc/fonts/"
mkdir -p "${_DEST}/etc/gtk-3.0/"
cp -pnR ${_SYSROOT}/etc/gtk-3.0/. "${_DEST}/etc/gtk-3.0/"
mkdir -p "${_DEST}/lib/gdk-pixbuf-2.0/"
cp -pnR ${_SYSROOT}/lib/gdk-pixbuf-2.0/. "${_DEST}/lib/gdk-pixbuf-2.0/"
mkdir -p "${_DEST}/share/fontconfig/"
cp -pnR ${_SYSROOT}/share/fontconfig/. "${_DEST}/share/fontconfig/"
mkdir -p "${_DEST}/share/glib-2.0/"
cp -pnR ${_SYSROOT}/share/glib-2.0/. "${_DEST}/share/glib-2.0/"
mkdir -p "${_DEST}/share/icons/"
cp -pnR ${_SYSROOT}/share/icons/. "${_DEST}/share/icons/"
mkdir -p "${_DEST}/share/libthai/"
cp -pnR ${_SYSROOT}/share/libthai/. "${_DEST}/share/libthai/"
mkdir -p "${_DEST}/share/locale/"
cp -pnR ${_SYSROOT}/share/locale/. "${_DEST}/share/locale/"
mkdir -p "${_DEST}/share/mime/"
cp -pnR ${_SYSROOT}/share/mime/. "${_DEST}/share/mime/"
mkdir -p "${_DEST}/share/themes/"
cp -pnR ${_SYSROOT}/share/themes/. "${_DEST}/share/themes/"
mkdir -p "${_DEST}/lib/gtk-3.0/"
cp -pnR ${_SYSROOT}/lib/gtk-3.0/. "${_DEST}/lib/gtk-3.0/"
mkdir -p "${_DEST}/lib/gio/"
cp -pnR ${_SYSROOT}/lib/gio/. "${_DEST}/lib/gio/"

#fix perms
find ${_DEST} -type d ! -perm -go+rx -exec chmod go+rx {} \;
find ${_DEST} -type f ! -perm -go+r -exec chmod go+r {} \;

find ${_DEST} -type f -exec file --mime-type -e apptype -e compress -e elf -e 
tar -e encoding {} \; |& grep 'text/' > files.log
grep 'text/' files.log | awk -F ':' '{print $1}' | xargs -I{} unix2dos {}
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/4620#issuecomment-5039889312
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/issues/4620/[email protected]>

Reply via email to