diff options
| author | Tannin <sherb@gmx.net> | 2015-12-07 21:00:22 +0100 |
|---|---|---|
| committer | Tannin <sherb@gmx.net> | 2015-12-07 21:00:22 +0100 |
| commit | e60e2858d8b6c40150ae0dee2ba267fecfa17979 (patch) | |
| tree | 98f9645b57264524a00015d92cb1987b0802e238 /src/shared | |
| parent | 495846534d560f825819b7ee391e8c461ce76e4f (diff) | |
| parent | 752bed064c24593e04ad121c29d40a20bbfc679a (diff) | |
Merge branch 'master' into new_vfs_library
Conflicts:
src/gameinfoimpl.cpp
src/installationmanager.cpp
src/mainwindow.cpp
src/organizercore.cpp
src/organizercore.h
src/organizerproxy.cpp
src/organizerproxy.h
src/savegamegamebryo.cpp
src/savegamegamebyro.h
src/selfupdater.h
src/shared/fallout3info.cpp
src/shared/fallout3info.h
src/shared/falloutnvinfo.cpp
src/shared/falloutnvinfo.h
src/shared/gameinfo.cpp
src/shared/gameinfo.h
src/shared/oblivioninfo.cpp
src/shared/oblivioninfo.h
src/shared/skyriminfo.cpp
src/shared/skyriminfo.h
src/spawn.cpp
src/transfersavesdialog.cpp
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/SConscript | 10 | ||||
| -rw-r--r-- | src/shared/fallout3info.cpp | 45 | ||||
| -rw-r--r-- | src/shared/fallout3info.h | 31 | ||||
| -rw-r--r-- | src/shared/fallout4info.cpp | 11 | ||||
| -rw-r--r-- | src/shared/fallout4info.h | 11 | ||||
| -rw-r--r-- | src/shared/falloutnvinfo.cpp | 51 | ||||
| -rw-r--r-- | src/shared/falloutnvinfo.h | 63 | ||||
| -rw-r--r-- | src/shared/gameinfo.cpp | 42 | ||||
| -rw-r--r-- | src/shared/gameinfo.h | 69 | ||||
| -rw-r--r-- | src/shared/oblivioninfo.cpp | 68 | ||||
| -rw-r--r-- | src/shared/oblivioninfo.h | 63 | ||||
| -rw-r--r-- | src/shared/skyriminfo.cpp | 68 | ||||
| -rw-r--r-- | src/shared/skyriminfo.h | 29 | ||||
| -rw-r--r-- | src/shared/stackdata.cpp | 5 |
14 files changed, 64 insertions, 502 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 a4b60410..446d4afe 100644 --- a/src/shared/fallout3info.cpp +++ b/src/shared/fallout3info.cpp @@ -30,8 +30,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. namespace MOShared {
-Fallout3Info::Fallout3Info(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory)
- : GameInfo(moDirectory, moDataDirectory, gameDirectory)
+Fallout3Info::Fallout3Info(const std::wstring &gameDirectory)
+ : GameInfo(gameDirectory)
{
identifyMyGamesDirectory(L"fallout3");
}
@@ -63,48 +63,9 @@ std::wstring Fallout3Info::getRegPathStatic() }
-std::vector<std::wstring> Fallout3Info::getDLCPlugins()
-{
- return boost::assign::list_of (L"ThePitt.esm")
- (L"Anchorage.esm")
- (L"BrokenSteel.esm")
- (L"PointLookout.esm")
- (L"Zeta.esm")
- ;
-}
-
-std::vector<std::wstring> Fallout3Info::getSavegameAttachmentExtensions()
-{
- 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()
-{
- return L"Fallout - Meshes.bsa";
-}
-
-std::wstring Fallout3Info::getNexusPage(bool nmmScheme)
-{
- if (nmmScheme) {
- return L"http://nmm.nexusmods.com/fallout3";
- } else {
- return L"http://www.nexusmods.com/fallout3";
- }
-}
-
-std::wstring Fallout3Info::getNexusInfoUrlStatic()
-{
- return L"http://nmm.nexusmods.com/fallout3";
-}
-
-int Fallout3Info::getNexusModIDStatic()
-{
- return 16348;
-}
-
} // namespace MOShared
diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h index 878adc2b..601fc346 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,38 +35,16 @@ public: virtual ~Fallout3Info() {}
static std::wstring getRegPathStatic();
- virtual std::wstring getRegPath() { return getRegPathStatic(); }
- virtual std::wstring getBinaryName() { return L"Fallout3.exe"; }
-
- virtual GameInfo::Type getType() { return TYPE_FALLOUT3; }
-
- virtual std::wstring getGameName() const { return L"Fallout 3"; }
- virtual std::wstring getGameShortName() const { return L"Fallout3"; }
-
- virtual std::vector<std::wstring> getDLCPlugins();
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions();
+ virtual std::wstring getRegPath() const { return getRegPathStatic(); }
// file name of this games ini (no path)
- virtual std::vector<std::wstring> getIniFileNames();
-
- virtual std::wstring getReferenceDataFile();
-
- virtual std::wstring getNexusPage(bool nmmScheme = true);
- static std::wstring getNexusInfoUrlStatic();
- virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); }
- static int getNexusModIDStatic();
- virtual int getNexusModID() { return getNexusModIDStatic(); }
- virtual int getNexusGameID() { return 120; }
-
- // 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::vector<std::wstring> getIniFileNames() const;
- virtual std::wstring archiveListKey() { return L"SArchiveList"; }
+ virtual std::wstring archiveListKey() const { return L"SArchiveList"; }
private:
- Fallout3Info(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory);
+ Fallout3Info(const std::wstring &gameDirectory);
static bool identifyGame(const std::wstring &searchPath);
diff --git a/src/shared/fallout4info.cpp b/src/shared/fallout4info.cpp index c9229793..aab431ad 100644 --- a/src/shared/fallout4info.cpp +++ b/src/shared/fallout4info.cpp @@ -30,8 +30,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. namespace MOShared { -Fallout4Info::Fallout4Info(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory) - : GameInfo(moDirectory, moDataDirectory, gameDirectory) +Fallout4Info::Fallout4Info(const std::wstring &gameDirectory) + : GameInfo(gameDirectory) { identifyMyGamesDirectory(L"fallout4"); } @@ -73,16 +73,11 @@ std::vector<std::wstring> Fallout4Info::getSavegameAttachmentExtensions() return std::vector<std::wstring>(); } -std::vector<std::wstring> Fallout4Info::getIniFileNames() +std::vector<std::wstring> Fallout4Info::getIniFileNames() const { return boost::assign::list_of(L"fallout4.ini")(L"fallout4prefs.ini"); } -std::wstring Fallout4Info::getReferenceDataFile() -{ - return L"Fallout - Meshes.bsa"; -} - std::wstring Fallout4Info::getNexusPage(bool nmmScheme) { if (nmmScheme) { diff --git a/src/shared/fallout4info.h b/src/shared/fallout4info.h index 4a28e867..70c9b7d3 100644 --- a/src/shared/fallout4info.h +++ b/src/shared/fallout4info.h @@ -36,11 +36,9 @@ public: virtual ~Fallout4Info() {} static std::wstring getRegPathStatic(); - virtual std::wstring getRegPath() { return getRegPathStatic(); } + virtual std::wstring getRegPath() const { return getRegPathStatic(); } virtual std::wstring getBinaryName() { return L"Fallout4.exe"; } - virtual GameInfo::Type getType() { return TYPE_FALLOUT4; } - virtual std::wstring getGameName() const { return L"Fallout 4"; } virtual std::wstring getGameShortName() const { return L"Fallout4"; } @@ -48,9 +46,7 @@ public: virtual std::vector<std::wstring> getSavegameAttachmentExtensions(); // 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 std::wstring getNexusPage(bool nmmScheme = true); static std::wstring getNexusInfoUrlStatic(); @@ -67,10 +63,11 @@ public: private: - Fallout4Info(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory); + Fallout4Info(const std::wstring &gameDirectory); static bool identifyGame(const std::wstring &searchPath); + }; } // namespace MOShared diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp index 81a75af3..510dfa01 100644 --- a/src/shared/falloutnvinfo.cpp +++ b/src/shared/falloutnvinfo.cpp @@ -31,8 +31,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. namespace MOShared {
-FalloutNVInfo::FalloutNVInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory)
- : GameInfo(moDirectory, moDataDirectory, gameDirectory)
+FalloutNVInfo::FalloutNVInfo(const std::wstring &gameDirectory)
+ : GameInfo(gameDirectory)
{
identifyMyGamesDirectory(L"falloutnv");
}
@@ -63,54 +63,9 @@ std::wstring FalloutNVInfo::getRegPathStatic() }
}
-std::vector<std::wstring> FalloutNVInfo::getDLCPlugins()
-{
- return boost::assign::list_of (L"DeadMoney.esm")
- (L"HonestHearts.esm")
- (L"OldWorldBlues.esm")
- (L"LonesomeRoad.esm")
- (L"GunRunnersArsenal.esm")
- (L"CaravanPack.esm")
- (L"ClassicPack.esm")
- (L"MercenaryPack.esm")
- (L"TribalPack.esm")
- ;
-}
-
-std::vector<std::wstring> FalloutNVInfo::getSavegameAttachmentExtensions()
-{
- 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()
-{
- return L"Fallout - Meshes.bsa";
-}
-
-std::wstring FalloutNVInfo::getNexusPage(bool nmmScheme)
-{
- if (nmmScheme) {
- return L"http://nmm.nexusmods.com/newvegas";
- } else {
- return L"http://www.nexusmods.com/newvegas";
- }
-}
-
-
-std::wstring FalloutNVInfo::getNexusInfoUrlStatic()
-{
- return L"http://nmm.nexusmods.com/newvegas";
-}
-
-
-int FalloutNVInfo::getNexusModIDStatic()
-{
- return 42572;
-}
-
} // namespace MOShared
diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h index 5712c2ba..a9b3b9ec 100644 --- a/src/shared/falloutnvinfo.h +++ b/src/shared/falloutnvinfo.h @@ -36,71 +36,14 @@ public: virtual ~FalloutNVInfo() {}
static std::wstring getRegPathStatic();
- virtual std::wstring getRegPath() { return getRegPathStatic(); }
- virtual std::wstring getBinaryName() { return L"FalloutNV.exe"; }
-
- virtual GameInfo::Type getType() { return TYPE_FALLOUTNV; }
-
- virtual std::wstring getGameName() const { return L"New Vegas"; }
- virtual std::wstring getGameShortName() const { return L"FalloutNV"; }
-
-// virtual bool requiresSteam() const { return true; }
-
-/* virtual std::wstring getInvalidationBSA()
- {
- return L"Fallout - Invalidation.bsa";
- }
-
- virtual bool isInvalidationBSA(const std::wstring &bsaName)
- {
- static LPCWSTR invalidation[] = { L"Fallout - AI!.bsa", L"Fallout - Invalidation.bsa", nullptr };
-
- for (int i = 0; invalidation[i] != nullptr; ++i) {
- if (wcscmp(bsaName.c_str(), invalidation[i]) == 0) {
- return true;
- }
- }
- return false;
- }
-
- virtual std::vector<std::wstring> getVanillaBSAs()
- {
- return boost::assign::list_of (L"Fallout - Textures.bsa")
- (L"Fallout - Textures2.bsa")
- (L"Fallout - Meshes.bsa")
- (L"Fallout - Voices1.bsa")
- (L"Fallout - Sound.bsa")
- (L"Fallout - Misc.bsa");
- }
-
- virtual std::vector<std::wstring> getPrimaryPlugins()
- {
- return boost::assign::list_of(L"falloutnv.esm");
- }*/
- virtual std::vector<std::wstring> getDLCPlugins();
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions();
+ virtual std::wstring getRegPath() const { return getRegPathStatic(); }
// file name of this games ini (no path)
- virtual std::vector<std::wstring> getIniFileNames();
-
- virtual std::wstring getReferenceDataFile();
-
- virtual std::wstring getNexusPage(bool nmmScheme = true);
- static std::wstring getNexusInfoUrlStatic();
- virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); }
- static int getNexusModIDStatic();
- virtual int getNexusModID() { return getNexusModIDStatic(); }
- virtual int getNexusGameID() { return 130; }
-
- // 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::vector<std::wstring> getIniFileNames() const;
private:
- FalloutNVInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory);
+ FalloutNVInfo(const std::wstring &gameDirectory);
static bool identifyGame(const std::wstring &searchPath);
};
diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp index d9dd9bb1..9b097053 100644 --- a/src/shared/gameinfo.cpp +++ b/src/shared/gameinfo.cpp @@ -41,8 +41,8 @@ namespace MOShared { GameInfo* GameInfo::s_Instance = nullptr;
-GameInfo::GameInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory)
- : m_GameDirectory(gameDirectory), m_OrganizerDirectory(moDirectory), m_OrganizerDataDirectory(moDataDirectory)
+GameInfo::GameInfo(const std::wstring &gameDirectory)
+ : m_GameDirectory(gameDirectory)
{
atexit(&cleanup);
}
@@ -87,39 +87,38 @@ void GameInfo::identifyMyGamesDirectory(const std::wstring &file) }
}
-
-bool GameInfo::identifyGame(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &searchPath)
+bool GameInfo::identifyGame(const std::wstring &searchPath)
{
if (OblivionInfo::identifyGame(searchPath)) {
- s_Instance = new OblivionInfo(moDirectory, moDataDirectory, searchPath);
+ s_Instance = new OblivionInfo(searchPath);
} else if (Fallout3Info::identifyGame(searchPath)) {
- s_Instance = new Fallout3Info(moDirectory, moDataDirectory, searchPath);
+ s_Instance = new Fallout3Info(searchPath);
} else if (FalloutNVInfo::identifyGame(searchPath)) {
- s_Instance = new FalloutNVInfo(moDirectory, moDataDirectory, searchPath);
+ s_Instance = new FalloutNVInfo(searchPath);
} else if (SkyrimInfo::identifyGame(searchPath)) {
- s_Instance = new SkyrimInfo(moDirectory, moDataDirectory, searchPath);
+ s_Instance = new SkyrimInfo(searchPath);
} else if (Fallout4Info::identifyGame(searchPath)) {
- s_Instance = new Fallout4Info(moDirectory, moDataDirectory, searchPath);
+ s_Instance = new Fallout4Info(searchPath);
}
return s_Instance != nullptr;
}
-bool GameInfo::init(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gamePath)
+bool GameInfo::init(const std::wstring &moDirectory, const std::wstring &gamePath)
{
if (s_Instance == nullptr) {
if (gamePath.length() == 0) {
// search upward in the directory until a recognized game-binary is found
std::wstring searchPath(moDirectory);
- while (!identifyGame(moDirectory, moDataDirectory, searchPath)) {
+ while (!identifyGame(searchPath)) {
size_t lastSep = searchPath.find_last_of(L"/\\");
if (lastSep == std::string::npos) {
return false;
}
searchPath.erase(lastSep);
}
- } else if (!identifyGame(moDirectory, moDataDirectory, gamePath)) {
+ } else if (!identifyGame(gamePath)) {
return false;
}
}
@@ -138,25 +137,6 @@ std::wstring GameInfo::getGameDirectory() const return m_GameDirectory;
}
-bool GameInfo::requiresSteam() const
-{
- return FileExists(getGameDirectory() + L"\\steam_api.dll")
- || FileExists(getGameDirectory() + L"\\steam_api64.dll");
-}
-
-std::wstring GameInfo::getLocalAppFolder() const
-{
- wchar_t localAppFolder[MAX_PATH];
- memset(localAppFolder, '\0', MAX_PATH * sizeof(wchar_t));
-
- if (::SHGetFolderPathW(nullptr, CSIDL_LOCAL_APPDATA, nullptr, SHGFP_TYPE_CURRENT, localAppFolder) == S_OK) {
- return localAppFolder;
- } else {
- // fallback: try the registry
- return getSpecialPath(L"Local AppData");
- }
-}
-
std::wstring GameInfo::getSpecialPath(LPCWSTR name) const
{
HKEY key;
diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h index 0e0052d7..c99ebef7 100644 --- a/src/shared/gameinfo.h +++ b/src/shared/gameinfo.h @@ -40,76 +40,35 @@ class GameInfo public:
- enum Type {
- TYPE_OBLIVION,
- TYPE_FALLOUT3,
- TYPE_FALLOUT4,
- TYPE_FALLOUTNV,
- TYPE_SKYRIM
- };
-
- enum LoadOrderMechanism {
- TYPE_FILETIME,
- TYPE_PLUGINSTXT
- };
-
-public:
-
virtual ~GameInfo() {}
- std::wstring getOrganizerDirectory() { return m_OrganizerDirectory; }
-
- virtual std::wstring getRegPath() = 0;
- virtual std::wstring getBinaryName() = 0;
-
- virtual GameInfo::Type getType() = 0;
-
- virtual std::wstring getGameName() const = 0;
- virtual std::wstring getGameShortName() const = 0;
+ //**USED IN HOOKDLL and at startup to set up for hookdll to work
+ // initialise with the path to the mo directory (needs to be where hook.dll is stored). This
+ // needs to be called before the instance can be retrieved
+ static bool init(const std::wstring &moDirectory, const std::wstring &gamePath = L"");
- /// determine the load order mechanism used by this game. this may throw an
- /// exception if the mechanism can't be determined
- virtual LoadOrderMechanism getLoadOrderMechanism() const { return TYPE_FILETIME; }
+ //**USED ONLY IN HOOKDLL
+ static GameInfo& instance();
+ //**USED ONLY IN HOOKDLL
virtual std::wstring getGameDirectory() const;
- virtual bool requiresSteam() const;
-
- // get a list of file extensions for additional files belonging to a save game
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions() = 0;
-
- // get a set of esp/esm files that are part of known dlcs
- virtual std::vector<std::wstring> getDLCPlugins() = 0;
+ //**USED ONLY IN HOOKDLL
+ 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::wstring getReferenceDataFile() = 0;
-
- virtual std::wstring getNexusPage(bool nmmScheme = true) = 0;
- virtual std::wstring getNexusInfoUrl() = 0;
- virtual int getNexusModID() = 0;
- virtual int getNexusGameID() = 0;
-
-public:
-
- // initialise with the path to the mo directory (needs to be where hook.dll is stored). This
- // needs to be called before the instance can be retrieved
- static bool init(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gamePath = L"");
-
- static GameInfo& instance();
+ virtual std::vector<std::wstring> getIniFileNames() const = 0;
protected:
- GameInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory);
+ GameInfo(const std::wstring &gameDirectory);
- std::wstring getLocalAppFolder() const;
- const std::wstring &getMyGamesDirectory() const { return m_MyGamesDirectory; }
void identifyMyGamesDirectory(const std::wstring &file);
private:
- static bool identifyGame(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &searchPath);
+ static bool identifyGame(const std::wstring &searchPath);
std::wstring getSpecialPath(LPCWSTR name) const;
static void cleanup();
@@ -121,8 +80,6 @@ private: std::wstring m_MyGamesDirectory;
std::wstring m_GameDirectory;
- std::wstring m_OrganizerDirectory;
- std::wstring m_OrganizerDataDirectory;
};
diff --git a/src/shared/oblivioninfo.cpp b/src/shared/oblivioninfo.cpp index c60f8911..b290fb36 100644 --- a/src/shared/oblivioninfo.cpp +++ b/src/shared/oblivioninfo.cpp @@ -31,8 +31,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. namespace MOShared {
-OblivionInfo::OblivionInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory)
- : GameInfo(moDirectory, moDataDirectory, gameDirectory)
+OblivionInfo::OblivionInfo(const std::wstring &gameDirectory)
+ : GameInfo(gameDirectory)
{
identifyMyGamesDirectory(L"oblivion");
}
@@ -63,71 +63,9 @@ std::wstring OblivionInfo::getRegPathStatic() }
}
-
-
-
-
-
-
-
-
-
-
-std::vector<std::wstring> OblivionInfo::getDLCPlugins()
-{
- return boost::assign::list_of (L"DLCShiveringIsles.esp")
- (L"Knights.esp")
- (L"DLCFrostcrag.esp")
- (L"DLCSpellTomes.esp")
- (L"DLCMehrunesRazor.esp")
- (L"DLCOrrery.esp")
- (L"DLCSpellTomes.esp")
- (L"DLCThievesDen.esp")
- (L"DLCVileLair.esp")
- (L"DLCHorseArmor.esp")
- ;
-}
-
-
-std::vector<std::wstring> OblivionInfo::getSavegameAttachmentExtensions()
-{
- 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");
}
-
-
-
-
-std::wstring OblivionInfo::getNexusPage(bool nmmScheme)
-{
- if (nmmScheme) {
- return L"http://nmm.nexusmods.com/oblivion";
- } else {
- return L"http://www.nexusmods.com/oblivion";
- }
-}
-
-
-std::wstring OblivionInfo::getNexusInfoUrlStatic()
-{
- return L"http://nmm.nexusmods.com/oblivion";
-}
-
-
-int OblivionInfo::getNexusModIDStatic()
-{
- return 38277;
-}
-
-std::wstring OblivionInfo::getReferenceDataFile()
-{
- return L"Oblivion - Meshes.bsa";
-}
-
} // namespace MOShared
diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h index 1ef5b48e..6609921a 100644 --- a/src/shared/oblivioninfo.h +++ b/src/shared/oblivioninfo.h @@ -34,71 +34,16 @@ public: virtual ~OblivionInfo() {}
static std::wstring getRegPathStatic();
- virtual std::wstring getRegPath() { return getRegPathStatic(); }
- virtual std::wstring getBinaryName() { return L"Oblivion.exe"; }
-
- virtual GameInfo::Type getType() { return TYPE_OBLIVION; }
-
- virtual std::wstring getGameName() const { return L"Oblivion"; }
- virtual std::wstring getGameShortName() const { return L"Oblivion"; }
-/*
- virtual std::wstring getInvalidationBSA()
- {
- return L"Oblivion - Invalidation.bsa";
- }
-
- virtual bool isInvalidationBSA(const std::wstring &bsaName)
- {
- static LPCWSTR invalidation[] = { L"Oblivion - Invalidation.bsa", L"ArchiveInvalidationInvalidated!.bsa",
- L"BSARedirection.bsa", nullptr };
-
- for (int i = 0; invalidation[i] != nullptr; ++i) {
- if (wcscmp(bsaName.c_str(), invalidation[i]) == 0) {
- return true;
- }
- }
- return false;
- }
-
- virtual std::vector<std::wstring> getVanillaBSAs()
- {
- return boost::assign::list_of(L"Oblivion - Meshes.bsa")
- (L"Oblivion - Textures - Compressed.bsa")
- (L"Oblivion - Sounds.bsa")
- (L"Oblivion - Voices1.bsa")
- (L"Oblivion - Voices2.bsa")
- (L"Oblivion - Misc.bsa");
- }
-
- virtual std::vector<std::wstring> getPrimaryPlugins()
- {
- return boost::assign::list_of(L"oblivion.esm");
- }*/
-
- virtual std::vector<std::wstring> getDLCPlugins();
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions();
+ virtual std::wstring getRegPath() const { return getRegPathStatic(); }
// file name of this games ini (no path)
- virtual std::vector<std::wstring> getIniFileNames();
-
- virtual std::wstring getReferenceDataFile();
-
- virtual std::wstring getNexusPage(bool nmmScheme = true);
- static std::wstring getNexusInfoUrlStatic();
- virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); }
- static int getNexusModIDStatic();
- virtual int getNexusModID() { return getNexusModIDStatic(); }
- virtual int getNexusGameID() { return 101; }
-
- // 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::vector<std::wstring> getIniFileNames() const;
- virtual std::wstring archiveListKey() { return L"SArchiveList"; }
+ virtual std::wstring archiveListKey() const { return L"SArchiveList"; }
private:
- OblivionInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory);
+ OblivionInfo(const std::wstring &gameDirectory);
static bool identifyGame(const std::wstring &searchPath);
diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp index acd72a3f..fbe13ae0 100644 --- a/src/shared/skyriminfo.cpp +++ b/src/shared/skyriminfo.cpp @@ -33,8 +33,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. namespace MOShared {
-SkyrimInfo::SkyrimInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory)
- : GameInfo(moDirectory, moDataDirectory, gameDirectory)
+SkyrimInfo::SkyrimInfo(const std::wstring &gameDirectory)
+ : GameInfo(gameDirectory)
{
identifyMyGamesDirectory(L"skyrim");
@@ -73,71 +73,9 @@ std::wstring SkyrimInfo::getRegPathStatic() }
}
-GameInfo::LoadOrderMechanism SkyrimInfo::getLoadOrderMechanism() const
-{
- std::wstring fileName = getGameDirectory() + L"\\TESV.exe";
-
- try {
- VS_FIXEDFILEINFO versionInfo = GetFileVersion(fileName);
- if ((versionInfo.dwFileVersionMS > 0x10004) || // version >= 1.5.x?
- ((versionInfo.dwFileVersionMS == 0x10004) && (versionInfo.dwFileVersionLS >= 0x1A0000))) { // version >= ?.4.26
- return TYPE_PLUGINSTXT;
- } else {
- return TYPE_FILETIME;
- }
- } catch (const std::exception &e) {
- log("TESV.exe is invalid: %s", e.what());
- return TYPE_FILETIME;
- }
-}
-
-std::vector<std::wstring> SkyrimInfo::getDLCPlugins()
-{
- return boost::assign::list_of (L"Dawnguard.esm")
- (L"Dragonborn.esm")
- (L"HearthFires.esm")
- (L"HighResTexturePack01.esp")
- (L"HighResTexturePack02.esp")
- (L"HighResTexturePack03.esp")
- ;
-}
-
-std::vector<std::wstring> SkyrimInfo::getSavegameAttachmentExtensions()
-{
- 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()
-{
- return L"Skyrim - Meshes.bsa";
-}
-
-
-std::wstring SkyrimInfo::getNexusPage(bool nmmScheme)
-{
- if (nmmScheme) {
- return L"http://nmm.nexusmods.com/skyrim";
- } else {
- return L"http://www.nexusmods.com/skyrim";
- }
-}
-
-
-std::wstring SkyrimInfo::getNexusInfoUrlStatic()
-{
- return L"http://nmm.nexusmods.com/skyrim";
-}
-
-
-int SkyrimInfo::getNexusModIDStatic()
-{
- return 1334;
-}
-
-
} // namespace MOShared
diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h index 732b9261..a13b834e 100644 --- a/src/shared/skyriminfo.h +++ b/src/shared/skyriminfo.h @@ -36,37 +36,14 @@ public: virtual ~SkyrimInfo() {}
static std::wstring getRegPathStatic();
- virtual std::wstring getRegPath() { return getRegPathStatic(); }
- virtual std::wstring getBinaryName() { return L"TESV.exe"; }
-
- virtual GameInfo::Type getType() { return TYPE_SKYRIM; }
-
- virtual std::wstring getGameName() const { return L"Skyrim"; }
- virtual std::wstring getGameShortName() const { return L"Skyrim"; }
-
- virtual LoadOrderMechanism getLoadOrderMechanism() const;
-
- virtual std::vector<std::wstring> getDLCPlugins();
-
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions();
+ virtual std::wstring getRegPath() const { return getRegPathStatic(); }
// file name of this games ini (no path)
- virtual std::vector<std::wstring> getIniFileNames();
-
- virtual std::wstring getReferenceDataFile();
-
- virtual std::wstring getNexusPage(bool nmmScheme = true);
-
- static std::wstring getNexusInfoUrlStatic();
- virtual std::wstring getNexusInfoUrl() { return getNexusInfoUrlStatic(); }
- static int getNexusModIDStatic();
- virtual int getNexusModID() { return getNexusModIDStatic(); }
- static int getNexusGameIDStatic() { return 110; }
- virtual int getNexusGameID() { return getNexusGameIDStatic(); }
+ virtual std::vector<std::wstring> getIniFileNames() const;
private:
- SkyrimInfo(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &gameDirectory);
+ SkyrimInfo(const std::wstring &gameDirectory);
static bool identifyGame(const std::wstring &searchPath);
diff --git a/src/shared/stackdata.cpp b/src/shared/stackdata.cpp index 6c5a0968..b336593a 100644 --- a/src/shared/stackdata.cpp +++ b/src/shared/stackdata.cpp @@ -24,7 +24,7 @@ static void initDbgIfNecess() firstCall = false;
}
if (!::SymInitialize(process, NULL, TRUE)) {
- printf("failed to initialize symbols: %d", ::GetLastError());
+ printf("failed to initialize symbols: %lu", ::GetLastError());
}
initialized.insert(::GetCurrentProcessId());
}
@@ -99,7 +99,8 @@ void StackData::initTrace() { CONTEXT context;
std::memset(&context, 0, sizeof(CONTEXT));
context.ContextFlags = CONTEXT_CONTROL;
-#if BOOST_ARCH_X86_64
+ //Why only for 64 bit?
+#if BOOST_ARCH_X86_64 || defined(__clang__)
::RtlCaptureContext(&context);
#else
__asm
|
