Add: git hash

This commit is contained in:
Cutls
2019-08-26 00:09:01 +09:00
parent 5694cbd945
commit 5007b70683
8 changed files with 30 additions and 10 deletions

View File

@@ -42,7 +42,12 @@ function system(mainWindow, dir, lang, dirname) {
});
//プラットフォーム
ipc.on('getPlatform', function (e, arg) {
e.sender.webContents.send('platform', [process.platform, process.arch, process.version, process.versions.chrome, process.versions.electron]);
try {
var gitHash = fs.readFileSync("git", 'utf8')
} catch{
var gitHash = null
}
e.sender.webContents.send('platform', [process.platform, process.arch, process.version, process.versions.chrome, process.versions.electron, gitHash]);
})
//言語
ipc.on('lang', function (e, arg) {