Commit 61150035 authored by David Fuhrmann's avatar David Fuhrmann

macOS codesign.sh: Regenerate the cache after signing modules

The cache is only valid if mod time and size of the plugins match.
As macOS codesign adapts the binaries, the cache will be invalid
after signing. Additionally, the cache file itself must be signed
as well, because of its location inside the bundle. Therefore,
regenerate the cache at the correct stage in the middle of the
signing script.

The script searches for vlc-cache-gen when executed inside vlcs
build directory, as well as inside the release package.

refs #19448
parent 475ea13b
......@@ -67,6 +67,18 @@ if [ "x$1" != "x" ]; then
exit 1
fi
VLCCACHEGEN=""
if [ -e "./bin/vlc-cache-gen" ]; then
VLCCACHEGEN="./bin/vlc-cache-gen"
fi
if [ -e "./vlc-cache-gen" ]; then
VLCCACHEGEN="./vlc-cache-gen"
fi
if [ -z "$VLCCACHEGEN" ]; then
info "WARN: Cannot find vlc-cache-gen, cache will be corrupt after signing"
fi
# Call with $1 = file or folder, $2 = identifier (if empty, file name is used)
sign()
{
......@@ -140,11 +152,17 @@ done
info "Signing the modules"
for i in $(find VLC.app/Contents/MacOS/plugins -type f -exec echo {} \;)
for i in $(find VLC.app/Contents/MacOS/plugins -type f -name "*.dylib" -exec echo {} \;)
do
sign "$i"
done
if [ ! -z "$VLCCACHEGEN" ]; then
$VLCCACHEGEN VLC.app/Contents/MacOS/plugins
fi
sign "VLC.app/Contents/MacOS/plugins/plugins.dat"
info "Signing the libraries"
for i in $(find VLC.app/Contents/MacOS/lib -type f -exec echo {} \;)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment