Skip to content

Releasing for Windows using windeployqt.exe

Piyush Aggarwal edited this page Oct 6, 2020 · 1 revision

Software used: windeployqt.exe (comes with Qt - minGW)

Using this software collects all the runtime libraries and puts them besides the executable built by the project. Then just share the zip or make an installer on top of it.

  1. make a release build from Qt Creator.

  2. copy over stegano.exe from release build to a separate folder, say REL_FOLDER.

  3. add Qt/(MAJOR_V).(MINOR_V).(PATCH_V)/(compiler)/bin to PATH for ease of use if not done already.

  4. run this command:-

    windeployqt.exe ${REL_FOLDER}/stegano.exe --qmldir "C:\Users\Piyush Aggarwal\Desktop\stegano"
    
     > - `windeployqt.exe` was installed in                         :  `Qt/(MAJOR_V).(MINOR_V).(PATCH_V)/(compiler)/bin`
     > - pass the binary's location to `windeployqt.exe`            :  `${REL_FOLDER}/stegano.exe`
     > - pass qmldir location so it can pick up all the QMLs used   :  `-qmldir "C:\Users\Piyush Aggarwal\Desktop\stegano"`    
  5. that's it. You're done. Now package it however you'd like.

ALTERNATIVE

Alternatively just use CQtDeployer for Windows.