mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 14:03:42 +00:00
dev: add emulator prod deployment
This commit is contained in:
parent
dfb2523bd6
commit
6ec3c8b653
@ -1,5 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
console.log(`emulator running in mode: ${MODE}`)
|
||||
|
||||
const PATH_V86 = MODE === 'dev' ? '/vendor/v86' : './vendor/v86';
|
||||
|
||||
const { XDocumentPTT } = require("../../phoenix/src/pty/XDocumentPTT");
|
||||
const {
|
||||
NewWispPacketStream,
|
||||
@ -132,15 +136,15 @@ window.onload = async function()
|
||||
);
|
||||
const arrayBuffer = await resp.arrayBuffer();
|
||||
var emulator = window.emulator = new V86({
|
||||
wasm_path: "/vendor/v86/v86.wasm",
|
||||
wasm_path: PATH_V86 + "/v86.wasm",
|
||||
memory_size: 512 * 1024 * 1024,
|
||||
vga_memory_size: 2 * 1024 * 1024,
|
||||
screen_container: document.getElementById("screen_container"),
|
||||
bios: {
|
||||
url: "/vendor/v86/bios/seabios.bin",
|
||||
url: PATH_V86 + "/bios/seabios.bin",
|
||||
},
|
||||
vga_bios: {
|
||||
url: "/vendor/v86/bios/vgabios.bin",
|
||||
url: PATH_V86 + "/bios/vgabios.bin",
|
||||
},
|
||||
|
||||
initrd: {
|
||||
|
@ -1,4 +1,5 @@
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const DefinePlugin = require('webpack').DefinePlugin;
|
||||
|
||||
module.exports = {
|
||||
entry: [
|
||||
@ -8,5 +9,8 @@ module.exports = {
|
||||
new HtmlWebpackPlugin({
|
||||
template: 'assets/template.html'
|
||||
}),
|
||||
new DefinePlugin({
|
||||
MODE: JSON.stringify(process.env.MODE ?? 'dev')
|
||||
}),
|
||||
]
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user