sfan5 / mingw-pkgs

A collection of scripts to cross-compile various libraries, tools, applications to Windows via MinGW.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mingw-pkgs

A collection of scripts to cross-compile various libraries, tools, applications to Windows via MinGW.

Designed to run on Linux. You will need MinGW itself, bash, wget, (un)zip, tar. Builds are transparently sandboxed if you have bwrap installed.

Supports both i686-w64-mingw32 and x86_64-w64-mingw32.

Note: This is just a thing I maintain for my personal usage. If you need something more serious take a look at MSYS2 or openSUSE's ported packages.

To build any package just run the script, it will produce a name-X.Y.Z-win??.zip archive upon completion. These archives contain an Unix-like bin, include, lib folder structure (DLLs go in bin). Generally both static and dynamic libraries are built.

Common flags for all scripts:

  • --clean: Clean before building package
  • --64: Build for 64-bit, default is 32-bit
  • --clang: Build with clang instead of gcc (if you have it)
  • --strip: Strip binaries/libraries before packaging

Variables/functions available in packaging scripts:

  • common_init ...: Call this first while forwarding arguments
  • fetch_git <giturl> [branch]: Download and checkout a git repo
  • fetch_web <url> <sha256> [filename]: Download a file from the web and perform hash check
  • unpack_zip <filename>: Unpack zip file
  • unpack_tar <filename> ...: Unpack tar file, extra arguments are forwarded to tar
  • depend_get_path <name>: Return path to package root of previously built named package
  • common_tidy: Remove commonly found clutter from the install dir
  • package <pkgver>: Pack contents of install dir into ZIP archive
  • $INSTALL_DIR: Root directory of the package
  • $CC, $CXX, $STRIP: set and exported as is standard
  • $MINGW_PREFIX: target triple
  • $MINGW_TYPE: either win32 or win64
  • $CMAKE_TOOLCHAIN: path to a CMake toolchain file, should be used to set the correct settings

About

A collection of scripts to cross-compile various libraries, tools, applications to Windows via MinGW.


Languages

Language:Shell 100.0%