Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't try to remove autodetected DLLs #2232

Merged
merged 1 commit into from
Dec 24, 2017

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Dec 24, 2017

Problem

ckan remove --all currently tries to remove autodetected DLLs, which fails. This makes this command unusable on Steam installs, which always have two extra DLLs, KSPSteamCtrlr and Steamworks.

ckan remove --re regularexpression has the same problem if the regular expressions match any autodetected DLL.

Cause

Cmdline/Action/Remove.cs loops over Registry.Installed, which includes autodetected DLLs:

Installed: KSPSteamCtrlr autodetected dll
Installed: Steamworks autodetected dll
Installed: StockVisualEnhancements 3:1.2.7.0
Installed: SVE-LowResolution 3:1.0.2
Installed: Scatterer-sunflare 2:v0.0320b
Installed: Scatterer-config 2:v0.0320b
Installed: DistantObject-default v1.9.1
Installed: Scatterer 2:v0.0320b
Installed: EnvironmentalVisualEnhancements 2:EVE-1.2.2-1
Installed: ModuleManager 3.0.1
Installed: DistantObject v1.9.1

Changes

Now it uses Registry.InstalledModules, which does not include autodetected DLLs:

InstalledModule: StockVisualEnhancements 3:1.2.7.0
InstalledModule: SVE-LowResolution 3:1.0.2
InstalledModule: Scatterer-sunflare 2:v0.0320b
InstalledModule: Scatterer-config 2:v0.0320b
InstalledModule: DistantObject-default v1.9.1
InstalledModule: Scatterer 2:v0.0320b
InstalledModule: EnvironmentalVisualEnhancements 2:EVE-1.2.2-1
InstalledModule: ModuleManager 3.0.1
InstalledModule: DistantObject v1.9.1

Before

$ mono ckan.exe remove --all
I can't do that, KSPSteamCtrlr isn't installed.
Try `ckan list` for a list of installed mods.

After

$ mono ckan.exe remove --all
About to remove:

 * Stock Visual Enhancements 3:1.2.7.0
 * Stock Visual Enhancements-Low Resolution Textures 3:1.0.2
 * scatterer - sunflare 2:v0.0320b
 * scatterer - default config 2:v0.0320b
 * Distant Object Enhancement default config v1.9.1
 * scatterer 2:v0.0320b
 * Environmental Visual Enhancements 2:EVE-1.2.2-1
 * Module Manager 3.0.1
 * Distant Object Enhancement v1.9.1

Continue? [Y/n] 

Linkages

Fixes #1553.

@HebaruSan HebaruSan added Bug Something is not working as intended Cmdline Issues affecting the command line Pull request and removed Bug Something is not working as intended labels Dec 24, 2017
@HebaruSan HebaruSan force-pushed the fix/remove-all-steam branch from 8073352 to b5de71e Compare December 24, 2017 00:43
@HebaruSan HebaruSan added the Bug Something is not working as intended label Dec 24, 2017
@politas politas merged commit b5de71e into KSP-CKAN:master Dec 24, 2017
politas added a commit that referenced this pull request Dec 24, 2017
@politas politas removed Bug Something is not working as intended Pull request labels Dec 24, 2017
@HebaruSan HebaruSan deleted the fix/remove-all-steam branch December 24, 2017 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmdline Issues affecting the command line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants