diff options
Diffstat (limited to 'worldtime/WorldTime.cpp')
-rw-r--r-- | worldtime/WorldTime.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/worldtime/WorldTime.cpp b/worldtime/WorldTime.cpp index e327261..d61eb9c 100644 --- a/worldtime/WorldTime.cpp +++ b/worldtime/WorldTime.cpp @@ -58,6 +58,32 @@ void CreatePluginServices() { }
static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) {
+ if(ServiceExists(MS_UPDATE_REGISTER)) {
+ // register with updater
+ Update update = {0};
+ char szVersion[16];
+
+ update.cbSize = sizeof(Update);
+
+ update.szComponentName = pluginInfo.shortName;
+ update.pbVersion = (BYTE *)CreateVersionString(pluginInfo.version, szVersion);
+ update.cpbVersion = strlen((char *)update.pbVersion);
+
+ update.szUpdateURL = UPDATER_AUTOREGISTER;
+
+ // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
+ // before the version that we use to locate it on the page
+ // (note that if the update URL and the version URL point to standard file listing entries, the backend xml
+ // data will be used to check for updates rather than the actual web page - this is not true for beta urls)
+ update.szBetaUpdateURL = "http://www.scottellis.com.au/miranda_plugins/WorldTime.zip";
+ update.szBetaVersionURL = "http://www.scottellis.com.au/miranda_plugins/ver_worldtime.html";
+ update.pbBetaVersionPrefix = (BYTE *)"World Time version ";
+
+ update.cpbBetaVersionPrefix = strlen((char *)update.pbBetaVersionPrefix);
+
+ CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
+ }
+
HWND contact_list_hwnd = (HWND)CallService(MS_CLUI_GETHWND, 0, 0);
addmypluginwindow1(contact_list_hwnd);
|