@@ -108,33 +108,23 @@ ComponentProps MakeComponentProps(std::vector<std::filesystem::path> pathList)
108108
109109std::vector<std::pair<std::string, std::tuple<ComponentState, ComponentProps>>> uninstallComponents;
110110
111- static std::filesystem::path GetMillenniumLocalPath ()
112- {
113- const char * localAppData = std::getenv (" LOCALAPPDATA" );
114- if (localAppData) {
115- return std::filesystem::path (localAppData) / " Millennium" ;
116- }
117- return {};
118- }
119-
120111// clang-format off
121112void InitializeUninstaller ()
122113{
123114 steamPath = GetSteamPath ();
124- auto millenniumLocalPath = GetMillenniumLocalPath () ;
115+ auto millenniumPath = steamPath / " millennium " ;
125116
126117 isUninstalling = false ;
127118 uninstallFinished = false ;
128119
129- bool isNewLayout = !millenniumLocalPath. empty () && std::filesystem::exists (millenniumLocalPath );
120+ bool isNewLayout = std::filesystem::exists (millenniumPath );
130121
131122 std::vector<std::filesystem::path> millenniumPaths;
132123
133124 if (isNewLayout) {
134- // New install (>2.35.0): files in %LOCALAPPDATA%/Millennium + hardlink in Steam
135125 millenniumPaths = {
136- millenniumLocalPath / " lib" ,
137- millenniumLocalPath / " bin" ,
126+ millenniumPath / " lib" ,
127+ millenniumPath / " bin" ,
138128 steamPath / " wsock32.dll" ,
139129 };
140130 } else {
@@ -156,12 +146,17 @@ void InitializeUninstaller()
156146 uninstallComponents = {
157147 { " Millennium" , std::make_tuple (ComponentState ({ false , true }), MakeComponentProps (millenniumPaths)) },
158148 { " Custom Steam Components" , std::make_tuple (ComponentState ({ false , true }), MakeComponentProps ({
149+ millenniumPath / " ext" / " data" / " assets" ,
150+ millenniumPath / " ext" / " data" / " shims" ,
159151 steamPath / " ext" / " data" / " assets" ,
160152 steamPath / " ext" / " data" / " shims"
161153 })) },
162- { " Dependencies" , std::make_tuple (ComponentState ({ false , true }), MakeComponentProps ({ steamPath / " ext" / " data" / " cache" , steamPath / " ext" / " data" / " pyx64" })) },
163- { " Themes" , std::make_tuple (ComponentState ({ false , true }), MakeComponentProps ({ steamPath / " steamui" / " skins" })) },
164- { " Plugins" , std::make_tuple (ComponentState ({ false , true }), MakeComponentProps ({ steamPath / " plugins" })) },
154+ { " Dependencies" , std::make_tuple (ComponentState ({ false , true }), MakeComponentProps ({
155+ steamPath / " ext" / " data" / " cache" ,
156+ steamPath / " ext" / " data" / " pyx64"
157+ })) },
158+ { " Themes" , std::make_tuple (ComponentState ({ false , true }), MakeComponentProps ({ millenniumPath / " themes" , steamPath / " steamui" / " skins" })) },
159+ { " Plugins" , std::make_tuple (ComponentState ({ false , true }), MakeComponentProps ({ millenniumPath / " plugins" , steamPath / " plugins" })) },
165160 };
166161}
167162// clang-format on
0 commit comments