Work on configs
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
<!-- <link rel="stylesheet" href="css/aether_layout_flow.css"> -->
|
||||
<!-- <link rel="stylesheet" href="css/aether_layout_grid.css"> -->
|
||||
<link rel="stylesheet" href="http://dev.oneskyit.local:5000/static/svelte/build/aether_modules_core.css">
|
||||
<link rel="stylesheet" href="http://dev.oneskyit.local:5000/static/svelte/build/aether_modules_other.css">
|
||||
<!-- <link rel="stylesheet" href="http://dev.oneskyit.local:5000/static/svelte/build/aether_modules_other.css"> -->
|
||||
|
||||
<link href="http://dev.oneskyit.local:5000/static/svelte/build/bundle.css" rel="stylesheet">
|
||||
<link href="http://dev.oneskyit.local:5000/static/svelte/build/reloading.css" rel="stylesheet">
|
||||
@@ -76,10 +76,10 @@
|
||||
const page_for = { 'event': event_id, 'event_device': event_device_id, 'event_location': event_location_id }; // Simple key value like object
|
||||
console.log(page_for);
|
||||
|
||||
const host_file_cache_path = 'file_cache'; // app_config.host_file_cache_path; // 'file_cache/'
|
||||
console.log(host_file_cache_path);
|
||||
const host_file_temp_path = 'temp' // app_config.host_file_temp_path; // 'temp/'
|
||||
console.log(host_file_temp_path);
|
||||
const host_file_cache_path = app_config.host_file_cache_path; // 'file_cache/'
|
||||
// console.log(host_file_cache_path);
|
||||
const host_file_temp_path = app_config.host_file_temp_path; // 'temp/'
|
||||
// console.log(host_file_temp_path);
|
||||
|
||||
let idb_name = app_config.idb_name;
|
||||
|
||||
|
||||
@@ -4,17 +4,23 @@ const path = require('path');
|
||||
const fs = require('fs');
|
||||
const { ipcRenderer } = require('electron');
|
||||
|
||||
let home_directory = require('os').homedir();
|
||||
console.log('Home: '+home_directory);
|
||||
|
||||
let tmp_directory = require('os').tmpdir();
|
||||
console.log('Temporary: '+tmp_directory);
|
||||
|
||||
let config = null;
|
||||
|
||||
exports.load_config = function () {
|
||||
console.log('*** Electron framework: load_config() ***');
|
||||
console.log('CWD: '+process.cwd());
|
||||
|
||||
let home_directory = require('os').homedir();
|
||||
console.log('Home: '+home_directory);
|
||||
// let home_directory = require('os').homedir();
|
||||
// console.log('Home: '+home_directory);
|
||||
|
||||
let tmp_directory = require('os').tmpdir();
|
||||
console.log('Temporary: '+tmp_directory);
|
||||
// let tmp_directory = require('os').tmpdir();
|
||||
// console.log('Temporary: '+tmp_directory);
|
||||
|
||||
// let config = null;
|
||||
let config_directory = null;
|
||||
@@ -71,6 +77,14 @@ exports.load_config = function () {
|
||||
//close();
|
||||
}
|
||||
|
||||
config.host_file_cache_path = config.host_file_cache_path.replace('[home]', home_directory);
|
||||
config.host_file_cache_path = config.host_file_cache_path.replace('[tmp]', tmp_directory);
|
||||
console.log(config.host_file_cache_path);
|
||||
|
||||
config.host_file_temp_path = config.host_file_temp_path.replace('[home]', home_directory);
|
||||
config.host_file_temp_path = config.host_file_temp_path.replace('[tmp]', tmp_directory);
|
||||
console.log(config.host_file_temp_path);
|
||||
|
||||
let import_config_to_ipc_result = ipcRenderer.invoke('import_config', config).then((result) => {
|
||||
console.log('IPC import config finished');
|
||||
console.log(result);
|
||||
|
||||
Reference in New Issue
Block a user