Permalink
Browse files

Setup the adequate SUFeedURL in the Info.plist

  • Loading branch information...
1 parent 07694d1 commit 0d6faa8b1e627707dae920964c3536d8208de1e8 @barijaona barijaona committed Dec 29, 2012
Showing with 41 additions and 2 deletions.
  1. +0 −2 Resources/Vienna-Info.plist
  2. +17 −0 Vienna.xcodeproj/project.pbxproj
  3. +24 −0 configs/scripts/Sparkle-setup.sh
@@ -102,8 +102,6 @@
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>ViennaApp</string>
- <key>SUFeedURL</key>
- <string>$(BASE_URL_TYP)://$(BASE_URL_LOC)/changelog.xml</string>
<key>SmartCrashReports_CompanyName</key>
<string>OpenCommunity</string>
<key>SmartCrashReports_EmailTicket</key>
@@ -940,6 +940,7 @@
344D9C020C3D4B2200498CA1 /* MainMenu.nib */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = MainMenu.nib; path = Interfaces/MainMenu.nib; sourceTree = SOURCE_ROOT; };
3A23F13315276935008AF863 /* NSNotificationAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = NSNotificationAdditions.h; path = src/NSNotificationAdditions.h; sourceTree = SOURCE_ROOT; };
3A23F13415276935008AF863 /* NSNotificationAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSNotificationAdditions.h; path = src/NSNotificationAdditions.h; sourceTree = SOURCE_ROOT; };
+ 3A5482F7168F5F4800887F91 /* Sparkle-setup.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = "Sparkle-setup.sh"; path = "configs/scripts/Sparkle-setup.sh"; sourceTree = "<group>"; };
3ABA673414C7536D00251925 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
3AFC9FEF152B7AF2004B0537 /* libSystem.B.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libSystem.B.dylib; path = usr/lib/libSystem.B.dylib; sourceTree = SDKROOT; };
430C4ADB1661753F0079C9FC /* autorevision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = autorevision.h; path = src/autorevision.h; sourceTree = SOURCE_ROOT; };
@@ -2113,6 +2114,7 @@
439824171666B31700FFE219 /* Scripts */ = {
isa = PBXGroup;
children = (
+ 3A5482F7168F5F4800887F91 /* Sparkle-setup.sh */,
439824181666B37000FFE219 /* Acknowledgements.sh */,
439824191666B37000FFE219 /* autorevision.sh */,
4398241A1666B37000FFE219 /* Changes-and-Notes.sh */,
@@ -3390,6 +3392,7 @@
8D15AC300486D014006FF6A4 /* Sources */,
8D15AC330486D014006FF6A4 /* Frameworks */,
8D15AC2B0486D014006FF6A4 /* Resources */,
+ 3A5482F6168F5C1700887F91 /* Sparkle autoupdate setup */,
AAEF2001085D685900A0E675 /* Copy Shared Support Files */,
52FDC71F0C559C7700F9F29B /* Acknowledgements */,
43EE8617165EF9D7000997FB /* Translations */,
@@ -4073,6 +4076,20 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
+ 3A5482F6168F5C1700887F91 /* Sparkle autoupdate setup */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Sparkle autoupdate setup";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = ". configs/scripts/Sparkle-setup.sh";
+ };
430C4ACE166172BD0079C9FC /* Run Autorevision */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# Config
+. "${OBJROOT}/autorevision.tmp"
+N_VCS_TAG="$(echo "${VCS_TAG}" | sed -e 's:^v/::')" # for urls/files
+V_VCS_TAG="$(echo "${N_VCS_TAG}" | sed -e 's:_beta: Beta :' -e 's:_rc: RC :')" # for display
+
+case "${N_VCS_TAG}" in
+ *_beta*)
+ SU_FEED_URL="http://vienna-rss.org/changelog_beta.xml"
+ ;;
+ *_rc*)
+ SU_FEED_URL="http://vienna-rss.org/changelog_rc.xml"
+ ;;
+ *)
+ SU_FEED_URL="http://vienna-rss.org/changelog.xml"
+ ;;
+esac
+
+INFO="${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/../Info.plist"
+
+/usr/libexec/PlistBuddy $INFO -c "add SUFeedURL string $SU_FEED_URL"
+/usr/libexec/PlistBuddy $INFO -c "set :SUFeedURL $SU_FEED_URL"
+exit ${?}

0 comments on commit 0d6faa8

Please sign in to comment.