[Vm-dev] Building a Mac plugin bundle without XCode
Bert Freudenberg
bert at freudenbergs.de
Wed Feb 27 17:18:17 UTC 2013
So far, I've only seen .dylib type plugins built from a Makefile. For the nicer .bundle type ones (which have a proper icon and show version information in the Finder) you had to use an XCode project. But it turned out to be quite simple: just link the module using "-bundle" instead of "-dynamiclib" and put it in a bundle file hierarchy together with a PkgInfo, Info.plist, and icon file, and it just works:
GeziraBindingsMT.bundle: GeziraBindingsMT GeziraBindingsMT.plist.in
$(RM) -r $@
mkdir $@ $@/Contents $@/Contents/MacOS $@/Contents/Resources
cp -a GeziraBindingsMT $@/Contents/MacOS/
cp -a $(ICON) $@/Contents/Resources/
sed 's/@VERSION@/$(VERSION)/;s/@BUILD@/$(BUILD)/' GeziraBindingsMT.plist.in > $@/Contents/Info.plist
printf BNDLFAST > $@/Contents/PkgInfo
GeziraBindingsMT: GeziraBindingsMT.o $(GEZIRA)/libgezira.a $(NILE)/libnile.a
$(CC) $(LDFLAGS) -m32 -bundle $< -o $@
This probably is less interesting for plugins included in the official VMs, but for separately distributed plugins it might come handy.
- Bert -
More information about the Vm-dev
mailing list