2024-03-11 11:01:07 -04:00
|
|
|
const Factory = require('./factory.js')
|
|
|
|
const { app, BrowserWindow, ipcMain, ipcRenderer } = require('electron')
|
|
|
|
const path = require('node:path')
|
|
|
|
|
|
|
|
const createWindow = () => {
|
|
|
|
const win = new BrowserWindow({
|
2024-05-13 05:08:47 -04:00
|
|
|
width: 1400,
|
|
|
|
height: 1200,
|
2024-03-11 11:01:07 -04:00
|
|
|
webPreferences: {
|
|
|
|
preload: path.join(__dirname, 'preload.js')
|
|
|
|
}
|
|
|
|
})
|
|
|
|
win.loadFile('index.html')
|
|
|
|
}
|
2024-05-14 10:50:42 -04:00
|
|
|
app.disableHardwareAcceleration()
|
2024-03-11 11:01:07 -04:00
|
|
|
app.whenReady().then(() => {
|
2024-03-12 02:13:02 -04:00
|
|
|
ipcMain.handle('run', (_, param) => {
|
2024-03-11 11:01:07 -04:00
|
|
|
Factory.get(param.workflow)
|
2024-05-07 01:32:22 -04:00
|
|
|
Factory.workflow.run(param.application, param, './tmp/')
|
2024-03-11 11:01:07 -04:00
|
|
|
})
|
|
|
|
createWindow()
|
|
|
|
app.on('window-all-closed', () => {
|
|
|
|
if (process.platform !== 'darwin') app.quit()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
app.on('window-all-closed', () => {
|
|
|
|
if (process.platform !== 'darwin') {
|
|
|
|
app.quit()
|
|
|
|
}
|
|
|
|
})
|