Hello everyone:
    I am writing an app which is designed to run on both android and  iOS, we 
development our app's UI usingn Qt Quick technology. But the size of the Qt 
library is too big, I have to build Qt by myself (from the stable branch of git 
repository) to shrink size, the build command is:

DISABLED_FEATURES='
 -no-feature-TEXTODFWRITER
 -no-feature-CURSOR
 -no-feature-SHAREDMEMORY
 -no-feature-SYSTEMSEMAPHORE
 -no-feature-PROCESS
 -no-feature-DOM
 -no-feature-FILESYSTEMWATCHER
 -no-feature-FILESYSTEMITERATOR
 -no-feature-MOVIE
 -no-feature-IMAGE_HEURISTIC_MASK
 -no-feature-IMAGE_TEXT
 -no-feature-PICTURE
 -no-feature-PDF
 -no-feature-PRINTER
 -no-feature-CUPS
 -no-feature-PAINT_DEBUG
 -no-feature-BIG_CODECS
 -no-feature-FTP
 -no-feature-UDPSOCKET
 -no-feature-NETWORKPROXY
 -no-feature-SOCKS5
 -no-feature-NETWORKDISKCACHE
 -no-feature-STATEMACHINE
 -no-feature-XMLSCHEMA
'

SKIPPED_MODULES='-skip qtwebkit -skip qtwebkit-examples -skip qtquick1 -skip 
qt3d -skip qtjsondb -skip qtsystems -skip qtwayland -skip qtlocation'

export ANDROID_NDK_ROOT=/mnt/sda7/software/google/android/android-ndk-r9b
export ANDROID_SDK_ROOT=/mnt/sda7/software/google/android/android-sdk-linux
export ANDROID_API_VERSION=android-19
export PATH=/usr/lib/jvm/java-7-openjdk-amd64/bin:$PATH
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64

./configure --prefix=../../qt5-sdk-android-arm -xplatform android-g++ -nomake 
tests -nomake examples -android-ndk $ANDROID_NDK_ROOT -android-sdk 
$ANDROID_SDK_ROOT -android-ndk-host linux-x86_64 -android-toolchain-version 4.8 
-opensource -confirm-license -no-qml-debug -no-warnings-are-errors 
$SKIPPED_MODULES $DISABLED_FEATURES

make -j 4
make install

$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip
 ../qt5-sdk-android-arm/lib/lib*.so
$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip
 ../qt5-sdk-android-arm/plugins/platforms/lib*.so
$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip
 ../qt5-sdk-android-arm/plugins/platforms/android/lib*.so
$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip
 ../qt5-sdk-android-arm/plugins/imageformats/lib*.so

    As you can see from the commands, I disabled many features and strip the 
final libraries, after all there steps the size of the libraries is:
    libQt5Core          3.3MB
    libQt5Gui            2.7MB
    libQt5Network    394.5KB

    libQt5Qml           1.8MB
    libQt5Quick        1.8MB

    libQtMultimedia  456KB

    But the size is still bigger than I have expected, Is there any way to 
shrink the library size even further? Thanks
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to