Y:\tt>type main.cpp
#include <QApplication>
#include <QLabel>
int main(int argc, char **argv) {
label.show();
return app.exec();
}
Y:\tt>qmake -project
Y:\tt>qmake CONFIG+=release
Y:\tt>mingw32-make
mingw32-make -f Makefile.Release
...
Y:\tt>dir release
Volume in drive Y is VBOX_tmp
Volume Serial Number is 0000-0822
Directory of Y:\tt\release
19/11/2012 11:35 AM 1,497 main.o
19/11/2012 11:36 AM 59,904 tt.exe
2 File(s) 61,401 bytes
0 Dir(s) 76,253,519,872 bytes free
Y:\tt>type main.cpp
#include <QApplication>
#include <QLabel>
int main(int argc, char **argv) {
QApplication app(argc, argv);
QLabel label(QString::number(2+2));
label.show();
return app.exec();
}
Y:\tt>qmake -project
Y:\tt>qmake CONFIG+=release
Y:\tt>mingw32-make
mingw32-make -f Makefile.Release
...
Y:\tt>dir release
Volume in drive Y is VBOX_tmp
Volume Serial Number is 0000-0822
Directory of Y:\tt\release
19/11/2012 11:35 AM 1,497 main.o
19/11/2012 11:36 AM 59,904 tt.exe
2 File(s) 61,401 bytes
0 Dir(s) 76,253,519,872 bytes free
To copy to clipboard, switch view to plain text mode
Size of program < 100kB (even smaller if built on Linux, probably a little smaller if built with Microsoft C++)
Y:\tt>mkdir deploy
Y:\tt>copy release\tt.exe deploy
1 file(s) copied.
Y:\tt>copy c:\QtSDK\Desktop\Qt\4.8.0\mingw\bin\QtCore4.dll deploy
1 file(s) copied.
Y:\tt>copy c:\QtSDK\Desktop\Qt\4.8.0\mingw\bin\QtGui4.dll deploy
1 file(s) copied.
Y:\tt>copy c:\QtSDK\Desktop\Qt\4.8.0\mingw\bin\mingwm10.dll deploy
1 file(s) copied.
Y:\tt>copy c:\QtSDK\Desktop\Qt\4.8.0\mingw\bin\libgcc_s_dw2-1.dll deploy
1 file(s) copied.
Y:\tt>dir deploy
Volume in drive Y is VBOX_tmp
Volume Serial Number is 0000-0822
Directory of Y:\tt\deploy
02/04/2012 02:00 PM 43,008 libgcc_s_dw2-1.dll
02/04/2012 02:00 PM 10,135,040 QtGui4.dll
19/11/2012 11:36 AM 59,904 tt.exe
02/04/2012 02:00 PM 11,362 mingwm10.dll
02/04/2012 02:01 PM 2,843,136 QtCore4.dll
5 File(s) 13,092,450 bytes
0 Dir(s) 76,240,388,096 bytes free
Y:\tt>"c:\Program Files\7-Zip\7z.exe" a -r deploy.zip deploy
...
Y:\tt>dir deploy.zip
Volume in drive Y is VBOX_tmp
Volume Serial Number is 0000-0822
Directory of Y:\tt
19/11/2012 11:45 AM 5,345,534 deploy.zip
1 File(s) 5,345,534 bytes
0 Dir(s) 76,235,026,432 bytes free
Y:\tt>mkdir deploy
Y:\tt>copy release\tt.exe deploy
1 file(s) copied.
Y:\tt>copy c:\QtSDK\Desktop\Qt\4.8.0\mingw\bin\QtCore4.dll deploy
1 file(s) copied.
Y:\tt>copy c:\QtSDK\Desktop\Qt\4.8.0\mingw\bin\QtGui4.dll deploy
1 file(s) copied.
Y:\tt>copy c:\QtSDK\Desktop\Qt\4.8.0\mingw\bin\mingwm10.dll deploy
1 file(s) copied.
Y:\tt>copy c:\QtSDK\Desktop\Qt\4.8.0\mingw\bin\libgcc_s_dw2-1.dll deploy
1 file(s) copied.
Y:\tt>dir deploy
Volume in drive Y is VBOX_tmp
Volume Serial Number is 0000-0822
Directory of Y:\tt\deploy
02/04/2012 02:00 PM 43,008 libgcc_s_dw2-1.dll
02/04/2012 02:00 PM 10,135,040 QtGui4.dll
19/11/2012 11:36 AM 59,904 tt.exe
02/04/2012 02:00 PM 11,362 mingwm10.dll
02/04/2012 02:01 PM 2,843,136 QtCore4.dll
5 File(s) 13,092,450 bytes
0 Dir(s) 76,240,388,096 bytes free
Y:\tt>"c:\Program Files\7-Zip\7z.exe" a -r deploy.zip deploy
...
Y:\tt>dir deploy.zip
Volume in drive Y is VBOX_tmp
Volume Serial Number is 0000-0822
Directory of Y:\tt
19/11/2012 11:45 AM 5,345,534 deploy.zip
1 File(s) 5,345,534 bytes
0 Dir(s) 76,235,026,432 bytes free
To copy to clipboard, switch view to plain text mode
Total deployment bundle size about 5 MB.
Bookmarks