-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild-plugin64.command
More file actions
executable file
·71 lines (61 loc) · 2.17 KB
/
build-plugin64.command
File metadata and controls
executable file
·71 lines (61 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/sh
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# + Example build script for OS X +
# + +
# + Change the following assignments to adapt them to +
# + your local settings: +
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# The directory where the DLL will be built
build_dir="/tmp"
# The FileMaker extension directory
target_dir="${HOME}/Library/Application Support/FileMaker/FileMaker Pro/22.0/Extensions"
# The delivery script
script="${HOME}/quicklisp/local-projects/fm-plugin-tools/deliver.lisp"
# The LispWorks executable
lispworks="/Applications/LispWorks 8.0 (64-bit)/LispWorks (64-bit).app/Contents/MacOS/lispworks-8-0-0-macos64-universal"
# The name of the plug-in (the .fmplugin file)
name=FMPLisp
# And an identity for codesigning is required since recently
csid="-"
# Open FileMaker client as last step with this database file
fmdb="${HOME}/plutest.fmp12"
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# + Don't change anything below this point. +
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
cd "$build_dir"
if [ $? -eq 0 ]
then
"$lispworks" -build "$script" "$name" "$build_dir"
if [ $? -eq 0 ]
then
rm -rf "$target_dir/$name.fmplugin"
mv "$build_dir/$name.fmplugin" "$target_dir/$name.fmplugin"
if [ $? -eq 0 ]
then
# Sign the internal lwheap file first, then the whole bundle
codesign --sign "$csid" --force "$target_dir/$name.fmplugin/Contents/MacOS/Resources/$name.lwheap"
if [ $? -eq 0 ]
then
codesign --sign "$csid" --force "$target_dir/$name.fmplugin"
if [ $? -eq 0 ]
then
echo "Successfully built and codesigned $name.fmplugin"
if [ -n "$fmdb" ]
then
open "$fmdb"
fi
else
echo "Couldn't codesign bundle $name.fmplugin."
fi
else
echo "Couldn't codesign $name.lwheap file."
fi
else
echo "Couldn't copy the bundle to $target_dir."
fi
else
echo "Couldn't build the loadable bundle."
fi
else
echo "Couldn't change to directory $build_dir."
fi