loading engine

rdesktop
filip mertens 1 year ago
parent 5728f3c7db
commit eaefe37861
  1. 10
      apps/remixdesktop/src/main.ts

@ -14,7 +14,7 @@ if (
} }
export let mainWindow: BrowserWindow; export let mainWindow: BrowserWindow;
export const createWindow = (): void => { export const createWindow = async (): Promise<void> => {
// Create the browser window. // Create the browser window.
mainWindow = new BrowserWindow({ mainWindow = new BrowserWindow({
height: 800, height: 800,
@ -30,15 +30,19 @@ export const createWindow = (): void => {
'http://localhost:8080') 'http://localhost:8080')
mainWindow.maximize(); mainWindow.maximize();
// Open the DevTools. // Open the DevTools.
mainWindow.webContents.openDevTools(); mainWindow.webContents.openDevTools();
require('./engine')
}; };
// This method will be called when Electron has finished // This method will be called when Electron has finished
// initialization and is ready to create browser windows. // initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs. // Some APIs can only be used after this event occurs.
app.on('ready', createWindow); app.on('ready', async() => {
await createWindow();
require('./engine')
});
// Quit when all windows are closed, except on macOS. There, it's common // Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits // for applications and their menu bar to stay active until the user quits

Loading…
Cancel
Save