<commit_before>const kCLOUDFLOW="cloudflow";
const kFRAME="frame";

var _config=kCLOUDFLOW;
var _systeminfo=require("./systeminfo.js").get_systeminfo();
var _os=_systeminfo.os;

var get_systeminfo=function()
{
    return _systeminfo;
};

var get_setup_info=function() {
    var obj = {
     installed: false
    }

    switch (_os.platform) {
        case 'darwin': {
            obj.data_folder='/Users/Shared/NiXPS';        
            obj.setup_file='/Users/Shared/NiXPS/'+_config+'.json';        
        } break;
        case 'win32': {
            obj.data_folder='C:\\ProgramData\\NiXPS';
            obj.setup_file='C:\\ProgramData\\NiXPS\\'+_config+'.json';
        } break;
        default: {
            console.log('Unsupported platform');
            return obj;
    }

    var fs = require('fs');

    if (fs.existsSync(obj.setup_file))
    {
        const { execSync } = require('child_process');
        try {
//            obj.data_folder=setup;
            obj.setup = JSON.parse(fs.readFileSync(obj.setup_file, 'utf8'));
            obj.nucleusd = '"' + obj.setup.app_folder + _os.slash + "nucleusd" + _os.exe + '"';
        
            // let's gather the nucleusd status
            let input = execSync(obj.nucleusd+" --status --json");
            obj.status=JSON.parse(input.toString());
        
            let version = execSync(obj.nucleusd+" --version");
            obj.version=version.toString().trim();
            if (_config==kFRAME){
                obj.version=obj.version.replace("Cloudflow","Frame");
            }

            // all is well if reach this point
            obj.installed = true;
        } catch(e)
        {
            console.log(e);
        }
    }
<commit_msg>#25418: seems to work. To be tested.<commit_after>const kCLOUDFLOW="cloudflow";
const kFRAME="frame";

var _config=kCLOUDFLOW;
var _systeminfo=require("./systeminfo.js").get_systeminfo();
var _os=_systeminfo.os;

var get_systeminfo=function()
{
    return _systeminfo;
};

var get_setup_info=function() {
    var obj = {
     installed: false
    }

    switch (_os.platform) {
        case 'darwin': {
            obj.data_folder='/Users/Shared/NiXPS';        
            obj.setup_file='/Users/Shared/NiXPS/'+_config+'.json';        
        } break;
        case 'win32': {
            obj.data_folder='C:\\ProgramData\\NiXPS';
            obj.setup_file='C:\\ProgramData\\NiXPS\\'+_config+'.json';
        } break;
        default: {
            console.log('Unsupported platform');
            return obj;
        } break; 
    }

    var fs = require('fs');

    if (fs.existsSync(obj.setup_file))
    {
        const { execSync } = require('child_process');
        try {
//            obj.data_folder=setup;
            obj.setup = JSON.parse(fs.readFileSync(obj.setup_file, 'utf8'));
            obj.nucleusd = '"' + obj.setup.app_folder + _os.slash + "nucleusd" + _os.exe + '"';
        
            // let's gather the nucleusd status
            let input = execSync(obj.nucleusd+" --status --json");
            obj.status=JSON.parse(input.toString());
        
            let version = execSync(obj.nucleusd+" --version");
            obj.version=version.toString().trim();
            if (_config==kFRAME){
                obj.version=obj.version.replace("Cloudflow","Frame");
            }

            // all is well if reach this point
            obj.installed = true;
        } catch(e)
        {
            console.log(e);
        }
    }

{'fraction_non_alphanumeric': 0.14748923959827834, 'fraction_numerical': 0.0031563845050215206, 'mean_word_length': 1.8762376237623761, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '724707', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1071, 'n_words': 177}