diff options
| author | Thomas Tanner <trtanner@btinternet.com> | 2015-12-05 12:49:12 +0000 |
|---|---|---|
| committer | Thomas Tanner <trtanner@btinternet.com> | 2015-12-05 12:49:12 +0000 |
| commit | c2ed844eeb2d213a72c405eb47e077da00f084fe (patch) | |
| tree | 647441b712dbe79caacf385395b04fd8ee94b66c /src/shared | |
| parent | c07e48075e86c855f147e084a50ee1c7f0c00e40 (diff) | |
| parent | 688e149c96c29d8249c9db416f5773cfc7baad6d (diff) | |
Merge remote-tracking branch 'remotes/TanninOne/master' into issue/356
Conflicts:
src/downloadmanager.cpp
src/mainwindow.cpp
src/modinfo.cpp
src/modinfo.h
src/selfupdater.cpp
src/shared/fallout3info.cpp
src/shared/fallout3info.h
src/shared/falloutnvinfo.cpp
src/shared/falloutnvinfo.h
src/shared/gameinfo.h
src/shared/oblivioninfo.cpp
src/shared/oblivioninfo.h
src/shared/skyriminfo.cpp
src/shared/skyriminfo.h
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/SConscript | 10 | ||||
| -rw-r--r-- | src/shared/fallout3info.cpp | 8 | ||||
| -rw-r--r-- | src/shared/fallout3info.h | 17 | ||||
| -rw-r--r-- | src/shared/falloutnvinfo.cpp | 8 | ||||
| -rw-r--r-- | src/shared/falloutnvinfo.h | 16 | ||||
| -rw-r--r-- | src/shared/gameinfo.cpp | 1 | ||||
| -rw-r--r-- | src/shared/gameinfo.h | 12 | ||||
| -rw-r--r-- | src/shared/oblivioninfo.cpp | 8 | ||||
| -rw-r--r-- | src/shared/oblivioninfo.h | 16 | ||||
| -rw-r--r-- | src/shared/skyriminfo.cpp | 9 | ||||
| -rw-r--r-- | src/shared/skyriminfo.h | 10 |
11 files changed, 50 insertions, 65 deletions
diff --git a/src/shared/SConscript b/src/shared/SConscript index 69a95289..24ca5b19 100644 --- a/src/shared/SConscript +++ b/src/shared/SConscript @@ -1,8 +1,6 @@ -Import('qt_env')
+Import('env')
-env = qt_env.Clone()
-
-env.EnableQtModules('Core', 'Gui')
+env = env.Clone()
env.AppendUnique(CPPDEFINES = [
'UNICODE',
@@ -21,5 +19,5 @@ env.AppendUnique(CPPPATH = [ # Not sure if renaming this helps much as it's static
env.StaticLibrary('mo_shared', env.Glob('*.cpp'))
-res = env['QT_USED_MODULES']
-Return('res')
+#res = env['QT_USED_MODULES']
+#Return('res')
diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp index 043a25dc..008a046c 100644 --- a/src/shared/fallout3info.cpp +++ b/src/shared/fallout3info.cpp @@ -63,22 +63,22 @@ std::wstring Fallout3Info::getRegPathStatic() }
-std::vector<std::wstring> Fallout3Info::getSavegameAttachmentExtensions()
+std::vector<std::wstring> Fallout3Info::getSavegameAttachmentExtensions() const
{
return std::vector<std::wstring>();
}
-std::vector<std::wstring> Fallout3Info::getIniFileNames()
+std::vector<std::wstring> Fallout3Info::getIniFileNames() const
{
return boost::assign::list_of(L"fallout.ini")(L"falloutprefs.ini");
}
-std::wstring Fallout3Info::getReferenceDataFile()
+std::wstring Fallout3Info::getReferenceDataFile() const
{
return L"Fallout - Meshes.bsa";
}
-bool Fallout3Info::rerouteToProfile(const wchar_t *fileName, const wchar_t*)
+bool Fallout3Info::rerouteToProfile(const wchar_t *fileName, const wchar_t*) const
{
static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr };
diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index 489ac038..21356924 100644 --- a/src/shared/fallout3info.h +++ b/src/shared/fallout3info.h @@ -20,7 +20,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #ifndef FALLOUT3INFO_H
#define FALLOUT3INFO_H
-
#include "gameinfo.h"
namespace MOShared {
@@ -36,22 +35,18 @@ public: virtual ~Fallout3Info() {}
static std::wstring getRegPathStatic();
- virtual std::wstring getRegPath() { return getRegPathStatic(); }
+ virtual std::wstring getRegPath() const { return getRegPathStatic(); }
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions();
+ virtual std::vector<std::wstring> getSavegameAttachmentExtensions() const;
// file name of this games ini (no path)
- virtual std::vector<std::wstring> getIniFileNames();
-
- virtual std::wstring getReferenceDataFile();
+ virtual std::vector<std::wstring> getIniFileNames() const;
- virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath);
+ virtual std::wstring getReferenceDataFile() const;
- // get a list of executables (game binary and known-to-work 3rd party tools). All of these are relative to
- // the game directory
- //virtual std::vector<ExecutableInfo> getExecutables();
+ virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) const;
- virtual std::wstring archiveListKey() { return L"SArchiveList"; }
+ virtual std::wstring archiveListKey() const { return L"SArchiveList"; }
private:
diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp index 88985ad6..80d2fba5 100644 --- a/src/shared/falloutnvinfo.cpp +++ b/src/shared/falloutnvinfo.cpp @@ -63,22 +63,22 @@ std::wstring FalloutNVInfo::getRegPathStatic() }
}
-std::vector<std::wstring> FalloutNVInfo::getSavegameAttachmentExtensions()
+std::vector<std::wstring> FalloutNVInfo::getSavegameAttachmentExtensions() const
{
return std::vector<std::wstring>();
}
-std::vector<std::wstring> FalloutNVInfo::getIniFileNames()
+std::vector<std::wstring> FalloutNVInfo::getIniFileNames() const
{
return boost::assign::list_of(L"fallout.ini")(L"falloutprefs.ini");
}
-std::wstring FalloutNVInfo::getReferenceDataFile()
+std::wstring FalloutNVInfo::getReferenceDataFile() const
{
return L"Fallout - Meshes.bsa";
}
-bool FalloutNVInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*)
+bool FalloutNVInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) const
{
static LPCWSTR profileFiles[] = { L"fallout.ini", L"falloutprefs.ini", L"plugins.txt", nullptr };
diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index a0bc5bd4..4bffff3f 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -36,22 +36,18 @@ public: virtual ~FalloutNVInfo() {}
static std::wstring getRegPathStatic();
- virtual std::wstring getRegPath() { return getRegPathStatic(); }
+ virtual std::wstring getRegPath() const { return getRegPathStatic(); }
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions();
+ virtual std::vector<std::wstring> getSavegameAttachmentExtensions() const;
// file name of this games ini (no path)
- virtual std::vector<std::wstring> getIniFileNames();
+ virtual std::vector<std::wstring> getIniFileNames() const;
- virtual std::wstring getReferenceDataFile();
+ virtual std::wstring getReferenceDataFile() const;
- virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath);
+ virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) const;
- // get a list of executables (game binary and known-to-work 3rd party tools). All of these are relative to
- // the game directory
- //virtual std::vector<ExecutableInfo> getExecutables();
-
- virtual std::wstring archiveListKey() { return L"SArchiveList"; }
+ virtual std::wstring archiveListKey() const { return L"SArchiveList"; }
private:
diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp index 2890e9cc..e77b9d17 100644 --- a/src/shared/gameinfo.cpp +++ b/src/shared/gameinfo.cpp @@ -86,7 +86,6 @@ void GameInfo::identifyMyGamesDirectory(const std::wstring &file) }
}
-
bool GameInfo::identifyGame(const std::wstring &searchPath)
{
if (OblivionInfo::identifyGame(searchPath)) {
diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 9e6a35ef..a5c615cf 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -47,7 +47,7 @@ public: //**Used only in savegame which needs refactoring a lot.
// get a list of file extensions for additional files belonging to a save game
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions() = 0;
+ virtual std::vector<std::wstring> getSavegameAttachmentExtensions() const = 0;
//**USED ONLY IN HOOKDLL
virtual std::wstring getGameDirectory() const;
@@ -58,17 +58,17 @@ public: static bool init(const std::wstring &moDirectory, const std::wstring &gamePath = L"");
//**USED ONLY IN HOOKDLL
- virtual std::wstring getRegPath() = 0;
+ virtual std::wstring getRegPath() const = 0;
//**USED ONLY IN HOOKDLL
// file name of this games ini file(s)
- virtual std::vector<std::wstring> getIniFileNames() = 0;
+ virtual std::vector<std::wstring> getIniFileNames() const = 0;
//**USED ONLY IN HOOKDLL
- virtual std::wstring getReferenceDataFile() = 0;
+ virtual std::wstring getReferenceDataFile() const = 0;
//**USED ONLY IN HOOKDLL
- virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) = 0;
+ virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) const = 0;
protected:
@@ -78,6 +78,8 @@ protected: const std::wstring &getMyGamesDirectory() const { return m_MyGamesDirectory; }
void identifyMyGamesDirectory(const std::wstring &file);
+ bool isValidModURL(int modID, const std::wstring &url, const std::wstring &alt) const;
+
private:
static bool identifyGame(const std::wstring &searchPath);
diff --git a/src/shared/oblivioninfo.cpp b/src/shared/oblivioninfo.cpp index a3dc3986..8f1f1843 100644 --- a/src/shared/oblivioninfo.cpp +++ b/src/shared/oblivioninfo.cpp @@ -66,18 +66,18 @@ std::wstring OblivionInfo::getRegPathStatic() -std::vector<std::wstring> OblivionInfo::getSavegameAttachmentExtensions()
+std::vector<std::wstring> OblivionInfo::getSavegameAttachmentExtensions() const
{
return boost::assign::list_of(L"obse");
}
-std::vector<std::wstring> OblivionInfo::getIniFileNames()
+std::vector<std::wstring> OblivionInfo::getIniFileNames() const
{
return boost::assign::list_of(L"oblivion.ini")(L"oblivionprefs.ini");
}
-bool OblivionInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*)
+bool OblivionInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) const
{
static LPCWSTR profileFiles[] = { L"oblivion.ini", L"oblivionprefs.ini", L"plugins.txt", nullptr };
@@ -89,7 +89,7 @@ bool OblivionInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t*) return false;
}
-std::wstring OblivionInfo::getReferenceDataFile()
+std::wstring OblivionInfo::getReferenceDataFile() const
{
return L"Oblivion - Meshes.bsa";
}
diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index 1e48b742..fc949f4b 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -34,22 +34,18 @@ public: virtual ~OblivionInfo() {}
static std::wstring getRegPathStatic();
- virtual std::wstring getRegPath() { return getRegPathStatic(); }
+ virtual std::wstring getRegPath() const { return getRegPathStatic(); }
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions();
+ virtual std::vector<std::wstring> getSavegameAttachmentExtensions() const;
// file name of this games ini (no path)
- virtual std::vector<std::wstring> getIniFileNames();
+ virtual std::vector<std::wstring> getIniFileNames() const;
- virtual std::wstring getReferenceDataFile();
+ virtual std::wstring getReferenceDataFile() const;
- virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath);
+ virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) const;
- // get a list of executables (game binary and known-to-work 3rd party tools). All of these are relative to
- // the game directory
- //virtual std::vector<ExecutableInfo> getExecutables();
-
- virtual std::wstring archiveListKey() { return L"SArchiveList"; }
+ virtual std::wstring archiveListKey() const { return L"SArchiveList"; }
private:
diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp index 869ac47d..d255e60f 100644 --- a/src/shared/skyriminfo.cpp +++ b/src/shared/skyriminfo.cpp @@ -73,22 +73,22 @@ std::wstring SkyrimInfo::getRegPathStatic() }
}
-std::vector<std::wstring> SkyrimInfo::getSavegameAttachmentExtensions()
+std::vector<std::wstring> SkyrimInfo::getSavegameAttachmentExtensions() const
{
return boost::assign::list_of(L"skse");
}
-std::vector<std::wstring> SkyrimInfo::getIniFileNames()
+std::vector<std::wstring> SkyrimInfo::getIniFileNames() const
{
return boost::assign::list_of(L"skyrim.ini")(L"skyrimprefs.ini");
}
-std::wstring SkyrimInfo::getReferenceDataFile()
+std::wstring SkyrimInfo::getReferenceDataFile() const
{
return L"Skyrim - Meshes.bsa";
}
-bool SkyrimInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath)
+bool SkyrimInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) const
{
static LPCWSTR profileFiles[] = { L"skyrim.ini", L"skyrimprefs.ini", L"loadorder.txt", nullptr };
@@ -106,5 +106,4 @@ bool SkyrimInfo::rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPa return false;
}
-
} // namespace MOShared
diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index ce2510f1..ac979d20 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -36,16 +36,16 @@ public: virtual ~SkyrimInfo() {}
static std::wstring getRegPathStatic();
- virtual std::wstring getRegPath() { return getRegPathStatic(); }
+ virtual std::wstring getRegPath() const { return getRegPathStatic(); }
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions();
+ virtual std::vector<std::wstring> getSavegameAttachmentExtensions() const;
// file name of this games ini (no path)
- virtual std::vector<std::wstring> getIniFileNames();
+ virtual std::vector<std::wstring> getIniFileNames() const;
- virtual std::wstring getReferenceDataFile();
+ virtual std::wstring getReferenceDataFile() const;
- virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath);
+ virtual bool rerouteToProfile(const wchar_t *fileName, const wchar_t *fullPath) const;
private:
|
