Skip to content

Instantly share code, notes, and snippets.

@LAGonauta
Last active May 9, 2021 17:47
Show Gist options
  • Save LAGonauta/0643a6413802e5a69f40078d13f23d0c to your computer and use it in GitHub Desktop.
Save LAGonauta/0643a6413802e5a69f40078d13f23d0c to your computer and use it in GitHub Desktop.
Script for building Dino 64-bit on MSYS2 with calls support
pacman -S --needed \
mingw64/mingw-w64-x86_64-gcc \
mingw64/mingw-w64-x86_64-cmake \
mingw64/mingw-w64-x86_64-ninja \
mingw64/mingw-w64-x86_64-libsoup \
mingw64/mingw-w64-x86_64-gtk3 \
mingw64/mingw-w64-x86_64-sqlite3 \
mingw64/mingw-w64-x86_64-gobject-introspection \
mingw64/mingw-w64-x86_64-glib2 \
mingw64/mingw-w64-x86_64-glib-networking \
mingw64/mingw-w64-x86_64-libgcrypt \
mingw64/mingw-w64-x86_64-libgee \
mingw64/mingw-w64-x86_64-pkg-config \
mingw64/mingw-w64-x86_64-vala \
mingw64/mingw-w64-x86_64-gsettings-desktop-schemas \
mingw64/mingw-w64-x86_64-qrencode \
mingw64/mingw-w64-x86_64-ntldd-git \
mingw64/mingw-w64-x86_64-gpgme \
mingw64/mingw-w64-x86_64-gspell \
mingw64/mingw-w64-x86_64-enchant \
mingw64/mingw-w64-x86_64-hunspell \
mingw64/mingw-w64-x86_64-iso-codes \
mingw64/mingw-w64-x86_64-gst-plugins-bad \
mingw64/mingw-w64-x86_64-gst-plugins-good \
mingw64/mingw-w64-x86_64-gst-plugins-base \
mingw64/mingw-w64-x86_64-gst-plugins-ugly \
curl
cd dino && \
./configure --program-prefix=${PWD}/dist --no-debug --release --disable-fast-vapi && \
make -j$NUMBER_OF_PROCESSORS && \
make install && \
cd dist && \
cp /mingw64/bin/gdbus.exe ./bin && \
cp /mingw64/bin/gspawn-win64-helper.exe ./bin && \
cp -r /mingw64/share/xml ./share && \
cp -r /mingw64/lib/enchant-2 ./lib && \
cp -r /mingw64/lib/gstreamer-1.0 ./lib && \
mkdir ./share/hunspell && \
curl -L -o ./share/hunspell/en_US.aff https://github.com/elastic/hunspell/raw/master/dicts/en_US/en_US.aff && \
curl -L -o ./share/hunspell/en_US.dic https://github.com/elastic/hunspell/raw/master/dicts/en_US/en_US.dic && \
mkdir -p ./lib/gdk-pixbuf-2.0/ && cp -r /mingw64/lib/gdk-pixbuf-2.0 ./lib/ && \
mkdir -p ./lib/gio/ && cp -r /mingw64/lib/gio ./lib/ && \
mkdir -p ./share/icons && cp -r /mingw64/share/icons ./share/ && \
mkdir -p ./share/locale && cp -r /mingw64/share/locale ./share/ && \
mkdir -p ./share/glib-2.0/schemas && cp -r /mingw64/share/glib-2.0/schemas ./share/glib-2.0/ && \
rm -r ./include &&
find . -iname "*.dll.a" -exec rm {} + && \
find . -iname "*.exe" -exec ntldd {} + | grep mingw64 | awk '{print "cp /mingw64/bin/"$1" ."}' | sh && \
find . -iname "*.dll" -exec ntldd {} + | grep mingw64 | awk '{print "cp /mingw64/bin/"$1" ."}' | sh && \
find . -iname "*.exe" -exec ldd {} + | grep mingw64 | awk '{print "cp /mingw64/bin/"$1" ."}' | sh && \
find . -iname "*.dll" -exec ldd {} + | grep mingw64 | awk '{print "cp /mingw64/bin/"$1" ."}' | sh && \
find . -iname "*.exe" -exec strip -s {} + && \
find . -iname "*.dll" -exec strip -s {} + && \
mv *.dll ./bin
@LAGonauta
Copy link
Author

LAGonauta commented May 9, 2021

Dependencies must be installed in MSYS shell, while the build process must be run in MINGW64 shell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment