(→MADDE) |
|||
| (26 intermediate revisions not shown) | |||
| Line 3: | Line 3: | ||
[[User:Maxayu|Maxayu]] 09:17, 22 December 2010 (UTC) | [[User:Maxayu|Maxayu]] 09:17, 22 December 2010 (UTC) | ||
| - | ==Qt Creator 2.1 | + | ==Qt Creator 2.1== |
| - | To build Qt Creator, you need to build on Windows OS | + | To build Qt Creator, you need to build on Windows OS and the below steps are following the spec file of the rpm package (http://build.meego.com/package/show?package=meego-sdk-qt-creator&project=devel%3Atools%3Asdk%3Ahost). |
| - | ''' | + | '''Prerequisites''' |
| - | + | * [http://www.microsoft.com/ Windows OS (XP/Vista/7)] | |
| - | + | * [[SDK/MeeGo SDK for Windows|MeeGo SDK for Windows]] | |
| - | + | * [http://www.microsoft.com/express/Downloads/#2008-All Visual Studio 2008] | |
| - | + | * [http://get.qt.nokia.com/qt/source/qt-win-opensource-4.7.1-vs2008.exe Qt for Open Source on Windows (VS2008) - Earlier than Qt Creator 2.1.0] | |
| - | + | * [http://get.qt.nokia.com/qt/source/qt-win-opensource-4.7.2-vs2008.exe Qt for Open Source on Windows (VS2008) - Qt Creator 2.1.0 or later] | |
| - | + | * [http://msdl.microsoft.com/download/symbols/debuggers/dbg_x86_6.11.1.404.msi Debugging Tools for Windows (dbg_x86)] | |
| - | + | ||
| - | Note: | + | Note: In case of build failure, please make sure webkit is mentioned inside <code>$QTDIR/mkspecs/qconfig.pri</code> file in the <code>QT_CONFIG</code> list, if it is not there, add it at the end of <code>QT_CONFIG</code< list, e.g.: |
| + | QT_CONFIG += webkit | ||
In the spec file, the following tasks are performed. | In the spec file, the following tasks are performed. | ||
| Line 22: | Line 22: | ||
'''- Pre-Build''' | '''- Pre-Build''' | ||
| - | * Access | + | * Access http://build.meego.com/package/files?package=meego-sdk-qt-creator&project=devel%3Atools%3Asdk%3Ahost |
** Download tar ball qt-creator-*-src.tar.gz | ** Download tar ball qt-creator-*-src.tar.gz | ||
** Download all patches file | ** Download all patches file | ||
| Line 30: | Line 30: | ||
* Copy images to corresponding paths | * Copy images to corresponding paths | ||
| - | Launch ''MADDE Terminal | + | Launch ''MADDE Terminal'' (Start -> All Programs -> MeeGo SDK -> MADDE Terminal), and run below commands in the extracted directory of Qt Creator source code. For instance, |
$patch -p1 -i ../meego-2.1_20110130.patch | $patch -p1 -i ../meego-2.1_20110130.patch | ||
| Line 40: | Line 40: | ||
$install -D -p -m 0644 ../mtf.png src/plugins/qt4projectmanager/wizards/images/mtf.png | $install -D -p -m 0644 ../mtf.png src/plugins/qt4projectmanager/wizards/images/mtf.png | ||
| - | Edit src/plugins/plugins.pro and comment the below line to disable the BuildService plug-in. | + | Edit src/plugins/plugins.pro and comment the below line to disable the BuildService plug-in (Due to attica is not supported). |
# plugin_buildservice \ | # plugin_buildservice \ | ||
| Line 46: | Line 46: | ||
'''- Build''' | '''- Build''' | ||
| - | + | Launch ''Qt Command Prompt'' (Start -> All Programs -> Qt by Nokia (VS2008 OpenSource) -> Qt Command Prompt). Run the below commands in an independent build directory, which can be created in parallel with the source directory and named 'qt-creator-*-rc1-build'. | |
>qmake -r DEFINES+=QTCREATOR_WITH_QML CONFIG-=console -config release ..\qt-creator-2.1.0-rc1-src\qtcreator.pro | >qmake -r DEFINES+=QTCREATOR_WITH_QML CONFIG-=console -config release ..\qt-creator-2.1.0-rc1-src\qtcreator.pro | ||
| Line 53: | Line 53: | ||
'''- Post Build''' | '''- Post Build''' | ||
| - | After building | + | After building successfully, we manually copy everything via |
1. xcopy /Y /R /E /EXCLUDE:%SCRIPT_DIRECTORY%\install_creator_step_excludes.txt %REPOSITORY_DIRECTORY%\creator %TARGET_LOCATION%\ | 1. xcopy /Y /R /E /EXCLUDE:%SCRIPT_DIRECTORY%\install_creator_step_excludes.txt %REPOSITORY_DIRECTORY%\creator %TARGET_LOCATION%\ | ||
| Line 61: | Line 61: | ||
* %REPOSITORY_DIRECTORY%: The build directory of Qt Creator, which should already contain \bin, \lib, \share and \src. | * %REPOSITORY_DIRECTORY%: The build directory of Qt Creator, which should already contain \bin, \lib, \share and \src. | ||
| - | * %TARGET_LOCATION%: Create an independent folder manually to store the target files, which named ' | + | * %TARGET_LOCATION%: Create an independent folder manually to store the target files, which named 'QtCreator'. |
For instance, | For instance, | ||
| Line 73: | Line 73: | ||
>xcopy /y C:\build\qt-creator\qt-creator-2.1.0-rc1-build\lib\qtcreator\plugins\Nokia\Find.dll C:\build\data\qtcreator\lib\qtcreator\plugins\Nokia\ | >xcopy /y C:\build\qt-creator\qt-creator-2.1.0-rc1-build\lib\qtcreator\plugins\Nokia\Find.dll C:\build\data\qtcreator\lib\qtcreator\plugins\Nokia\ | ||
| - | 3. Copy all the .dll and .exe files from C:\qt\4.7.1\bin to %TARGET_LOCATION%\bin | + | 3. Copy all the .dll and .exe files from C:\qt\4.7.1\bin to %TARGET_LOCATION%\bin |
| - | 4. Copy the following plugins to the corresponding subdirectories of %TARGET_LOCATION%\bin | + | 4. Copy the following plugins to the corresponding subdirectories of %TARGET_LOCATION%\bin |
imageformats | imageformats | ||
| Line 96: | Line 96: | ||
accessible/qtaccessiblewidgets4.dll | accessible/qtaccessiblewidgets4.dll | ||
| - | Compress the | + | 5. Build jom to generate jom.exe |
| + | |||
| + | Fetch the source code of jom from http://gitorious.org/qt-labs/jom. | ||
| + | |||
| + | Extract jom.tar.gz and run the below commands under the directory of jom in ''Qt Command Prompt''. | ||
| + | |||
| + | >qmake | ||
| + | >nmake | ||
| + | |||
| + | Copy .\bin\jom.exe to %TARGET_LOCATION%\bin | ||
| + | |||
| + | Compress the directory QtCreator into qtcreator.7z package. | ||
==MADDE== | ==MADDE== | ||
| - | + | ||
| + | You need to build it on Linux OS. | ||
| + | |||
| + | ''' - Pre-Build''' | ||
| + | * Access http://build.meego.com/package/files?package=madde&project=devel%3Atools%3Asdk%3Ahost to download madde-*.tar.gz | ||
| + | * MADDE builds if you have all required distfiles in place | ||
| + | * Additionally this requires that required packages are installed on build system (wine & mingw cross-compiler among other things) | ||
| + | * Some dist files can be found at http://www.iki.fi/too | ||
| + | * Download the script file file [[Media:Berlin-gatherer.sh]] | ||
* Please change the following line in /usr/i586-mingw32msvc/include/stdint.h from: | * Please change the following line in /usr/i586-mingw32msvc/include/stdint.h from: | ||
typedef signed char int8_t; | typedef signed char int8_t; | ||
| Line 105: | Line 124: | ||
//typedef signed char int8_t; !!!! XXX XXXX The change in the next line is a tmp edit for building MADDE only. Please change it back to this line ASAP. | //typedef signed char int8_t; !!!! XXX XXXX The change in the next line is a tmp edit for building MADDE only. Please change it back to this line ASAP. | ||
typedef char int8_t; | typedef char int8_t; | ||
| - | |||
| - | cd /path/to/madde | + | ''' -Build''' |
| - | make w32 SUMO=meego | + | $cd /path/to/madde |
| - | ../berlin_gatherer.sh -e _build | + | $make w32 SUMO=meego |
| - | + | $../berlin_gatherer.sh -e _build | |
| - | + | ||
==qt-tools 4.7.1== | ==qt-tools 4.7.1== | ||
| Line 134: | Line 151: | ||
==Toolchain== | ==Toolchain== | ||
| - | + | You need to build it on Linux OS. | |
| + | |||
| + | ''' - Pre-Build''' | ||
| + | * Download source code of each package into $HOME/cross-build/src | ||
| + | ** mpc, binutils, gcc, gdb | ||
| + | ** http://build.meego.com/project/show?project=devel%3Atools%3Asdk%3Ahost%3Atoolchain%3AMeeGo%3A1.2%3ASource | ||
| + | ** gmp, mpfr, zlib, expat | ||
| + | ** http://build.meego.com/project/show?project=Trunk | ||
| + | ** libiconv | ||
| + | ** You need to download it from its official website. | ||
| + | ** Extract each tar ball into a separate folder and apply all patches. For instance, | ||
| + | $patch -p1 -i ../gcc44-hack.patch | ||
| + | * Download sysroot and Linux Toolchain into $HOME/cross-build/i386-w32 | ||
| + | ** Download sysroot of meego-core-ia32-1.1.2 | ||
| + | ** http://download3.meego.com/meego-core-ia32-madde-sysroot-1.1.20110106.1139-fs.tar.gz | ||
| + | ** Extract it into $HOME/cross-build/i386-w32/sysroot. The following folder will be under the this directory, | ||
| + | ** bin, boot, dev, etc, ..., usr, var | ||
| + | ** Download Linux Toolchain | ||
| + | ** http://download3.meego.com/meego-sdk-i586-toolchain-1.1-w32_i686.tar.gz | ||
| + | ** Extract it into $HOME/cross-build/i386-w32/build-target. The following folder will be under the this directory, | ||
| + | ** bin, i586-meego-linux-gnu, include, lib, libexec, share | ||
| + | * Download build script into $HOME/cross-build | ||
| + | ** http://meego.gitorious.org/meego-developer-tools/madde/blobs/master/ext/i386-toolchain-w32-meego.sh | ||
| + | ** Modify the corresponding line in the script | ||
| + | target=i586-meego-linux-gnu | ||
| + | i586-meego-linux-gnu should be the folder name which is under 'build-target' | ||
| + | gmpv=gmp-4.3.1 | ||
| + | mpfrv=mpfr-2.4.1 | ||
| + | ... | ||
| + | gdbv=gdb-7.1 | ||
| + | Each package should be the folder name which is under 'src' | ||
| + | HOME=/home/user | ||
| + | HOME should be your home directory | ||
| + | PARAL="-j8" | ||
| + | 8 indicates 2 * Number of CPU, i.e., 4 processors now. Change it according to actual case. | ||
| + | |||
| + | '''FAQs''' | ||
| + | |||
| + | In line 98, when building zlib, remove 'rc' if error occurs. | ||
| + | AR='i586-mingw32msvc-ar' \ | ||
| + | |||
| + | ''' -Build''' | ||
| + | $cd /path/to/cross-build | ||
| + | $./i386-toolchain-w32-meego.sh | ||
| + | |||
| + | ''' -Post Build''' | ||
| + | |||
| + | Compress the build result into meego-toolchain.tar.gz | ||
| + | cd i386-w32 | ||
| + | mv tools meego-toolchain | ||
| + | tar czf meego-toolchain.tar.gz meego-toolchain | ||
==Qt Simulator== | ==Qt Simulator== | ||
| Line 147: | Line 214: | ||
cd simulator-mobility-1.1.0~git1/plugins/sensors/simulator/ | cd simulator-mobility-1.1.0~git1/plugins/sensors/simulator/ | ||
mv main.cpp main.cpp.sav | mv main.cpp main.cpp.sav | ||
| + | |||
| + | ==IFW== | ||
| + | Source code of IFW can be downloaded from: http://qt.gitorious.org/qt-labs/installer-framework | ||
| + | |||
| + | Check the document in the source tree on how to build it. | ||
| + | |||
| + | You'd better build a static IFW, and you'll need to build static Qt for it. | ||
| + | |||
| + | ===Build static Qt for IFW=== | ||
| + | configure -static -no-webkit -no-qt3support -no-dbus -no-multimedia -no-phonon -fast -no-opengl -exceptions -nomake demos -nomake examples -nokia-developer -qt-sql-sqlite -plugin-sql-sqlite | ||
| + | |||
| + | "-qt-sql-sqlite -plugin-sql-sqlite" are work around for buiding IFW. | ||
| + | |||
| + | [[Category:SDK]] | ||
These are the BKMs to build MeeGo SDK for Windows. This implemented a part of Feature 10971 - Build MeeGo SDK for Windows in a public server. For more information about MeeGo SDK for Windows, please check SDK/MeeGo SDK for Windows.
Maxayu 09:17, 22 December 2010 (UTC)
Contents |
To build Qt Creator, you need to build on Windows OS and the below steps are following the spec file of the rpm package (http://build.meego.com/package/show?package=meego-sdk-qt-creator&project=devel%3Atools%3Asdk%3Ahost).
Prerequisites
Note: In case of build failure, please make sure webkit is mentioned inside $QTDIR/mkspecs/qconfig.pri file in the QT_CONFIG list, if it is not there, add it at the end of QT_CONFIG</code< list, e.g.:
QT_CONFIG += webkit
In the spec file, the following tasks are performed.
- Pre-Build
Launch MADDE Terminal (Start -> All Programs -> MeeGo SDK -> MADDE Terminal), and run below commands in the extracted directory of Qt Creator source code. For instance,
$patch -p1 -i ../meego-2.1_20110130.patch $patch -p1 -i ../ftbfs_missing_webkit.patch $patch -p1 -i ../ftbfs_allow-shlib-undefined_no-undefined.patch $patch -p1 -i ../buildservice_plugin_20110104.patch $patch -p1 -i ../install_qtquickplugin.patch $cp -rf src/plugins/qt4projectmanager/qt-maemo/images src/plugins/qt4projectmanager/qt-meego/ $install -D -p -m 0644 ../mtf.png src/plugins/qt4projectmanager/wizards/images/mtf.png
Edit src/plugins/plugins.pro and comment the below line to disable the BuildService plug-in (Due to attica is not supported).
# plugin_buildservice \
- Build
Launch Qt Command Prompt (Start -> All Programs -> Qt by Nokia (VS2008 OpenSource) -> Qt Command Prompt). Run the below commands in an independent build directory, which can be created in parallel with the source directory and named 'qt-creator-*-rc1-build'.
>qmake -r DEFINES+=QTCREATOR_WITH_QML CONFIG-=console -config release ..\qt-creator-2.1.0-rc1-src\qtcreator.pro >nmake
- Post Build
After building successfully, we manually copy everything via
1. xcopy /Y /R /E /EXCLUDE:%SCRIPT_DIRECTORY%\install_creator_step_excludes.txt %REPOSITORY_DIRECTORY%\creator %TARGET_LOCATION%\
For instance,
>xcopy /Y /R /E /EXCLUDE:C:\bin_win\install_creator_step_excludes.txt C:\build\qt-creator\qt-creator-2.1.0-rc1-build C:\build\data\qtcreator
2. xcopy /y %REPOSITORY_DIRECTORY%\creator\lib\qtcreator\plugins\Nokia\Find.dll %TARGET_LOCATION%\lib\qtcreator\plugins\Nokia\
There missed a file Find.dll unfortunately, which can be copied manually. For instance,
>xcopy /y C:\build\qt-creator\qt-creator-2.1.0-rc1-build\lib\qtcreator\plugins\Nokia\Find.dll C:\build\data\qtcreator\lib\qtcreator\plugins\Nokia\
3. Copy all the .dll and .exe files from C:\qt\4.7.1\bin to %TARGET_LOCATION%\bin
4. Copy the following plugins to the corresponding subdirectories of %TARGET_LOCATION%\bin
imageformats imageformats/qgif4.dll imageformats/qico4.dll imageformats/qjpeg4.dll imageformats/qmng4.dll imageformats/qsvg4.dll imageformats/qtiff4.dll iconengines iconengines/qsvgicon4.dll sqldrivers sqldrivers/qsqlite4.dll codecs codecs/qcncodecs4.dll codecs/qjpcodecs4.dll codecs/qkrcodecs4.dll codecs/qtwcodecs4.dll accessible accessible/qtaccessiblewidgets4.dll
5. Build jom to generate jom.exe
Fetch the source code of jom from http://gitorious.org/qt-labs/jom.
Extract jom.tar.gz and run the below commands under the directory of jom in Qt Command Prompt.
>qmake >nmake
Copy .\bin\jom.exe to %TARGET_LOCATION%\bin
Compress the directory QtCreator into qtcreator.7z package.
You need to build it on Linux OS.
- Pre-Build
typedef signed char int8_t;
To:
//typedef signed char int8_t; !!!! XXX XXXX The change in the next line is a tmp edit for building MADDE only. Please change it back to this line ASAP. typedef char int8_t;
-Build
$cd /path/to/madde $make w32 SUMO=meego $../berlin_gatherer.sh -e _build
Follow instructions on http://meego.gitorious.org/meego-developer-tools/madde/blobs/master/docs/QtToolsForMadde.rst . Which contains my modifications.
The patch mentioned in the above link can be downloaded from here: Media:Qt qtmake option.cpp.patch.
mgen and mmoc from libmeegotouch need to be added. Source code of libmeegotouch can be downloaded from http://build.meego.com/package/show?package=libmeegotouch&project=Trunk.
To build mgen, create a file "make.bat" by copy the following lines:
set MYQTDIR=C:\Qt\4.7.1 set CL=/I%MYQTDIR%\include\QtGui /I%MYQTDIR%\include\QtCore /I%MYQTDIR%\include set LIBRARY_PATH=%MYQTDIR%\lib cl mgen.cpp mgen_processor.cpp %LIBRARY_PATH%\QtGui4.lib %LIBRARY_PATH%\QtCore4.lib %LIBRARY_PATH%\QtCore4.lib
Put the file "make.bat" into "mgen" sub-directory of libmeegotouch, and invoke it to build mgen.
You need to build it on Linux OS.
- Pre-Build
$patch -p1 -i ../gcc44-hack.patch
target=i586-meego-linux-gnu
i586-meego-linux-gnu should be the folder name which is under 'build-target'
gmpv=gmp-4.3.1 mpfrv=mpfr-2.4.1 ... gdbv=gdb-7.1
Each package should be the folder name which is under 'src'
HOME=/home/user
HOME should be your home directory
PARAL="-j8"
8 indicates 2 * Number of CPU, i.e., 4 processors now. Change it according to actual case.
FAQs
In line 98, when building zlib, remove 'rc' if error occurs.
AR='i586-mingw32msvc-ar' \
-Build
$cd /path/to/cross-build $./i386-toolchain-w32-meego.sh
-Post Build
Compress the build result into meego-toolchain.tar.gz
cd i386-w32 mv tools meego-toolchain tar czf meego-toolchain.tar.gz meego-toolchain
Refer to: http://developer.qt.nokia.com/wiki/Qt_Simulator and http://build.meego.com/package/view_file?file=qt-simulator.spec&package=qt-simulator&project=devel%3Atools%3Asdk%3Ahost&srcmd5=e45d364bbac25fb09e70f49e9650177c (require login. Download source code from here.)
Source code of simulator need to be patched by Media:Simulator.patch.
Create a directory "simulator-depends".
Use the bat file Media:Make_bat.txt to build it. While you need to apply the following work around after building simulator-mobility and before building simulator.
cd simulator-mobility-1.1.0~git1/plugins/sensors/simulator/ mv main.cpp main.cpp.sav
Source code of IFW can be downloaded from: http://qt.gitorious.org/qt-labs/installer-framework
Check the document in the source tree on how to build it.
You'd better build a static IFW, and you'll need to build static Qt for it.
configure -static -no-webkit -no-qt3support -no-dbus -no-multimedia -no-phonon -fast -no-opengl -exceptions -nomake demos -nomake examples -nokia-developer -qt-sql-sqlite -plugin-sql-sqlite
"-qt-sql-sqlite -plugin-sql-sqlite" are work around for buiding IFW.