Skip to content

Commit

Permalink
Updating MMWD to 1.1.2.0 (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisias committed May 6, 2024
1 parent abb9630 commit a4b54b5
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 20 deletions.
Binary file modified GameData/666_ModuleManagerWatchDog.dll
Binary file not shown.
17 changes: 14 additions & 3 deletions GameData/ModuleManagerWatchDog/CHANGE_LOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Module Manager Watch Dog :: Change Log

* 2024-0423: 1.1.2.0 (LisiasT) for KSP >= 1.2.2
+ Adds an Option Box asking the user what would be their preferred MM Fork when a conflict is detected.
+ We had moved!
- The Official Repository is now on https://github.com/KSP-ModularManagement/ModuleManagerWatchDog
+ Closes issue:
- [#11](https://github.com/KSP-ModularManagement/ModuleManagerWatchDog/issues/11) Implement a more friendly way to allow the user to select which MM fork it wants.
* 2024-0330: 1.1.1.2 (LisiasT) for KSP >= 1.2.2
+ Implements a "self-cleaning" mechanism intended to prevent the user being forced to manually delete artefacts on `GameData` once they decide to deinstall `Module Manager /L` and/or `Module Manager Watch Dog`.
- Specially necessary for CurseForge users.
+ Closes issue:
- [#10](https://github.com/KSP-ModularManagement/ModuleManagerWatchDog/issues/10) Detects when the host directory (`GameData\ModuleManager`) was removed, and kill `ModuleManager.dll` in response.
* 2023-0703: 1.1.1.1 (LisiasT) for KSP >= 1.2.2
+ More sensible updating mechanism, coping with how Windows handles DLL files once they are loaded.
+ Fixes a bug on the KSPe's Install Checker/Update Tool
Expand All @@ -9,11 +20,11 @@
- Safer handling 1.12.x without screwing older KSPs.
+ Implements an "AutoFix", automatically fixing the user's rig when possible (respecting user's preferences).
+ Closes issue:
- [#8](https://github.com/net-lisias-ksp/ModuleManagerWatchDog/issues/8) Automatically fix the Module Manager installation borks when possible.
- [#8](https://github.com/KSP-ModularManagement/ModuleManagerWatchDog/issues/8) Automatically fix the Module Manager installation borks when possible.
* 2023-0313: 1.1.0.4 (LisiasT) for KSP >= 1.2.2
+ Makes the thing survivable if KSP starts with the `pwd` set to anywhere but the `KSPUtil.ApplicationRootPath`.
+ Closes issue:
- [#6](https://github.com/net-lisias-ksp/ModuleManagerWatchDog/issues/6) Resurrect the multiple ModuleManager DLLs check for KSP 1.12.x
- [#6](https://github.com/KSP-ModularManagement/ModuleManagerWatchDog/issues/6) Resurrect the multiple ModuleManager DLLs check for KSP 1.12.x
* 2022-1112: 1.1.0.3 (LisiasT) for KSP >= 1.2.2
+ ***DITCHED***
* 2022-0719: 1.1.0.2 (LisiasT) for KSP >= 1.2.2
Expand All @@ -24,7 +35,7 @@
- ModuleManager /L
- TweakScale
+ Closes issue:
- [#5](https://github.com/net-lisias-ksp/ModuleManagerWatchDog/issues/5) Cook a `GameData/*.dll` update tool
- [#5](https://github.com/KSP-ModularManagement/ModuleManagerWatchDog/issues/5) Cook a `GameData/*.dll` update tool
* 2022-0621: 1.1.0.0 (LisiasT) for KSP >= 1.2.2
+ ***DTICHED*** due a stupid mistake on handling pathnames... #facePalm
* 2021-0907: 1.0.1.1 (LisiasT) for KSP >= 1.2.2
Expand Down
11 changes: 6 additions & 5 deletions GameData/ModuleManagerWatchDog/ModuleManagerWatchDog.version
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"NAME" : "Module Manager Watch Dog",
"URL" : "https://raw.githubusercontent.com/net-lisias-ksp/ModuleManagerWatchDog/master/ModuleManagerWatchDog.version",
"DOWNLOAD" : "https://github.com/net-lisias-ksp/ModuleManagerWatchDog/releases",
"CHANGE_LOG_URL": "https://raw.githubusercontent.com/net-lisias-ksp/ModuleManagerWatchDog/master/CHANGES.md",
"URL" : "https://raw.githubusercontent.com/KSP-ModularManagement/ModuleManagerWatchDog/master/ModuleManagerWatchDog.version",
"DOWNLOAD" : "https://github.com/KSP-ModularManagement/ModuleManagerWatchDog/releases",
"CHANGE_LOG" : "https://raw.githubusercontent.com/KSP-ModularManagement/ModuleManagerWatchDog/master/CHANGE_LOG.md",
"CHANGE_LOG_URL": "https://raw.githubusercontent.com/KSP-ModularManagement/ModuleManagerWatchDog/master/CHANGES.md",

"VERSION":{
"MAJOR":1,
"MINOR":1,
"PATCH":1,
"BUILD":1
"PATCH":2,
"BUILD":0
},
"KSP_VERSION_MIN":{
"MAJOR":1,
Expand Down
2 changes: 1 addition & 1 deletion GameData/ModuleManagerWatchDog/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"ModuleManagerWatchDog", "Module Manager Watch Dog" and "MMWD" are trademarmarks of LisiasT

Other trademarks and registered trademarks are the property of the respective trademark holders.
© 2020-22 LisiasT
© 2020-24 LisiasT
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
24 changes: 13 additions & 11 deletions GameData/ModuleManagerWatchDog/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Module Manager Watch Dog

A Watch Dog for Module Manager.
A Watch Dog for Module Manager - with benefits.


## In a Hurry
Expand Down Expand Up @@ -34,7 +34,7 @@ A Watch Dog for Module Manager.

`MMWD` is a Watch Dog to monitor Module Manager, preventing known (and unsolved) bugs on KSP 1.8 and newer that affects it.

Additional services for updating specific DLLs on `GameData.` are now part of the solution, making it useful even for KSP <= 1.7.3 .
Additional services for updating specific DLLs on `GameData` are now part of the solution, and it is's now effective for KSP <= 1.7.3 .

The following services are provided:

Expand All @@ -44,11 +44,11 @@ Some 3rd party Add'Ons and this tool itself need critical DLLs to be present dir

Additionally, CurseForge - at least at the moment of this release - doesn't have a mechanism to allow updating files on it, triggering bug reports that will be easily avoided by deploying this tool.

This tool checks for need for installing (or updating) such critical DLLs automatically for selected Add'Ons.
This tool checks for the need of installing (or updating) such critical DLLs automatically for selected Add'Ons.

The feature is implemented on a discrete DLL, `WatchDogInstallChecker.dll`, and can be easily removed from the distribution without colateral effects (other than losing the functionality).

**It's not advisable to use it on installments managed by CKAN**, as it manages itself these DLLs.
**It's _not_ advisable to use it on installments managed by CKAN**, as it manages itself these DLLs.

The following Add'Ons are currently managed:

Expand All @@ -64,35 +64,37 @@ Historically, managing multiple Module Manager versions was problematic on KSP -

Before KSP 1.8, duplicated Assemblies were being loaded on dedicated App Domains, and so calling them would incur in marshalling (essentially, RPC but on the same process...) with significantly performance issues.

But on KSP 1.8 (and until 1.12.0), while trying to tackle down the performance problem by short circuiting all the duplicated Assemblies to the first one loaded, Squad inadvertently caused the oldest MM being elected to be used (as DLLs are loaded in alphabetical order), with pretty serious consequences.
But on KSP 1.8 (and until 1.12.0), while trying to tackle down the performance problem by short circuiting all the duplicated Assemblies to the first loaded one, Squad inadvertently caused the oldest MM being elected to be used (as DLLs are loaded in alphabetical order), with pretty serious consequences.

On KSP 1.12.0 things changed again. Now the DLL version is used as criteria, and the highest version found is the one elected to be used. **However**, a new bug was introduced, playing havoc on the system if more than one DLL **has the same filename**.
On KSP 1.12.0 things changed again. Now the DLL version is used as election criteria, and the highest version found is the one elected to be used. **However**, a new bug was introduced, playing havoc on the system if more than one DLL **has the same filename**.

Finally, on KSP 1.12.5 the problem of selecting the first DLL was resurrected, and now that old problem that started to happen on KSP 1.8 is in effect again.

So, different KSP releases will need different MM handling:

* On KSP \< 1.8, the tool complains if MM is not installed.
* On KSP \>= 1.8 and \< 1.12, the tool will yell on any duplicated Module Manager on the rig - *There can be only one!*
* On KSP \>= 1.8 and \< 1.12, as well KSP 1.12.5, the tool will yell on any duplicated Module Manager on the rig - *There can be only one!*
* On KSP \>= 1.12, the tool prevents installing MM/L together Forum's one as an extra safety measure.
+ MM/L behaves and it's 100% compatible, being a drop in replacement - it's safe to switch MM at any time.
+ MM/L behaves and it's 100% compatible, being a drop in replacement - it's absolutely safe to switch MM at any time (even the functional bugs are the same)
+ But yet is advisable to avoid having both installed at the same time.

The Author strongly advises to edit the `WatchDog.cfg` file and select enforcing the "1.8 rules". It's far the safest option - besides risking being a bit annoying sometimes.

### Checking TweakScale

Due the general mess that handling duplicated DLLs are on KSP, it was choose to install the formerly named `Scale_Redist.dll` file into `GameData` as `999_Scale_Redist.dll` . This aims to ensure the canon Redist is the first one to be loaded, as well to avoid eventual naming collisions with the few Add'Ons that used to have it embedded.
Due the general mess that handling duplicated DLLs is on KSP, it was chosen to install the formerly named `Scale_Redist.dll` file into `GameData` as `999_Scale_Redist.dll` . This aims to ensure the canon Redist is the first one to be loaded, as well to avoid eventual naming collisions with the few Add'Ons that used to have it embedded.

This way, we can be ensure the best performance on older KSPs as well a safest environment on newer ones.

The tool checks for known `Scale_Redist` clients and yells if they are present but not the Redist. It also yells if there're more than one copy of `Scale_Redist` are installed, and also enforce that the only one installed are the `GameData/999_Scale_Redist.dll` .
The tool checks for known `Scale_Redist` clients and yells if they are present but not the Redist. It also yells if there're more than one copy of `Scale_Redist` installed, and also enforces that the only one installed are the `GameData/999_Scale_Redist.dll` .

### Checking KSP Interstellar Extended

Similar handling are applied to `Interstellar_Redist.dll` from KSPIE.

### Final Considerations

This tool was originally aimed to be redistributed embedded on Add'Ons that used to redistribute Module Manager themselves in the past, unintentionally triggering the problems this tool aims to detect, but evolved to an Add'On de jure and de facto.
This tool was originally aimed to be redistributed embedded on Add'Ons that used to redistribute Module Manager themselves in the past, unintentionally triggering the problems this tool aims to detect - but evolved to an Add'On *de jure and de facto*.


## Installation
Expand Down

0 comments on commit a4b54b5

Please sign in to comment.