diff options
author | Oystein Eftevaag | 2011-08-02 16:09:58 -0700 |
---|---|---|
committer | Oystein Eftevaag | 2011-08-02 16:09:58 -0700 |
commit | 9044e17499797ef007c9c8240d79f69382f61765 (patch) | |
tree | b686c9fc28f0d2eae4c0db3ff98687f43556066a | |
parent | 8f70ee9afc877b22123269669d155e710a467c4b (diff) | |
parent | efd9dff55662e1c0c4c794ed8f0143a87cc5fa0d (diff) | |
download | scummvm-rg350-9044e17499797ef007c9c8240d79f69382f61765.tar.gz scummvm-rg350-9044e17499797ef007c9c8240d79f69382f61765.tar.bz2 scummvm-rg350-9044e17499797ef007c9c8240d79f69382f61765.zip |
Merge pull request #52 from CeRiAl/macosx-sparkle
MACOSX: Add Sparkle support
-rw-r--r-- | backends/module.mk | 6 | ||||
-rw-r--r-- | backends/platform/sdl/macosx/macosx.cpp | 6 | ||||
-rw-r--r-- | backends/updates/macosx/macosx-updates.h | 46 | ||||
-rw-r--r-- | backends/updates/macosx/macosx-updates.mm | 129 | ||||
-rw-r--r-- | backends/updates/sparkle-updates.cpp | 45 | ||||
-rw-r--r-- | backends/updates/sparkle-updates.h | 48 | ||||
-rw-r--r-- | common/system.cpp | 9 | ||||
-rw-r--r-- | common/system.h | 24 | ||||
-rw-r--r-- | common/updates.h | 102 | ||||
-rwxr-xr-x | configure | 54 | ||||
-rw-r--r-- | dists/macosx/Info.plist | 4 | ||||
-rw-r--r-- | dists/macosx/Info.plist.in | 4 | ||||
-rwxr-xr-x | dists/macosx/scummvm_osx_appcast.xml | 25 | ||||
-rw-r--r-- | po/POTFILES | 1 | ||||
-rw-r--r-- | ports.mk | 9 |
15 files changed, 510 insertions, 2 deletions
diff --git a/backends/module.mk b/backends/module.mk index 63774cc4d0..d8b423a67a 100644 --- a/backends/module.mk +++ b/backends/module.mk @@ -15,7 +15,8 @@ MODULE_OBJS := \ midi/timidity.o \ saves/savefile.o \ saves/default/default-saves.o \ - timer/default/default-timer.o + timer/default/default-timer.o \ + updates/sparkle-updates.o ifdef USE_ELF_LOADER @@ -87,7 +88,8 @@ endif ifdef MACOSX MODULE_OBJS += \ midi/coreaudio.o \ - midi/coremidi.o + midi/coremidi.o \ + updates/macosx/macosx-updates.o endif ifdef WIN32 diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp index ddfc99570a..39fd4237ec 100644 --- a/backends/platform/sdl/macosx/macosx.cpp +++ b/backends/platform/sdl/macosx/macosx.cpp @@ -30,6 +30,7 @@ #include "backends/platform/sdl/macosx/macosx.h" #include "backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h" #include "backends/platform/sdl/macosx/appmenu_osx.h" +#include "backends/updates/macosx/macosx-updates.h" #include "common/archive.h" #include "common/config-manager.h" @@ -63,6 +64,11 @@ void OSystem_MacOSX::initBackend() { // Replace the SDL generated menu items with our own translated ones on Mac OS X replaceApplicationMenuItems(); +#if defined(USE_SPARKLE) + // Initialize updates manager + _updateManager = new MacOSXUpdateManager(); +#endif + // Invoke parent implementation of this method OSystem_POSIX::initBackend(); } diff --git a/backends/updates/macosx/macosx-updates.h b/backends/updates/macosx/macosx-updates.h new file mode 100644 index 0000000000..1fe0e4bb75 --- /dev/null +++ b/backends/updates/macosx/macosx-updates.h @@ -0,0 +1,46 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef BACKENDS_UPDATES_MACOSX_H +#define BACKENDS_UPDATES_MACOSX_H + +#include "backends/updates/sparkle-updates.h" + +#if defined(MACOSX) && defined(USE_SPARKLE) + +class MacOSXUpdateManager : public SparkleUpdateManager { +public: + MacOSXUpdateManager(); + virtual ~MacOSXUpdateManager(); + + virtual void checkForUpdates(); + + virtual void setAutomaticallyChecksForUpdates(UpdateState state); + virtual UpdateState getAutomaticallyChecksForUpdates(); + + virtual void setUpdateCheckInterval(UpdateInterval interval); + virtual UpdateInterval getUpdateCheckInterval(); +}; + +#endif + +#endif // BACKENDS_UPDATES_MACOSX_H diff --git a/backends/updates/macosx/macosx-updates.mm b/backends/updates/macosx/macosx-updates.mm new file mode 100644 index 0000000000..f3675f9bd2 --- /dev/null +++ b/backends/updates/macosx/macosx-updates.mm @@ -0,0 +1,129 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + +#include "backends/updates/sparkle-updates.h" + +#if defined(MACOSX) && defined(USE_SPARKLE) + +#include "backends/updates/macosx/macosx-updates.h" +#include "common/translation.h" + +#include <Cocoa/Cocoa.h> +#include <Sparkle/Sparkle.h> + +SUUpdater *sparkleUpdater; + +/** + * Sparkle is a software update framework for Mac OS X which uses appcasts for + * release information. Appcasts are RSS-like XML feeds which contain information + * about the most current version at the time. If a new version is available, the + * user is presented the release-notes/changes/fixes and is asked if he wants to + * update, and if yes the Sparkle framework downloads a signed update package + * from the server and automatically installs and restarts the software. + * More detailed information is available at the following address: + * http://sparkle.andymatuschak.org/ + * + */ +MacOSXUpdateManager::MacOSXUpdateManager() { + NSMenuItem *menuItem = [[NSApp mainMenu] itemAtIndex:0]; + NSMenu *applicationMenu = [menuItem submenu]; + + // Init Sparkle + sparkleUpdater = [SUUpdater sharedUpdater]; + + // Set appcast URL + [sparkleUpdater setFeedURL:[NSURL URLWithString:[NSString stringWithCString:getAppcastUrl().c_str()]]]; + + // Get current encoding + NSStringEncoding stringEncoding = CFStringConvertEncodingToNSStringEncoding(CFStringConvertIANACharSetNameToEncoding((CFStringRef)[NSString stringWithCString:(TransMan.getCurrentCharset()).c_str() encoding:NSASCIIStringEncoding])); + + // Add "Check for Updates..." menu item + NSMenuItem *updateMenuItem = [applicationMenu insertItemWithTitle:[NSString stringWithCString:_("Check for Updates...") encoding:stringEncoding] action:@selector(checkForUpdates:) keyEquivalent:@"" atIndex:1]; + + // Set the target of the new menu item + [updateMenuItem setTarget:sparkleUpdater]; + + // Finally give up our references to the objects + [menuItem release]; + + // Enable automatic update checking once a day (alternatively use + // checkForUpdates() here to check for updates on every startup) + // TODO: Should be removed when an update settings gui is implemented + setAutomaticallyChecksForUpdates(kUpdateStateEnabled); + setUpdateCheckInterval(kUpdateIntervalOneDay); +} + +MacOSXUpdateManager::~MacOSXUpdateManager() { + [sparkleUpdater release]; +} + +void MacOSXUpdateManager::checkForUpdates() { + [sparkleUpdater checkForUpdatesInBackground]; +} + +void MacOSXUpdateManager::setAutomaticallyChecksForUpdates(UpdateManager::UpdateState state) { + if (state == kUpdateStateNotSupported) + return; + + [sparkleUpdater setAutomaticallyChecksForUpdates:(state == kUpdateStateEnabled ? YES : NO)]; +} + +Common::UpdateManager::UpdateState MacOSXUpdateManager::getAutomaticallyChecksForUpdates() { + if ([sparkleUpdater automaticallyChecksForUpdates]) + return kUpdateStateEnabled; + else + return kUpdateStateDisabled; +} + +void MacOSXUpdateManager::setUpdateCheckInterval(UpdateInterval interval) { + if (interval == kUpdateIntervalNotSupported) + return; + + [sparkleUpdater setUpdateCheckInterval:(NSTimeInterval)interval]; +} + +Common::UpdateManager::UpdateInterval MacOSXUpdateManager::getUpdateCheckInterval() { + // This is kind of a hack but necessary, as the value stored by Sparkle + // might have been changed outside of ScummVM (in which case we return the + // default interval of one day) + switch ((UpdateInterval)[sparkleUpdater updateCheckInterval]) { + default: + break; + + case kUpdateIntervalOneDay: + return kUpdateIntervalOneDay; + + case kUpdateIntervalOneWeek: + return kUpdateIntervalOneWeek; + + case kUpdateIntervalOneMonth: + return kUpdateIntervalOneMonth; + } + + // Return the default value (one day) + return kUpdateIntervalOneDay; +} + +#endif diff --git a/backends/updates/sparkle-updates.cpp b/backends/updates/sparkle-updates.cpp new file mode 100644 index 0000000000..f146237a98 --- /dev/null +++ b/backends/updates/sparkle-updates.cpp @@ -0,0 +1,45 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#include "backends/updates/sparkle-updates.h" + +#if defined(USE_SPARKLE) + +// TODO replace by proper URL +#if defined(MACOSX) + #define APPCAST_BASE_URL "http://www.scummvm.org/appcasts/macosx/" +#elif defined(WIN32) + #define APPCAST_BASE_URL "http://www.scummvm.org/appcasts/win32/" +#else + #error "Please define APPCAST_BASE_URL for your platform!" +#endif + + +Common::String SparkleUpdateManager::getAppcastUrl() { +#ifdef RELEASE_BUILD + return APPCAST_BASE_URL "release.xml"; +#else + return APPCAST_BASE_URL "beta.xml"; +#endif +} + +#endif diff --git a/backends/updates/sparkle-updates.h b/backends/updates/sparkle-updates.h new file mode 100644 index 0000000000..26f170db2e --- /dev/null +++ b/backends/updates/sparkle-updates.h @@ -0,0 +1,48 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef BACKENDS_UPDATES_SPARKLE_UPDATE_H +#define BACKENDS_UPDATES_SPARKLE_UPDATE_H + +#include "common/scummsys.h" +#include "common/str.h" +#include "common/updates.h" + +#if defined(USE_SPARKLE) + +class SparkleUpdateManager : public Common::UpdateManager { +public: + /** + * Gets the appcast url. + * + * Beta/RC versions and releases might have a different appcast url. + * This function takes care of checking which version of ScummVM is running + * and return the url to the proper appcast. + * + * @return the appcast url. + */ + Common::String getAppcastUrl(); +}; + +#endif + +#endif // BACKENDS_UPDATES_SPARKLE_UPDATE_H diff --git a/common/system.cpp b/common/system.cpp index 8d5bfd39cd..59210544ab 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -28,6 +28,7 @@ #include "common/savefile.h" #include "common/str.h" #include "common/taskbar.h" +#include "common/updates.h" #include "common/textconsole.h" #include "backends/audiocd/default/default-audiocd.h" @@ -44,6 +45,9 @@ OSystem::OSystem() { #if defined(USE_TASKBAR) _taskbarManager = 0; #endif +#if defined(USE_UPDATES) + _updateManager = 0; +#endif _fsFactory = 0; } @@ -62,6 +66,11 @@ OSystem::~OSystem() { _taskbarManager = 0; #endif +#if defined(USE_UPDATES) + delete _updateManager; + _updateManager = 0; +#endif + delete _savefileManager; _savefileManager = 0; diff --git a/common/system.h b/common/system.h index 9b833c5b1a..600778d8e1 100644 --- a/common/system.h +++ b/common/system.h @@ -45,6 +45,9 @@ class String; #if defined(USE_TASKBAR) class TaskbarManager; #endif +#if defined(USE_UPDATES) +class UpdateManager; +#endif class TimerManager; class SeekableReadStream; class WriteStream; @@ -161,6 +164,15 @@ protected: Common::TaskbarManager *_taskbarManager; #endif +#if defined(USE_UPDATES) + /** + * No default value is provided for _updateManager by OSystem. + * + * @note _updateManager is deleted by the OSystem destructor. + */ + Common::UpdateManager *_updateManager; +#endif + /** * No default value is provided for _fsFactory by OSystem. * @@ -1071,6 +1083,18 @@ public: } #endif +#if defined(USE_UPDATES) + /** + * Returns the UpdateManager, used to handle auto-updating, + * and updating of ScummVM in general. + * + * @return the UpdateManager for the current architecture + */ + virtual Common::UpdateManager *getUpdateManager() { + return _updateManager; + } +#endif + /** * Returns the FilesystemFactory object, depending on the current architecture. * diff --git a/common/updates.h b/common/updates.h new file mode 100644 index 0000000000..1e0babdf6d --- /dev/null +++ b/common/updates.h @@ -0,0 +1,102 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef BACKENDS_UPDATES_ABSTRACT_H +#define BACKENDS_UPDATES_ABSTRACT_H + +#if defined(USE_UPDATES) + +namespace Common { + +/** + * The UpdateManager allows configuring of the automatic update checking + * for systems that support it: + * - using Sparkle on MacOSX + * - using WinSparkle on Windows + * + * Most of the update checking is completely automated and this class only + * gives access to basic settings. It is mostly used by the GUI to set + * widgets state on the update page and for manually checking for updates + * + */ +class UpdateManager { +public: + enum UpdateState { + kUpdateStateDisabled = 0, + kUpdateStateEnabled = 1, + kUpdateStateNotSupported = 2 + }; + + enum UpdateInterval { + kUpdateIntervalNotSupported = 0, + kUpdateIntervalOneDay = 86400, + kUpdateIntervalOneWeek = 604800, + kUpdateIntervalOneMonth = 2628000 // average seconds per month (60*60*24*365)/12 + }; + + UpdateManager() {} + virtual ~UpdateManager() {} + + /** + * Checks manually if an update is available, showing progress UI to the user. + * + * By default, update checks are done silently on start. + * This allows to manually start an update check. + */ + virtual void checkForUpdates() {} + + /** + * Sets the automatic update checking state + * + * @param state The state. + */ + virtual void setAutomaticallyChecksForUpdates(UpdateState state) {} + + /** + * Gets the automatic update checking state + * + * @return kUpdateStateDisabled if automatic update checking is disabled, + * kUpdateStateEnabled if automatic update checking is enabled, + * kUpdateStateNotSupported if automatic update checking is not available + */ + virtual UpdateState getAutomaticallyChecksForUpdates() { return kUpdateStateNotSupported; } + + /** + * Sets the update checking interval. + * + * @param interval The interval. + */ + virtual void setUpdateCheckInterval(UpdateInterval interval) {} + + /** + * Gets the update check interval. + * + * @return the update check interval. + */ + virtual UpdateInterval getUpdateCheckInterval() { return kUpdateIntervalNotSupported; } +}; + +} // End of namespace Common + +#endif + +#endif // BACKENDS_UPDATES_ABSTRACT_H @@ -135,6 +135,7 @@ _alsa=auto _seq_midi=auto _timidity=auto _zlib=auto +_sparkle=auto _png=auto _theoradec=auto _faad=auto @@ -143,6 +144,7 @@ _opengl=auto _opengles=auto _readline=auto _taskbar=yes +_updates=yes _libunity=auto # Default option behaviour yes/no _debug_build=auto @@ -773,6 +775,7 @@ Optional Features: --disable-hq-scalers exclude HQ2x and HQ3x scalers --disable-translation don't build support for translated messages --disable-taskbar don't build support for taskbar and launcher integration + --disable-updates don't build support for updates --enable-text-console use text console instead of graphical console --enable-verbose-build enable regular echoing of commands during build process @@ -814,6 +817,9 @@ Optional Libraries: installed (optional) --disable-fluidsynth disable fluidsynth MIDI driver [autodetect] + --with-sparkle-prefix=DIR Prefix where sparkle is installed (MacOSX only - optional) + --disable-sparkle disable sparkle automatic update support [MacOSX only - autodetect] + --with-sdl-prefix=DIR Prefix where the sdl-config script is installed (optional) @@ -862,6 +868,8 @@ for ac_option in $@; do --disable-mad) _mad=no ;; --enable-zlib) _zlib=yes ;; --disable-zlib) _zlib=no ;; + --enable-sparkle) _sparkle=yes ;; + --disable-sparkle) _sparkle=no ;; --enable-nasm) _nasm=yes ;; --disable-nasm) _nasm=no ;; --disable-png) _png=no ;; @@ -875,6 +883,8 @@ for ac_option in $@; do --disable-readline) _readline=no ;; --enable-taskbar) _taskbar=yes ;; --disable-taskbar) _taskbar=no ;; + --enable-updates) _updates=yes ;; + --disable-updates) _updates=no ;; --enable-libunity) _libunity=yes ;; --disable-libunity) _libunity=no ;; --enable-opengl) _opengl=yes ;; @@ -949,6 +959,11 @@ for ac_option in $@; do ZLIB_CFLAGS="-I$arg/include" ZLIB_LIBS="-L$arg/lib" ;; + --with-sparkle-prefix=*) + arg=`echo $ac_option | cut -d '=' -f 2` + SPARKLE_CFLAGS="-F$arg" + SPARKLE_LIBS="-F$arg" + ;; --with-readline-prefix=*) arg=`echo $ac_option | cut -d '=' -f 2` READLINE_CFLAGS="-I$arg/include" @@ -2972,6 +2987,30 @@ if test `get_engine_build sword25` = yes && test ! "$_zlib" = yes ; then fi # +# Check for Sparkle if updates support is enabled +# +echocheck "Sparkle" +if test "$_updates" = no; then + _sparkle=no +else +if test "$_sparkle" = auto ; then + _sparkle=no + cat > $TMPC << EOF +#include <Cocoa/Cocoa.h> +#include <Sparkle/Sparkle.h> +int main(void) { SUUpdater *updater = [SUUpdater sharedUpdater]; return 0; } +EOF + cc_check $SPARKLE_CFLAGS $SPARKLE_LIBS -framework Sparkle -ObjC++ -lobjc && _sparkle=yes +fi +if test "$_sparkle" = yes ; then + LIBS="$LIBS $SPARKLE_LIBS -framework Sparkle" + INCLUDES="$INCLUDES $SPARKLE_CFLAGS" +fi +define_in_config_if_yes "$_sparkle" 'USE_SPARKLE' +fi +echo "$_sparkle" + +# # Check for libfluidsynth # echocheck "libfluidsynth" @@ -3278,6 +3317,21 @@ define_in_config_if_yes $_bink 'USE_BINK' echo "$_bink" # +# Check whether to build updates support +# +echo_n "Building updates support... " +define_in_config_if_yes $_updates 'USE_UPDATES' +if test "$_updates" = yes; then + if test "$_sparkle" = yes; then + echo "Sparkle" + else + echo "$_updates" + fi +else + echo "$_updates" +fi + +# # Figure out installation directories # test "x$prefix" = xNONE && prefix=/usr/local diff --git a/dists/macosx/Info.plist b/dists/macosx/Info.plist index 20081ccc80..2e9067516c 100644 --- a/dists/macosx/Info.plist +++ b/dists/macosx/Info.plist @@ -28,5 +28,9 @@ <string>NSApplication</string> <key>NSHumanReadableCopyright</key> <string>Copyright 2001-2011 The ScummVM team</string> + <key>SUFeedURL</key> + <string>http://www.scummvm.org/appcasts/macosx/release.xml</string> + <key>SUPublicDSAKeyFile</key> + <string>dsa_pub.pem</string> </dict> </plist> diff --git a/dists/macosx/Info.plist.in b/dists/macosx/Info.plist.in index 3ba5a080f0..4a01690d73 100644 --- a/dists/macosx/Info.plist.in +++ b/dists/macosx/Info.plist.in @@ -28,5 +28,9 @@ <string>NSApplication</string> <key>NSHumanReadableCopyright</key> <string>Copyright 2001-2011 The ScummVM team</string> + <key>SUFeedURL</key> + <string>http://www.scummvm.org/appcasts/macosx/release.xml</string> + <key>SUPublicDSAKeyFile</key> + <string>dsa_pub.pem</string> </dict> </plist> diff --git a/dists/macosx/scummvm_osx_appcast.xml b/dists/macosx/scummvm_osx_appcast.xml new file mode 100755 index 0000000000..455b062b6b --- /dev/null +++ b/dists/macosx/scummvm_osx_appcast.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <channel> + <title>ScummVM Changelog</title> + <link>http://scummvm.org/scummvm_appcast.xml</link> + <description>Most recent changes with links to updates.</description> + <language>en</language> + <item> + <title>Version 1.2.1 (3 bugs fixed; 2 new features)</title> + <sparkle:releaseNotesLink> + http://sourceforge.net/projects/scummvm/files/scummvm/1.2.1/ReleaseNotes/view + </sparkle:releaseNotesLink> + <pubDate>Sun, 19 Dec 2010 12:20:11 +0000</pubDate> + <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" /> + </item> + <item> + <title>Version 1.2.0</title> + <sparkle:releaseNotesLink> + http://sourceforge.net/projects/scummvm/files/scummvm/1.2.0/ReleaseNotes/view + </sparkle:releaseNotesLink> + <pubDate>Fri, 15 Oct 2010 12:20:11 +0000</pubDate> + <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" /> + </item> + </channel> +</rss> diff --git a/po/POTFILES b/po/POTFILES index 26bbf52d8f..b556817015 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -78,3 +78,4 @@ backends/platform/wince/wince-sdl.cpp backends/events/default/default-events.cpp backends/events/gph/gph-events.cpp backends/events/openpandora/op-events.cpp +backends/updates/macosx/macosx-updates.mm @@ -39,6 +39,11 @@ bundle: scummvm-static mkdir -p $(bundle_name)/Contents/Resources echo "APPL????" > $(bundle_name)/Contents/PkgInfo cp $(srcdir)/dists/macosx/Info.plist $(bundle_name)/Contents/ +ifdef USE_SPARKLE + mkdir -p $(bundle_name)/Contents/Frameworks + cp $(srcdir)/dists/macosx/dsa_pub.pem $(bundle_name)/Contents/Resources/ + cp -R $(STATICLIBPATH)/Sparkle.framework $(bundle_name)/Contents/Frameworks/ +endif cp $(srcdir)/icons/scummvm.icns $(bundle_name)/Contents/Resources/ cp $(DIST_FILES_DOCS) $(bundle_name)/ cp $(DIST_FILES_THEMES) $(bundle_name)/Contents/Resources/ @@ -108,6 +113,10 @@ ifdef USE_ZLIB OSX_ZLIB ?= -lz endif +ifdef USE_SPARKLE +OSX_STATIC_LIBS += -framework Sparkle -F$(STATICLIBPATH) +endif + ifdef USE_TERMCONV OSX_ICONV ?= -liconv endif |