2016-11-16 02:17:45 +00:00
|
|
|
wrapQtProgram() {
|
|
|
|
local prog="$1"
|
|
|
|
shift
|
|
|
|
wrapProgram "$prog" \
|
|
|
|
--set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \
|
|
|
|
--set QML_IMPORT_PATH "$QML_IMPORT_PATH" \
|
|
|
|
--set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \
|
|
|
|
--set DYLD_FRAMEWORK_PATH "/System/Library/Frameworks" \
|
|
|
|
--prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \
|
|
|
|
--prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \
|
|
|
|
"$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
makeQtWrapper() {
|
|
|
|
local old="$1"
|
|
|
|
local new="$2"
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
makeWrapper "$old" "$new" \
|
|
|
|
--set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \
|
|
|
|
--set QML_IMPORT_PATH "$QML_IMPORT_PATH" \
|
|
|
|
--set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \
|
|
|
|
--set DYLD_FRAMEWORK_PATH "/System/Library/Frameworks" \
|
|
|
|
--prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \
|
|
|
|
--prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \
|
|
|
|
"$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
_makeQtWrapperSetup() {
|
|
|
|
# cannot use addToSearchPath because these directories may not exist yet
|
|
|
|
export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}${!outputLib}/lib/qt5/plugins"
|
|
|
|
export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}${!outputLib}/lib/qt5/imports"
|
|
|
|
export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}${!outputLib}/lib/qt5/qml"
|
2017-03-22 12:14:05 +00:00
|
|
|
export RUNTIME_XDG_DATA_DIRS="$RUNTIME_XDG_DATA_DIRS${RUNTIME_XDG_DATA_DIRS:+:}${!outputBin}/share"
|
|
|
|
export RUNTIME_XDG_CONFIG_DIRS="$RUNTIME_XDG_CONFIG_DIRS${RUNTIME_XDG_CONFIG_DIRS:+:}${!outputBin}/etc/xdg"
|
2016-11-16 02:17:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
prePhases+=(_makeQtWrapperSetup)
|