forked from jonocole/lastfm-desktop
/
PluginInfo.h
47 lines (38 loc) · 1.38 KB
/
PluginInfo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef WINAMP_PLUGIN_INFO_H_
#define WINAMP_PLUGIN_INFO_H_
#include "../../lib/unicorn/Updater/IPluginInfo.h"
#include "../../lib/DllExportMacro.h"
class UNICORN_DLLEXPORT WinampPluginInfo : public IPluginInfo
{
public:
std::string name() const { return "Winamp"; }
Version minVersion() const { return Version(); }
Version maxVersion() const { return Version(); }
std::string pluginPath() const { return std::string( "plugins" ); }
std::string displayName() const { return std::string( "MPlayer2" ); }
std::string processName() const { return std::string( "winamp.exe" ); }
std::string id() const { return "wa2"; }
BootstrapType bootstrapType() const { return PluginBootstrap; }
bool isPlatformSupported() const
{
#ifdef WIN32
return true;
#endif
return false;
}
IPluginInfo* clone() const { return new WinampPluginInfo( *this ); }
#ifdef QT_VERSION
QString pluginInstallPath() const
{
#ifdef Q_OS_WIN
QSettings s( QString( "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows"
"\\CurrentVersion\\App Paths\\") + processName(),
QSettings::NativeFormat );
return s.value( "Path" ) + "\\Plugins";
#endif
Q_ASSERT( !"There is no winamp on non-windows platforms!" );
return "";
}
#endif
};
#endif //WINAMP_PLUGIN_INFO_H_