Skip to content

Commit

Permalink
waiting for electron-build fix see electron-userland/electron-builder…
Browse files Browse the repository at this point in the history
  • Loading branch information
MagiusCHE committed Apr 29, 2021
1 parent 477dd6c commit 412c866
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 1,592 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ package-json.lock
*.log
node_modules
/appData
/GameDek-linux-x64
/GameDek-linux-x64
out/
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"start": "electron . --develop",
"prod": "electron .",
"release": "electron-builder",
"packager_test": "electron-packager ./ --overwrite --ignore=/.vscode --ignore=/appData --ignore=/dist",
"dist:linux": "yarn release -l",
"dist:linux:deb": "yarn release -l deb",
"dist:linux:targz": "yarn release -l tar.gz",
Expand Down Expand Up @@ -73,9 +72,7 @@
}
},
"devDependencies": {
"@electron-forge/cli": "^6.0.0-beta.54",
"electron": "^12.0.0",
"electron-builder": "^22.10.5",
"electron-packager": "^15.2.0"
"electron-builder": "*"
}
}
}
11 changes: 10 additions & 1 deletion plugins/gamelib.manager/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class myplugin extends global.Plugin {
this.#library.lastUpdate = new Date()
}

for (const game of this.#library.games) {
delete game.lastExecutionLog //back compatibility
}

await kernel.broadcastPluginMethod('gameengine', 'libraryLoaded', this.#library)

this.log(`Loaded library (${this.#library.games.length} games).`)
Expand Down Expand Up @@ -99,7 +103,12 @@ class myplugin extends global.Plugin {
const ela = exists.lastStop - exists.lastStart
exists.playTime = (exists.playTime || 0) + ela
}
exists.lastExecutionLog = log
const gamelogdir = path.join(kernel.appDataRoot, 'logs', 'games')
mkdirp.sync(gamelogdir)

delete exists.lastExecutionLog //back compatibility

fs.writeFileSync(path.join(gamelogdir, exists.hash + '.log'), typeof log == 'string' ? log : JSON.stringify(log, undefined, 2))

this.saveLibrary()

Expand Down
Loading

0 comments on commit 412c866

Please sign in to comment.