summaryrefslogtreecommitdiff
path: root/meta2/meta2.cpp
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-10-03 06:02:50 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-10-03 06:02:50 +0000
commite52098965bc45872cff2d99147b0c27769c146f0 (patch)
tree15b615f777658cd9bce800475b666f121c2f0f3c /meta2/meta2.cpp
parentc6a2d1cb7f370fe7a64928610a6235505aea7c2d (diff)
added updater support
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@341 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'meta2/meta2.cpp')
-rw-r--r--meta2/meta2.cpp32
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;
}