|
|
Qt FrameworkDescriptionQt is a cross-platform C++ framework for creating applications. Originally a GUI framework it also supports console only applications. Qt is developed by Nokia. See also Wikipedia on more details about Qt. Qt is used for some PC-based tools for Rockbox:Building QtUnless you want to compile a statically linked application it's usually not necessary to compile Qt yourself. Nokia provides binary packages for Windows and OS X, and Linux distributions have packages as well. Compiling statically linked executable has advantages for deployment. Especially there is no need to distribute the DLLs for Qt anymore. For this reason we use a statically built Qt for building RockboxUtility and the ThemeEditor. To do so compiling Qt itself is necessary.All PlatformsBuilding Qt can take quite a while, especially since it does build a lot of examples and demos by default. To cut down the build time you can pass the initialconfigure call some options to disable various features.
WindowsOn Windows the MinGW toolchain is used to build both Qt and applications. Qt itself also supports Microsoft Visual Studio but this isn't supported with our applications.NativeInstall MinGW usingmingw-get .
Configure and build Qt. We usually use the following for configuring Qt:
configure -no-exceptions -static -release -no-webkit -no-dbus -no-phonon -no-phonon-backend -no-qt3support -no-opengl -no-direct3d -no-style-motif -no-style-cde
Cross compiling from Linux / OS XFor cross compiling you can use the MinGW cross compiling environment to set up everything. Install dependencies from the MacPorts project (cmake, scons, xz). Thelrelease binary isn't added add cross tool (which is unnecessary since it's platform independent). At least Rockbox Utility's project file tries to use that from the Qt installation. Therefore you need to create a symbolic link to the native lrelease in the mingw-cross-env installation folder below usr/i686-pc-ming32/bin .
LinuxThere's nothing special to care about. If you want to get rid of dependencies to other libraries likelibpng make sure there are static libs in the compilers search path.
Mac OS XOS X uses Application Bundles which also include dynamic binaries. Therefore building Qt statically on OS X is unnecessary. Just use the binary packages provided by Nokia. Use the Carbon package to still include support for OS X 10.4. Important: When building Qt applications make sure to used the correct compiler as otherwise strange errors occur. OS X 10.6 defaults togcc-4.2 which doesn't support the OS X 10.4 SDK anymore. In order to be able to build Qt applications that still support OS X 10.4 you need to use gcc-4.0 (part of XCode 3.2). To do so pass qmake the correct spec either by setting the environment variable QMAKSPEC=macx-g++40 or via the command line option -spec , i.e. qmake -spec macx-g++40 .
r2 - 02 Apr 2021 - 20:46:07 - UnknownUser
Copyright © by the contributing authors.
|