How to make standalone app?



  • Hello
    iam trying to make a standalone release to my app to not use those all DLL file in the app folder
    i make many searches I followed many steps but no result I always ended up with errors and something like that which make me upset. I tried to follow this blog here in the steps to make standalone app from qt so the first step to make qt static release from qt source I go to my this path

    C:\Qt\5.5\Src\qtbase\mkspecs\win32-g++\
    

    write these in the qmake.cong

    QMAKE_LFLAGS += -static -static-libgcc
    QMAKE_CFLAGS_RELEASE -= -O2
    QMAKE_CFLAGS_RELEASE += -Os -momit-leaf-frame-pointer
    DEFINES += QT_STATIC_BUILD
    

    then I opened Open a Qt environment command prompt go to source file run this

    configure -static -platform win32-g++ -prefix "C:\Qt\Qt5_static" -debug-and-release -opensource -confirm-license -nomake examples -nomake tests -nomake tools -opengl desktop -no-angle -qt-sql-sqlite -make libs -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype
    

    and here is the problem which i stuck i got this error at the end of using above command

    Info: creating super cache file C:\Qt\Qt5.10.0\5.10.0\Src\.qmake.super
    ERROR: Invalid value given for boolean command line option 'sql-sqlite'.
    

    then i ignored them i use the next step which is this command to finally get the qt static and got this error under each command i used

    mingw32-make -k -j4
    mingw32-make: *** No targets specified and no makefile found.  Stop.
    
    mingw32-make -k install
    mingw32-make: *** No rule to make target 'install'.
    
    

    tried to remake this step again of using the first long command i got this two errors

    Bootstrapping qmake ...
    mingw32-make: Nothing to be done for 'first'.
    ERROR: Invalid value given for boolean command line option 'sql-sqlite'.
    

    so what should i do now to solve this errors
    Thanks in advance



  • @AmrCoder said in How to make standalone app?:

    -qt-sql-sqlite

    what I tried now is to remove this from the first command

    -qt-sql-sqlite
    

    and finally it worked but I have a question here is that make a problem to my static release I tested it to release use static version it worked fine but it will make a problem if I use for example SQLite database or make any kind of problems later?


  • Moderators

    @AmrCoder said in How to make standalone app?:

    -qt-sql-sqlite

    You only need this if you plan to use SQLite



  • @jsulm I created a small app to add values to a simple SQLite table and release it and it worked fine!


  • Qt Champions 2017

    @AmrCoder

    Did you test on a fresh pc ?



  • @mrjj Yes i use this release on a new pc that not have qt just windows nothing more and it worked it insert and view the data in the SQLite database


  • Qt Champions 2017

    @AmrCoder
    ok so it must be included somehow. :)
    well as long as it works.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.