After reading this article http://lukast.mediablog.sk/log/?p=155 I decided to use mingw for linux to compile Windows applications. This means that I can compile, test, debug and release directly from Linux.
I hacked this assembly script, which will block the compilation of the application and even pack it into a ZIP file. Note that I use the source builds for QMake (did you even know that this is supported? Wow ...). Also note that the script will automatically pull out the necessary DLLs. Here is a script for all of you to use and abuse:
#! /bin/sh set -x set -e VERSION=0.1 PRO_FILE=blabla.pro BUILD_DIR=mingw_build DIST_DIR=blabla-$VERSION-win32
Compiled binary work on the Windows7 machine under test. Now to the questions:
- When I run the application on Windows, the theme is not a Windows7 theme. I assume that I don't have a style module, I'm not sure yet.
- For some reason, the application gets a console window.
The second point (console window) is critical. How to remove this background window? Please note that extra configuration lines do not work for me, what am I missing there?
Change 1 (plan a few):
Compilation Line:
i686-pc-mingw32-g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -o release/font_export.exe object_script.font_export.Release -L"/usr/i686-pc-mingw32/sys-root/mingw/lib" -lQtGui4 -lQtCore4
The switch -subsystem,windows added only with "CONFIG + = windows", and this is ignored on other operating systems. I assume the QG MinGW port is getting confused "I work on Linux, I need to ignore the windows / console configuration." This means that I need to edit the corresponding qmake.spec file. arhg ... I hate mistakes. I still need to verify that this fixes the problem ....
source share