Code Monkey home page Code Monkey logo

docker-mingw-arch's Introduction

MinGW-arch

mingw-based build environment based on arch-linux. The image provides an easy to use cross-compilation for windows target. It is also CI-friendly. mingw- versions of Qt5, cmake, Eigen3, boost are included. Dosens of other libraries are available from the package manager.

Table of Contents

  1. Usage
  2. Continuous Integration
  3. Dependencies
  4. Supported tags

Usage

Start the docker container:

sudo docker run -it burningdaylight/mingw-arch:qt /bin/bash

Compile your application (QNapi is used as an example here):

git clone --recursive 'https://github.com/QNapi/qnapi.git'
cd qnapi/
x86_64-w64-mingw32-qmake-qt5
make

Or for CMake:

x86_64-w64-mingw32-cmake ..

To deploy the program, you will need to copy the dlls from /usr/{x86_64-w64-mingw32,i686-w64-mingw32}/{bin,lib/qt/plugins/{imageformats,iconengines,platforms}} (for x64 and x32 builds respectively) to the directory with the .exe file. The list of necessary dlls may vary. If a dll is missing, Windows will usually show an error popup window with the name of the missing dll, when you try to start the program.

That's it!

Continuous Integration

For Gitlab CI the config file could look something like this:

build-win64:
  stage: compile
  image: burningdaylight/mingw-arch:qt
  script:
    - mkdir -p ${CI_BUILD_NAME}
    - cd ${CI_BUILD_NAME}; x86_64-w64-mingw32-qmake-qt5 ..; make
  artifacts:
    paths:
      - "${CI_BUILD_NAME}/src/*/release/*.exe"
      - "${CI_BUILD_NAME}/src/*/release/*.dll"

You can also check out the a full .gitlab-ci.yml file.

Dependencies

If you need some other dependencies, you can install them from AUR.

yay -S --noconfirm mingw-w64-rapidjson

If mingw- version of the needed libarary is not available in AUR, you can add it yourself. The process is really straightforward. You would need to write a PKBUILD file, which is as intuitive as it can get, see mingw-w64-rapidjson, for example.

Supported tags

  • base minimal cross-compilation environment which includes yay to install additional libraries from AUR and a small set of mingw-w64- packages: cmake, gcc, zlib
  • latest, qt full-blown cross-compilation environment, which includes Qt5, boost, openssl, etc.

docker-mingw-arch's People

Contributors

burning-daylight avatar mdimura avatar voibit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.