How to apply patch .diff file?
-
I was hoping this bug fix (https://bugreports.qt.io/browse/QTBUG-53022) will make it to 5.12 LTS branch but looks like that's not happening, so I have to manually apply the .diff file someone shared in comment section.
Never applied a patch before. Is there a tutorial anywhere on how to apply .diff file? I couldn't find one. Working with VS2017 on Windows 10.
-
@SGaist I've been trying to apply the patch as below:
- Download and unzip Qt Source code in folder 5.12.5
- cd to 5.12.5\qtbase
- git init
- git add . (I see lots of LF -> CRLF warning message)
- git apply --stat <patch filename> (Shows several lines of changes)
- git apply --check <patch filename> (No output)
- git apply <patch filename> (No output)
- git apply --check <patch filename> (Shows several lines of error patch does not apply, so assuming patch applied successfully?)
- run the Exact same configure command that I successfully used on code without patch applied, it starts and then after 10-15 seconds fails with error:
Info: creating super cache file C:\Qt\Static\5.12.5_build.qmake.super
Info: creating cache file C:\Qt\Static\5.12.5_build.qmake.cache
ERROR: Unknown command line option '-commercial'.'-commercial' is the first argument after configure, if I remove commerical, then it fails showing the next argument in error message "-static".
-
Hi @Taytoo,
if you want to apply patches, you should not download the source zip file, but rather build Qt directly from Git.
Regards