#!/bin/bash source /home/rust/.cargo/env cargo build --target=x86_64-pc-windows-gnu --release mkdir package cp target/x86_64-pc-windows-gnu/release/*.exe package DLLS=$(peldd package/*.exe -t --ignore-errors) export DLLS for DLL in $DLLS do cp "$DLL" package done mkdir -p package/share/{themes,gtk-3.0} cp -r "$GTK_INSTALL_PATH"/share/glib-2.0/schemas package/share/glib-2.0 cp -r "$GTK_INSTALL_PATH"/share/icons package/share/icons mingw-strip package/* zip -r package.zip package/*