Revision | a5507cc91fb3c6395c021625acd00ef204bd5c8b (tree) |
---|---|
Time | 2023-01-28 07:38:28 |
Author | Fs <Fsu0413@vip....> |
Commiter | Fs |
workaround QTBUG-102877
Signed-off-by: Fs <Fsu0413@vip.qq.com>
@@ -475,19 +475,25 @@ conf.Qt.generateConfTable = function(self, host, job) | ||
475 | 475 | if confHost.makefileTemplate == "win" then |
476 | 476 | file = string.gsub(file, "%/", "\\") |
477 | 477 | end |
478 | - ret.EXTRAINSTALL = ret.EXTRAINSTALL .. copyCmd .. " " .. ret.BUILDDIR .. confHost.pathSep .. file .. " " .. installRoot .. "\n" | |
478 | + ret.EXTRAINSTALL = ret.EXTRAINSTALL .. copyCmd .. ret.BUILDDIR .. confHost.pathSep .. file .. " " .. installRoot .. "\n" | |
479 | + end | |
480 | + | |
481 | + -- check for static builds | |
482 | + local staticBuild = false | |
483 | + for _, v in ipairs(confDetail.variant) do | |
484 | + if (v == "-static") or (v == "-staticFull") then | |
485 | + staticBuild = true | |
486 | + break | |
487 | + end | |
488 | + end | |
489 | + | |
490 | + -- hack for static Qt 6.2 series: they can't be used without workaround of qt.conf | |
491 | + if staticBuild and (string.sub(confDetail.qtVersion, 1, 4) == "6.2.") then | |
492 | + ret.EXTRAINSTALL = ret.EXTRAINSTALL .. copyCmd .. scriptPath .. confHost.pathSep .. ".." .. confHost.pathSep .. "qtconf-ForQt6.2Static" .. " " .. installRoot .. confHost.pathSep .. "bin" .. confHost.pathSep .. "qt.conf\n" | |
479 | 493 | end |
480 | 494 | |
481 | 495 | -- OpenSSL libraries |
482 | 496 | if confDetail.opensslConf then |
483 | - -- check for static builds | |
484 | - local staticBuild = false | |
485 | - for _, v in ipairs(confDetail.variant) do | |
486 | - if (v == "-static") or (v == "-staticFull") then | |
487 | - staticBuild = true | |
488 | - break | |
489 | - end | |
490 | - end | |
491 | 497 | local opensslLibPath = conf.OpenSSL.configurations[confDetail.opensslConf][(staticBuild and "static" or "") .. "libPath"] |
492 | 498 | if opensslLibPath then |
493 | 499 | local targetDir = "lib" |
@@ -31,6 +31,7 @@ fi | ||
31 | 31 | |
32 | 32 | mkdir "${PATH_TO_TARGET}/host" |
33 | 33 | cp -R "${PATH_TO_HOST}/bin" "${PATH_TO_TARGET}/host/" |
34 | +[ -e "${PATH_TO_TARGET}/host/bin/qt.conf" ] && rm "${PATH_TO_TARGET}/host/bin/qt.conf" | |
34 | 35 | [ -d "${PATH_TO_HOST}/libexec" ] && cp -R "${PATH_TO_HOST}/libexec" "${PATH_TO_TARGET}/host/" |
35 | 36 | mkdir "${PATH_TO_TARGET}/host/lib" |
36 | 37 | cp -R "${PATH_TO_HOST}/lib/cmake" "${PATH_TO_TARGET}/host/lib/" |
@@ -59,6 +60,8 @@ chmod +x "${PATH_TO_TARGET}/bin/qmake" | ||
59 | 60 | echo "\$script_dir_path/../host/bin/qtpaths -qtconf \"\$script_dir_path/target_qt.conf\" \$*" |
60 | 61 | ) > "${PATH_TO_TARGET}/bin/qtpaths" |
61 | 62 | |
63 | +chmod +x "${PATH_TO_TARGET}/bin/qtpaths" | |
64 | + | |
62 | 65 | # judge if sed / gsed is GNU sed |
63 | 66 | GNU_SED= |
64 | 67 |
@@ -76,8 +79,6 @@ if [ x"$GNU_SED" = x ]; then | ||
76 | 79 | GNU_SED=sed |
77 | 80 | fi |
78 | 81 | |
79 | -chmod +x "${PATH_TO_TARGET}/bin/qtpaths" | |
80 | - | |
81 | 82 | $GNU_SED -i -e 's,^HostPrefix=.*$,HostPrefix=../host,g' "${PATH_TO_TARGET}/bin/target_qt.conf" |
82 | 83 | $GNU_SED -i -e 's,^HostData=.*$,HostData=..,g' "${PATH_TO_TARGET}/bin/target_qt.conf" |
83 | 84 |
@@ -26,6 +26,7 @@ End If | ||
26 | 26 | |
27 | 27 | fso.CreateFolder PATH_TO_TARGET & "\host" |
28 | 28 | fso.CopyFolder PATH_TO_HOST & "\bin", PATH_TO_TARGET & "\host\bin" |
29 | +If fso.FileExists(PATH_TO_TARGET & "\host\bin\qt.conf") Then fso.DeleteFile PATH_TO_TARGET & "\host\bin\qt.conf" | |
29 | 30 | If fso.FolderExists(PATH_TO_HOST & "\libexec") Then fso.CopyFolder PATH_TO_HOST & "\libexec", PATH_TO_TARGET & "\host\libexec" |
30 | 31 | fso.CreateFolder PATH_TO_TARGET & "\host\lib" |
31 | 32 | fso.CopyFolder PATH_TO_HOST & "\lib\cmake", PATH_TO_TARGET & "\host\lib\cmake" |
@@ -0,0 +1,3 @@ | ||
1 | +[Paths] | |
2 | +Prefix=.. | |
3 | +HostPrefix=.. |