Skip to content

Commit

Permalink
Added DynamicLoadingDLL to main data folder with the rest of the requ…
Browse files Browse the repository at this point in the history
…ired dlls.
  • Loading branch information
DragoQCC committed Jul 7, 2023
1 parent 86e58d3 commit e4d9b7c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Binary file added TeamServer/Data/DynamicEngLoading.dll
Binary file not shown.
Binary file not shown.
14 changes: 7 additions & 7 deletions TeamServer/Utilities/Compile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public static byte[] GenerateEngCode(string source,SpawnEngineerRequest.EngCompi

//get the shared library location
string TopLevelFolder = pathSplit[0] + $"..{allPlatformPathSeperator}";
string DynamicLoadingDllPath = TopLevelFolder + "DynamicEngLoading" + allPlatformPathSeperator + "bin" + allPlatformPathSeperator + "Debug";
// string DynamicLoadingDllPath = TopLevelFolder + "DynamicEngLoading" + allPlatformPathSeperator + "bin" + allPlatformPathSeperator + "Debug";
//in the TopLeelFolder should be files in the format Engineer_randomStrings.exe, we need one of those file paths
string[] DynamicLoadingLibrary = Directory.GetFiles(DynamicLoadingDllPath, "DynamicEngLoading.dll");
// string[] DynamicLoadingLibrary = Directory.GetFiles(DynamicLoadingDllPath, "DynamicEngLoading.dll");



Expand Down Expand Up @@ -82,8 +82,8 @@ public static byte[] GenerateEngCode(string source,SpawnEngineerRequest.EngCompi
trees.Add(syntaxTree);
//get Refrences from the assembly
List<MetadataReference> references = new List<MetadataReference> { };
Console.WriteLine("DynamicLoadingLibrary file path: " + DynamicLoadingLibrary[0]);
references.Add(MetadataReference.CreateFromFile($"{DynamicLoadingLibrary[0]}"));
//Console.WriteLine("DynamicLoadingLibrary file path: " + DynamicLoadingLibrary[0]);
//references.Add(MetadataReference.CreateFromFile($"{DynamicLoadingLibrary[0]}"));
// get MetadataRefrence CreateFromFile for each string in assemblyRefList
foreach (string assembly in assemblyRefList)
{
Expand Down Expand Up @@ -160,9 +160,9 @@ public static byte[] CompileCommands(string source)
pathSplit[1] = pathSplit[1].Replace("\\", allPlatformPathSeperator.ToString());
//string dataFolderPath = pathSplit[0] + "Data";
string TopLevelFolder = pathSplit[0] + $"..{allPlatformPathSeperator}";
string DynamicLoadingDllPath = TopLevelFolder + "DynamicEngLoading" +allPlatformPathSeperator + "bin" + allPlatformPathSeperator+"Debug";
// string DynamicLoadingDllPath = TopLevelFolder + "DynamicEngLoading" +allPlatformPathSeperator + "bin" + allPlatformPathSeperator+"Debug";
//in the TopLeelFolder should be files in the format Engineer_randomStrings.exe, we need one of those file paths
string[] DynamicLoadingLibrary = Directory.GetFiles(DynamicLoadingDllPath, "DynamicEngLoading.dll");
// string[] DynamicLoadingLibrary = Directory.GetFiles(DynamicLoadingDllPath, "DynamicEngLoading.dll");

string dataFolderPath = pathSplit[0] + "Data" + allPlatformPathSeperator + "NewCommandStandard";

Expand All @@ -171,7 +171,7 @@ public static byte[] CompileCommands(string source)

List<MetadataReference> referencedAssemblies = new List<MetadataReference>
{
MetadataReference.CreateFromFile($"{DynamicLoadingLibrary[0]}")
// MetadataReference.CreateFromFile($"{DynamicLoadingLibrary[0]}")
};
foreach (string assembly in assemblyRefList)
{
Expand Down

0 comments on commit e4d9b7c

Please sign in to comment.