feat: Implemented launching and downloading of roms
This is just an initial implementation lots of kings to iron out
This commit is contained in:
parent
ef08fa6114
commit
f15bf9a1e0
117 changed files with 37776 additions and 1073 deletions
17
src/bun/webview/base.ts
Normal file
17
src/bun/webview/base.ts
Normal 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
7
src/bun/webview/linux.ts
Normal 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
7
src/bun/webview/win32.ts
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue