added build folder for getting splash screen working - buildResources will be ignored on import

This commit is contained in:
DJ2LS 2022-11-09 16:46:25 +01:00
parent db0f472f43
commit e55623e0ae
4 changed files with 29 additions and 6 deletions

BIN
gui/build/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 KiB

View file

@ -55,11 +55,11 @@
"appId": "app.freedata",
"npmRebuild": "false",
"directories": {
"buildResources": "src/img",
"buildResources": "build",
"output": "dist"
},
"dmg": {
"icon": "src/img/icon.png",
"icon": "build/icon.png",
"contents": [
{
"x": 130,
@ -74,13 +74,13 @@
]
},
"win": {
"icon": "src/img/icon.png",
"icon": "build/icon.png",
"target": [
"nsis"
]
},
"linux": {
"icon": "src/img/icon.png",
"icon": "build/icon.png",
"target": [
"AppImage"
],

View file

@ -8,6 +8,28 @@ var configPath = path.join(configFolder, 'config.json')
const config = require(configPath);
var _getAllFilesFromFolder = function(dir) {
var filesystem = require("fs");
var results = [];
filesystem.readdirSync(dir).forEach(function(file) {
file = dir+'/'+file;
var stat = filesystem.statSync(file);
if (stat && stat.isDirectory()) {
results = results.concat(_getAllFilesFromFolder(file))
} else results.push(file);
});
return results;
};
console.log(_getAllFilesFromFolder(__dirname));
// WINDOW LISTENER
window.addEventListener('DOMContentLoaded', () => {

View file

@ -1,10 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Security-Policy" content="script-src 'self';">
</head>
<body>
<img src="img/icon_cube_border.png" width="100%" height="100%">
</body>
</html>