diff options
Diffstat (limited to 'MySpace/MySpace.cpp')
-rw-r--r-- | MySpace/MySpace.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/MySpace/MySpace.cpp b/MySpace/MySpace.cpp index aa229b5..6121fa3 100644 --- a/MySpace/MySpace.cpp +++ b/MySpace/MySpace.cpp @@ -37,12 +37,16 @@ extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvRe }
extern "C" __declspec (dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) {
+ if (mirandaVersion < PLUGIN_MAKE_VERSION(0, 7, 0, 30))
+ return 0;
return &pluginInfo;
}
// uncomment this for pre 0.7 compatibility
extern "C" __declspec (dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion) {
+ if (mirandaVersion < PLUGIN_MAKE_VERSION(0, 7, 0, 30))
+ return 0;
pluginInfo.cbSize = sizeof(PLUGININFO);
return (PLUGININFO*)&pluginInfo;
}
@@ -54,6 +58,37 @@ 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/MySpace.zip";
+ update.szBetaVersionURL = "http://www.scottellis.com.au/miranda_plugins/ver_MySpace.html";
+#else
+ update.szBetaUpdateURL = "http://www.scottellis.com.au/miranda_plugins/MySpace_ansi.zip";
+ update.szBetaVersionURL = "http://www.scottellis.com.au/miranda_plugins/ver_MySpace_ansi.html";
+#endif
+ update.pbBetaVersionPrefix = (BYTE *)"MySpace version ";
+
+ update.cpbBetaVersionPrefix = strlen((char *)update.pbBetaVersionPrefix);
+
+ CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
+ }
+
InitNetlib();
InitMenu();
|