diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 652b858c..7658237c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,7 +17,11 @@ jobs: - name: Publish project run: | - dotnet publish -c Release -o publish/RAWSimO + dotnet publish -c Release -o publish/RAWSimO RAWSimO.Visualization/RAWSimO.Visualization.csproj + - name: Copy resource files + run: | + mkdir publish/RAWSimO/Resources + cp -r Material/Resources/* publish/RAWSimO/Resources - name: Zip output run: | cd publish diff --git a/RAWSimO.Core/IO/IOConstants.cs b/RAWSimO.Core/IO/IOConstants.cs index 0a03b2e5..a5d24e8a 100644 --- a/RAWSimO.Core/IO/IOConstants.cs +++ b/RAWSimO.Core/IO/IOConstants.cs @@ -325,12 +325,6 @@ public enum StatFile /// public static readonly List DEFAULT_RESOURCE_DIRS = new List { - Path.Combine(Path.GetPathRoot(Path.GetFullPath(Directory.GetCurrentDirectory())), "scratch", "mmarius", "research", "awsimopt", "resources", "Wordlists"), - Path.Combine(Path.GetPathRoot(Path.GetFullPath(Directory.GetCurrentDirectory())), "scratch", "mmarius", "research", "awsimopt", "resources"), - Path.Combine(Path.GetPathRoot(Path.GetFullPath(Directory.GetCurrentDirectory())), "scratch", "mmarius", "research", "awsimopt", "repo", "Material", "Resources", "Wordlists"), - Path.Combine(Path.GetPathRoot(Path.GetFullPath(Directory.GetCurrentDirectory())), "scratch", "mmarius", "research", "awsimopt", "repo", "Material", "Resources"), - Path.Combine(Path.GetPathRoot(Path.GetFullPath(Directory.GetCurrentDirectory())), "scratch", "herbort", "storage_eval", "repo", "Material", "Resources", "Wordlists"), - Path.Combine(Path.GetPathRoot(Path.GetFullPath(Directory.GetCurrentDirectory())), "scratch", "herbort", "storage_eval", "repo", "Material", "Resources"), Path.Combine("Material", "Resources", "Wordlists"), Path.Combine("Material", "Resources"), Path.Combine("repo", "Material", "Resources", "Wordlists"), diff --git a/Tests/RAWSimO.Core.Tests/Resources/ResourceHelper.cs b/Tests/RAWSimO.Core.Tests/Resources/ResourceHelper.cs deleted file mode 100644 index 8ab0fe99..00000000 --- a/Tests/RAWSimO.Core.Tests/Resources/ResourceHelper.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; - -namespace RAWSimO.Core.Tests.Resources -{ - /// - /// Exposes auxiliary functionality for handling test resources. - /// - public static class ResourceHelper - { - /// - /// Reads a given embedded resource file into a single string. - /// - /// The namespace and filename of the file to read. - /// The file as a single string. - private static string ReadTextResourceFile(string file) - { - // Read file content - var assembly = Assembly.GetExecutingAssembly(); - using var stream = assembly.GetManifestResourceStream(file); - using var reader = new StreamReader(stream ?? throw new InvalidOperationException("Resource file for mini-instance not found!")); - return reader.ReadToEnd(); - } - } -}