From bb78ea79e741edef42b3f9388ca2369fff032fc5 Mon Sep 17 00:00:00 2001 From: Julius Michaelis Date: Wed, 14 Mar 2012 23:28:44 +0100 Subject: [PATCH] Fix typo previous rev c18fa35abd02 + conditionally exclude C4UpdateDlg.h/cpp from build --- CMakeLists.txt | 8 ++++++-- src/C4Application.cpp | 2 +- src/gui/C4UpdateDlg.cpp | 7 +------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49a18a6a5..5a0925ef6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -370,8 +370,6 @@ set(OC_CLONK_SOURCES src/gui/C4StartupPlrSelDlg.h src/gui/C4StartupScenSelDlg.cpp src/gui/C4StartupScenSelDlg.h - src/gui/C4UpdateDlg.cpp - src/gui/C4UpdateDlg.h src/gui/C4UpperBoard.cpp src/gui/C4UpperBoard.h src/gui/C4UserMessages.h @@ -653,6 +651,12 @@ if(USE_GTK) src/editor/C4ConsoleGTK.cpp ) endif() +if(WITH_AUTOMATIC_UPDATE) + list(APPEND OC_CLONK_SOURCES + src/gui/C4UpdateDlg.cpp + src/gui/C4UpdateDlg.h + ) +endif() if(PROJECT_FOLDERS) source_group("Core" src/.*) diff --git a/src/C4Application.cpp b/src/C4Application.cpp index 8fce0503b..5feb6af4a 100644 --- a/src/C4Application.cpp +++ b/src/C4Application.cpp @@ -144,7 +144,7 @@ bool C4Application::DoInit(int argc, char * argv[]) if (!IsResStrTableLoaded()) Log("WARNING: No language string table loaded!"); -#if defined(WIN32) && defined(WITH_AUTOMATIC_UDPATE) +#if defined(WIN32) && defined(WITH_AUTOMATIC_UPDATE) // Windows: handle incoming updates directly, even before starting up the gui // because updates will be applied in the console anyway. if (Application.IncomingUpdate) diff --git a/src/gui/C4UpdateDlg.cpp b/src/gui/C4UpdateDlg.cpp index 559911369..5e78de234 100644 --- a/src/gui/C4UpdateDlg.cpp +++ b/src/gui/C4UpdateDlg.cpp @@ -20,9 +20,7 @@ * See clonk_trademark_license.txt for full license. */ // dialogs for update, and the actual update application code - -// Don't compile this class if automatic update is disabled -#ifdef WITH_AUTOMATIC_UPDATE +// is only compiled WITH_AUTOMATIC_UPDATE #include "C4Include.h" @@ -382,6 +380,3 @@ bool C4UpdateDlg::CheckForUpdates(C4GUI::Screen *pScreen, bool fAutomatic) // Done (and no update has been done) return false; } - - -#endif // WITH_AUTOMATIC_UPDATE