Qt World Summit: Submit your Presentation

Qt VS Tools Always building stuff for Release build

  • Scenario

    1. Select release build
    2. Run build to completion
    3. Select Debug/Start Debugging or Debug/Start Without Debugging

    Before running the executable VS Tools (or MSBuild) does a rebuild of the translation files

    Even though the project has already built to completion including the above stuff.

    I've checked the vcxproj file by hand for differences between the Debug|x64 and Release|x64 sections.

    The only difference is that I have a post build event that runs lrelease twice in the Release builds, once to put the Qt dependencies into the build directory and once to place them into the Installers\RunTIme64 directory.:

    call $(QTDIR)\bin\qtenv2.bat
    $(QTDIR)\bin\windeployqt $(TargetPath)
    $(QTDIR)\bin\windeployqt --dir $(SolutionDir)Installers\RunTime64 $(TargetPath)

    Looking around the directory tree the only other difference I found is that the qtvars...props file locations are inconsistent:

    D:\Users\amonra\Documents\GitHub\DSS>dir qtvars*.props /s
     Volume in drive D is Data
     Volume Serial Number is 2892-0083
     Directory of D:\Users\amonra\Documents\GitHub\DSS\DeepSkyStacker\Debug\qmake
    04/05/2020  03:34             1,655 qtvars_Win32_Debug.props
                   1 File(s)          1,655 bytes
     Directory of D:\Users\amonra\Documents\GitHub\DSS\DeepSkyStacker\Release\qmake
    04/05/2020  03:34             1,672 qtvars_Win32_Release.props
                   1 File(s)          1,672 bytes
     Directory of D:\Users\amonra\Documents\GitHub\DSS\DeepSkyStacker\x64\Debug\qmake
    08/06/2020  11:26             3,976 qtvars_x64_Debug.props
                   1 File(s)          3,976 bytes
     Directory of D:\Users\amonra\Documents\GitHub\DSS\DeepSkyStacker\x64\Release\qmake
    08/06/2020  16:39             3,993 qtvars_x64_Release.props
                   1 File(s)          3,993 bytes

  • Lifetime Qt Champion

    @Perdrix Please mark thread as solved

  • windeployqt doesn't have a concept of "changes", it is just run everytime

  • That's not the problem. It is run as part of the build for the debug build, but not every time I invoke the executable, but for the release build, every time I attempt to run the executable it re-runs all the stuff you see above - that isn't right. I removed the post build step for windeployqt and that didn't change the behaviour.

    This is driving me nuts

  • Problem solved Self inflicted problem with custom build step

  • Lifetime Qt Champion

    @Perdrix Please mark thread as solved

Log in to reply