mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-24 07:16:43 +00:00
ca8e846264
The new ios/configure script performs a separate ../configure for each of the following iOS targets: iPhoneOS on armv7 iPhoneOS on arm64 iPhoneSimulator on i386 iPhoneSimulator on x86_64 The script then creates ios/Makefile that builds a static iOS Framework Bundle suitable for inclusion in an Xcode iOS project. Add the --xcode-sdk=SDK option to configure.ac, to support cross compiling using Apple Xcode. It prefixes all compile/link toolchain commands with the "xcrun --sdk SDK" command, ie, CC, AS, LD, AR, RANLIB, etc. Re-structure headerfiles.mk to separate "public" from "private" headers, because the Framework module only exposes the public ones. Moves the SQLITE3_AMALGAMATION definition from Makefile.in into headerfiles.mk. Update INSTALL.md and add a technical document for Apple iOS. This enables development of Serval DNA within the context of an Xcode iOS project using the standard edit-make-test cycle: after modifying a Serval DNA source file, "cd ios; make" will recompile the changed file for all the target architectures and update the Framework Bundle. Rebuilding the Xcode project will then incorporate the changes, which can be tested immediately.
55 lines
1.4 KiB
Bash
Executable File
55 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Utility to output an Apple framework Info.plist file for Serval DNA.
|
|
# Copyright 2017 Flinders University
|
|
|
|
set -e
|
|
|
|
case "$0" in
|
|
*/*) SERVAL_DNA_DIR="${0%/*}/..";;
|
|
*) SERVAL_DNA_DIR="..";;
|
|
esac
|
|
|
|
bundle_name="${1?}"
|
|
bundle_id="${2?}"
|
|
bundle_version="${3?}"
|
|
|
|
escape() {
|
|
echo -n "$(printf '%s\n' "$*" | sed -e 's/&/&/g' -e 's/</</g' -e 's/>/>/g')"
|
|
}
|
|
|
|
comment() {
|
|
echo '<!--'
|
|
local arg
|
|
for arg; do
|
|
printf ' %s\n' "$arg" | sed -e 's/-->/-- >/g'
|
|
done
|
|
echo '-->'
|
|
}
|
|
|
|
property() {
|
|
echo -n ' <key>'
|
|
escape "$1"
|
|
echo -n '</key><string>'
|
|
escape "$2"
|
|
echo '</string>'
|
|
}
|
|
|
|
echo '<?xml version="1.0" encoding="UTF-8"?>'
|
|
echo '<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">'
|
|
comment "Info.plist for the $bundle_name framework iOS bundle." \
|
|
"Copyright 2007 Flinders University"
|
|
echo '<plist version="1.0">'
|
|
echo '<dict>'
|
|
property CFBundleIdentifier "$bundle_id"
|
|
property CFBundleName "$bundle_name"
|
|
property CFBundleVersion "$bundle_version"
|
|
property CFBundleShortVersionString "$bundle_version"
|
|
property CFBundleExecutable "$bundle_name"
|
|
property CFBundleDevelopmentRegion English
|
|
property CFBundleInfoDictionaryVersion 6.0
|
|
property CFBundlePackageType FMWK
|
|
property NSHumanReadableCopyright "$(cat $SERVAL_DNA_DIR/COPYRIGHT.txt)"
|
|
echo '</dict>'
|
|
echo '</plist>'
|