Bug fixes
authorCedric Godin <cedric.godin@usherbrooke.ca>
Mon, 5 Mar 2018 19:04:07 +0000 (14:04 -0500)
committerCedric Godin <cedric.godin@usherbrooke.ca>
Mon, 5 Mar 2018 19:04:07 +0000 (14:04 -0500)
build.js
settings.js

index cced454a4c8568cf500c6cfdd75caa45f9733e99..1ef03dca61956cb309fbecb061d43b7822e550a2 100644 (file)
--- a/build.js
+++ b/build.js
@@ -3,6 +3,7 @@ const rebuild = require('electron-rebuild').rebuild;
 
 packager({
     dir: '.',
+    ignore: 'google-api-key.json',
     afterCopy: [
         (buildPath, electronVersion, platform, arch, callback) => {
             rebuild({ buildPath, electronVersion, arch })
index c831154286916f4170c94275d797a8cf35447c8c..cc3ac7be5402706fbdb94347b0b4aa35af546602 100644 (file)
@@ -1,6 +1,15 @@
 const LocalStorage = require('node-localstorage').LocalStorage;
+const os = require('os');
+const path = require('path');
+const fs = require('fs');
 
-const localStorage = new LocalStorage('./config');
+const odasStudioPath = path.join(os.homedir(), 'odas-studio');
+const storagePath = path.join(odasStudioPath, 'config');
+
+if(!fs.existsSync(odasStudioPath))
+    fs.mkdirSync(odasStudioPath);
+
+const localStorage = new LocalStorage(storagePath);
 
 class AppSettings {
     constructor() {