* Encapsulate the downloads directory watcher in DirWatcherManager
QFileSystemWatcher suppression currently relies on public static start/end
methods and a static counter. Seven call sites pair them raw, one of them
outside the class. Any exception between a pair permanently disables the
watcher, and the static counter implies a singleton DownloadManager.
A new DirWatcherManager owns the watcher, the counter (now an instance
member), and the filtering. The only way to suspend is an RAII Guard
obtained via a scopedGuard() factory. All raw pairs migrate to guards. A
TODO flags the existing processEvents() in the dtor as a known reentrancy
hazard worth replacing later.
* Replace aboutToUpdate/update(int) with ModelResetGuard
Replace the fragile two-signal protocol with a refcounted RAII
ModelResetGuard. Split update(int) into aboutToResetModel/modelReset
(guard only) and rowChanged(int); notifyRowChanged() is suppressed while
a reset is active.
Fixes "beginResetModel without endResetModel" warnings from three sites
in downloadFinished/removeDownload that were pairing reset with a row
update. removePending only opens a guard when an actual match is removed.
* Centralize row notifications in setState and fix missed emits
setState emits notifyRowChanged itself, uses indexByInfo (-1 when
untracked), and re-looks up the row at each use so reply->abort() and
plugin callbacks that re-enter and erase info don't produce stale
signals.
Remove the trailing emit loop from createMetaFile and the now-redundant
notifyRowChanged calls scattered after setState. Add the two missing
emits in restoreDownload (after m_Hidden) and metaDataChanged (after
rename). Guard downloadFinished with a top-level DirWatcherGuard to
prevent filesystem events from its writes racing with model updates.
* Fix comma operator in addNXMDownload pending-dedup check
The game-name comparison result was discarded by the comma operator,
so the dedup only matched modId/fileId across all games.
* Fix lost finished() signal on fast downloads
Hoist the file-exists prompt out of startDownload so setup is straight-line.
Connect finished() last and dispatch manually if the reply already finished.
* Fix memory leak in DownloadInfo::createFromMeta
Move the allocation past the early-return checks so path-mismatch and
hidden-skip paths no longer leak a fresh DownloadInfo.
* Sanitize suffix path in getDownloadFileName
The collision-avoidance branch was using the raw baseName, so invalid
characters sanitized out of the initial path leaked into the suffixed one.
* [pre-commit.ci] Auto fixes from pre-commit.com hooks.
* Remove unused alphabetical translation vector
m_AlphabeticalTranslation was written but never read; drop it along with
refreshAlphabeticalTranslation, ByName, and the LessThanWrapper helper.
* Address PR feedback: fix redundant check and move refresh outside try catch.
* Coalesce the removeDownload reset with the following refreshList
Moves the ModelResetGuard out of the try-catch so it also wraps the
refreshList() call below. Without this, one reset fires when the guard
destructs at the end of the try block and another fires from
refreshList's own guard, producing two resets where one is sufficient.
* Guard the .meta creation in openMetaFile against the directory watcher
openMetaFile creates the .meta file via QSettings when one does not
exist; the disk write fires directoryChanged and triggers a spurious
refreshList. Wrap it in a DirWatcherManager::Guard like the other
meta-file editing paths.
* Extract getValidGameShortName method in download manager (#2380)
* Add stable download id index and PendingDownload struct
Replace the (game, mod, file) tuple backing m_PendingDownloads with a
named struct, and add m_ByID as an O(1) m_DownloadID-to-info index kept
in sync with every m_ActiveDownloads mutation. Encapsulate the id
counter behind DownloadInfo::newDownloadID(), the only supported way to
consume from s_NextDownloadID.
Infrastructure only; external behaviour is unchanged.
* Return stable ids from the plugin-facing download API
startDownloadURLs / startDownloadNexusFile / addNXMDownload now reserve
and return m_DownloadID instead of a stale index. Plugin callbacks fire
with m_DownloadID; downloadPath looks up via m_ByID. nxmDownloadURLsAvailable
threads the reserved id into the materializing DownloadInfo, and Nexus
API failures wake waiting plugins via notifyPendingDownloadFailed.
Incidental: startDownload now returns bool and frees newDownload on
output-open failure; createMetaFile is deferred past that check so
failed starts no longer leave an orphan .meta.
* Split downloadFinished into onReplyFinished slot and finishDownload
The old dual-use downloadFinished(int = 0) took either an explicit index
or relied on sender() when called as a slot. Split into a sender-resolved
slot and an id-based direct call, removing the ambiguous index-zero path.
* Introduce DownloadID alias and row/id accessors
Add a DownloadID type alias for the stable per-download handle and two
public accessors (downloadIDAtRow, rowForDownloadID) so callers can
translate between the view's row vocabulary and the model's id
vocabulary without reaching into the manager's internals. DownloadList
now embeds the DownloadID in QModelIndex::internalId() so any code
holding an index can identify the download directly.
* Convert cancel/pause/resume action methods to take DownloadID
The four methods (cancel, pause, resume, resumeDownloadInt) now accept
a DownloadID, resolve through m_ByID, and no longer care about row
positions. Internal callers iterate DownloadInfo* or look up via id;
DownloadsTab translates row -> id at the connect boundary so the
view's int-shaped signals keep working unchanged.
Also switches the remaining unsigned int signatures that refer to the
download id (finishDownload, downloadInfoByID, PendingDownload::reservedID,
m_ByID, newDownloadID, s_NextDownloadID) to the DownloadID alias.
Drive-by fix: finishDownload's retry branch could read info->m_Tries
after info had been deleted in the CANCELED/retries-exhausted branch
above; now re-resolves via m_ByID.value(id) before touching any fields.
* [pre-commit.ci] Auto fixes from pre-commit.com hooks.
* fix warnings about unused variables and size_t types
* cleanup dead code
* avoid calling processEvents when releasing the DirWatcherGuard
* [pre-commit.ci] Auto fixes from pre-commit.com hooks.
* use QEventLoop instead of manual ProcessEvents
* don't call processEvents in download started and defer handling finish state in event loop
* Cleanup pending download in case of failure.
* Add missing notifyPendingDownloadFailed if user cancels
* [pre-commit.ci] Auto fixes from pre-commit.com hooks.
* Refactor pending download failure handling and cover rename failures
* fix rebase bug, addNXMDownload not returning the correct type
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Feenstra <26406078+JonathanFeenstra@users.noreply.github.com>
* Index API response into lookup maps
* extract new findLatestActiveSuccessor method from update check function
* extract method to check if a file is active
* use new isActiveFileStatus in modInfoRegular
* fix bug when merging during mod install
* remember ordering of installed nexus file ids
* refactor update check logic to prioritize Nexus file IDs over filenames
* refactor nxmUpdatesAvailable to simplify update checking logic
* refactor update check logic to find Nexus file IDs by filename and streamline successor retrieval
* refactor update checking to streamline version resolution and improve successor retrieval
* Extended MODL / direct download handling
- name, modname, version, and source options added to download command
- nxmhandler init adds schemas and MODL entry with default launch args
- Add MODL register button to general tab
- On window display, call meta function to trigger both registrations
* Remove SConscript related files.
* Force-load translations from uibase and gamebryo/creation.
* Bring githubpp here and add a standalone preset.
* Switch VersionInfo -> Version for ModOrganizer2. (#2063)
* Add pre-commit hook.
* Use 7zip build from VCPKG registry.
* Use archive.dll from the bin folder instead of dlls.
* Allow for mod directory maps
- Set main data files based on game
- Mapped mod directories to VFS
- Update overwrite setup
* Skip if mod contains no 'data' dir
* More mod directory compatibility fixes
* Workaround for Obl:Rem save location
- SLocalSavePath does nothing yet MO2 wants to use it to override the default save location
- This only applies to BGS games anyway, we should move this logic
* First pass for overwrite mod directory support
* More overwrite move / delete restrictions
* Fix issue with moving directories that are not required
* Formatting pass
* More modDataDirectory updates
* Formatting
---------
Co-authored-by: Mikaël Capelle <capelle.mikael@gmail.com>
* Precompute load order for ModThreads
* Precompute file infos for plugin association check
---------
Co-authored-by: RJ <Liderate@users.noreply.github.com>
* Parse unmanaged file location when creating ModInfoForeign
- Fixes issues with secondaryDataDirectories
* Revert SF memory address changes
- CCC implementation prevents the need to determine core plugin LO by dependency chains
* The light flag wins over the medium flag
- I had expected the opposite, but apparently the light flag still wins if both are set. This shouldn't really happen but it's possible, even with the CK
* Update display to account for multi-flagged plugins
- Show both icons, warn if both set
* Use new Skip File & Skip Directory in usvfs.
# Motivations
https://github.com/ModOrganizer2/usvfs/pull/61 Highlights some reasons why the ability to skip files & directories would be beneficial
# Modifications
- Add two new settings, `skip_file_suffixes` and `skip_directories`
- Wire the two new settings up to usvfs
- Add two new buttons to the `Workarounds` dialog, one to adjust Skip File Suffixes and another for Skip Directories, both buttons act nearly identical to the Executable Blacklist button
- Add a new grouping in the `Workarounds` dialog box that contains the usvfs buttons to keep the dialog a tad organized
* Add medium plugin support (Starfield)
- Coopt the overlay support for the new 'medium' / ESH plugin flag
- Update various displays to include ESH info
* Rework address display for SF weirdness
* Fix core ESH display
* Use `displayGameName()` in create instance dialogs & the main window, this doesn't cover all places `gameName()` was being used for purely display reasons, but it covers the bulk.
* Use `lootGameName()` instead of `gameShortName()` for LOOT cli initiation.
* Use game display name in status bar.
---------
Co-authored-by: Twinki <Twinki@users.noreply.github.com>
* Remove uneeded "Fix" text
* Don't set Qt::WA_OpaquePaintEvent when imagesThumbnails has transparent base
---------
Co-authored-by: Liderate <Liderate@users.noreply.github.com>
* Convert the priority index to a string as Windows appears to be converting these to localized numerals
* Skip separators when assigning categories
* Update the context menu requirements for displaying the auto-assign option
* Bump to RC 2
- Add enabledPlugins for core plugins which are enabled but NOT auto-loaded (may need to be written to plugins.txt or have an ambiguous load order position)
- General Starfield updates
- Add enabledPlugins for "BlueprintShips-Starfield.esm"
- Disable plugin management if sTestFile is in use (also applies to FO4)
- Write the enabledPlugins to plugins.txt to enforce base game load order
- Allow for LOOT sorting (dynamic based on settings)
- Incorporate enabledPlugins into force enabled plugins in plugin list
- Update various interface layers
TODO: Fix sort button to dynamically update if status changes
TODO: Auto refresh lists if the INI Editor is closed
- Remove plugins class
- Route signals to run Nexus API call from MainWindow
- Pass Dialog instance to route response data
- Revert CategoryFactory::instance to return reference
* No longer cause an error when deleting a category that's being used
* Add a dialog when installing a mod with no Nexus mapping (if not disabled)
* Allow disabling Nexus category mapping in Settings (Nexus tab)
* Add context option to remove nexus mappings in the category editor
* Some clang style fixes
* Display checkboxes for all plugins
* Disable checkboxes for force enabled/disabled plugins
* Display tooltip data for all plugins regardless of force status
Before now, MO2 only looked at the ESM flag of a plugin and didn't
look for an .esm extension. This is incorrect and an .esm file
should be treated as implicitly having the ESM flag.
This also removes some apparently unused functions.
**This template is useful to add basic support using https://github.com/ModOrganizer2/modorganizer-basic_games.**
**This template is useful to add basic support using https://github.com/ModOrganizer2/modorganizer-basic_games.**
**If you are vaguely familiar with programming you can try following the instructions on that link to get something working yourself. If you have trouble with that please fill in this template.**
Briefly describe the issue you are experiencing. Tell us what you were trying to do and what happened instead. Remember, this is _not_ a place to ask questions. For that, go to our [Discord server](https://discord.gg/6GKR9jZ).
Briefly describe the issue you are experiencing. Tell us what you were trying to do and what happened instead. Remember, this is _not_ a place to ask questions. For that, go to our [Discord server](https://discord.gg/ewUVAqyrQX).
Mod Organizer (MO) is a tool for managing mod collections of arbitrary size. It is specifically designed for people who like to experiment with mods and thus need an easy and reliable way to install and uninstall them.
@@ -12,22 +10,22 @@ The project took up speed again after a few more coders showed up in late 2017,
## Help Wanted!
Mod Organizer 2 is an open project in the hands of the community, there are problems that need to be solved and things that could be added. MO2 really needs developers and if you have the programming skills and some free time you can really improve the experience of the modding community.
To have more information, please join the open MO2 Development discord server: [Mod Organizer 2](https://discord.gg/6GKR9jZ)
If you want to help translate MO2 to your language you should join the discord server too and head to the #translation channel.
To have more information, please join the open MO2 Development Discord server: [Mod Organizer 2](https://discord.gg/ewUVAqyrQX)
If you want to help translate MO2 to your language you should join the Discord server too and head to the #translation channel.
To setup a development environment on your machine, there is the [mob project](https://github.com/modorganizer2/mob) that handles that.
If you want to submit your code changes, please use a good formatting style like the default one in Visual Studio.
Through the work of a few people of the community MO2 has come quite far, now it needs some more of those people to go further.
## Reporting Issues:
Issues should be reported to the GitHub page or on the open discord server: [Mod Organizer 2](https://discord.gg/6GKR9jZ). Here is also where dev builds are tested, bugs are reported and investigated, suggestions are discussed and a lot more.
Issues should be reported to the GitHub page or on the open Discord server: [Mod Organizer 2](https://discord.gg/ewUVAqyrQX). Here is also where dev builds are tested, bugs are reported and investigated, suggestions are discussed and a lot more.
Credits to Tannin, LePresidente, Silarn, erasmux, AL12, LostDragonist, AnyOldName3, isa, Holt59 and many others for the development.
Credits to Tannin, LePresidente, Silarn, erasmux, AL12, LostDragonist, AnyOldName3, isa, Holt59, Project579, przester, Qudix, RJ, Jonathan Feenstra and many others for the development.
## Download Location
* on [GitHub.com](https://github.com/Modorganizer2/modorganizer/releases)
* on [NexusMods.com](https://www.nexusmods.com/skyrimspecialedition/mods/6194)
* on [NexusMods.com](https://www.nexusmods.com/site/mods/6)
## Old Download Location
@@ -39,7 +37,7 @@ Please refer to [Modorganizer2/mob](https://github.com/modorganizer2/mob) for bu
## Other Repositories
MO2 consists of multiple repositories on github. The mob project will download them automatically as required. They should however also be buildable individually.
MO2 consists of multiple repositories on GitHub. The mob project will download them automatically as required. They should however also be buildable individually.
# This python script contains the configuration for scons
# Copy this to scons_configure.py and adjust to taste.
# Path to your boost install - it should have a boost/ subdirectory and a stage/
# subdirectory. The scons script will use stage/lib if there, or the appropriate
# version for your compiler, if you installed the multiple-build version
BOOSTPATH=r"C:\Apps\boost_1_55_0"
# Version of Visual Studio to use, if you wish to use a specific version. If you
# don't specify a version, the latest will be picked.. See the scons manual for
# supported values.
#MSVC_VERSION = '10.0Exp'
# Path to your python install
# You don't really need to set this up but you might if (say) you have a 32- and
# 64-bit python install and scons has been installed for the 64 bit version
#PYTHONPATH=r"C:\Apps\Python"
# Path to your QT install. This might constrain the version of MSVC you can use.
# This seems to be set by QTCreator
#QTDIR = r"C:\Apps\Qt\4.8.6"
# Path to 7-zip sources
SEVENZIPPATH=r"C:\Apps\7-Zip\7z920"
# Path to zlib. Please read the README file for more information about how this
# needs to be set up
ZLIBPATH=r"C:\Apps\zlib-1.2.8"
# Source control programs. Sadly I can't get this information from qt, even
# though you have to set it up in the configuration
GIT=r"C:\Program Files\git\bin\git.exe"
MERCURIAL=r"C:\Program Files\TortoiseHg\hg.exe"
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.