Skip to content

Commit

Permalink
Fixed Steam library search
Browse files Browse the repository at this point in the history
- Updated several dependencies
  • Loading branch information
gregkwaste committed Jul 18, 2022
1 parent 4aa4d5d commit 2339211
Show file tree
Hide file tree
Showing 6 changed files with 238 additions and 38 deletions.
21 changes: 7 additions & 14 deletions MVCore/Utils/NMS_Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -657,24 +657,17 @@ private static string fetchSteamGameInstallationDir()
StreamReader sr = new StreamReader(Path.Combine(steam_path, @"steamapps\libraryfolders.vdf"));
List<string> libraryPaths = new List<string>();

int line_count = 0;
while (!sr.EndOfStream)
{
string line = sr.ReadLine();
if (line_count < 4)
{
line_count++;
continue;
}

if (!line.StartsWith("\t"))
if (!line.Contains("\"path\""))
continue;

string[] split = line.Split('\t');
string path = split[split.Length - 1];
path = path.Trim('\"');
path = path.Replace("\\\\", "\\");
libraryPaths.Add(Path.Combine(path, "steamapps"));

line = line.Replace("\t", " ");
line = line.Trim().Trim('\"');
string path = line.Split('\"')[2];
libraryPaths.Add(Path.Combine(path, "steamapps\\"));
}

//Check all library paths for the acf file
Expand All @@ -687,7 +680,7 @@ private static string fetchSteamGameInstallationDir()
continue;

if (filepath.Contains(nms_id))
return Path.Combine(path, @"common\No Man's Sky\GAMEDATA");
return Path.Combine(path, @"common\No Man's Sky");
}
}

Expand Down
10 changes: 5 additions & 5 deletions WPFModelViewer/App.config
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="OpenTK" publicKeyToken="bad199fe84eb3df4" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.2.0.0" newVersion="3.2.0.0"/>
<assemblyIdentity name="OpenTK" publicKeyToken="bad199fe84eb3df4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.2.0.0" newVersion="3.2.0.0" />
</dependentAssembly>
</assemblyBinding>
<loadFromRemoteSources enabled="true"/>
<loadFromRemoteSources enabled="true" />
</runtime>
</configuration>
30 changes: 30 additions & 0 deletions WPFModelViewer/FodyWeavers.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
Expand All @@ -43,6 +53,16 @@
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeRuntimeReferences" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if runtime assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseRuntimeReferencePaths" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
Expand Down Expand Up @@ -73,6 +93,16 @@
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
Expand Down
1 change: 1 addition & 0 deletions WPFModelViewer/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public MainWindow()
//Initialize Resource Manager
RenderState.activeResMgr = new ResourceManager();


//Generate CGLControl
glControl = new CGLControl();

Expand Down
Loading

0 comments on commit 2339211

Please sign in to comment.