feat: Implemented launching and downloading of roms

This is just an initial implementation lots of kings to iron out
This commit is contained in:
Simeon Radivoev 2026-02-19 16:10:29 +02:00
parent ef08fa6114
commit f15bf9a1e0
Signed by: simeonradivoev
GPG key ID: 7611A451D2A5D37A
117 changed files with 37776 additions and 1073 deletions

17
src/bun/webview/base.ts Normal file
View file

@ -0,0 +1,17 @@
import { SERVER_URL } from "@/shared/constants";
import Webview from "@rcompat/webview";
import { host } from "../utils";
export default function (webview: Webview)
{
self.addEventListener('message', (e) =>
{
console.log("Terminate");
if (e.data === 'exit')
{
webview.destroy();
}
});
webview.navigate(SERVER_URL(host));
webview.run();
}

7
src/bun/webview/linux.ts Normal file
View file

@ -0,0 +1,7 @@
import Webview from "@rcompat/webview";
import platform from "@rcompat/webview/linux-x64";
import webviewWorkerBase from "./base";
console.log("Launching Webview");
const webview = new Webview({ debug: import.meta.env.NODE_ENV === 'development', platform });
webviewWorkerBase(webview);

7
src/bun/webview/win32.ts Normal file
View file

@ -0,0 +1,7 @@
import Webview from "@rcompat/webview";
import platform from "@rcompat/webview/windows-x64";
import webviewWorkerBase from "./base";
console.log("Launching Webview");
const webview = new Webview({ debug: import.meta.env.NODE_ENV === 'development', platform });
webviewWorkerBase(webview);