mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
photosfacepatch: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
ebf5d5ca84
commit
f5c6f6ccf1
@ -6,28 +6,58 @@
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
SO_FILE="/var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0"
|
||||
SO_FILE1="/var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so"
|
||||
SO_FILE2="/var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0"
|
||||
if [ -f "${SO_FILE1}" ] || [ -f "${SO_FILE2}" ]; then
|
||||
echo "SynologyPhotos installed -> Patching"
|
||||
else
|
||||
echo "SynologyPhotos not installed -> Exit"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "${1}" = "-r" ]; then
|
||||
if [ -f "${SO_FILE}.bak" ]; then
|
||||
mv -f "${SO_FILE}.bak" "${SO_FILE}"
|
||||
if [ -f "${SO_FILE1}" ]; then
|
||||
SO_FILE="${SO_FILE1}"
|
||||
|
||||
if [ "${1}" = "-r" ]; then
|
||||
if [ -f "${SO_FILE}.bak" ]; then
|
||||
mv -f "${SO_FILE}.bak" "${SO_FILE}"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -f "${SO_FILE}" ]; then
|
||||
echo "SynologyPhotos not install"
|
||||
exit
|
||||
fi
|
||||
if [ ! -f "${SO_FILE}.bak" ]; then
|
||||
echo "Backup ${SO_FILE}"
|
||||
cp -vfp "${SO_FILE}" "${SO_FILE}.bak"
|
||||
fi
|
||||
|
||||
if [ ! -f "${SO_FILE}.bak" ]; then
|
||||
echo "Backup ${SO_FILE}"
|
||||
cp -vfp "${SO_FILE}" "${SO_FILE}.bak"
|
||||
echo "Patching ${SO_FILE}"
|
||||
# support face and concept
|
||||
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform20IsSupportedIENetworkEv" "B8 00 00 00 00 C3"
|
||||
# force to support concept
|
||||
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform18IsSupportedConceptEv" "B8 01 00 00 00 C3"
|
||||
# force no Gpu
|
||||
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform23IsSupportedIENetworkGpuEv" "B8 00 00 00 00 C3"
|
||||
fi
|
||||
echo "Patching ${SO_FILE}"
|
||||
# support face and concept
|
||||
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform20IsSupportedIENetworkEv" "B8 00 00 00 00 C3"
|
||||
# force to support concept
|
||||
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform18IsSupportedConceptEv" "B8 01 00 00 00 C3"
|
||||
# force no Gpu
|
||||
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform23IsSupportedIENetworkGpuEv" "B8 00 00 00 00 C3"
|
||||
if [ -f "${SO_FILE2}" ]; then
|
||||
SO_FILE="${SO_FILE2}"
|
||||
|
||||
if [ "${1}" = "-r" ]; then
|
||||
if [ -f "${SO_FILE}.bak" ]; then
|
||||
mv -f "${SO_FILE}.bak" "${SO_FILE}"
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -f "${SO_FILE}.bak" ]; then
|
||||
echo "Backup ${SO_FILE}"
|
||||
cp -vfp "${SO_FILE}" "${SO_FILE}.bak"
|
||||
fi
|
||||
|
||||
echo "Patching ${SO_FILE}"
|
||||
# support face and concept
|
||||
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform20IsSupportedIENetworkEv" "B8 00 00 00 00 C3"
|
||||
# force to support concept
|
||||
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform18IsSupportedConceptEv" "B8 01 00 00 00 C3"
|
||||
# force no Gpu
|
||||
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform23IsSupportedIENetworkGpuEv" "B8 00 00 00 00 C3"
|
||||
fi
|
Loading…
Reference in New Issue
Block a user