summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/Sparkle.disable.security.patch18
-rwxr-xr-xmacosx/Sparkle.framework/Versions/A/Sparklebin463540 -> 680396 bytes
-rw-r--r--make/configure.py41
-rw-r--r--pkg/appcast.xml.m434
-rw-r--r--pkg/darwin/module.defs3
-rw-r--r--pkg/darwin/module.rules15
6 files changed, 95 insertions, 16 deletions
diff --git a/macosx/Sparkle.disable.security.patch b/macosx/Sparkle.disable.security.patch
new file mode 100644
index 000000000..7d3d2d038
--- /dev/null
+++ b/macosx/Sparkle.disable.security.patch
@@ -0,0 +1,18 @@
+--- SUBasicUpdateDriver.m.orig 2009-06-18 16:23:17.000000000 -0400
++++ SUBasicUpdateDriver.m 2009-06-18 16:23:53.000000000 -0400
+@@ -158,6 +158,7 @@
+
+ - (void)downloadDidFinish:(NSURLDownload *)d
+ {
++#if 0
+ // New in Sparkle 1.5: we're now checking signatures on all non-secure downloads, where "secure" is defined as both the appcast and the download being transmitted over SSL.
+ NSURL *downloadURL = [[d request] URL];
+ if (![[downloadURL scheme] isEqualToString:@"https"] || ![[appcastURL scheme] isEqualToString:@"https"] || [host publicDSAKey])
+@@ -168,6 +169,7 @@
+ return;
+ }
+ }
++#endif
+
+ [self extractUpdate];
+ }
diff --git a/macosx/Sparkle.framework/Versions/A/Sparkle b/macosx/Sparkle.framework/Versions/A/Sparkle
index 0db0a8f01..3f82bcb16 100755
--- a/macosx/Sparkle.framework/Versions/A/Sparkle
+++ b/macosx/Sparkle.framework/Versions/A/Sparkle
Binary files differ
diff --git a/make/configure.py b/make/configure.py
index 0c4179255..790d29abb 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -654,24 +654,34 @@ class Project( Action ):
self.vpoint = 4
def _action( self ):
- appcastfmt = 'http://handbrake.fr/appcast%s.xml'
+ ## add architecture to URL only for Mac
+ if fnmatch.fnmatch( build.spec, '*-*-darwin*' ):
+ url_arch = '.%s' % (arch.mode.mode)
+ else:
+ url_arch = ''
if repo.type == 'release':
self.version = '%d.%d.%d' % (self.vmajor,self.vminor,self.vpoint)
- self.url_appcast = appcastfmt % ('')
+ url_type = ''
self.build = time.strftime('%Y%m%d') + '00'
self.title = '%s %s (%s)' % (self.name,self.version,self.build)
elif repo.type == 'developer':
self.version = 'svn%d' % (repo.rev)
- self.url_appcast = appcastfmt % ('_unstable')
+ url_type = '_unstable'
self.build = time.strftime('%Y%m%d') + '01'
self.title = '%s svn%d (%s)' % (self.name,repo.rev,self.build)
else:
self.version = 'svn%d' % (repo.rev)
- self.url_appcast = appcastfmt % ('_unofficial')
+ url_type = '_unofficial'
+ self.url_appcast = appcast_fmt % ('_unofficial',appcast_arch)
self.build = time.strftime('%Y%m%d') + '99'
self.title = 'Unofficial svn%d (%s)' % (repo.rev,self.build)
+ #self.url_appbase = 'http://handbrake.fr/appcast%s.xml' % (url_type)
+ #self.url_appcast = 'http://handbrake.fr/appcast%s%s.xml' % (url_type,url_arch)
+ self.url_appbase = 'http://localhost/appcast%s' % (url_type)
+ self.url_appcast = 'http://localhost/appcast%s%s.xml' % (url_type,url_arch)
+
self.msg_end = '%s (%s)' % (self.name,repo.type)
self.fail = False
@@ -1190,17 +1200,18 @@ try:
doc.add( 'CONF.args', ' '.join( args ))
doc.addBlank()
- doc.add( 'HB.title', project.title )
- doc.add( 'HB.name', project.name )
- doc.add( 'HB.name.lower', project.name_lower )
- doc.add( 'HB.name.upper', project.name_upper )
- doc.add( 'HB.acro.lower', project.acro_lower )
- doc.add( 'HB.acro.upper', project.acro_upper )
-
- doc.add( 'HB.url.website', project.url_website )
- doc.add( 'HB.url.community', project.url_community )
- doc.add( 'HB.url.irc', project.url_irc )
- doc.add( 'HB.url.appcast', project.url_appcast )
+ doc.add( 'HB.title', project.title )
+ doc.add( 'HB.name', project.name )
+ doc.add( 'HB.name.lower', project.name_lower )
+ doc.add( 'HB.name.upper', project.name_upper )
+ doc.add( 'HB.acro.lower', project.acro_lower )
+ doc.add( 'HB.acro.upper', project.acro_upper )
+
+ doc.add( 'HB.url.website', project.url_website )
+ doc.add( 'HB.url.community', project.url_community )
+ doc.add( 'HB.url.irc', project.url_irc )
+ doc.add( 'HB.url.appbase', project.url_appbase )
+ doc.add( 'HB.url.appcast', project.url_appcast )
doc.add( 'HB.version.major', project.vmajor )
doc.add( 'HB.version.minor', project.vminor )
diff --git a/pkg/appcast.xml.m4 b/pkg/appcast.xml.m4
new file mode 100644
index 000000000..98634943a
--- /dev/null
+++ b/pkg/appcast.xml.m4
@@ -0,0 +1,34 @@
+dnl
+dnl This file is a template used to generate various appcast.xml files.
+dnl
+changequote(<<, >>)dnl
+include(<<handbrake.m4>>)dnl
+changequote([, ])dnl
+dnl
+dnl
+dnl
+<?xml version="1.0" encoding="utf-8"?>
+<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
+ <channel>
+ <title>__HB_name __BUILD_arch Appcast</title>
+ <link>__HB_url_appcast</link>
+ <description></description>
+ <language>en</language>
+ <pubDate>__BUILD_date</pubDate>
+ <lastBuildDate>__BUILD_date</lastBuildDate>
+ <item>
+ <title>__HB_name __HB_version Released</title>
+ <cli>__HB_build "__HB_version __BUILD_arch"</cli>
+ <sparkle:releaseNotesLink>__HB_url_appbase.html</sparkle:releaseNotesLink>
+ <pubDate>__BUILD_date</pubDate>
+ <description></description>
+ <enclosure
+ sparkle:version="__HB_build"
+ sparkle:shortVersionString="__HB_version __BUILD_arch"
+ url="http://handbrake.fr/rotation.php?file=__APPCAST_dmg"
+ length="__APPCAST_dmg_size"
+ type="application/octet-stream"/>
+ <sparkle:minimumSystemVersion>10.5.0</sparkle:minimumSystemVersion>
+ </item>
+ </channel>
+</rss>
diff --git a/pkg/darwin/module.defs b/pkg/darwin/module.defs
index 33115a2a8..8c88e7dbd 100644
--- a/pkg/darwin/module.defs
+++ b/pkg/darwin/module.defs
@@ -7,7 +7,10 @@ PKG.gui.tmp.dmg = $(PKG.out/)$(HB.name)-$(HB.version)-MacOSX.5_GUI_$(BUILD.machi
STAGE.cli/ = $(BUILD/)stage/cli/
STAGE.gui/ = $(BUILD/)stage/gui/
+PKG.appcast = $(PKG.out/)$(notdir $(HB.url.appcast))
+
###############################################################################
BUILD.out += $(PKG.cli.dmg)
BUILD.out += $(PKG.gui.dmg)
+BUILD.out += $(PKG.appcast)
diff --git a/pkg/darwin/module.rules b/pkg/darwin/module.rules
index 1392f00f7..28abb0520 100644
--- a/pkg/darwin/module.rules
+++ b/pkg/darwin/module.rules
@@ -1,4 +1,13 @@
-pkg.create:: $(PKG.cli.dmg) $(PKG.gui.dmg)
+pkg.create:: $(PKG.appcast) $(PKG.cli.dmg) $(PKG.gui.dmg)
+
+
+$(PKG.appcast): | $(dir $(PKG.appcast))
+$(PKG.appcast): $(BUILD/)project/handbrake.m4
+$(PKG.appcast): $(PKG.in/)appcast.xml.m4
+ $(M4.exe) -I$(BUILD/)project \
+ -D__APPCAST_dmg="$(notdir $(PKG.gui.dmg))" \
+ -D__APPCAST_dmg_size="$(shell stat -f '%z' $(PKG.gui.dmg))" \
+ $(PKG.in/)appcast.xml.m4 > $@
$(PKG.cli.dmg): | $(dir $(PKG.cli.dmg))
$(PKG.cli.dmg): | $(STAGE.cli/)
@@ -10,11 +19,15 @@ $(PKG.cli.dmg): | $(STAGE.cli/)
$(PKG.gui.dmg): | $(dir $(PKG.gui.dmg))
$(PKG.gui.dmg): | $(STAGE.gui/)
+ifeq (1-darwin,$(FEATURE.xcode)-$(BUILD.system))
hdiutil create -srcfolder $(STAGE.gui/) -format UDRO -mode 755 \
-volname $(basename $(notdir $@)) \
-ov $(PKG.gui.tmp.dmg)
hdiutil convert -format UDBZ -o $@ $(PKG.gui.tmp.dmg)
$(RM.exe) $(PKG.gui.tmp.dmg)
+else
+ $(TOUCH.exe) $@
+endif
pkg.cli.clean:
$(RM.exe) -fr $(STAGE.cli/)