wrapGAppsHook: add wrapGApp helper
This commit is contained in:
parent
1716d62f63
commit
3c1563f49d
@ -258,6 +258,16 @@ mkDerivation {
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</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>
|
</variablelist>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
@ -8,6 +8,12 @@ find_gio_modules() {
|
|||||||
|
|
||||||
addEnvHooks "$targetOffset" 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.
|
# Note: $gappsWrapperArgs still gets defined even if $dontWrapGApps is set.
|
||||||
wrapGAppsHook() {
|
wrapGAppsHook() {
|
||||||
# guard against running multiple times (e.g. due to propagation)
|
# guard against running multiple times (e.g. due to propagation)
|
||||||
@ -52,7 +58,7 @@ wrapGAppsHook() {
|
|||||||
find "${targetDir}" -type f -executable -print0 \
|
find "${targetDir}" -type f -executable -print0 \
|
||||||
| while IFS= read -r -d '' file; do
|
| while IFS= read -r -d '' file; do
|
||||||
echo "Wrapping program '${file}'"
|
echo "Wrapping program '${file}'"
|
||||||
wrapProgram "${file}" "${gappsWrapperArgs[@]}"
|
wrapGApp "${file}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -71,7 +77,7 @@ wrapGAppsHook() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "Wrapping link: '$linkPath'"
|
echo "Wrapping link: '$linkPath'"
|
||||||
wrapProgram "${linkPath}" "${gappsWrapperArgs[@]}"
|
wrapGApp "${linkPath}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user