diff --git a/TShockLauncher/TShock.sh b/TShockLauncher/TShock.sh new file mode 100755 index 00000000..e07cfe1f --- /dev/null +++ b/TShockLauncher/TShock.sh @@ -0,0 +1,2 @@ +#!/bin/bash +./bin/TShock.Run \ No newline at end of file diff --git a/TShockLauncher/TShockLauncher.csproj b/TShockLauncher/TShockLauncher.csproj index 9ca38814..17391044 100644 --- a/TShockLauncher/TShockLauncher.csproj +++ b/TShockLauncher/TShockLauncher.csproj @@ -5,8 +5,11 @@ net6.0 enable enable - TShock + TShock + TShock.Run + Always + @@ -26,9 +29,14 @@ + + + PreserveNewest + + - + @@ -44,10 +52,7 @@ - + @@ -65,14 +70,14 @@ var contents = File.ReadAllBytes(HostExe); var matches = 0; - var offset = Array.FindIndex(contents, (b) => { + var offset = Array.FindIndex(contents, (b) => { matches = (b == find[matches]) ? matches + 1 : 0; return matches == find.Length; }); - if (offset > -1) offset -= find.Length - 1; + if (offset > -1) offset -= find.Length - 1; var x = 0; - Array.ForEach(replace, _ => { contents[offset + x] = replace[x++]; }); + Array.ForEach(replace, _ => { contents[offset + x] = replace[x++]; }); File.WriteAllBytes(HostExe, contents); @@ -84,22 +89,8 @@ - - - - - - - File.WriteAllText(Path.Combine(OutPath, "TShock.exe"), "#!/bin/bash\n./bin/TShock"); - - - - - - + +