I found and easier way using Wine.
1. Install Nokia Qt SDK for Windows using Wine. It should install fine.
2. Create a build script that does something like this:
export QTDIR=$HOME/.wine/drive_c/Qt/2010.04
export Path=C:\\windows\\system32\\\;C:\\windows\\\;C:\\windows\\system32\\wbem\;C:\\Qt\\2010.04\\mingw\\bin\\\;C:\\Qt\\2010.04\\qt\\bin\\\;\
C:\\Program\ Files\\NSIS\\
cd
wineconsole --backend=curses qmake.exe
wineconsole --backend=curses mingw32-make.exe
3. That's it! You should now have a working .exe in yout project directory. You can run it using wine.
When shipping your application, you need to include the required mingw and Qt DLL's with it. For example:
$QTDIR/qt/bin/mingwm10.dll
$QTDIR/qt/bin/libgcc_s_dw2-1.dll
$QTDIR/qt/bin/QtCore4.dll
$QTDIR/qt/bin/QtGui4.dll
.. and any other DLL's your app needs. Remember to use the d-versions if you build your app in debug mode.
For SQL drivers install them into directory named sqldrivers in the directory where your .exe is installed. For SQLITE the DLL is $QTDIR/qt/plugins/sqldrivers/qsqlited4.dll.
If you want to create an installer, I can recommend the open source Nullsoft installer (NSIS).
Ei kommentteja:
Lähetä kommentti