summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTannin <sherb@gmx.net>2016-05-16 16:03:36 +0200
committerTannin <sherb@gmx.net>2016-05-16 16:03:36 +0200
commit986330a3bd8e0a4717a0a1aa26f4acd2c04de1ac (patch)
tree03a777f9d3ab0c26e17c63f60a689656b8fee344 /src
parent81c5ca53087bd0a72ecb60ba308ba1f9134accf3 (diff)
removed obsolete stuff
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp1
-rw-r--r--src/pluginlist.cpp1
-rw-r--r--src/shared/fallout3info.cpp71
-rw-r--r--src/shared/fallout3info.h55
-rw-r--r--src/shared/fallout4info.cpp100
-rw-r--r--src/shared/fallout4info.h75
-rw-r--r--src/shared/falloutnvinfo.cpp71
-rw-r--r--src/shared/falloutnvinfo.h53
-rw-r--r--src/shared/gameinfo.cpp167
-rw-r--r--src/shared/gameinfo.h89
-rw-r--r--src/shared/oblivioninfo.cpp71
-rw-r--r--src/shared/oblivioninfo.h54
-rw-r--r--src/shared/skyriminfo.cpp81
-rw-r--r--src/shared/skyriminfo.h58
-rw-r--r--src/spawn.cpp1
15 files changed, 0 insertions, 948 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 3cced2a1..6940e288 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -27,7 +27,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <windows.h>
#include <DbgHelp.h>
-#include <inject.h>
#include <appconfig.h>
#include <utility.h>
#include <scopeguard.h>
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp
index 5c21d0c8..8d37ab82 100644
--- a/src/pluginlist.cpp
+++ b/src/pluginlist.cpp
@@ -18,7 +18,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
*/
#include "pluginlist.h"
-#include "inject.h"
#include "settings.h"
#include "scopeguard.h"
#include "modinfo.h"
diff --git a/src/shared/fallout3info.cpp b/src/shared/fallout3info.cpp
deleted file mode 100644
index 446d4afe..00000000
--- a/src/shared/fallout3info.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "fallout3info.h"
-#include "util.h"
-#include <tchar.h>
-#include <ShlObj.h>
-#include <sstream>
-#include "windows_error.h"
-#include "error_report.h"
-#define WIN32_LEAN_AND_MEAN
-#include <Windows.h>
-#include <boost/assign.hpp>
-
-namespace MOShared {
-
-Fallout3Info::Fallout3Info(const std::wstring &gameDirectory)
- : GameInfo(gameDirectory)
-{
- identifyMyGamesDirectory(L"fallout3");
-}
-
-bool Fallout3Info::identifyGame(const std::wstring &searchPath)
-{
- return FileExists(searchPath, L"Fallout3.exe") &&
- FileExists(searchPath, L"FalloutLauncher.exe");
-}
-
-std::wstring Fallout3Info::getRegPathStatic()
-{
- HKEY key;
- LONG errorcode = ::RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\Bethesda Softworks\\Fallout3",
- 0, KEY_QUERY_VALUE, &key);
-
- if (errorcode != ERROR_SUCCESS) {
- return std::wstring();
- }
-
- WCHAR temp[MAX_PATH];
- DWORD bufferSize = MAX_PATH;
-
- if (::RegQueryValueExW(key, L"Installed Path", nullptr, nullptr, (LPBYTE)temp, &bufferSize) == ERROR_SUCCESS) {
- return std::wstring(temp);
- } else {
- return std::wstring();
- }
-}
-
-
-std::vector<std::wstring> Fallout3Info::getIniFileNames() const
-{
- return boost::assign::list_of(L"fallout.ini")(L"falloutprefs.ini");
-}
-
-} // namespace MOShared
diff --git a/src/shared/fallout3info.h b/src/shared/fallout3info.h
deleted file mode 100644
index 601fc346..00000000
--- a/src/shared/fallout3info.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef FALLOUT3INFO_H
-#define FALLOUT3INFO_H
-
-#include "gameinfo.h"
-
-namespace MOShared {
-
-
-class Fallout3Info : public GameInfo
-{
-
- friend class GameInfo;
-
-public:
-
- virtual ~Fallout3Info() {}
-
- static std::wstring getRegPathStatic();
- virtual std::wstring getRegPath() const { return getRegPathStatic(); }
-
- // file name of this games ini (no path)
- virtual std::vector<std::wstring> getIniFileNames() const;
-
- virtual std::wstring archiveListKey() const { return L"SArchiveList"; }
-
-private:
-
- Fallout3Info(const std::wstring &gameDirectory);
-
- static bool identifyGame(const std::wstring &searchPath);
-
-};
-
-} // namespace MOShared
-
-#endif // FALLOUT3INFO_H
diff --git a/src/shared/fallout4info.cpp b/src/shared/fallout4info.cpp
deleted file mode 100644
index aab431ad..00000000
--- a/src/shared/fallout4info.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "fallout4info.h"
-#include "util.h"
-#include <tchar.h>
-#include <ShlObj.h>
-#include <sstream>
-#include "windows_error.h"
-#include "error_report.h"
-#define WIN32_LEAN_AND_MEAN
-#include <Windows.h>
-#include <boost/assign.hpp>
-
-namespace MOShared {
-
-Fallout4Info::Fallout4Info(const std::wstring &gameDirectory)
- : GameInfo(gameDirectory)
-{
- identifyMyGamesDirectory(L"fallout4");
-}
-
-bool Fallout4Info::identifyGame(const std::wstring &searchPath)
-{
- return FileExists(searchPath, L"Fallout4.exe") &&
- FileExists(searchPath, L"Fallout4Launcher.exe");
-}
-
-std::wstring Fallout4Info::getRegPathStatic()
-{
- HKEY key;
- LONG errorcode = ::RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\Bethesda Softworks\\Fallout4",
- 0, KEY_QUERY_VALUE, &key);
-
- if (errorcode != ERROR_SUCCESS) {
- return std::wstring();
- }
-
- WCHAR temp[MAX_PATH];
- DWORD bufferSize = MAX_PATH;
-
- if (::RegQueryValueExW(key, L"Installed Path", nullptr, nullptr, (LPBYTE)temp, &bufferSize) == ERROR_SUCCESS) {
- return std::wstring(temp);
- } else {
- return std::wstring();
- }
-}
-
-
-std::vector<std::wstring> Fallout4Info::getDLCPlugins()
-{
- return std::vector<std::wstring>();
-}
-
-std::vector<std::wstring> Fallout4Info::getSavegameAttachmentExtensions()
-{
- return std::vector<std::wstring>();
-}
-
-std::vector<std::wstring> Fallout4Info::getIniFileNames() const
-{
- return boost::assign::list_of(L"fallout4.ini")(L"fallout4prefs.ini");
-}
-
-std::wstring Fallout4Info::getNexusPage(bool nmmScheme)
-{
- if (nmmScheme) {
- return L"http://nmm.nexusmods.com/fallout4";
- } else {
- return L"http://www.nexusmods.com/fallout4";
- }
-}
-
-std::wstring Fallout4Info::getNexusInfoUrlStatic()
-{
- return L"http://nmm.nexusmods.com/fallout4";
-}
-
-int Fallout4Info::getNexusModIDStatic()
-{
- return 377160;
-}
-
-} // namespace MOShared
diff --git a/src/shared/fallout4info.h b/src/shared/fallout4info.h
deleted file mode 100644
index 70c9b7d3..00000000
--- a/src/shared/fallout4info.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef FALLOUT4INFO_H
-#define FALLOUT4INFO_H
-
-
-#include "gameinfo.h"
-
-namespace MOShared {
-
-
-class Fallout4Info : public GameInfo
-{
-
- friend class GameInfo;
-
-public:
-
- virtual ~Fallout4Info() {}
-
- static std::wstring getRegPathStatic();
- virtual std::wstring getRegPath() const { return getRegPathStatic(); }
- virtual std::wstring getBinaryName() { return L"Fallout4.exe"; }
-
- virtual std::wstring getGameName() const { return L"Fallout 4"; }
- virtual std::wstring getGameShortName() const { return L"Fallout4"; }
-
- virtual std::vector<std::wstring> getDLCPlugins();
- virtual std::vector<std::wstring> getSavegameAttachmentExtensions();
-
- // file name of this games ini (no path)
- virtual std::vector<std::wstring> getIniFileNames() const;
-
- 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 1151; }
-
- // 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"; }
-
-private:
-
- Fallout4Info(const std::wstring &gameDirectory);
-
- static bool identifyGame(const std::wstring &searchPath);
-
-
-};
-
-} // namespace MOShared
-
-#endif // FALLOUT3INFO_H
diff --git a/src/shared/falloutnvinfo.cpp b/src/shared/falloutnvinfo.cpp
deleted file mode 100644
index 510dfa01..00000000
--- a/src/shared/falloutnvinfo.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "falloutnvinfo.h"
-#include "util.h"
-#include <tchar.h>
-#include <ShlObj.h>
-#include <sstream>
-#include "windows_error.h"
-#include "error_report.h"
-#define WIN32_LEAN_AND_MEAN
-#include <Windows.h>
-#include <boost/assign.hpp>
-
-namespace MOShared {
-
-
-FalloutNVInfo::FalloutNVInfo(const std::wstring &gameDirectory)
- : GameInfo(gameDirectory)
-{
- identifyMyGamesDirectory(L"falloutnv");
-}
-
-bool FalloutNVInfo::identifyGame(const std::wstring &searchPath)
-{
- return FileExists(searchPath, L"FalloutNV.exe") &&
- FileExists(searchPath, L"FalloutNVLauncher.exe");
-}
-
-std::wstring FalloutNVInfo::getRegPathStatic()
-{
- HKEY key;
- LONG errorcode = ::RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\Bethesda Softworks\\FalloutNV",
- 0, KEY_QUERY_VALUE, &key);
-
- if (errorcode != ERROR_SUCCESS) {
- return std::wstring();
- }
-
- WCHAR temp[MAX_PATH];
- DWORD bufferSize = MAX_PATH;
-
- if (::RegQueryValueExW(key, L"Installed Path", nullptr, nullptr, (LPBYTE)temp, &bufferSize) == ERROR_SUCCESS) {
- return std::wstring(temp);
- } else {
- return std::wstring();
- }
-}
-
-std::vector<std::wstring> FalloutNVInfo::getIniFileNames() const
-{
- return boost::assign::list_of(L"fallout.ini")(L"falloutprefs.ini");
-}
-
-} // namespace MOShared
diff --git a/src/shared/falloutnvinfo.h b/src/shared/falloutnvinfo.h
deleted file mode 100644
index a9b3b9ec..00000000
--- a/src/shared/falloutnvinfo.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef FALLOUTNVINFO_H
-#define FALLOUTNVINFO_H
-
-
-#include "gameinfo.h"
-
-namespace MOShared {
-
-
-class FalloutNVInfo : public GameInfo
-{
-
- friend class GameInfo;
-
-public:
-
- virtual ~FalloutNVInfo() {}
-
- static std::wstring getRegPathStatic();
- virtual std::wstring getRegPath() const { return getRegPathStatic(); }
-
- // file name of this games ini (no path)
- virtual std::vector<std::wstring> getIniFileNames() const;
-
-private:
-
- FalloutNVInfo(const std::wstring &gameDirectory);
-
- static bool identifyGame(const std::wstring &searchPath);
-};
-
-} // namespace MOShared
-
-#endif // FALLOUTNVINFO_H
diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp
deleted file mode 100644
index 9b097053..00000000
--- a/src/shared/gameinfo.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "gameinfo.h"
-
-#include "windows_error.h"
-
-#include "oblivioninfo.h"
-#include "fallout3info.h"
-#include "fallout4info.h"
-#include "falloutnvinfo.h"
-#include "skyriminfo.h"
-#include "util.h"
-
-#include <boost/assign.hpp>
-#include <boost/format.hpp>
-
-#include <shlobj.h>
-#include <sstream>
-#include <cassert>
-
-namespace MOShared {
-
-
-GameInfo* GameInfo::s_Instance = nullptr;
-
-
-GameInfo::GameInfo(const std::wstring &gameDirectory)
- : m_GameDirectory(gameDirectory)
-{
- atexit(&cleanup);
-}
-
-
-void GameInfo::cleanup() {
- delete GameInfo::s_Instance;
- GameInfo::s_Instance = nullptr;
-}
-
-
-void GameInfo::identifyMyGamesDirectory(const std::wstring &file)
-{
- // this function attempts 3 (three!) ways to determine the correct "My Games" folder.
- wchar_t myDocuments[MAX_PATH];
- memset(myDocuments, '\0', MAX_PATH * sizeof(wchar_t));
-
- m_MyGamesDirectory.clear();
-
- // a) this is the way it should work. get the configured My Documents\My Games directory
- if (::SHGetFolderPathW(nullptr, CSIDL_PERSONAL, nullptr, SHGFP_TYPE_CURRENT, myDocuments) == S_OK) {
- m_MyGamesDirectory = std::wstring(myDocuments) + L"\\My Games";
- }
-
- // b) if there is no <game> directory there, look in the default directory
- if (m_MyGamesDirectory.empty()
- || !FileExists(m_MyGamesDirectory + L"\\" + file)) {
- if (::SHGetFolderPathW(nullptr, CSIDL_PERSONAL, nullptr, SHGFP_TYPE_DEFAULT, myDocuments) == S_OK) {
- std::wstring fromDefault = std::wstring(myDocuments) + L"\\My Games";
- if (FileExists(fromDefault + L"\\" + file)) {
- m_MyGamesDirectory = fromDefault;
- }
- }
- }
- // c) finally, look in the registry. This is discouraged
- if (m_MyGamesDirectory.empty()
- || !FileExists(m_MyGamesDirectory + L"\\" + file)) {
- std::wstring fromRegistry = getSpecialPath(L"Personal") + L"\\My Games";
- if (FileExists(fromRegistry + L"\\" + file)) {
- m_MyGamesDirectory = fromRegistry;
- }
- }
-}
-
-bool GameInfo::identifyGame(const std::wstring &searchPath)
-{
- if (OblivionInfo::identifyGame(searchPath)) {
- s_Instance = new OblivionInfo(searchPath);
- } else if (Fallout3Info::identifyGame(searchPath)) {
- s_Instance = new Fallout3Info(searchPath);
- } else if (FalloutNVInfo::identifyGame(searchPath)) {
- s_Instance = new FalloutNVInfo(searchPath);
- } else if (SkyrimInfo::identifyGame(searchPath)) {
- s_Instance = new SkyrimInfo(searchPath);
- } else if (Fallout4Info::identifyGame(searchPath)) {
- s_Instance = new Fallout4Info(searchPath);
- }
-
- return s_Instance != nullptr;
-}
-
-
-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(searchPath)) {
- size_t lastSep = searchPath.find_last_of(L"/\\");
- if (lastSep == std::string::npos) {
- return false;
- }
- searchPath.erase(lastSep);
- }
- } else if (!identifyGame(gamePath)) {
- return false;
- }
- }
- return true;
-}
-
-
-GameInfo &GameInfo::instance()
-{
- assert(s_Instance != nullptr && "gameinfo not yet initialized");
- return *s_Instance;
-}
-
-std::wstring GameInfo::getGameDirectory() const
-{
- return m_GameDirectory;
-}
-
-std::wstring GameInfo::getSpecialPath(LPCWSTR name) const
-{
- HKEY key;
- LONG errorcode = ::RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders",
- 0, KEY_QUERY_VALUE, &key);
-
- if (errorcode != ERROR_SUCCESS) {
- throw windows_error("failed to look up special folder (path)", errorcode);
- }
-
- WCHAR temp[MAX_PATH];
- DWORD bufferSize = MAX_PATH;
-
- errorcode = ::RegQueryValueExW(key, name, nullptr, nullptr, (LPBYTE)temp, &bufferSize);
- if (errorcode != ERROR_SUCCESS) {
- throw windows_error((boost::format("failed to look up special folder (%1%)") % ToString(name, true)).str(), errorcode);
- }
-
- WCHAR temp2[MAX_PATH];
- // try to expand variables in the path, if any
- if (::ExpandEnvironmentStringsW(temp, temp2, MAX_PATH) != 0) {
- return temp2;
- } else {
- return temp;
- }
-}
-
-} // namespace MOShared
diff --git a/src/shared/gameinfo.h b/src/shared/gameinfo.h
deleted file mode 100644
index c99ebef7..00000000
--- a/src/shared/gameinfo.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef GAMEINFO_H
-#define GAMEINFO_H
-
-#include <string>
-#include <vector>
-#include <wchar.h>
-
-#define WIN32_LEAN_AND_MEAN
-#include <Windows.h>
-
-namespace MOShared {
-
-
-/**
- Class to manage information that depends on the used game type. The intention is to keep
- as much of the rest of omo is game-agnostic. It is mostly concerned with figuring out the
- correct paths, filenames and data types.
-*/
-class GameInfo
-{
-
-public:
-
- virtual ~GameInfo() {}
-
- //**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"");
-
- //**USED ONLY IN HOOKDLL
- static GameInfo& instance();
-
- //**USED ONLY IN HOOKDLL
- virtual std::wstring getGameDirectory() const;
-
- //**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() const = 0;
-
-protected:
-
- GameInfo(const std::wstring &gameDirectory);
-
- void identifyMyGamesDirectory(const std::wstring &file);
-
-private:
-
- static bool identifyGame(const std::wstring &searchPath);
- std::wstring getSpecialPath(LPCWSTR name) const;
-
- static void cleanup();
-
-private:
-
- static GameInfo *s_Instance;
-
- std::wstring m_MyGamesDirectory;
-
- std::wstring m_GameDirectory;
-
-};
-
-
-} // namespace MOShared
-
-#endif // GAMEINFO_H
diff --git a/src/shared/oblivioninfo.cpp b/src/shared/oblivioninfo.cpp
deleted file mode 100644
index b290fb36..00000000
--- a/src/shared/oblivioninfo.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "oblivioninfo.h"
-#include <tchar.h>
-#include <ShlObj.h>
-#include "util.h"
-#include <sstream>
-#include "windows_error.h"
-#include "error_report.h"
-#define WIN32_LEAN_AND_MEAN
-#include <Windows.h>
-#include <boost/assign.hpp>
-
-namespace MOShared {
-
-
-OblivionInfo::OblivionInfo(const std::wstring &gameDirectory)
- : GameInfo(gameDirectory)
-{
- identifyMyGamesDirectory(L"oblivion");
-}
-
-bool OblivionInfo::identifyGame(const std::wstring &searchPath)
-{
- return FileExists(searchPath, L"Oblivion.exe") &&
- FileExists(searchPath, L"OblivionLauncher.exe");
-}
-
-std::wstring OblivionInfo::getRegPathStatic()
-{
- HKEY key;
- LONG errorcode = ::RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\Bethesda Softworks\\Oblivion",
- 0, KEY_QUERY_VALUE, &key);
-
- if (errorcode != ERROR_SUCCESS) {
- return std::wstring();
- }
-
- WCHAR temp[MAX_PATH];
- DWORD bufferSize = MAX_PATH;
-
- if (::RegQueryValueExW(key, L"Installed Path", nullptr, nullptr, (LPBYTE)temp, &bufferSize) == ERROR_SUCCESS) {
- return std::wstring(temp);
- } else {
- return std::wstring();
- }
-}
-
-std::vector<std::wstring> OblivionInfo::getIniFileNames() const
-{
- return boost::assign::list_of(L"oblivion.ini")(L"oblivionprefs.ini");
-}
-
-} // namespace MOShared
diff --git a/src/shared/oblivioninfo.h b/src/shared/oblivioninfo.h
deleted file mode 100644
index 6609921a..00000000
--- a/src/shared/oblivioninfo.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef OBLIVIONINFO_H
-#define OBLIVIONINFO_H
-
-#include "gameinfo.h"
-
-namespace MOShared {
-
-class OblivionInfo : public GameInfo
-{
-
- friend class GameInfo;
-
-public:
-
- virtual ~OblivionInfo() {}
-
- static std::wstring getRegPathStatic();
- virtual std::wstring getRegPath() const { return getRegPathStatic(); }
-
- // file name of this games ini (no path)
- virtual std::vector<std::wstring> getIniFileNames() const;
-
- virtual std::wstring archiveListKey() const { return L"SArchiveList"; }
-
-private:
-
- OblivionInfo(const std::wstring &gameDirectory);
-
- static bool identifyGame(const std::wstring &searchPath);
-
-};
-
-} // namespace MOShared
-
-#endif // OBLIVIONINFO_H
diff --git a/src/shared/skyriminfo.cpp b/src/shared/skyriminfo.cpp
deleted file mode 100644
index fbe13ae0..00000000
--- a/src/shared/skyriminfo.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "skyriminfo.h"
-
-#include "util.h"
-#include <tchar.h>
-#include <ShlObj.h>
-#include <sstream>
-#include "windows_error.h"
-#include "error_report.h"
-#define WIN32_LEAN_AND_MEAN
-#include <Windows.h>
-#include <Shlwapi.h>
-#include <boost/assign.hpp>
-
-namespace MOShared {
-
-
-SkyrimInfo::SkyrimInfo(const std::wstring &gameDirectory)
- : GameInfo(gameDirectory)
-{
- identifyMyGamesDirectory(L"skyrim");
-
- wchar_t appDataPath[MAX_PATH];
- if (SUCCEEDED(SHGetFolderPathW(nullptr, CSIDL_LOCAL_APPDATA, nullptr, SHGFP_TYPE_CURRENT, appDataPath))) {
- m_AppData = appDataPath;
- }
-}
-
-bool SkyrimInfo::identifyGame(const std::wstring &searchPath)
-{
- return FileExists(searchPath, L"TESV.exe") &&
- FileExists(searchPath, L"SkyrimLauncher.exe");
-}
-
-
-
-
-std::wstring SkyrimInfo::getRegPathStatic()
-{
- HKEY key;
- LONG errorcode = ::RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\Bethesda Softworks\\Skyrim",
- 0, KEY_QUERY_VALUE, &key);
-
- if (errorcode != ERROR_SUCCESS) {
- return std::wstring();
- }
-
- WCHAR temp[MAX_PATH];
- DWORD bufferSize = MAX_PATH;
-
- if (::RegQueryValueExW(key, L"Installed Path", nullptr, nullptr, (LPBYTE)temp, &bufferSize) == ERROR_SUCCESS) {
- return std::wstring(temp);
- } else {
- return std::wstring();
- }
-}
-
-std::vector<std::wstring> SkyrimInfo::getIniFileNames() const
-{
- return boost::assign::list_of(L"skyrim.ini")(L"skyrimprefs.ini");
-}
-
-} // namespace MOShared
diff --git a/src/shared/skyriminfo.h b/src/shared/skyriminfo.h
deleted file mode 100644
index a13b834e..00000000
--- a/src/shared/skyriminfo.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-Copyright (C) 2012 Sebastian Herbord. All rights reserved.
-
-This file is part of Mod Organizer.
-
-Mod Organizer is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-Mod Organizer is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef SKYRIMINFO_H
-#define SKYRIMINFO_H
-
-
-#include "gameinfo.h"
-
-namespace MOShared {
-
-
-class SkyrimInfo : public GameInfo
-{
-
- friend class GameInfo;
-
-public:
-
- virtual ~SkyrimInfo() {}
-
- static std::wstring getRegPathStatic();
- virtual std::wstring getRegPath() const { return getRegPathStatic(); }
-
- // file name of this games ini (no path)
- virtual std::vector<std::wstring> getIniFileNames() const;
-
-private:
-
- SkyrimInfo(const std::wstring &gameDirectory);
-
- static bool identifyGame(const std::wstring &searchPath);
-
-private:
-
- std::wstring m_AppData;
-
-};
-
-} // namespace MOShared
-
-#endif // SKYRIMINFO_H
diff --git a/src/spawn.cpp b/src/spawn.cpp
index 0ff64af0..ac8ccf30 100644
--- a/src/spawn.cpp
+++ b/src/spawn.cpp
@@ -22,7 +22,6 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "report.h"
#include "utility.h"
#include <report.h>
-#include <inject.h>
#include <usvfs.h>
#include <Shellapi.h>
#include <appconfig.h>