I'm in doubt, I'm new to Electron and I want to ask if it's possible to make it play only in selected folders?
A clearer example of what I mean...
const { app, BrowserWindow, webFrame } = require("electron");
app.whenReady().then(() => _startElectron());
var mainWindow;
async function _startElectron() {
const { screen } = require('electron');
// Create a window that fills the screen's available work area.
const
primaryDisplay = screen.getPrimaryDisplay(),
{ width, height } = primaryDisplay.workAreaSize;
mainWindow = new BrowserWindow({
width: width,
minWidth: 640,
height: height,
minHeight: 360,
frame: true,
autoHideMenuBar: true,
darkTheme: true,
webPreferences: {
devTools: true
}
});
mainWindow.loadFile("dist/gamefile.html");
}
app.on('window-all-closed', () => app.quit());
mainWindow.loadFile("dist/gamefile.html"); in that case it is opening in dist/gamefile.html, it means that all the game source code is being pushed into the .exe file created by Electron.
That's the question, is there a way for the electron builder to just push what's inside the /dist folder? I don't want to make the source code available, just the compilation inside /dist, but the compiler is pushing everything to the .exe.