Revision | fd4911796032b566fec99605d7bbdb43cdf1d8fc (tree) |
---|---|
Time | 2022-11-19 23:15:12 |
Author | Fs <Fsu0413@vip....> |
Commiter | Fs |
我草
@@ -61,11 +61,24 @@ chmod +x "${PATH_TO_TARGET}/bin/qmake" | ||
61 | 61 | |
62 | 62 | chmod +x "${PATH_TO_TARGET}/bin/qtpaths" |
63 | 63 | |
64 | -sed -i -e 's,^HostPrefix=.*$,HostPrefix=../host,g' "${PATH_TO_TARGET}/bin/target_qt.conf" | |
65 | -sed -i -e 's,^HostData=.*$,HostData=..,g' "${PATH_TO_TARGET}/bin/target_qt.conf" | |
64 | +sed -i '' -e 's,^HostPrefix=.*$,HostPrefix=../host,g' "${PATH_TO_TARGET}/bin/target_qt.conf" | |
65 | +sed -i '' -e 's,^HostData=.*$,HostData=..,g' "${PATH_TO_TARGET}/bin/target_qt.conf" | |
66 | 66 | |
67 | -# CMake tweak | |
67 | +# CMake tweak / Qt 6.4.1 + | |
68 | 68 | |
69 | -sed -i -e 's,^set(__qt_platform_initial_qt_host_path[[:space:]].*$,set(__qt_platform_initial_qt_host_path "${Qt6_DIR}/../../../host"),' "${PATH_TO_TARGET}/lib/cmake/Qt6/Qt6Dependencies.cmake" | |
70 | -sed -i -e 's,^set(__qt_platform_initial_qt_host_path_cmake_dir[[:space:]].*$,set(__qt_platform_initial_qt_host_path "${Qt6_DIR}/../../../host/lib/cmake"),' "${PATH_TO_TARGET}/lib/cmake/Qt6/Qt6Dependencies.cmake" | |
69 | +sed -i '' -e 's,^set(__qt_platform_initial_qt_host_path[[:space:]].*$,set(__qt_platform_initial_qt_host_path "${Qt6_DIR}/../../../host"),' "${PATH_TO_TARGET}/lib/cmake/Qt6/Qt6Dependencies.cmake" | |
70 | +sed -i '' -e 's,^set(__qt_platform_initial_qt_host_path_cmake_dir[[:space:]].*$,set(__qt_platform_initial_qt_host_path_cmake_dir "${Qt6_DIR}/../../../host/lib/cmake"),' "${PATH_TO_TARGET}/lib/cmake/Qt6/Qt6Dependencies.cmake" | |
71 | 71 | |
72 | +# CMake tweak / Qt 6.2.4 | |
73 | + | |
74 | +sed -i '' -e '/^set(__qt_toolchain_initial_qt_host_path[[:space:]]*$/{N | |
75 | +c\ | |
76 | +set(__qt_platform_initial_qt_host_path "${CMAKE_CURRENT_LIST_DIR}/../../../host") | |
77 | +d | |
78 | +}' "${PATH_TO_TARGET}/lib/cmake/Qt6/qt.toolchain.cmake" | |
79 | + | |
80 | +sed -i '' -e '/^set(__qt_platform_initial_qt_host_path_cmake_dir[[:space:]]*$/{N | |
81 | +c\ | |
82 | +set(__qt_platform_initial_qt_host_path_cmake_dir "${CMAKE_CURRENT_LIST_DIR}/../../../host/lib/cmake") | |
83 | +d | |
84 | +}' "${PATH_TO_TARGET}/lib/cmake/Qt6/qt.toolchain.cmake" |
@@ -75,7 +75,7 @@ target_qtconfold.Close | ||
75 | 75 | fso.DeleteFile PATH_TO_TARGET & "\bin\target_qt.conf" |
76 | 76 | fso.MoveFile PATH_TO_TARGET & "\bin\target_qt.conf.new", PATH_TO_TARGET & "\bin\target_qt.conf" |
77 | 77 | |
78 | -' CMake tweak | |
78 | +' CMake tweak / Qt 6.4.1 + | |
79 | 79 | |
80 | 80 | Dim Qt6Dependencies_cmake |
81 | 81 | Dim Qt6Dependencies_cmakeold |
@@ -95,6 +95,32 @@ Qt6Dependencies_cmakeold.Close | ||
95 | 95 | fso.DeleteFile PATH_TO_TARGET & "\lib\cmake\Qt6\Qt6Dependencies.cmake" |
96 | 96 | fso.MoveFile PATH_TO_TARGET & "\lib\cmake\Qt6\Qt6Dependencies.cmake.new", PATH_TO_TARGET & "\lib\cmake\Qt6\Qt6Dependencies.cmake" |
97 | 97 | |
98 | +' CMake tweak / Qt 6.2.4 | |
99 | + | |
100 | +Dim qt_toolchain_cmake | |
101 | +Dim qt_toolchain_cmakeold | |
102 | +Set qt_toolchain_cmake = fso.OpenTextFile(PATH_TO_TARGET & "\lib\cmake\Qt6\qt.toolchain.cmake.new", 2, True) | |
103 | +Set qt_toolchain_cmakeold = fso.OpenTextFile(PATH_TO_TARGET & "\lib\cmake\Qt6\qt.toolchain.cmake", 1, False) | |
104 | + | |
105 | +Do until qt_toolchain_cmakeold.AtEndOfStream | |
106 | + line = qt_toolchain_cmakeold.ReadLine | |
107 | + If Left(Trim(line), 38) = "set(__qt_platform_initial_qt_host_path" Then | |
108 | + line = "set(__qt_platform_initial_qt_host_path ""${CMAKE_CURRENT_LIST_DIR}/../../../host"")" | |
109 | + qt_toolchain_cmakeold.ReadLine ' Qt 6.2.4 intentionally put the path to next line. It should be skipped. | |
110 | + End If | |
111 | + If Left(Trim(line), 48) = "set(__qt_platform_initial_qt_host_path_cmake_dir" Then | |
112 | + line = "set(__qt_platform_initial_qt_host_path_cmake_dir ""${CMAKE_CURRENT_LIST_DIR}/../../../host/lib/cmake"")" | |
113 | + qt_toolchain_cmakeold.ReadLine | |
114 | + End If | |
115 | + qt_toolchain_cmake.WriteLine line | |
116 | +Loop | |
117 | + | |
118 | +qt_toolchain_cmake.Close | |
119 | +qt_toolchain_cmakeold.Close | |
120 | + | |
121 | +fso.DeleteFile PATH_TO_TARGET & "\lib\cmake\Qt6\qt.toolchain.cmake" | |
122 | +fso.MoveFile PATH_TO_TARGET & "\lib\cmake\Qt6\qt.toolchain.cmake.new", PATH_TO_TARGET & "\lib\cmake\Qt6\qt.toolchain.cmake" | |
123 | + | |
98 | 124 | ' lib/cmake/Qt6/QtBuildInternalsExtra.cmake |
99 | 125 | ' Does this need to be modified? This is the install directory! |
100 | 126 | ' Our Qt builds are relocatable so it seems like there is no way that the file needs to be modified |