summaryrefslogtreecommitdiff
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
parentc6a2d1cb7f370fe7a64928610a6235505aea7c2d (diff)
added updater support
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@341 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r--meta2/common.h1
-rw-r--r--meta2/meta2.cpp32
-rw-r--r--meta2/version.h6
3 files changed, 36 insertions, 3 deletions
diff --git a/meta2/common.h b/meta2/common.h
index c613ef5..67f3a50 100644
--- a/meta2/common.h
+++ b/meta2/common.h
@@ -49,6 +49,7 @@
#include <m_metacontacts.h>
#include <m_yapp.h>
+#include <m_updater.h>
#include "collection.h"
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;
}
diff --git a/meta2/version.h b/meta2/version.h
index 81ba1a8..380985b 100644
--- a/meta2/version.h
+++ b/meta2/version.h
@@ -5,7 +5,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 0
#define __RELEASE_NUM 0
-#define __BUILD_NUM 1
+#define __BUILD_NUM 2
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
@@ -13,9 +13,9 @@
#define __VERSION_STRING __STRINGIFY(__FILEVERSION_STRING_DOTS)
#ifdef _UNICODE
-#define __PLUGIN_NAME "meta2 (Unicode)"
+#define __PLUGIN_NAME "MetaContacts mk2 (Unicode)"
#else
-#define __PLUGIN_NAME "meta2"
+#define __PLUGIN_NAME "MetaContacts mk2"
#endif
#define __FILENAME "meta2.dll"