diff --git a/doomsday/engine/data/cphelp.txt b/doomsday/engine/data/cphelp.txt index a66d28e7b5..c36d87f317 100644 --- a/doomsday/engine/data/cphelp.txt +++ b/doomsday/engine/data/cphelp.txt @@ -374,6 +374,9 @@ inf = Params: keymap (dkm-file)\nFor example, 'keymap finnish'. desc = Kick client out of the game (server only). inf = Params: kick (playernum)\nFor example, 'kick 1'. +[lastupdated] +desc = Show when the latest check for updates was made. + [listcontrols] desc = List the names of all player controls. @@ -537,8 +540,13 @@ desc = Unload the current game or one or more data files. inf = Params: unload (name) ...\nFor example, 'unload mylevel.wad'. [update] -desc = Check for new available releases or adjust autoupdate settings. -inf = Examples:\n 'update' checks for new releases.\n 'update config' shows the current settings. +desc = Check for new available releases. + +[updateandnotify] +desc = Check for new available releases and open the update notification dialog. + +[updatesettings] +desc = Show the settings dialog for configuring automatic updates. [varstats] desc = Show detailed statistics for console variables. diff --git a/doomsday/engine/portable/include/updater.h b/doomsday/engine/portable/include/updater.h index 7f882e9467..426cd3c171 100644 --- a/doomsday/engine/portable/include/updater.h +++ b/doomsday/engine/portable/include/updater.h @@ -103,6 +103,11 @@ void Updater_CheckNow(boolean notify); */ void Updater_ShowSettings(void); +/** + * Print in the console when the latest update check was made. + */ +void Updater_PrintLastUpdated(void); + #ifdef __cplusplus } // extern "C" #endif diff --git a/doomsday/engine/portable/src/dd_main.c b/doomsday/engine/portable/src/dd_main.c index ba21d0bb18..47883537ff 100644 --- a/doomsday/engine/portable/src/dd_main.c +++ b/doomsday/engine/portable/src/dd_main.c @@ -140,6 +140,12 @@ D_CMD(CheckForUpdatesAndNotify) return true; } +D_CMD(LastUpdated) +{ + Updater_PrintLastUpdated(); + return true; +} + D_CMD(ShowUpdateSettings) { Updater_ShowSettings(); @@ -151,9 +157,10 @@ D_CMD(ShowUpdateSettings) */ void DD_Register(void) { - C_CMD("update", "", CheckForUpdates); + C_CMD("update", "", CheckForUpdates); C_CMD("updateandnotify", "", CheckForUpdatesAndNotify); - C_CMD("updatesettings", "", ShowUpdateSettings); + C_CMD("updatesettings", "", ShowUpdateSettings); + C_CMD("lastupdated", "", LastUpdated); DD_RegisterLoop(); DD_RegisterInput(); diff --git a/doomsday/engine/portable/src/updater.cpp b/doomsday/engine/portable/src/updater.cpp index 68ef5aa188..307f515b38 100644 --- a/doomsday/engine/portable/src/updater.cpp +++ b/doomsday/engine/portable/src/updater.cpp @@ -545,3 +545,10 @@ void Updater_ShowSettings(void) } de::LegacyCore::instance().timer(delay, showSettingsDialog); } + +void Updater_PrintLastUpdated(void) +{ + UpdaterSettings st; + Con_Message("Latest update check was made on %s.\n", + st.lastCheckTime().asText(de::Time::FriendlyFormat).toAscii().constData()); +}