Congratulations to our 2022 Qt Champions!

How do I make apps smaller with qmake and macdeployqt

  • How do I make apps smaller with qmake and macdeployqt?

    I have set QT = core gui in the projects .pro file and run qmake and macdeployqt on the resulting app.

    The problem is that the program is bundling QtNetwork, QtScript, QtSvg etc. I've tried setting QT -= network script svg (and then make clean, rm -rf *.app, qmake, make).

    In total the app is 32 MB.

    .pro file:
    TEMPLATE = app
    TARGET = throw
    CONFIG += x86_64 release
    QT = core gui

    unix {
    CONFIG += link_pkgconfig
    PKGCONFIG += glib-2.0


    SOURCES += main.cpp


    HEADERS += throw.h

    RESOURCES += throw.qrc

    ICON = throw.png

    mac {
    QMAKE_INFO_PLIST = Info.plist
    ICON = throw.icns

    [edit: code highlighted / Denis Kormalev]

  • Don't forget to highlight your code blocks with @.

Log in to reply