view mac/finishup.sh @ 2993:392f0b3dd502

Android: Add DW_FEATURE_RENDER_SAFE, initially just for Android. This will eventually be supported on other platforms that support unsafe rendering. On Android this moves EXPOSE events off the main thread and is enabled by default to provide extra safety. Since none of the callbacks happen on the main thread anymore, this means that none of the threading functions follow the potentially unsafe code paths that lead to instability. The trade off is performance, rendering performance, which was already kind of slow is even worse. I'll look for ways to improve this performance without sacrificing stability.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 02 May 2023 11:37:48 +0000
parents 8a2079224bc4
children
line wrap: on
line source

#!/bin/sh
PLATFORM=`uname -s`
RELEASE=`uname -r`
REQUIRED=11.0.0
SRCDIR=$1
BINNAME=$2
IDENTITY=$3

if [ $PLATFORM = "Darwin" ]
then
    mkdir -p $BINNAME.app/Contents/MacOS
    mkdir -p $BINNAME.app/Contents/Resources

    cat $SRCDIR/mac/Info.template | sed s/APPNAME/$BINNAME/ >  $BINNAME.app/Contents/Info.plist
    cp -f $SRCDIR/mac/PkgInfo $BINNAME.app/Contents 
    cp -f $SRCDIR/mac/file.png $BINNAME.app/Contents/Resources
    cp -f $SRCDIR/mac/folder.png $BINNAME.app/Contents/Resources
    cp -f $SRCDIR/image/test.png $BINNAME.app/Contents/Resources
    cp -f $BINNAME $BINNAME.app/Contents/MacOS
    if [ "$(printf '%s\n' "$REQUIRED" "$RELEASE" | sort -n | head -n1)" = "$REQUIRED" ]; then
       DEEP="--deep"
    fi
    # Check if there is a certificate to sign with...
    if [ -z "$IDENTITY" ]; then
        echo "No identity set signing AdHoc."
        codesign $DEEP -s "-" $BINNAME.app
    else
        echo "Signing code with identity: $IDENTITY"
        codesign $DEEP -s "$IDENTITY" $BINNAME.app
    fi
fi