Permalink
Browse files

Add Sparkle as a submodule and build from source.

  • Loading branch information...
martinh committed Jul 8, 2012
1 parent b74e6cb commit 4a87c12c6eafb8224d0e908d8924759d69d7af17
Showing with 20 additions and 3 deletions.
  1. +3 −0 .gitmodules
  2. +16 −3 Makefile
  3. +1 −0 sparkle
View
@@ -61,3 +61,6 @@
[submodule "plblockimp"]
path = plblockimp
url = https://github.com/landonf/plblockimp.git
+[submodule "sparkle"]
+ path = sparkle
+ url = https://github.com/andymatuschak/Sparkle.git
View
@@ -447,12 +447,16 @@ PAR_LDLIBS =
# Use Sparkle updates for all builds
APP_FRAMEWORKS += Sparkle
RESOURCES += sparkle_pub.pem
+SPARKLE_FWDIR = $(BUILDDIR)/sparkle
+SPARKLE_FW = $(SPARKLE_FWDIR)/Sparkle.framework
+CPPFLAGS += -F$(SPARKLE_FWDIR)
+LDFLAGS += -F$(SPARKLE_FWDIR)
# Crash Reporter requires AddressBook framework for getting the users email address
APP_FRAMEWORKS += AddressBook
# paths
-BUILDDIR=./build/$(CONFIGURATION)
+BUILDDIR=$(CURDIR)/build/$(CONFIGURATION)
OBJDIR=$(BUILDDIR)/obj/$(ARCH)
OBJDIR_32=$(BUILDDIR)/obj/i386
OBJDIR_64=$(BUILDDIR)/obj/x86_64
@@ -506,7 +510,7 @@ $(HELP_EN)/%.html: %.md
.PHONY: app
app: $(NIBS) $(RESOURCES) $(BUNDLE_REPOS) $(INFOPLIST) help \
- $(APPDIR)/Contents/PkgInfo submodules
+ $(APPDIR)/Contents/PkgInfo submodules $(SPARKLE_FW)
for arch in $(ARCHS); do \
$(MAKE) binaries ARCH=$$arch; \
done
@@ -522,7 +526,7 @@ app: $(NIBS) $(RESOURCES) $(BUNDLE_REPOS) $(INFOPLIST) help \
dsymutil $(BINDIR)/Vico -o $(BUILDDIR)/Vico.app.dSYM; \
fi
rsync -a --delete --exclude ".git" --exclude ".DS_Store" $(RESOURCES) $(RESDIR)
- rsync -a --delete --exclude ".git" --exclude ".DS_Store" Sparkle.framework $(FWDIR)
+ rsync -a --delete --exclude ".git" --exclude ".DS_Store" $(SPARKLE_FW) $(FWDIR)
cp -f app/en.lproj/Credits.rtf $(RESDIR)/en.lproj/Credits.rtf
cp -f app/en.lproj/InfoPlist.strings $(RESDIR)/en.lproj/InfoPlist.strings
# find $(RESDIR)/Bundles \( -iname "*.plist" -or -iname "*.tmCommand" -or -iname "*.tmSnippet" -or -iname "*.tmPreferences" \) -exec /usr/bin/plutil -convert binary1 "{}" \;
@@ -534,6 +538,15 @@ $(BUILDDIR)/gitmodules.stamp:
git submodule update --init --recursive -- .
touch $@
+$(SPARKLE_FW): $(BUILDDIR)/sparkle/Sparkle.stamp
+$(BUILDDIR)/sparkle/Sparkle.stamp:
+ xcodebuild -project "$(CURDIR)/sparkle/Sparkle.xcodeproj" \
+ -target Sparkle -configuration Release -parallelizeTargets \
+ CONFIGURATION_BUILD_DIR="$(BUILDDIR)/sparkle" \
+ OBJROOT="$(BUILDDIR)/sparkle" \
+ SYMROOT="$(BUILDDIR)/sparkle"
+ touch $@
+
binaries: $(OBJDIR)/Vico $(OBJDIR)/vicotool $(OBJDIR)/par
$(OBJC_OBJS): $(OBJDIR)/Vico-prefix.objc.pth
Submodule sparkle added at 118f3c

0 comments on commit 4a87c12

Please sign in to comment.