Skip to content

Instantly share code, notes, and snippets.

@KoKuToru
Last active August 30, 2015 07:43
Show Gist options
  • Save KoKuToru/c8361cc7139ea393894b to your computer and use it in GitHub Desktop.
Save KoKuToru/c8361cc7139ea393894b to your computer and use it in GitHub Desktop.
i686-w64-mingw32-cmake ..
make
#zip everything
mkdir gtox-win32
#Copy everything we need
cp -rT /usr/i686-w64-mingw32 ./gtox-win32
cp -r ./share ./gtox-win32/
cp gtox.exe ./gtox-win32/bin/gtox.exe
#Fix libharfbuzz-1.dll bug
cp ./gtox-win32/bin/libharfbuzz-0.dll ./gtox-win32/bin/libharfbuzz-1.dll
cp ./gtox-win32/bin/libharfbuzz-gobject-0.dll ./gtox-win32/bin/libharfbuzz-gobject-1.dll
cp ./gtox-win32/bin/libharfbuzz-icu-0.dll ./gtox-win32/bin/libharfbuzz-icu-1.dll
#Generate loaders.cache for SVG
FILE=./gtox-win32/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
echo "\"../lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.dll\"" > $FILE
echo "\"svg\" 2 \"gdk-pixbuf\" \"Scalable Vector Graphics\" \"LGPL\"" >> $FILE
echo "\"image/svg+xml\" \"image/svg\" \"image/svg-xml\" \"image/vnd.adobe.svg+xml\" \"text/xml-svg\" \"image/svg+xml-compressed\" \"\"" >> $FILE
echo "\"svg\" \"svgz\" \"svg.gz\" \"\"" >> $FILE
echo "\" <svg\" \"* \" 100" >> $FILE
echo "\" <\!DOCTYPE svg\" \"* \" 100" >> $FILE
echo "" >> $FILE
echo "" >> $FILE
#Remove unused files
find ./gtox-win32 -name "*.a" -type f -delete
find ./gtox-win32 -name "*.h" -type f -delete
find ./gtox-win32 -name "*.c" -type f -delete
find ./gtox-win32 -name "*.hpp" -type f -delete
find ./gtox-win32 -name "*.cpp" -type f -delete
find ./gtox-win32 -name "*.o" -type f -delete
find ./gtox-win32 -name "*.pc" -type f -delete
find ./gtox-win32 -name "*.m4" -type f -delete
find ./gtox-win32 -name "*.sh" -type f -delete
find ./gtox-win32 -name "*.spec" -type f -delete
find ./gtox-win32 -name "*.cmake" -type f -delete
find ./gtox-win32 -name include -exec rm -rf {} \;
find ./gtox-win32 -name proc -exec rm -rf {} \;
rm -rf ./gtox-win32/share/doc
find ./gtox-win32 -type d -empty -exec rm -rf {} \;
sudo pacman -S zip --noconfirm
zip -r9 gtox-win32.zip ./gtox-win32/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment