diff --git a/Application/AppController.m b/Application/AppController.m index 99734569e..aee89e598 100644 --- a/Application/AppController.m +++ b/Application/AppController.m @@ -395,6 +395,8 @@ increase/decrease as long as the user holds the left/right, plus/minus button */ [userDefaultsValuesDict setObject:[NSNumber numberWithBool:YES] forKey:@"remoteEnabled"]; [userDefaultsValuesDict setObject:[NSNumber numberWithBool:YES] forKey:@"remoteOnlyOnActive"]; + [userDefaultsValuesDict setObject:@"http://cogx.org/appcast/stable.xml" forKey:@"SUFeedURL"]; + //Register and sync defaults [[NSUserDefaults standardUserDefaults] registerDefaults:userDefaultsValuesDict]; [[NSUserDefaults standardUserDefaults] synchronize]; diff --git a/Credits.html b/Credits.html index 22688dc54..dc10f594b 100644 --- a/Credits.html +++ b/Credits.html @@ -1,6 +1,6 @@ -Cog is brought to you by the letter Q and the number 14. +Cog is brought to you by Schadenfreude Inc, makers of Cheese Babies ™ and other fine gourmet snacks.

This program has been made possible through contributions from users like you. diff --git a/Info.plist b/Info.plist index 78f2a259a..72ce070d5 100644 --- a/Info.plist +++ b/Info.plist @@ -1,6 +1,9 @@ - - - + + + + + + CFBundleDevelopmentRegion English @@ -95,7 +98,7 @@ CFBundleSignature ???? CFBundleVersion - 0.06 + BLARG! CFBundleHelpBookFolder Help CFBundleHelpBookName @@ -111,3 +114,5 @@ http://cogosx.sourceforge.net/appcast.xml + + diff --git a/Preferences/General/English.lproj/Preferences.nib/classes.nib b/Preferences/General/English.lproj/Preferences.nib/classes.nib index c3992d461..df89aa4c5 100644 --- a/Preferences/General/English.lproj/Preferences.nib/classes.nib +++ b/Preferences/General/English.lproj/Preferences.nib/classes.nib @@ -1,5 +1,10 @@ { IBClasses = ( + { + CLASS = AppcastArrayController; + LANGUAGE = ObjC; + SUPERCLASS = NSArrayController; + }, { ACTIONS = {openSheet = id; }; CLASS = FileDrawerPane; diff --git a/Preferences/General/English.lproj/Preferences.nib/info.nib b/Preferences/General/English.lproj/Preferences.nib/info.nib index 6d1e88c5c..db84a7fdc 100644 --- a/Preferences/General/English.lproj/Preferences.nib/info.nib +++ b/Preferences/General/English.lproj/Preferences.nib/info.nib @@ -3,7 +3,7 @@ IBDocumentLocation - 36 301 356 534 0 0 1440 878 + 291 101 356 534 0 0 1680 1028 IBEditorPositions 10 @@ -13,7 +13,7 @@ 43 640 652 400 116 0 0 1680 1028 50 - 640 662 400 96 0 0 1680 1028 + 731 409 355 124 0 0 1680 1028 58 634 659 411 101 0 0 1680 1028 85 @@ -23,14 +23,14 @@ 446.1 IBOpenObjects - 10 - 43 - 58 - 11 50 + 11 + 10 + 58 85 + 43 IBSystem Version - 8L2127 + 8P2137 diff --git a/Preferences/General/English.lproj/Preferences.nib/keyedobjects.nib b/Preferences/General/English.lproj/Preferences.nib/keyedobjects.nib index bcd44182d..cc3bcdca5 100644 Binary files a/Preferences/General/English.lproj/Preferences.nib/keyedobjects.nib and b/Preferences/General/English.lproj/Preferences.nib/keyedobjects.nib differ diff --git a/Preferences/General/General.xcodeproj/project.pbxproj b/Preferences/General/General.xcodeproj/project.pbxproj index d3018c76c..d8fcc1917 100644 --- a/Preferences/General/General.xcodeproj/project.pbxproj +++ b/Preferences/General/General.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 170744AD0BFF3938002475C9 /* AppcastArrayController.m in Sources */ = {isa = PBXBuildFile; fileRef = 170744AC0BFF3938002475C9 /* AppcastArrayController.m */; }; 172D72AD0B8926CA00D095BB /* apple_remote.png in Resources */ = {isa = PBXBuildFile; fileRef = 172D72AC0B8926CA00D095BB /* apple_remote.png */; }; 1766C7A80B912A71004A7AE4 /* lastfm.png in Resources */ = {isa = PBXBuildFile; fileRef = 1766C7A70B912A71004A7AE4 /* lastfm.png */; }; 17C643380B8A77CC00C53518 /* OutputsArrayController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17C643360B8A77CC00C53518 /* OutputsArrayController.m */; }; @@ -34,6 +35,8 @@ 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 170744AB0BFF3938002475C9 /* AppcastArrayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppcastArrayController.h; sourceTree = ""; }; + 170744AC0BFF3938002475C9 /* AppcastArrayController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppcastArrayController.m; sourceTree = ""; }; 172D72AC0B8926CA00D095BB /* apple_remote.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = apple_remote.png; path = Icons/apple_remote.png; sourceTree = ""; }; 1766C7A70B912A71004A7AE4 /* lastfm.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = lastfm.png; path = Icons/lastfm.png; sourceTree = ""; }; 17C643360B8A77CC00C53518 /* OutputsArrayController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = OutputsArrayController.m; sourceTree = ""; }; @@ -162,6 +165,8 @@ 17D503410ABDB1660022D1E8 /* Custom */ = { isa = PBXGroup; children = ( + 170744AB0BFF3938002475C9 /* AppcastArrayController.h */, + 170744AC0BFF3938002475C9 /* AppcastArrayController.m */, 8E6C12120AACAE4100819171 /* NDHotKeyControl.h */, 8E6C12130AACAE4100819171 /* NDHotKeyControl.m */, 8E6C12140AACAE4100819171 /* NDHotKeyEvent.h */, @@ -271,6 +276,7 @@ 8E6C13A00AACBAB500819171 /* HotKeyControl.m in Sources */, 17C643380B8A77CC00C53518 /* OutputsArrayController.m in Sources */, 17C6433F0B8A783F00C53518 /* OutputPane.m in Sources */, + 170744AD0BFF3938002475C9 /* AppcastArrayController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Scripts/build_nightly.rb b/Scripts/build_nightly.rb index 2a65c1182..13c93f729 100755 --- a/Scripts/build_nightly.rb +++ b/Scripts/build_nightly.rb @@ -7,10 +7,10 @@ include REXML appcast = open('http://cogx.org/appcast/nightly.xml') -doc = Document.new(appcast) +appcastdoc = Document.new(appcast) #Get the latest revision from the appcast -appcast_revision = Regexp.new('\d+$').match(doc.elements['//channel/item/title'].text.to_s()).to_s().to_i() || 0 +appcast_revision = Regexp.new('\d+$').match(appcastdoc.elements['//channel/item/title'].text.to_s()).to_s().to_i() || 0 #Update to the latest revision latest_revision = %x[svn update | tail -n 1].gsub(/[^\d]+/, '').to_i() @@ -22,6 +22,18 @@ if appcast_revision < latest_revision #Remove the previous build directories %x[find . -type d -name build -print0 | xargs -0 rm -r ] + #Update the version in the plist + plist = open('info.plist') + plistdoc = Document.new(plist) + plist.close() + + version_element = plistdoc.elements["//[. = 'CFBundleVersion']/following-sibling::string"]; + version_element.text = "r#{latest_version}" + + newplist = open('info.plist', 'w') + plistdoc.write(newplist, 2) + newplist.close() + #Build Cog! %x[./Scripts/build_cog.sh].each_line do |line| if line.match(/\*\* BUILD FAILED \*\*/) @@ -32,37 +44,39 @@ if appcast_revision < latest_revision filename = "Cog-r#{latest_revision}.tbz2" #Zip the app! - %x[tar cjf build/Release/#{filename} build/Release/Cog.app] + %x[rm -f build/Release/nightly.tar.bz2] + %x[tar -C build/Release -cjf build/Release/nightly.tar.bz2 Cog.app] - filesize = File.size("build/Release/#{filename}") + filesize = File.size("build/Release/nightly.tar.bz2") #Send the new build to the server - %x[scp build/Release/#{filename} cogx@cogx.org:~/cogx.org/nightly_builds/] + %x[scp build/Release/nightly.tar.bz2 cogx@cogx.org:~/cogx.org/nightly_builds/#{filename}] - #Add new entry to appcast - new_item = Element.new('item') - - new_item.add_element('title') - new_item.elements['title'].text = "Cog r#{latest_revision}" - - new_item.add_element('description') - new_item.elements['description'].text = changelog + #Add new entry to appcast + new_item = Element.new('item') + + new_item.add_element('title') + new_item.elements['title'].text = "Cog r#{latest_revision}" + + new_item.add_element('description') + new_item.elements['description'].text = changelog - new_item.add_element('pubDate') - new_item.elements['pubDate'].text = Time.now().strftime("%a, %d %b %Y %H:%M:%S %Z") #RFC 822 - - new_item.add_element('enclosure') - new_item.elements['enclosure'].add_attribute('url', "http://cogx.org/nightly_builds/#{filename}") - new_item.elements['enclosure'].add_attribute('length', filesize) - new_item.elements['enclosure'].add_attribute('type', 'application/octet-stream') - - doc.insert_before('//channel/item', new_item) - - #Limit number of entries to 5 - doc.delete_element('//channel/item[position()>5]') - - new_xml = Tempfile.new('appcast.xml') - new_xml << doc.to_s() + new_item.add_element('pubDate') + new_item.elements['pubDate'].text = Time.now().strftime("%a, %d %b %Y %H:%M:%S %Z") #RFC 822 + + new_item.add_element('enclosure') + new_item.elements['enclosure'].add_attribute('url', "http://cogx.org/nightly_builds/#{filename}") + new_item.elements['enclosure'].add_attribute('length', filesize) + new_item.elements['enclosure'].add_attribute('type', 'application/octet-stream') + new_item.elements['enclosure'].add_attribute('version', "r#{latest_revision}") + + appcastdoc.insert_before('//channel/item', new_item) + + #Limit number of entries to 5 + appcastdoc.delete_element('//channel/item[position()>5]') + + new_xml = Tempfile.new('appcast.xml') + appcastdoc.write(new_xml, 2) new_xml.close() appcast.close() diff --git a/TODO b/TODO index efad61459..8432192da 100644 --- a/TODO +++ b/TODO @@ -5,3 +5,7 @@ Bug fixes: Windows M3U paths: http://sbooth.org/forums/viewtopic.php?t=1209 ? Playlist display: http://sbooth.org/forums/viewtopic.php?t=1050 +Nightlies: + Fix path inside nightly builds. + Make preference for update channels. Stable, Unstable, and Nightly. + Get sparkle working with nightlies!