mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-05-13 21:46:53 +02:00
helper scripts for mac app helpers
This commit is contained in:
parent
03e917f85c
commit
30bda87db4
57
demos/Lazarus_Mac/AppHelper/create_mac_helper_apps.sh
Executable file
57
demos/Lazarus_Mac/AppHelper/create_mac_helper_apps.sh
Executable file
@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
BASEDIR=$(dirname "$0")
|
||||||
|
DEST=$1
|
||||||
|
SRC=$2
|
||||||
|
|
||||||
|
if [ "$SRC" = "" ];
|
||||||
|
then
|
||||||
|
SRC=$BASEDIR/../../../bin/AppHelper.app
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "" ] || [ ! -e "$DEST" ] || [ ! -e "$SRC" ];
|
||||||
|
then
|
||||||
|
echo "Usage"
|
||||||
|
echo " $0 destpath/project.app"
|
||||||
|
echo " $0 destpath/project.app sourcedir/AppHelper.app"
|
||||||
|
echo
|
||||||
|
if [ ! -e "$DEST" ];
|
||||||
|
then
|
||||||
|
echo "Error: Target app bundle not found. (Did you compile AND create the bundle?)"
|
||||||
|
fi
|
||||||
|
if [ ! -e "$SRC" ];
|
||||||
|
then
|
||||||
|
echo "Error: Source (AppHelper) app bundle not found. (Did you compile AND create the bundle?)"
|
||||||
|
fi
|
||||||
|
exit;
|
||||||
|
fi
|
||||||
|
|
||||||
|
SRCAPP=$(basename "$SRC")
|
||||||
|
SRCAPP="${SRCAPP%\.app}"
|
||||||
|
DESTAPP=$(basename "$DEST")
|
||||||
|
DESTAPP="${DESTAPP%\.app}"
|
||||||
|
|
||||||
|
SUB=""
|
||||||
|
rm -rf "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app"
|
||||||
|
cp -r "$SRC" "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app"
|
||||||
|
mv "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app/Contents/MacOS/$SRCAPP" "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app/Contents/MacOS/$DESTAPP Helper$SUB"
|
||||||
|
sed -i '' "s/$SRCAPP/$DESTAPP Helper$SUB/g" "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app/Contents/Info.plist"
|
||||||
|
|
||||||
|
SUB=" (GPU)"
|
||||||
|
rm -rf "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app"
|
||||||
|
cp -r "$SRC" "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app"
|
||||||
|
mv "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app/Contents/MacOS/$SRCAPP" "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app/Contents/MacOS/$DESTAPP Helper$SUB"
|
||||||
|
sed -i '' "s/$SRCAPP/$DESTAPP Helper$SUB/g" "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app/Contents/Info.plist"
|
||||||
|
|
||||||
|
SUB=" (Renderer)"
|
||||||
|
rm -rf "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app"
|
||||||
|
cp -r "$SRC" "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app"
|
||||||
|
mv "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app/Contents/MacOS/$SRCAPP" "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app/Contents/MacOS/$DESTAPP Helper$SUB"
|
||||||
|
sed -i '' "s/$SRCAPP/$DESTAPP Helper$SUB/g" "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app/Contents/Info.plist"
|
||||||
|
|
||||||
|
SUB=" (Plugin)"
|
||||||
|
rm -rf "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app"
|
||||||
|
cp -r "$SRC" "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app"
|
||||||
|
mv "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app/Contents/MacOS/$SRCAPP" "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app/Contents/MacOS/$DESTAPP Helper$SUB"
|
||||||
|
sed -i '' "s/$SRCAPP/$DESTAPP Helper$SUB/g" "$DEST/Contents/Frameworks/$DESTAPP Helper$SUB.app/Contents/Info.plist"
|
||||||
|
|
8
demos/Lazarus_Mac/SimpleBrowser2/create_mac_helper.sh
Executable file
8
demos/Lazarus_Mac/SimpleBrowser2/create_mac_helper.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
CDIR=$(pwd)
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
|
../AppHelper/create_mac_helper_apps.sh ../../../bin/SimpleBrowser2.app
|
||||||
|
|
||||||
|
cd "$CDIR"
|
Loading…
x
Reference in New Issue
Block a user