Fix bug in WebPlayer installation logic

Also run prettier
This commit is contained in:
CakeLancelot
2023-02-09 12:52:57 -06:00
parent d554b6b968
commit 2bf916ea58
4 changed files with 20 additions and 17 deletions

View File

@@ -43,10 +43,8 @@ function installUnity(callback) {
child.on("exit", function () {
// overwrite 3.5.2 loader/player with FF's custom version
var dstfolder =
app.getPath("appData") + "..\\LocalLow\\Unity\\WebPlayer";
fs.copySync(utilsdir + "\\WebPlayer", dstfolder, {
clobber: true,
});
app.getPath("appData") + "\\..\\LocalLow\\Unity\\WebPlayer";
fs.copySync(utilsdir + "\\WebPlayer", dstfolder, { clobber: true });
// avoids error reporter popping up when closing Electron
fs.removeSync(dstfolder + "\\UnityBugReporter.exe");
console.log("Unity Web Player installed successfully.");