makes the updater optional at compile time
authorkoda
Sat, 26 Sep 2009 20:54:13 +0000
changeset 2395 d01d3bf3e1de
parent 2394 0f8de781fc34
child 2396 e13a1117152b
makes the updater optional at compile time
QTfrontend/CMakeLists.txt
QTfrontend/gameuiconfig.cpp
QTfrontend/gameuiconfig.h
QTfrontend/hedgewars.pro
QTfrontend/hwform.cpp
QTfrontend/pages.cpp
cmake_modules/FindOggVorbis.cmake
cmake_modules/FindSparkle.cmake
--- a/QTfrontend/CMakeLists.txt	Sat Sep 26 15:44:34 2009 +0000
+++ b/QTfrontend/CMakeLists.txt	Sat Sep 26 20:54:13 2009 +0000
@@ -17,6 +17,7 @@
 
 # Configure for SDL
 find_package(SDL REQUIRED)
+find_package(Sparkle)
 
 include_directories(.)
 include_directories(${SDL_INCLUDE_DIR})
@@ -137,11 +138,10 @@
 	bgwidget.h
 	)
 
-if(APPLE)
-find_package(Sparkle REQUIRED)
+if(APPLE AND SPARKLE_FOUND)
 set(hwfr_src ${hwfr_src} AutoUpdater.cpp CocoaInitializer.mm SparkleAutoUpdater.mm)
 #set(hwfr_moc_hdrs ${hwfr_moc_hdrs} AutoUpdater.h CocoaInitializer.h SparkleAutoUpdater.h)
-endif(APPLE)
+endif()
 
 set(hwfr_hdrs
 	binds.h
@@ -188,8 +188,11 @@
 		${OGG_LIBRARY}
 		${VORBIS_LIBRARY}
 		${HW_LINK_LIBS}
-		${SPARKLE_LIBRARY}
 		)
+        if (SPARKLE_FOUND)
+                set(HW_LINK_LIBS ${HW_LINK_LIBS} ${SPARKLE_LIBRARY})
+                set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS} "-DSPARKLE_ENABLED")
+        endif()
 endif()
 
 
--- a/QTfrontend/gameuiconfig.cpp	Sat Sep 26 15:44:34 2009 +0000
+++ b/QTfrontend/gameuiconfig.cpp	Sat Sep 26 20:54:13 2009 +0000
@@ -75,9 +75,8 @@
 	Form->ui.pageOptions->CBAltDamage->setChecked(value("misc/altdamage", false).toBool());
 	Form->ui.pageOptions->CBNameWithDate->setChecked(value("misc/appendTimeToRecords", false).toBool());
 
-#ifdef __APPLE__
-    //autoupdate
-    Form->ui.pageOptions->CBAutoUpdate->setChecked(value("misc/autoUpdate", true).toBool());
+#ifdef SPARKLE_ENABLED
+        Form->ui.pageOptions->CBAutoUpdate->setChecked(value("misc/autoUpdate", true).toBool());
 #endif
 
 	depth = QApplication::desktop()->depth();
@@ -90,15 +89,15 @@
 	QStringList teamslist = cfgdir->entryList(QStringList("*.cfg"));
 	QStringList cleanedList;
 	for (QStringList::Iterator it = teamslist.begin(); it != teamslist.end(); ++it ) {
-	  QString tmpTeamStr=(*it).replace(QRegExp("^(.*)\\.cfg$"), "\\1");
-	  cleanedList.push_back(tmpTeamStr);
+            QString tmpTeamStr=(*it).replace(QRegExp("^(.*)\\.cfg$"), "\\1");
+            cleanedList.push_back(tmpTeamStr);
 	}
 	return cleanedList;
 }
 
 void GameUIConfig::resizeToConfigValues()
 {
-  Form->resize(value("window/width", 720).toUInt(), value("window/height", 450).toUInt());
+        Form->resize(value("window/width", 720).toUInt(), value("window/height", 450).toUInt());
 }
 
 void GameUIConfig::SaveOptions()
@@ -137,9 +136,8 @@
 	setValue("misc/altdamage", isAltDamageEnabled());
 	setValue("misc/appendTimeToRecords", appendDateTimeToRecordName());
 
-#ifdef __APPLE__
-    //autoupdate
-    setValue("misc/autoUpdate", isAutoUpdateEnabled());
+#ifdef SPARKLE_ENABLED
+        setValue("misc/autoUpdate", isAutoUpdateEnabled());
 #endif
 }
 
@@ -204,8 +202,7 @@
 	return Form->ui.pageOptions->CBNameWithDate->isChecked();
 }
 
-#ifdef __APPLE__
-//autoupdate
+#ifdef SPARKLE_ENABLED
 bool GameUIConfig::isAutoUpdateEnabled()
 {
     return Form->ui.pageOptions->CBAutoUpdate->isChecked();
--- a/QTfrontend/gameuiconfig.h	Sat Sep 26 15:44:34 2009 +0000
+++ b/QTfrontend/gameuiconfig.h	Sat Sep 26 20:54:13 2009 +0000
@@ -50,8 +50,7 @@
 	bool isFrontendFullscreen() const;
 	void resizeToConfigValues();
 
-#ifdef __APPLE__
-    //autoupdate
+#ifdef __APPLE__ and SPARKLE_ENABLED
     bool isAutoUpdateEnabled();
 #endif
 
--- a/QTfrontend/hedgewars.pro	Sat Sep 26 15:44:34 2009 +0000
+++ b/QTfrontend/hedgewars.pro	Sat Sep 26 20:54:13 2009 +0000
@@ -8,11 +8,6 @@
 	RC_FILE	= ./res/hedgewars.rc
 }
 
-macx{
-	CONFIG += x86
- 	#CONFIG += x86 ppc x86_64 ppc64
-}
-
 QT += network svg xml
 
 HEADERS += 	KB.h SDLs.h SquareLabel.h \
@@ -77,9 +72,13 @@
 !macx{
 	LIBS += -lSDL -lopenalbridge
 }else{
-	LIBS += -framework SDL -framework OpenAL -framework Ogg -framework Vorbis -lopenalbridge -framework Sparkle
+	LIBS += -framework SDL -framework OpenAL -framework Ogg -framework Vorbis -lopenalbridge 
 	INCLUDEPATH += /Library/Frameworks/SDL.framework/Headers
-	SOURCES += AutoUpdater.cpp CocoaInitializer.mm SparkleAutoUpdater.mm
-	HEADERS += AutoUpdater.h CocoaInitializer.h SparkleAutoUpdater.h
-	
+	CONFIG += warn_on x86
+
+	#-framework Sparkle
+	#SOURCES += AutoUpdater.cpp CocoaInitializer.mm SparkleAutoUpdater.mm
+	#HEADERS += AutoUpdater.h CocoaInitializer.h SparkleAutoUpdater.h
+
+ 	#CONFIG += x86 ppc x86_64 ppc64
 }
--- a/QTfrontend/hwform.cpp	Sat Sep 26 15:44:34 2009 +0000
+++ b/QTfrontend/hwform.cpp	Sat Sep 26 20:54:13 2009 +0000
@@ -55,8 +55,7 @@
 #include "ammoSchemeModel.h"
 #include "bgwidget.h"
 
-#ifdef __APPLE__
-//autoupdate
+#ifdef SPARKLE_ENABLED
 #include "CocoaInitializer.h"
 #include "SparkleAutoUpdater.h"
 #endif
@@ -81,8 +80,7 @@
 
 	namegen = new HWNamegen();
 
-#ifdef __APPLE__
-        //autoupdate
+#ifdef SPARKLE_ENABLED
         AutoUpdater* updater;
         CocoaInitializer initializer;
         updater = new SparkleAutoUpdater("http://files.getdropbox.com/u/24468/appcast.xml"); //this has to change before release!!!
--- a/QTfrontend/pages.cpp	Sat Sep 26 15:44:34 2009 +0000
+++ b/QTfrontend/pages.cpp	Sat Sep 26 20:54:13 2009 +0000
@@ -337,143 +337,141 @@
 	gbTBLayout->setMargin(0);
 	gbTBLayout->setSpacing(0);
 	{
-		teamsBox = new IconedGroupBox(this);
-        //teamsBox->setAttribute(Qt::WA_PaintOnScreen, true);
-		teamsBox->setIcon(QIcon(":/res/teamicon.png"));
-		teamsBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
-		teamsBox->setTitle(QGroupBox::tr("Teams"));
-
-		QVBoxLayout * GBTlayout = new QVBoxLayout(teamsBox);
+            teamsBox = new IconedGroupBox(this);
+            //teamsBox->setAttribute(Qt::WA_PaintOnScreen, true);
+            teamsBox->setIcon(QIcon(":/res/teamicon.png"));
+            teamsBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+            teamsBox->setTitle(QGroupBox::tr("Teams"));
 
-		CBTeamName = new QComboBox(teamsBox);
-		GBTlayout->addWidget(CBTeamName);
+            QVBoxLayout * GBTlayout = new QVBoxLayout(teamsBox);
 
-		QHBoxLayout * layout1 = new QHBoxLayout;
-		GBTlayout->addLayout(layout1);
-		BtnNewTeam = addButton(tr("New team"), layout1, 0);
-		BtnEditTeam = addButton(tr("Edit team"), layout1, 1);
-		layout1->setStretchFactor(BtnNewTeam, 100);
-		layout1->setStretchFactor(BtnEditTeam, 100);
-
-		QHBoxLayout * layout2 = new QHBoxLayout;
-		GBTlayout->addLayout(layout2);
+            CBTeamName = new QComboBox(teamsBox);
+            GBTlayout->addWidget(CBTeamName);
 
-		labelNN = new QLabel(teamsBox);
-		labelNN->setText(QLabel::tr("Net nick"));
-		layout2->addWidget(labelNN);
+            QHBoxLayout * layout1 = new QHBoxLayout;
+            GBTlayout->addLayout(layout1);
+            BtnNewTeam = addButton(tr("New team"), layout1, 0);
+            BtnEditTeam = addButton(tr("Edit team"), layout1, 1);
+            layout1->setStretchFactor(BtnNewTeam, 100);
+            layout1->setStretchFactor(BtnEditTeam, 100);
 
-		editNetNick = new QLineEdit(teamsBox);
-		editNetNick->setMaxLength(20);
-		editNetNick->setText(QLineEdit::tr("unnamed"));
-		layout2->addWidget(editNetNick);
-
-		gbTBLayout->addWidget(teamsBox, 0, 0);
-	}
+            QHBoxLayout * layout2 = new QHBoxLayout;
+            GBTlayout->addLayout(layout2);
 
-	{
-		IconedGroupBox* groupWeapons = new IconedGroupBox(this);
-        groupWeapons->setContentTopPadding(0);
-		groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
-		groupWeapons->setIcon(QIcon(":/res/weaponsicon.png"));
-		//groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
-		groupWeapons->setTitle(QGroupBox::tr("Weapons"));
-		QGridLayout * WeaponsLayout = new QGridLayout(groupWeapons);
+            labelNN = new QLabel(teamsBox);
+            labelNN->setText(QLabel::tr("Net nick"));
+            layout2->addWidget(labelNN);
 
-		WeaponsButt = addButton(tr("Weapons set"), WeaponsLayout, 1, 0);
-		WeaponsName = new QComboBox(this);
-		WeaponsLayout->addWidget(WeaponsName, 0, 0, 1, 2);
-		WeaponEdit = addButton(tr("Edit"), WeaponsLayout, 1, 1);
-		gbTBLayout->addWidget(groupWeapons, 1, 0);
+            editNetNick = new QLineEdit(teamsBox);
+            editNetNick->setMaxLength(20);
+            editNetNick->setText(QLineEdit::tr("unnamed"));
+            layout2->addWidget(editNetNick);
+
+            gbTBLayout->addWidget(teamsBox, 0, 0);
 	}
 
-	{
-		AGGroupBox = new IconedGroupBox(this);
-		AGGroupBox->setIcon(QIcon(":/res/graphicsicon.png"));
-		AGGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
-		AGGroupBox->setTitle(QGroupBox::tr("Audio/Graphic options"));
+        {
+            IconedGroupBox* groupWeapons = new IconedGroupBox(this);
+            groupWeapons->setContentTopPadding(0);
+            groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+            groupWeapons->setIcon(QIcon(":/res/weaponsicon.png"));
+            //groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+            groupWeapons->setTitle(QGroupBox::tr("Weapons"));
+            QGridLayout * WeaponsLayout = new QGridLayout(groupWeapons);
 
-		QVBoxLayout * GBAlayout = new QVBoxLayout(AGGroupBox);
-		QHBoxLayout * GBAreslayout = new QHBoxLayout(0);
+            WeaponsButt = addButton(tr("Weapons set"), WeaponsLayout, 1, 0);
+            WeaponsName = new QComboBox(this);
+            WeaponsLayout->addWidget(WeaponsName, 0, 0, 1, 2);
+            WeaponEdit = addButton(tr("Edit"), WeaponsLayout, 1, 1);
+            gbTBLayout->addWidget(groupWeapons, 1, 0);
+        }
 
-		QLabel * resolution = new QLabel(AGGroupBox);
-		resolution->setText(QLabel::tr("Resolution"));
-		GBAreslayout->addWidget(resolution);
-
-		CBResolution = new QComboBox(AGGroupBox);
-		GBAreslayout->addWidget(CBResolution);
-		GBAlayout->addLayout(GBAreslayout);
+        {
+            AGGroupBox = new IconedGroupBox(this);
+            AGGroupBox->setIcon(QIcon(":/res/graphicsicon.png"));
+            AGGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
+            AGGroupBox->setTitle(QGroupBox::tr("Audio/Graphic options"));
 
-		QHBoxLayout * GBAfpslayout = new QHBoxLayout(0);
-		QLabel * maxfps = new QLabel(AGGroupBox);
-		maxfps->setText(QLabel::tr("FPS limit"));
-		GBAfpslayout->addWidget(maxfps);
-		GBAlayout->addLayout(GBAfpslayout);
+            QVBoxLayout * GBAlayout = new QVBoxLayout(AGGroupBox);
+            QHBoxLayout * GBAreslayout = new QHBoxLayout(0);
 
-		CBReduceQuality = new QCheckBox(AGGroupBox);
-		CBReduceQuality->setText(QCheckBox::tr("Reduce Quality"));
-		GBAlayout->addWidget(CBReduceQuality);
+            QLabel * resolution = new QLabel(AGGroupBox);
+            resolution->setText(QLabel::tr("Resolution"));
+            GBAreslayout->addWidget(resolution);
+
+            CBResolution = new QComboBox(AGGroupBox);
+            GBAreslayout->addWidget(CBResolution);
+            GBAlayout->addLayout(GBAreslayout);
 
-		CBFrontendEffects = new QCheckBox(AGGroupBox);
-		CBFrontendEffects->setText(QCheckBox::tr("Frontend Effects (Requires Restart)"));
-		GBAlayout->addWidget(CBFrontendEffects);
+            QHBoxLayout * GBAfpslayout = new QHBoxLayout(0);
+            QLabel * maxfps = new QLabel(AGGroupBox);
+            maxfps->setText(QLabel::tr("FPS limit"));
+            GBAfpslayout->addWidget(maxfps);
+            GBAlayout->addLayout(GBAfpslayout);
 
-		CBFullscreen = new QCheckBox(AGGroupBox);
-		CBFullscreen->setText(QCheckBox::tr("Fullscreen"));
-		GBAlayout->addWidget(CBFullscreen);
+            CBReduceQuality = new QCheckBox(AGGroupBox);
+            CBReduceQuality->setText(QCheckBox::tr("Reduce Quality"));
+            GBAlayout->addWidget(CBReduceQuality);
 
-		CBFrontendFullscreen = new QCheckBox(AGGroupBox);
-		CBFrontendFullscreen->setText(QCheckBox::tr("Frontend fullscreen"));
-		GBAlayout->addWidget(CBFrontendFullscreen);
+            CBFrontendEffects = new QCheckBox(AGGroupBox);
+            CBFrontendEffects->setText(QCheckBox::tr("Frontend Effects (Requires Restart)"));
+            GBAlayout->addWidget(CBFrontendEffects);
 
-		CBHardwareSound = new QCheckBox(AGGroupBox);
-		CBHardwareSound->setText(QCheckBox::tr("Use hardware sound (if available; requires restart)"));
-		//CBHardwareSound->setEnabled(openal_ready());
-		GBAlayout->addWidget(CBHardwareSound);
+            CBFullscreen = new QCheckBox(AGGroupBox);
+            CBFullscreen->setText(QCheckBox::tr("Fullscreen"));
+            GBAlayout->addWidget(CBFullscreen);
+
+            CBFrontendFullscreen = new QCheckBox(AGGroupBox);
+            CBFrontendFullscreen->setText(QCheckBox::tr("Frontend fullscreen"));
+            GBAlayout->addWidget(CBFrontendFullscreen);
 
-		CBEnableSound = new QCheckBox(AGGroupBox);
-		CBEnableSound->setText(QCheckBox::tr("Enable sound"));
-		//CBEnableSound->setEnabled(openal_ready());
-		GBAlayout->addWidget(CBEnableSound);
+            CBHardwareSound = new QCheckBox(AGGroupBox);
+            CBHardwareSound->setText(QCheckBox::tr("Use hardware sound (if available; requires restart)"));
+            //CBHardwareSound->setEnabled(openal_ready());
+            GBAlayout->addWidget(CBHardwareSound);
 
-		CBEnableMusic = new QCheckBox(AGGroupBox);
-		CBEnableMusic->setText(QCheckBox::tr("Enable music"));
-		//CBEnableMusic->setEnabled(openal_ready());
-		GBAlayout->addWidget(CBEnableMusic);
+            CBEnableSound = new QCheckBox(AGGroupBox);
+            CBEnableSound->setText(QCheckBox::tr("Enable sound"));
+            //CBEnableSound->setEnabled(openal_ready());
+            GBAlayout->addWidget(CBEnableSound);
+            CBEnableMusic = new QCheckBox(AGGroupBox);
+            CBEnableMusic->setText(QCheckBox::tr("Enable music"));
+            //CBEnableMusic->setEnabled(openal_ready());
+            GBAlayout->addWidget(CBEnableMusic);
 
-		QHBoxLayout * GBAvollayout = new QHBoxLayout(0);
-		QLabel * vol = new QLabel(AGGroupBox);
-		vol->setText(QLabel::tr("Initial sound volume"));
-		GBAvollayout->addWidget(vol);
-		GBAlayout->addLayout(GBAvollayout);
-		volumeBox = new QSpinBox(AGGroupBox);
-		volumeBox->setRange(0, 100);
-		volumeBox->setSingleStep(5);
-		//volumeBox->setEnabled(openal_ready());
-		GBAvollayout->addWidget(volumeBox);
+            QHBoxLayout * GBAvollayout = new QHBoxLayout(0);
+            QLabel * vol = new QLabel(AGGroupBox);
+            vol->setText(QLabel::tr("Initial sound volume"));
+            GBAvollayout->addWidget(vol);
+            GBAlayout->addLayout(GBAvollayout);
+            volumeBox = new QSpinBox(AGGroupBox);
+            volumeBox->setRange(0, 100);
+            volumeBox->setSingleStep(5);
+            //volumeBox->setEnabled(openal_ready());
+            GBAvollayout->addWidget(volumeBox);
 
-		CBShowFPS = new QCheckBox(AGGroupBox);
-		CBShowFPS->setText(QCheckBox::tr("Show FPS"));
-		GBAlayout->addWidget(CBShowFPS);
+            CBShowFPS = new QCheckBox(AGGroupBox);
+            CBShowFPS->setText(QCheckBox::tr("Show FPS"));
+            GBAlayout->addWidget(CBShowFPS);
 
-		CBAltDamage = new QCheckBox(AGGroupBox);
-		CBAltDamage->setText(QCheckBox::tr("Alternative damage show"));
-		GBAlayout->addWidget(CBAltDamage);
+            CBAltDamage = new QCheckBox(AGGroupBox);
+            CBAltDamage->setText(QCheckBox::tr("Alternative damage show"));
+            GBAlayout->addWidget(CBAltDamage);
 
-		CBNameWithDate = new QCheckBox(AGGroupBox);
-		CBNameWithDate->setText(QCheckBox::tr("Append date and time to record file name"));
-		GBAlayout->addWidget(CBNameWithDate);
+            CBNameWithDate = new QCheckBox(AGGroupBox);
+            CBNameWithDate->setText(QCheckBox::tr("Append date and time to record file name"));
+            GBAlayout->addWidget(CBNameWithDate);
 
-#ifdef __APPLE__
-            //autoupdate
-		CBAutoUpdate = new QCheckBox(AGGroupBox);
-		CBAutoUpdate->setText(QCheckBox::tr("Check for updates at startup"));
-		GBAlayout->addWidget(CBAutoUpdate);
+#ifdef SPARKLE_ENABLED
+            CBAutoUpdate = new QCheckBox(AGGroupBox);
+            CBAutoUpdate->setText(QCheckBox::tr("Check for updates at startup"));
+            GBAlayout->addWidget(CBAutoUpdate);
 #endif
 
             fpsedit = new FPSEdit(AGGroupBox);
             GBAfpslayout->addWidget(fpsedit);
             gbTBLayout->addWidget(AGGroupBox, 0, 1, 2, 1);
-	}
+        }
 
 	BtnSaveOptions = addButton(":/res/Save.png", pageLayout, 2, 2, true);
 	BtnSaveOptions->setStyleSheet("QPushButton{margin: 12px 0px 12px 0px;}");
--- a/cmake_modules/FindOggVorbis.cmake	Sat Sep 26 15:44:34 2009 +0000
+++ b/cmake_modules/FindOggVorbis.cmake	Sat Sep 26 20:54:13 2009 +0000
@@ -15,6 +15,7 @@
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 
+
 include (CheckLibraryExists)
 find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
 find_library(OGG_LIBRARY NAMES ogg)
@@ -45,28 +46,10 @@
 else (OGGVORBIS_FOUND)
    if (OggVorbis_FIND_REQUIRED)
       message(FATAL_ERROR "Could NOT find OggVorbis libraries")
-   endif (OggVorbis_FIND_REQUIRED)
-   if (NOT OggVorbis_FIND_QUIETLY)
-      message(STATUS "Could NOT find OggVorbis libraries")
-   endif (NOT OggVorbis_FIND_QUIETLY)
+   else (OggVorbis_FIND_REQUIRED)
+      if (NOT OggVorbis_FIND_QUIETLY)
+         message(STATUS "Could NOT find OggVorbis libraries")
+      endif (NOT OggVorbis_FIND_QUIETLY)
+   endif(OggVorbis_FIND_REQUIRED)
 endif (OGGVORBIS_FOUND)
-#check_include_files(vorbis/vorbisfile.h HAVE_VORBISFILE_H)
-#check_library_exists(ogg ogg_page_version "" HAVE_LIBOGG)
-#check_library_exists(vorbis vorbis_info_init "" HAVE_LIBVORBIS)
-#check_library_exists(vorbisfile ov_open "" HAVE_LIBVORBISFILE)
-#check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2)
-#if (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE)
-#    message(STATUS "Ogg/Vorbis found")
-#    set (VORBIS_LIBS "-lvorbis -logg")
-#    set (VORBISFILE_LIBS "-lvorbisfile")
-#    set (OGGVORBIS_FOUND TRUE)
-#    if (HAVE_LIBVORBISENC2)
-#        set (HAVE_VORBIS 2)
-#    else (HAVE_LIBVORBISENC2)
-#        set (HAVE_VORBIS 1)
-#    endif (HAVE_LIBVORBISENC2)
-#else (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE)
-#    message(STATUS "Ogg/Vorbis not found")
-#endif (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE)
 
-
--- a/cmake_modules/FindSparkle.cmake	Sat Sep 26 15:44:34 2009 +0000
+++ b/cmake_modules/FindSparkle.cmake	Sat Sep 26 20:54:13 2009 +0000
@@ -1,19 +1,17 @@
-### SuperTux - Removed unused vorbisenc library
+### Hedgewars
 
-# - Try to find the OggVorbis libraries
+# - Try to find the Sparkle framework
 # Once done this will define
 #
-#  OGGVORBIS_FOUND - system has OggVorbis
-#  OGGVORBIS_VERSION - set either to 1 or 2
-#  OGGVORBIS_INCLUDE_DIR - the OggVorbis include directory
-#  OGGVORBIS_LIBRARIES - The libraries needed to use OggVorbis
-#  OGG_LIBRARY         - The Ogg library
-#  VORBIS_LIBRARY      - The Vorbis library
-#  VORBISFILE_LIBRARY  - The VorbisFile library
-# Copyright (c) 2006, Richard Laerkaeng, <richard@goteborg.utfors.se>
+#  SPARKLE_FOUND - system has Sparkle
+#  SPARKLE_INCLUDE_DIR - the Sparkle include directory
+#  SPARKLE_LIBRARY - The library needed to use Sparkle
+# Copyright (c) 2009, Vittorio Giovara, <vittorio.giovara@gmail.com>
 #
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# Redistribution and use is allowed according to the terms of a Creative Commons license.
+# For details see http://creativecommons.org/licenses/by-sa/3.0/
+# original version of this module was derived from Richard Laerkaeng, <richard@goteborg.utfors.se>
+
 
 include (CheckLibraryExists)
 find_path(SPARKLE_INCLUDE_DIR Sparkle.h)
@@ -32,9 +30,10 @@
 else ()
    if (Sparkle_FIND_REQUIRED)
       message(FATAL_ERROR "Could NOT find Sparkle framework")
-   endif ()
-   if (NOT Sparkle_FIND_QUIETLY)
-      message(STATUS "Could NOT find Sparkle framework")
+   else ()
+      if (NOT Sparkle_FIND_QUIETLY)
+         message(STATUS "Could NOT find Sparkle framework, autoupdate feature will be disabled")
+      endif()
    endif ()
 endif ()