Skip to content

Commit a7a73d1

Browse files
committed
actually fix relative build
1 parent 2dba615 commit a7a73d1

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

frontend/src/game/dotnet.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,11 @@ export async function preInit() {
319319

320320
const dlls = await getDlls();
321321

322+
const loc = location.pathname;
323+
322324
await runtime.runMain();
323325
await exports.CelesteBootstrap.MountFilesystems(
326+
loc.substring(0, loc.lastIndexOf("/")) + "/",
324327
dlls.map((x) => `${x[0]}|${x[1]}`)
325328
);
326329
await exports.CelesteLoader.PreInit();

loader/CelesteBootstrap.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private static void TryCreateDirectory(string path)
2727
Directory.CreateDirectory(path);
2828
}
2929

30-
private static void MountDlls(string[] rawDlls)
30+
private static void MountDlls(string root, string[] rawDlls)
3131
{
3232
IEnumerable<Dll> dlls = rawDlls.Select(x =>
3333
{
@@ -37,7 +37,7 @@ private static void MountDlls(string[] rawDlls)
3737

3838
// mono.cecil searches in /bin for some dlls
3939
Directory.CreateDirectory("/bin");
40-
mount_fetch("_framework/", "/fetchdlls/");
40+
mount_fetch(root + "_framework/", "/fetchdlls/");
4141
foreach (var dll in dlls)
4242
{
4343
int ret = mount_fetch_file($"/fetchdlls/{dll.RealName}");
@@ -50,7 +50,7 @@ private static void MountDlls(string[] rawDlls)
5050
}
5151

5252
[JSExport]
53-
public static async Task MountFilesystems(string[] rawDlls)
53+
public static async Task MountFilesystems(string root, string[] rawDlls)
5454
{
5555
try
5656
{
@@ -66,7 +66,7 @@ public static async Task MountFilesystems(string[] rawDlls)
6666
File.CreateSymbolicLink("/Content", "/libsdl/Content");
6767
File.CreateSymbolicLink("/Saves", "/libsdl/Celeste/Saves");
6868
File.CreateSymbolicLink("/remote/%GameInstall%Saves", "/libsdl/Celeste/Saves");
69-
MountDlls(rawDlls);
69+
MountDlls(root, rawDlls);
7070
}
7171
catch (Exception err)
7272
{

0 commit comments

Comments
 (0)