wrapGAppsHook: add wrapGApp helper
This commit is contained in:
parent
1716d62f63
commit
3c1563f49d
|
@ -258,6 +258,16 @@ mkDerivation {
|
|||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="ssec-gnome-common-issues-weird-location">
|
||||
<term>
|
||||
I need to wrap a binary outside <filename>bin</filename> and <filename>libexec</filename> directories.
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
You can manually trigger the wrapping with <function>wrapGApp</function> in <literal>preFixup</literal> phase. It takes a path to a program as a first argument; the remaining arguments are passed directly to <function xlink:href="#fun-wrapProgram">wrapProgram</function> function.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</section>
|
||||
</section>
|
||||
|
|
|
@ -8,6 +8,12 @@ find_gio_modules() {
|
|||
|
||||
addEnvHooks "$targetOffset" find_gio_modules
|
||||
|
||||
wrapGApp() {
|
||||
local program="$1"
|
||||
shift 1
|
||||
wrapProgram "$program" "${gappsWrapperArgs[@]}" "$@"
|
||||
}
|
||||
|
||||
# Note: $gappsWrapperArgs still gets defined even if $dontWrapGApps is set.
|
||||
wrapGAppsHook() {
|
||||
# guard against running multiple times (e.g. due to propagation)
|
||||
|
@ -52,7 +58,7 @@ wrapGAppsHook() {
|
|||
find "${targetDir}" -type f -executable -print0 \
|
||||
| while IFS= read -r -d '' file; do
|
||||
echo "Wrapping program '${file}'"
|
||||
wrapProgram "${file}" "${gappsWrapperArgs[@]}"
|
||||
wrapGApp "${file}"
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
@ -71,7 +77,7 @@ wrapGAppsHook() {
|
|||
fi
|
||||
done
|
||||
echo "Wrapping link: '$linkPath'"
|
||||
wrapProgram "${linkPath}" "${gappsWrapperArgs[@]}"
|
||||
wrapGApp "${linkPath}"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue