1 | Index: libs/libmyth/mythcontext.cpp
|
---|
2 | ===================================================================
|
---|
3 | --- libs/libmyth/mythcontext.cpp (revision 16312)
|
---|
4 | +++ libs/libmyth/mythcontext.cpp (working copy)
|
---|
5 | @@ -352,6 +352,26 @@
|
---|
6 | QDir prefixDir(appPath.left(appPath.findRev("/")));
|
---|
7 | #endif
|
---|
8 |
|
---|
9 | +#ifdef _WIN32
|
---|
10 | + // LIBDIR might not be defined
|
---|
11 | + // some libraries will fail without it
|
---|
12 | +
|
---|
13 | + char *tmp_libdir = getenv("MYTHLIBDIR");
|
---|
14 | + if (!tmp_libdir) {
|
---|
15 | + char * localappdata= getenv("LOCALAPPDATA"); // Vista
|
---|
16 | + if (!localappdata)
|
---|
17 | + localappdata = getenv("APPDATA"); // XP
|
---|
18 | + if (!localappdata)
|
---|
19 | + m_installlibdir = ".\\lib"; // getenv("TEMP")?
|
---|
20 | + else
|
---|
21 | + m_installlibdir = localappdata + QString("\\mythtv");
|
---|
22 | +
|
---|
23 | + _putenv(QString("MYTHLIBDIR=%1").arg(m_installlibdir));
|
---|
24 | + } else
|
---|
25 | + m_installlibdir = tmp_libdir;
|
---|
26 | +
|
---|
27 | +#endif
|
---|
28 | +
|
---|
29 | if (QDir(m_installprefix).isRelative())
|
---|
30 | {
|
---|
31 | // If the PREFIX is relative, evaluate it relative to our
|
---|