diff options
Diffstat (limited to 'meta2/meta2.cpp')
-rw-r--r-- | meta2/meta2.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta2/meta2.cpp b/meta2/meta2.cpp index eba4262..f5442cf 100644 --- a/meta2/meta2.cpp +++ b/meta2/meta2.cpp @@ -54,6 +54,36 @@ extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) }
int ModulesLoaded(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)
+#ifdef _UNICODE
+ update.szBetaUpdateURL = "http://www.scottellis.com.au/miranda_plugins/meta2.zip";
+#else
+ update.szBetaUpdateURL = "http://www.scottellis.com.au/miranda_plugins/meta2_ansi.zip";
+#endif
+ update.szBetaVersionURL = "http://www.scottellis.com.au/miranda_plugins/ver_meta2.html";
+ update.pbBetaVersionPrefix = (BYTE *)"MetaContacts mk2, version ";
+
+ update.cpbBetaVersionPrefix = strlen((char *)update.pbBetaVersionPrefix);
+
+ CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
+ }
+
InitIcons();
InitMenu();
@@ -61,6 +91,8 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) { ImportOldMetas();
DBWriteContactSettingByte(0, MODULE, "FirstRun", 0);
}
+
+
return 0;
}
|