Ticket #9286: ScummVM_Sparkle.patch
File ScummVM_Sparkle.patch, 10.7 KB (added by , 13 years ago) |
---|
-
base/main.cpp
diff -rupN scummvm-1.2.1-orig/base/main.cpp scummvm-1.2.1-source/base/main.cpp
old new 52 52 #include "gui/GuiManager.h" 53 53 #include "gui/message.h" 54 54 #include "gui/error.h" 55 #if defined(USE_SPARKLE) 56 #include "gui/sparkle_osx.h" 57 #endif 55 58 56 59 #include "sound/audiocd.h" 57 60 #include "sound/mididrv.h" … … extern "C" int scummvm_main(int argc, co 377 380 // Now as the event manager is created, setup the keymapper 378 381 setupKeymapper(system); 379 382 383 // Setup the "Check for Updates..." menu on Mac-OSX when built with Sparkle support 384 #if defined(USE_SPARKLE) 385 GUI::SparkleMenu sparkleMenu; 386 sparkleMenu.addUpdateMenuItem(); 387 #endif 388 380 389 // Unless a game was specified, show the launcher dialog 381 390 if (0 == ConfMan.getActiveDomain()) 382 391 launcherDialog(); -
scummvm-1.2.
diff -rupN scummvm-1.2.1-orig/configure scummvm-1.2.1-source/configure
old new _mad=auto 123 123 _alsa=auto 124 124 _seq_midi=auto 125 125 _zlib=auto 126 _sparkle=auto 126 127 _mpeg2=no 127 128 _fluidsynth=auto 128 129 _16bit=auto … … Optional Libraries: 730 731 installed (optional) 731 732 --disable-fluidsynth disable fluidsynth MIDI driver [autodetect] 732 733 734 --with-sparkle-prefix=DIR Prefix where sparkle is installed (MacOSX only - optional) 735 --disable-sparkle disable sparkle automatic update support [MacOSX only - autodetect] 736 733 737 --with-sdl-prefix=DIR Prefix where the sdl-config script is 734 738 installed (optional) 735 739 … … for ac_option in $@; do 773 777 --disable-mad) _mad=no ;; 774 778 --enable-zlib) _zlib=yes ;; 775 779 --disable-zlib) _zlib=no ;; 780 --enable-sparkle) _sparkle=yes ;; 781 --disable-sparkle) _sparkle=no ;; 776 782 --enable-nasm) _nasm=yes ;; 777 783 --disable-nasm) _nasm=no ;; 778 784 --enable-mpeg2) _mpeg2=yes ;; … … for ac_option in $@; do 839 845 ZLIB_CFLAGS="-I$arg/include" 840 846 ZLIB_LIBS="-L$arg/lib" 841 847 ;; 848 --with-sparkle-prefix=*) 849 arg=`echo $ac_option | cut -d '=' -f 2` 850 SPARKLE_CFLAGS="-F$arg" 851 SPARKLE_LIBS="-framework Sparkle -F$arg" 852 ;; 842 853 --with-readline-prefix=*) 843 854 arg=`echo $ac_option | cut -d '=' -f 2` 844 855 READLINE_CFLAGS="-I$arg/include" … … define_in_config_if_yes "$_zlib" 'USE_ZL 2362 2374 echo "$_zlib" 2363 2375 2364 2376 # 2377 # Check for Sparkle 2378 # 2379 echocheck "Sparkle" 2380 if test "$_sparkle" = auto ; then 2381 _sparkle=no 2382 cat > $TMPC << EOF 2383 #include <Cocoa/Cocoa.h> 2384 #include <Sparkle/Sparkle.h> 2385 int main(void) { SUUpdater *updater = [SUUpdater sharedUpdater]; return 0; } 2386 EOF 2387 cc_check $SPARKLE_CFLAGS $SPARKLE_LIBS -ObjC++ -lobjc && _sparkle=yes 2388 fi 2389 if test "$_sparkle" = yes ; then 2390 LIBS="$LIBS $SPARKLE_LIBS" 2391 INCLUDES="$INCLUDES $SPARKLE_CFLAGS" 2392 fi 2393 define_in_config_if_yes "$_sparkle" 'USE_SPARKLE' 2394 echo "$_sparkle" 2395 2396 # 2365 2397 # Check for LibMPEG2 2366 2398 # 2367 2399 echocheck "libmpeg2 >= 0.3.2" -
dists/macosx/Info.plist
diff -rupN scummvm-1.2.1-orig/dists/macosx/Info.plist scummvm-1.2.1-source/dists/macosx/Info.plist
old new 28 28 <string>NSApplication</string> 29 29 <key>NSHumanReadableCopyright</key> 30 30 <string>Copyright 2001-2010 The ScummVM team</string> 31 <key>SUFeedURL</key> 32 <string>http://scummvm.org/scummvm_appcast.xml</string> 33 <key>SUPublicDSAKeyFile</key> 34 <string>dsa_pub.pem</string> 31 35 </dict> 32 36 </plist> -
dists/macosx/Info.plist.in
diff -rupN scummvm-1.2.1-orig/dists/macosx/Info.plist.in scummvm-1.2.1-source/dists/macosx/Info.plist.in
old new 28 28 <string>NSApplication</string> 29 29 <key>NSHumanReadableCopyright</key> 30 30 <string>Copyright 2001-2010 The ScummVM team</string> 31 <key>SUFeedURL</key> 32 <string>http://scummvm.org/scummvm_appcast.xml</string> 33 <key>SUPublicDSAKeyFile</key> 34 <string>dsa_pub.pem</string> 31 35 </dict> 32 36 </plist> -
dists/macosx/scummvm_appcast.xml
diff -rupN scummvm-1.2.1-orig/dists/macosx/scummvm_appcast.xml scummvm-1.2.1-source/dists/macosx/scummvm_appcast.xml
old new 1 <?xml version="1.0" encoding="utf-8"?> 2 <rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/"> 3 <channel> 4 <title>ScummVM Changelog</title> 5 <link>http://scummvm.org/scummvm_appcast.xml</link> 6 <description>Most recent changes with links to updates.</description> 7 <language>en</language> 8 <item> 9 <title>Version 1.2.1 (3 bugs fixed; 2 new features)</title> 10 <sparkle:releaseNotesLink> 11 http://sourceforge.net/projects/scummvm/files/scummvm/1.2.1/ReleaseNotes/view 12 </sparkle:releaseNotesLink> 13 <pubDate>Sun, 19 Dec 2010 12:20:11 +0000</pubDate> 14 <enclosure url="http://scummvm.org/ScummVM 1.2.1-Test.zip" sparkle:version="1.2.1" length="1472893" type="application/octet-stream" sparkle:dsaSignature="234818feCa1JyW30nbkBwainOzrN6EQuAh" /> 15 </item> 16 <item> 17 <title>Version 1.2.0</title> 18 <sparkle:releaseNotesLink> 19 http://sourceforge.net/projects/scummvm/files/scummvm/1.2.0/ReleaseNotes/view 20 </sparkle:releaseNotesLink> 21 <pubDate>Fri, 15 Oct 2010 12:20:11 +0000</pubDate> 22 <enclosure url="http://scummvm.org/ScummVM 1.2.0-Test.zip" sparkle:version="1.2.0" length="1472893" type="application/octet-stream" sparkle:dsaSignature="234818feCa1JyW30nbkBwainOzrN6EQuAh" /> 23 </item> 24 </channel> 25 </rss> 26 No newline at end of file -
gui/module.mk
diff -rupN scummvm-1.2.1-orig/gui/module.mk scummvm-1.2.1-source/gui/module.mk
old new MODULE_OBJS += \ 36 36 browser.o 37 37 endif 38 38 39 ifdef USE_SPARKLE 40 MODULE_OBJS += \ 41 sparkle_osx.o 42 endif 43 44 39 45 # Include common rules 40 46 include $(srcdir)/rules.mk -
gui/sparkle_osx.h
diff -rupN scummvm-1.2.1-orig/gui/sparkle_osx.h scummvm-1.2.1-source/gui/sparkle_osx.h
old new 1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * $URL$ 22 * $Id$ 23 * 24 */ 25 26 #ifndef SPARKLE_OSX_H 27 #define SPARKLE_OSX_H 28 29 namespace GUI { 30 31 class SparkleMenu { 32 public: 33 SparkleMenu(void); 34 virtual ~SparkleMenu(); 35 virtual void addUpdateMenuItem(); 36 }; 37 38 } // End of namespace GUI 39 40 #endif -
gui/sparkle_osx.mm
diff -rupN scummvm-1.2.1-orig/gui/sparkle_osx.mm scummvm-1.2.1-source/gui/sparkle_osx.mm
old new 1 /* ScummVM - Graphic Adventure Engine 2 * 3 * ScummVM is the legal property of its developers, whose names 4 * are too numerous to list here. Please refer to the COPYRIGHT 5 * file distributed with this source distribution. 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * $URL$ 22 * $Id$ 23 * 24 */ 25 26 #include "gui/sparkle_osx.h" 27 28 #include <Cocoa/Cocoa.h> 29 #include <Sparkle/Sparkle.h> 30 31 namespace GUI { 32 33 SparkleMenu::SparkleMenu(void) {} 34 SparkleMenu::~SparkleMenu() {} 35 36 void SparkleMenu::addUpdateMenuItem() { 37 NSMenuItem *menuItem = [[NSApp mainMenu] itemAtIndex:0]; 38 NSMenu *applicationMenu = [menuItem submenu]; 39 40 /* Add "Check for Updates..." menu item */ 41 SUUpdater *updater = [SUUpdater sharedUpdater]; 42 NSMenuItem *updateMenuItem = [applicationMenu insertItemWithTitle:@"Check for Updates..." action:@selector(checkForUpdates:) keyEquivalent:@"" atIndex:1]; 43 [updateMenuItem setTarget:updater]; 44 [updater checkForUpdatesInBackground]; 45 } 46 47 } // End of namespace GUI -
scummvm-1.2.
diff -rupN scummvm-1.2.1-orig/ports.mk scummvm-1.2.1-source/ports.mk
old new bundle: scummvm-static 41 41 mkdir -p $(bundle_name)/Contents/Resources 42 42 echo "APPL????" > $(bundle_name)/Contents/PkgInfo 43 43 cp $(srcdir)/dists/macosx/Info.plist $(bundle_name)/Contents/ 44 ifdef USE_SPARKLE 45 mkdir -p $(bundle_name)/Contents/Frameworks 46 cp $(srcdir)/dists/macosx/dsa_pub.pem $(bundle_name)/Contents/Resources/ 47 cp -R $(STATICLIBPATH)/Sparkle.framework $(bundle_name)/Contents/Frameworks/ 48 endif 44 49 cp $(srcdir)/icons/scummvm.icns $(bundle_name)/Contents/Resources/ 45 50 cp $(DIST_FILES_DOCS) $(bundle_name)/ 46 51 cp $(DIST_FILES_THEMES) $(bundle_name)/Contents/Resources/ … … ifdef USE_ZLIB 101 106 OSX_ZLIB ?= -lz 102 107 endif 103 108 109 ifdef USE_SPARKLE 110 OSX_STATIC_LIBS += -framework Sparkle -F$(STATICLIBPATH) 111 endif 112 104 113 ifdef USE_TERMCONV 105 114 OSX_ICONV ?= -liconv 106 115 endif