diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2018-11-29 08:17:28 -0600 |
|---|---|---|
| committer | LostDragonist <lost.dragonist@gmail.com> | 2018-11-29 14:11:09 -0600 |
| commit | 2212ad6f1c0bbaff7025cdb7227023661e399596 (patch) | |
| tree | 800fd33340a8aed14bd11ab9605398fe9c07284c | |
| parent | 6142872620983a2bdd352d4e9e391ddb11c40305 (diff) | |
Add executable blacklisting
| -rw-r--r-- | src/mainwindow.cpp | 14 | ||||
| -rw-r--r-- | src/organizer_en.ts | 263 | ||||
| -rw-r--r-- | src/organizercore.cpp | 20 | ||||
| -rw-r--r-- | src/organizercore.h | 2 | ||||
| -rw-r--r-- | src/settings.cpp | 18 | ||||
| -rw-r--r-- | src/settings.h | 7 | ||||
| -rw-r--r-- | src/settingsdialog.cpp | 27 | ||||
| -rw-r--r-- | src/settingsdialog.h | 13 | ||||
| -rw-r--r-- | src/settingsdialog.ui | 22 | ||||
| -rw-r--r-- | src/usvfsconnector.cpp | 13 | ||||
| -rw-r--r-- | src/usvfsconnector.h | 2 |
11 files changed, 272 insertions, 129 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d0591d6e..9a0e02aa 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2877,7 +2877,7 @@ void MainWindow::createSeparator_clicked() }
int newPriority = -1;
- if (m_ContextRow >= 0 && m_ModListSortProxy->sortColumn() == ModList::COL_PRIORITY)
+ if (m_ContextRow >= 0 && m_ModListSortProxy->sortColumn() == ModList::COL_PRIORITY)
{
newPriority = m_OrganizerCore.currentProfile()->getModPriority(m_ContextRow);
}
@@ -2885,7 +2885,7 @@ void MainWindow::createSeparator_clicked() if (m_OrganizerCore.createMod(name) == nullptr) { return; }
m_OrganizerCore.refreshModList();
- if (newPriority >= 0)
+ if (newPriority >= 0)
{
m_OrganizerCore.modList()->changeModPriority(ModInfo::getIndex(name), newPriority);
}
@@ -4129,7 +4129,7 @@ void MainWindow::on_actionSettings_triggered() updateDownloadListDelegate();
- m_OrganizerCore.updateVFSParams(settings.logLevel(), settings.crashDumpsType());
+ m_OrganizerCore.updateVFSParams(settings.logLevel(), settings.crashDumpsType(), settings.executablesBlacklist());
m_OrganizerCore.cycleDiagnostics();
}
@@ -4405,8 +4405,8 @@ void MainWindow::sendSelectedPluginsToBottom_clicked() void MainWindow::sendSelectedPluginsToPriority_clicked()
{
bool ok;
- int newPriority = QInputDialog::getInt(this,
- tr("Set Priority"), tr("Set the priority of the selected plugins"),
+ int newPriority = QInputDialog::getInt(this,
+ tr("Set Priority"), tr("Set the priority of the selected plugins"),
0, 0, INT_MAX, 1, &ok);
if (!ok) return;
@@ -5678,8 +5678,8 @@ void MainWindow::sendSelectedModsToBottom_clicked() void MainWindow::sendSelectedModsToPriority_clicked()
{
bool ok;
- int newPriority = QInputDialog::getInt(this,
- tr("Set Priority"), tr("Set the priority of the selected mods"),
+ int newPriority = QInputDialog::getInt(this,
+ tr("Set Priority"), tr("Set the priority of the selected mods"),
0, 0, INT_MAX, 1, &ok);
if (!ok) return;
diff --git a/src/organizer_en.ts b/src/organizer_en.ts index 9b1294ac..518e49bc 100644 --- a/src/organizer_en.ts +++ b/src/organizer_en.ts @@ -4041,113 +4041,113 @@ p, li { white-space: pre-wrap; } <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="992"/> + <location filename="modlist.cpp" line="998"/> <source>drag&drop failed: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1071"/> + <location filename="modlist.cpp" line="1077"/> <source>Confirm</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1072"/> + <location filename="modlist.cpp" line="1078"/> <source>Are you sure you want to remove "%1"?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1135"/> + <location filename="modlist.cpp" line="1141"/> <source>Flags</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1136"/> + <location filename="modlist.cpp" line="1142"/> <source>Content</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1137"/> + <location filename="modlist.cpp" line="1143"/> <source>Mod Name</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1138"/> + <location filename="modlist.cpp" line="1144"/> <source>Version</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1139"/> + <location filename="modlist.cpp" line="1145"/> <source>Priority</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1140"/> + <location filename="modlist.cpp" line="1146"/> <source>Category</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1141"/> + <location filename="modlist.cpp" line="1147"/> <source>Source Game</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1142"/> + <location filename="modlist.cpp" line="1148"/> <source>Nexus ID</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1143"/> + <location filename="modlist.cpp" line="1149"/> <source>Installation</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1144"/> - <location filename="modlist.cpp" line="1179"/> + <location filename="modlist.cpp" line="1150"/> + <location filename="modlist.cpp" line="1185"/> <source>unknown</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1152"/> + <location filename="modlist.cpp" line="1158"/> <source>Name of your mods</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1153"/> + <location filename="modlist.cpp" line="1159"/> <source>Version of the mod (if available)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1154"/> + <location filename="modlist.cpp" line="1160"/> <source>Installation priority of your mod. The higher, the more "important" it is and thus overwrites files from mods with lower priority.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1156"/> + <location filename="modlist.cpp" line="1162"/> <source>Category of the mod.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1157"/> + <location filename="modlist.cpp" line="1163"/> <source>The source game which was the origin of this mod.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1158"/> + <location filename="modlist.cpp" line="1164"/> <source>Id of the mod as used on Nexus.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1159"/> + <location filename="modlist.cpp" line="1165"/> <source>Emblemes to highlight things that might require attention.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1160"/> + <location filename="modlist.cpp" line="1166"/> <source>Depicts the content of the mod:<br><table cellspacing=7><tr><td><img src=":/MO/gui/content/plugin" width=32/></td><td>Game plugins (esp/esm/esl)</td></tr><tr><td><img src=":/MO/gui/content/interface" width=32/></td><td>Interface</td></tr><tr><td><img src=":/MO/gui/content/mesh" width=32/></td><td>Meshes</td></tr><tr><td><img src=":/MO/gui/content/bsa" width=32/></td><td>BSA</td></tr><tr><td><img src=":/MO/gui/content/texture" width=32/></td><td>Textures</td></tr><tr><td><img src=":/MO/gui/content/sound" width=32/></td><td>Sounds</td></tr><tr><td><img src=":/MO/gui/content/music" width=32/></td><td>Music</td></tr><tr><td><img src=":/MO/gui/content/string" width=32/></td><td>Strings</td></tr><tr><td><img src=":/MO/gui/content/script" width=32/></td><td>Scripts (Papyrus)</td></tr><tr><td><img src=":/MO/gui/content/skse" width=32/></td><td>Script Extender plugins</td></tr><tr><td><img src=":/MO/gui/content/skyproc" width=32/></td><td>SkyProc Patcher</td></tr><tr><td><img src=":/MO/gui/content/menu" width=32/></td><td>Mod Configuration Menu</td></tr><tr><td><img src=":/MO/gui/content/inifile" width=32/></td><td>INI files</td></tr><tr><td><img src=":/MO/gui/content/modgroup" width=32/></td><td>ModGroup files</td></tr></table></source> <translation type="unfinished"></translation> </message> <message> - <location filename="modlist.cpp" line="1178"/> + <location filename="modlist.cpp" line="1184"/> <source>Time this mod was installed</source> <translation type="unfinished"></translation> </message> @@ -4353,91 +4353,103 @@ Continue launching %1?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="1421"/> + <location filename="organizercore.cpp" line="1345"/> + <source>Blacklisted Executable</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="organizercore.cpp" line="1346"/> + <source>The executable you are attempted to launch is blacklisted in the virtual file system. This will likely prevent the executable, and any executables that are launched by this one, from seeing any mods. This could extend to INI files, save games and any other virtualized files. + +Continue launching %1?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="organizercore.cpp" line="1435"/> <source>No profile set</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="1707"/> + <location filename="organizercore.cpp" line="1721"/> <source>Failed to refresh list of esps: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="1791"/> + <location filename="organizercore.cpp" line="1805"/> <source>Multiple esps/esls activated, please check that they don't conflict.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="1866"/> + <location filename="organizercore.cpp" line="1880"/> <source>Download?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="1867"/> + <location filename="organizercore.cpp" line="1881"/> <source>A download has been started but no installed page plugin recognizes it. If you download anyway no information (i.e. version) will be associated with the download. Continue?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="2001"/> + <location filename="organizercore.cpp" line="2015"/> <source>failed to update mod list: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="2008"/> - <location filename="organizercore.cpp" line="2025"/> + <location filename="organizercore.cpp" line="2022"/> + <location filename="organizercore.cpp" line="2039"/> <source>login successful</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="2032"/> + <location filename="organizercore.cpp" line="2046"/> <source>Login failed</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="2033"/> + <location filename="organizercore.cpp" line="2047"/> <source>Login failed, try again?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="2042"/> + <location filename="organizercore.cpp" line="2056"/> <source>login failed: %1. Download will not be associated with an account</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="2050"/> + <location filename="organizercore.cpp" line="2064"/> <source>login failed: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="2060"/> + <location filename="organizercore.cpp" line="2074"/> <source>login failed: %1. You need to log-in with Nexus to update MO.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="2113"/> + <location filename="organizercore.cpp" line="2127"/> <source>MO1 "Script Extender" load mechanism has left hook.dll in your game folder</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="2116"/> - <location filename="organizercore.cpp" line="2132"/> + <location filename="organizercore.cpp" line="2130"/> + <location filename="organizercore.cpp" line="2146"/> <source>Description missing</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="2125"/> + <location filename="organizercore.cpp" line="2139"/> <source><a href="%1">hook.dll</a> has been found in your game folder (right click to copy the full path). This is most likely a leftover of setting the ModOrganizer 1 load mechanism to "Script Extender", in which case you must remove this file either by changing the load mechanism in ModOrganizer 1 or manually removing the file, otherwise the game is likely to crash and burn.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="2159"/> + <location filename="organizercore.cpp" line="2173"/> <source>failed to save load order: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="organizercore.cpp" line="2231"/> + <location filename="organizercore.cpp" line="2245"/> <source>The designated write target "%1" is not enabled.</source> <translation type="unfinished"></translation> </message> @@ -5398,7 +5410,7 @@ If the folder was still in use, restart MO and try again.</source> </message> <message> <location filename="main.cpp" line="682"/> - <location filename="settings.cpp" line="1056"/> + <location filename="settings.cpp" line="1070"/> <source>Mod Organizer</source> <translation type="unfinished"></translation> </message> @@ -5475,12 +5487,12 @@ If the folder was still in use, restart MO and try again.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settings.cpp" line="1063"/> + <location filename="settings.cpp" line="1077"/> <source>Script Extender</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settings.cpp" line="1070"/> + <location filename="settings.cpp" line="1084"/> <source>Proxy DLL</source> <translation type="unfinished"></translation> </message> @@ -5694,18 +5706,18 @@ Select Show Details option to see the full change-log.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settings.cpp" line="466"/> - <location filename="settings.cpp" line="485"/> + <location filename="settings.cpp" line="480"/> + <location filename="settings.cpp" line="499"/> <source>attempt to store setting for unknown plugin "%1"</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settings.cpp" line="845"/> + <location filename="settings.cpp" line="859"/> <source>Error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settings.cpp" line="846"/> + <location filename="settings.cpp" line="860"/> <source>Failed to create "%1", you may not have the necessary permission. path remains unchanged.</source> <translation type="unfinished"></translation> </message> @@ -6042,52 +6054,52 @@ p, li { white-space: pre-wrap; } <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="727"/> + <location filename="settingsdialog.ui" line="730"/> <source>Author:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="741"/> + <location filename="settingsdialog.ui" line="744"/> <source>Version:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="755"/> + <location filename="settingsdialog.ui" line="758"/> <source>Description:</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="793"/> + <location filename="settingsdialog.ui" line="796"/> <source>Key</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="798"/> + <location filename="settingsdialog.ui" line="801"/> <source>Value</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="810"/> + <location filename="settingsdialog.ui" line="813"/> <source>Blacklisted Plugins (use <del> to remove):</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="821"/> + <location filename="settingsdialog.ui" line="824"/> <source>Workarounds</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="829"/> + <location filename="settingsdialog.ui" line="832"/> <source>Steam App ID</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="849"/> + <location filename="settingsdialog.ui" line="852"/> <source>The Steam AppID for your game</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="852"/> + <location filename="settingsdialog.ui" line="855"/> <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -6103,17 +6115,17 @@ p, li { white-space: pre-wrap; } <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="883"/> + <location filename="settingsdialog.ui" line="886"/> <source>Load Mechanism</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="903"/> + <location filename="settingsdialog.ui" line="906"/> <source>Select loading mechanism. See help for details.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="906"/> + <location filename="settingsdialog.ui" line="909"/> <source>Mod Organizer needs a dll to be injected into the game so all mods are visible to it. There are several means to do this: *Mod Organizer* (default) In this mode the Mod Organizer itself injects the dll. The disadvantage is that you always have to start the game through MO or a link created by it. @@ -6124,17 +6136,17 @@ If you use the Steam version of Oblivion the default will NOT work. In this case <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="923"/> + <location filename="settingsdialog.ui" line="926"/> <source>NMM Version</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="943"/> + <location filename="settingsdialog.ui" line="946"/> <source>The Version of Nexus Mod Manager to impersonate.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="946"/> + <location filename="settingsdialog.ui" line="949"/> <source>Mod Organizer uses an API provided by the Nexus to provide features like checking for updates and downloading files. Unfortunately this API has not been made available officially to third party tools like MO so we have to impersonate the Nexus Mod Manager to be allowed in. On top of this Nexus has used the client identification to lock out outdated versions of NMM to force users to update. This means that MO also needs to impersonate the new version of NMM even if MO doesn't need an update. Therefore you can configure the version to identify as here. Please note that MO does identify itself as MO to the webserver, it's not lying about what it is. It is merely adding a "compatible" NMM version to the user agent. @@ -6143,44 +6155,44 @@ tl;dr-version: If Nexus-features don't work, insert the current version num <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="971"/> + <location filename="settingsdialog.ui" line="974"/> <source>Enforces that inactive ESPs and ESMs are never loaded.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="974"/> + <location filename="settingsdialog.ui" line="977"/> <source>It seems that the Games occasionally load ESP or ESM files even if they haven't been activated as plugins. I don't yet know what the circumstances are, but user reports imply it is in some cases unwanted. If this is checked, ESPs and ESMs not checked in the List are invisible to the game and can not be loaded.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="978"/> + <location filename="settingsdialog.ui" line="981"/> <source>Hide inactive ESPs/ESMs</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="985"/> + <location filename="settingsdialog.ui" line="988"/> <source>If checked, files (i.e. esps, esms and bsas) belonging to the core game can not be disabled in the UI. (default: on)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="988"/> + <location filename="settingsdialog.ui" line="991"/> <source>If checked, files (i.e. esps, esms and bsas) belonging to the core game can not be disabled in the UI. (default: on) Uncheck this if you want to use Mod Organizer with total conversions (like Nehrim) but be aware that the game will crash if required files are not enabled.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="992"/> + <location filename="settingsdialog.ui" line="995"/> <source>Force-enable game files</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1002"/> + <location filename="settingsdialog.ui" line="1005"/> <source>Disable this to no longer display mods installed outside MO in the mod list (left pane). Assets from those mods will then be treated as having lowest mod priority together with the original game content.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1005"/> + <location filename="settingsdialog.ui" line="1008"/> <source>By default Mod Organizer will display esp+bsa bundles installed with foreign tools as mods (left pane). This allows you to control their priority in relation to other mods. This is particularly useful if you also use Steam Workshop to install mods. However, if you installed loose file mods outside MO which conflict with BSAs also installed outside MO those conflicts can't be resolved correctly. @@ -6188,44 +6200,63 @@ If you disable this feature, MO will only display official DLCs this way. Please <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1011"/> + <location filename="settingsdialog.ui" line="1014"/> <source>Display mods installed outside MO</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1021"/> - <location filename="settingsdialog.ui" line="1025"/> + <location filename="settingsdialog.ui" line="1024"/> + <location filename="settingsdialog.ui" line="1028"/> <source>For Skyrim, this can be used instead of Archive Invalidation. It should make AI redundant for all Profiles. For the other games this is not a sufficient replacement for AI!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1029"/> + <location filename="settingsdialog.ui" line="1032"/> <source>Back-date BSAs</source> <translation type="unfinished"></translation> </message> <message> + <location filename="settingsdialog.ui" line="1043"/> + <source>Add executables to the blacklist to prevent them from +accessing the virtual file system. This is useful to prevent +unintended programs from being hooked. Hooking unintended +programs may affect the execution of these programs or the +programs you are intentionally running.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="settingsdialog.ui" line="1050"/> + <source>Add executables to the blacklist to prevent them from accessing the virtual file system. This is useful to prevent unintended programs from being hooked. Hooking unintended programs may affect the execution of these programs or the programs you are intentionally running.</source> + <translation type="unfinished"></translation> + </message> + <message> <location filename="settingsdialog.ui" line="1053"/> + <source>Configure Executables Blacklist</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="settingsdialog.ui" line="1076"/> <source>These are workarounds for problems with Mod Organizer. Please make sure you read the help text before changing anything here.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1064"/> + <location filename="settingsdialog.ui" line="1087"/> <source>Diagnostics</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1072"/> + <location filename="settingsdialog.ui" line="1095"/> <source>Log Level</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1079"/> + <location filename="settingsdialog.ui" line="1102"/> <source>Decides the amount of data printed to "ModOrganizer.log"</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1082"/> + <location filename="settingsdialog.ui" line="1105"/> <source> Decides the amount of data printed to "ModOrganizer.log". "Debug" produces very useful information for finding problems. There is usually no noteworthy performance impact but the file may become rather large. If this is a problem you may prefer the "Info" level for regluar use. On the "Error" level the log file usually remains empty. @@ -6233,37 +6264,37 @@ For the other games this is not a sufficient replacement for AI!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1089"/> + <location filename="settingsdialog.ui" line="1112"/> <source>Debug</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1094"/> + <location filename="settingsdialog.ui" line="1117"/> <source>Info (recommended)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1099"/> + <location filename="settingsdialog.ui" line="1122"/> <source>Warning</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1104"/> + <location filename="settingsdialog.ui" line="1127"/> <source>Error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1129"/> + <location filename="settingsdialog.ui" line="1152"/> <source>Crash Dumps</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1136"/> + <location filename="settingsdialog.ui" line="1159"/> <source>Decides which type of crash dumps are collected when injected processes crash.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1139"/> + <location filename="settingsdialog.ui" line="1162"/> <source> Decides which type of crash dumps are collected when injected processes crash. "None" Disables the generation of crash dumps by MO. @@ -6274,37 +6305,37 @@ For the other games this is not a sufficient replacement for AI!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1149"/> + <location filename="settingsdialog.ui" line="1172"/> <source>None</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1154"/> + <location filename="settingsdialog.ui" line="1177"/> <source>Mini (recommended)</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1159"/> + <location filename="settingsdialog.ui" line="1182"/> <source>Data</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1164"/> + <location filename="settingsdialog.ui" line="1187"/> <source>Full</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1176"/> + <location filename="settingsdialog.ui" line="1199"/> <source>Max Dumps To Keep</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1196"/> + <location filename="settingsdialog.ui" line="1219"/> <source>Maximum number of crash dumps to keep on disk. Use 0 for unlimited.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1199"/> + <location filename="settingsdialog.ui" line="1222"/> <source> Maximum number of crash dumps to keep on disk. Use 0 for unlimited. Set "Crash Dumps" above to None to disable crash dump collection. @@ -6312,12 +6343,12 @@ For the other games this is not a sufficient replacement for AI!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1211"/> + <location filename="settingsdialog.ui" line="1234"/> <source>Hint: right click link and copy link location</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.ui" line="1214"/> + <location filename="settingsdialog.ui" line="1237"/> <source> Logs and crash dumps are stored under your current instance in the <a href="LOGS_FULL_PATH">LOGS_DIR</a> and <a href="DUMPS_FULL_PATH">DUMPS_DIR</a> folders. @@ -6327,52 +6358,68 @@ For the other games this is not a sufficient replacement for AI!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.cpp" line="81"/> + <location filename="settingsdialog.cpp" line="83"/> <source>Confirm</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.cpp" line="82"/> + <location filename="settingsdialog.cpp" line="84"/> <source>Changing the mod directory affects all your profiles! Mods not present (or named differently) in the new location will be disabled in all profiles. There is no way to undo this unless you backed up your profiles manually. Proceed?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.cpp" line="130"/> + <location filename="settingsdialog.cpp" line="124"/> + <source>Executables Blacklist</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="settingsdialog.cpp" line="125"/> + <source>Enter one executable per line to be blacklisted from the virtual file system. +Mods and other virtualized files will not be visible to these executables and +any executables launched by them. + +Example: + Chrome.exe + Firefox.exe</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="settingsdialog.cpp" line="158"/> <source>Select base directory</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.cpp" line="141"/> + <location filename="settingsdialog.cpp" line="169"/> <source>Select download directory</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.cpp" line="152"/> + <location filename="settingsdialog.cpp" line="180"/> <source>Select mod directory</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.cpp" line="163"/> + <location filename="settingsdialog.cpp" line="191"/> <source>Select cache directory</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.cpp" line="174"/> + <location filename="settingsdialog.cpp" line="202"/> <source>Select profiles directory</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.cpp" line="185"/> + <location filename="settingsdialog.cpp" line="213"/> <source>Select overwrite directory</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.cpp" line="290"/> + <location filename="settingsdialog.cpp" line="318"/> <source>Confirm?</source> <translation type="unfinished"></translation> </message> <message> - <location filename="settingsdialog.cpp" line="291"/> + <location filename="settingsdialog.cpp" line="319"/> <source>This will make all dialogs show up again where you checked the "Remember selection"-box. Continue?</source> <translation type="unfinished"></translation> </message> @@ -6576,7 +6623,7 @@ On Windows XP: <context> <name>UsvfsConnector</name> <message> - <location filename="usvfsconnector.cpp" line="157"/> + <location filename="usvfsconnector.cpp" line="161"/> <source>Preparing vfs</source> <translation type="unfinished"></translation> </message> diff --git a/src/organizercore.cpp b/src/organizercore.cpp index b66895db..9ac3cb63 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -762,9 +762,9 @@ void OrganizerCore::prepareVFS() m_USVFS.updateMapping(fileMapping(m_CurrentProfile->name(), QString()));
}
-void OrganizerCore::updateVFSParams(int logLevel, int crashDumpsType) {
+void OrganizerCore::updateVFSParams(int logLevel, int crashDumpsType, QString executableBlacklist) {
setGlobalCrashDumpsType(crashDumpsType);
- m_USVFS.updateParams(logLevel, crashDumpsType);
+ m_USVFS.updateParams(logLevel, crashDumpsType, executableBlacklist);
}
bool OrganizerCore::cycleDiagnostics() {
@@ -1339,10 +1339,24 @@ HANDLE OrganizerCore::spawnBinaryProcess(const QFileInfo &binary, }
}
+ for (auto exec : settings().executablesBlacklist().split(";")) {
+ if (exec.compare(binary.fileName(), Qt::CaseInsensitive)) {
+ if (QuestionBoxMemory::query(window, QString("blacklistedExecutable"), binary.fileName(),
+ tr("Blacklisted Executable"),
+ tr("The executable you are attempted to launch is blacklisted in the virtual file"
+ " system. This will likely prevent the executable, and any executables that are"
+ " launched by this one, from seeing any mods. This could extend to INI files, save"
+ " games and any other virtualized files.\n\nContinue launching %1?").arg(binary.fileName()),
+ QDialogButtonBox::Yes | QDialogButtonBox::No) == QDialogButtonBox::No) {
+ return INVALID_HANDLE_VALUE;
+ }
+ }
+ }
+
QString modsPath = settings().getModDirectory();
// Check if this a request with either an executable or a working directory under our mods folder
- // then will start the processs in a virtualized "environment" with the appropriate paths fixed:
+ // then will start the process in a virtualized "environment" with the appropriate paths fixed:
// (i.e. mods\FNIS\path\exe => game\data\path\exe)
QString cwdPath = currentDirectory.absolutePath();
bool virtualizedCwd = cwdPath.startsWith(modsPath, Qt::CaseInsensitive);
diff --git a/src/organizercore.h b/src/organizercore.h index 28ecef48..086fa11d 100644 --- a/src/organizercore.h +++ b/src/organizercore.h @@ -167,7 +167,7 @@ public: void prepareVFS();
- void updateVFSParams(int logLevel, int crashDumpsType);
+ void updateVFSParams(int logLevel, int crashDumpsType, QString executableBlacklist);
bool cycleDiagnostics();
diff --git a/src/settings.cpp b/src/settings.cpp index ce3a68ff..c311ef29 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -386,6 +386,20 @@ QColor Settings::pluginListContainedColor() const return m_Settings.value("Settings/containedColor", QColor(0, 0, 255, 64)).value<QColor>(); } +QString Settings::executablesBlacklist() const +{ + return m_Settings.value("Settings/executable_blacklist", ( + QStringList() + << "Chrome.exe" + << "Firefox.exe" + << "TSVNCache.exe" + << "TGitCache.exe" + << "Steam.exe" + << "GameOverlayUI.exe" + ).join(";") + ).toString(); +} + void Settings::setNexusLogin(QString username, QString password) { m_Settings.setValue("Settings/nexus_login", true); @@ -1080,6 +1094,8 @@ Settings::WorkaroundsTab::WorkaroundsTab(Settings *m_parent, m_forceEnableBox->setChecked(m_parent->forceEnableCoreFiles()); m_displayForeignBox->setChecked(m_parent->displayForeign()); + m_dialog.setExecutableBlacklist(m_parent->executablesBlacklist()); + } void Settings::WorkaroundsTab::update() @@ -1094,4 +1110,6 @@ void Settings::WorkaroundsTab::update() m_Settings.setValue("Settings/hide_unchecked_plugins", m_hideUncheckedBox->isChecked()); m_Settings.setValue("Settings/force_enable_core_files", m_forceEnableBox->isChecked()); m_Settings.setValue("Settings/display_foreign", m_displayForeignBox->isChecked()); + + m_Settings.setValue("Settings/executable_blacklist", m_dialog.getExecutableBlacklist()); } diff --git a/src/settings.h b/src/settings.h index 8fe053e8..667b1b4c 100644 --- a/src/settings.h +++ b/src/settings.h @@ -17,8 +17,8 @@ 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 WORKAROUNDS_H -#define WORKAROUNDS_H +#ifndef SETTINGS_H +#define SETTINGS_H #include "loadmechanism.h" @@ -227,6 +227,7 @@ public: QColor pluginListContainedColor() const; + QString executablesBlacklist() const; /** * @brief set the nexus login information @@ -525,4 +526,4 @@ private: }; -#endif // WORKAROUNDS_H +#endif // SETTINGS_H diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp index de18a850..e1c4b10d 100644 --- a/src/settingsdialog.cpp +++ b/src/settingsdialog.cpp @@ -34,6 +34,7 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include <QMessageBox> #include <QShortcut> #include <QColorDialog> +#include <QInputDialog> #define WIN32_LEAN_AND_MEAN #include <Windows.h> @@ -115,6 +116,32 @@ void SettingsDialog::on_categoriesBtn_clicked() } } +void SettingsDialog::on_execBlacklistBtn_clicked() +{ + bool ok = false; + QString result = QInputDialog::getMultiLineText( + this, + tr("Executables Blacklist"), + tr("Enter one executable per line to be blacklisted from the virtual file system.\n" + "Mods and other virtualized files will not be visible to these executables and\n" + "any executables launched by them.\n\n" + "Example:\n" + " Chrome.exe\n" + " Firefox.exe"), + m_ExecutableBlacklist.split(";").join("\n"), + &ok + ); + if (ok) { + QStringList blacklist; + for (auto exec : result.split("\n")) { + if (exec.trimmed().endsWith(".exe", Qt::CaseInsensitive)) { + blacklist << exec.trimmed(); + } + } + m_ExecutableBlacklist = blacklist.join(";"); + } +} + void SettingsDialog::on_bsaDateBtn_clicked() { IPluginGame const *game diff --git a/src/settingsdialog.h b/src/settingsdialog.h index 386cd24e..911f910d 100644 --- a/src/settingsdialog.h +++ b/src/settingsdialog.h @@ -17,8 +17,8 @@ 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 WORKAROUNDDIALOG_H
-#define WORKAROUNDDIALOG_H
+#ifndef SETTINGSDIALOG_H
+#define SETTINGSDIALOG_H
#include "tutorabledialog.h"
#include <iplugin.h>
@@ -69,17 +69,22 @@ public: QColor getOverwrittenColor() { return m_OverwrittenColor; }
QColor getContainsColor() { return m_ContainsColor; }
QColor getContainedColor() { return m_ContainedColor; }
+ QString getExecutableBlacklist() { return m_ExecutableBlacklist; }
void setOverwritingColor(QColor col) { m_OverwritingColor = col; }
void setOverwrittenColor(QColor col) { m_OverwrittenColor = col; }
void setContainsColor(QColor col) { m_ContainsColor = col; }
void setContainedColor(QColor col) { m_ContainedColor = col; }
+ void setExecutableBlacklist(QString blacklist) { m_ExecutableBlacklist = blacklist; }
+
private slots:
void on_loginCheckBox_toggled(bool checked);
void on_categoriesBtn_clicked();
+ void on_execBlacklistBtn_clicked();
+
void on_bsaDateBtn_clicked();
void on_browseDownloadDirBtn_clicked();
@@ -134,8 +139,10 @@ private: QColor m_OverwrittenColor;
QColor m_ContainsColor;
QColor m_ContainedColor;
+
+ QString m_ExecutableBlacklist;
};
-#endif // WORKAROUNDDIALOG_H
+#endif // SETTINGSDIALOG_H
diff --git a/src/settingsdialog.ui b/src/settingsdialog.ui index 555180b5..ae13b9f2 100644 --- a/src/settingsdialog.ui +++ b/src/settingsdialog.ui @@ -17,7 +17,7 @@ <item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
- <number>4</number>
+ <number>5</number>
</property>
<widget class="QWidget" name="generalTab">
<attribute name="title">
@@ -1038,6 +1038,26 @@ For the other games this is not a sufficient replacement for AI!</string> </widget>
</item>
<item>
+ <widget class="QPushButton" name="execBlacklistBtn">
+ <property name="toolTip">
+ <string>Add executables to the blacklist to prevent them from
+accessing the virtual file system. This is useful to prevent
+unintended programs from being hooked. Hooking unintended
+programs may affect the execution of these programs or the
+programs you are intentionally running.</string>
+ </property>
+ <property name="whatsThis">
+ <string>Add executables to the blacklist to prevent them from accessing the virtual file system. This is useful to prevent unintended programs from being hooked. Hooking unintended programs may affect the execution of these programs or the programs you are intentionally running.</string>
+ </property>
+ <property name="text">
+ <string>Configure Executables Blacklist</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
diff --git a/src/usvfsconnector.cpp b/src/usvfsconnector.cpp index 4ffc81c0..9c81d0d9 100644 --- a/src/usvfsconnector.cpp +++ b/src/usvfsconnector.cpp @@ -132,7 +132,11 @@ UsvfsConnector::UsvfsConnector() CreateVFS(¶ms); - BlacklistExecutable(L"TSVNCache.exe"); + ClearExecutableBlacklist(); + for (auto exec : Settings::instance().executablesBlacklist().split(";")) { + std::wstring buf = exec.toStdWString(); + BlacklistExecutable(buf.data()); + } m_LogWorker.moveToThread(&m_WorkerThread); @@ -199,6 +203,11 @@ void UsvfsConnector::updateMapping(const MappingType &mapping) */ } -void UsvfsConnector::updateParams(int logLevel, int crashDumpsType) { +void UsvfsConnector::updateParams(int logLevel, int crashDumpsType, QString executableBlacklist) { USVFSUpdateParams(::logLevel(logLevel), ::crashDumpsType(crashDumpsType)); + ClearExecutableBlacklist(); + for (auto exec : executableBlacklist.split(";")) { + std::wstring buf = exec.toStdWString(); + BlacklistExecutable(buf.data()); + } } diff --git a/src/usvfsconnector.h b/src/usvfsconnector.h index 40f8857b..3aefb703 100644 --- a/src/usvfsconnector.h +++ b/src/usvfsconnector.h @@ -82,7 +82,7 @@ public: ~UsvfsConnector(); void updateMapping(const MappingType &mapping); - void updateParams(int logLevel, int crashDumpsType); + void updateParams(int logLevel, int crashDumpsType, QString executableBlacklist); private: |
