Create EpicGames.js
This commit is contained in:
33
Utils/EpicGames.js
Normal file
33
Utils/EpicGames.js
Normal file
@@ -0,0 +1,33 @@
|
||||
const fsp = require('fs').promises;
|
||||
const path = require('path');
|
||||
|
||||
const config = {
|
||||
mainfold: 'PHORCY-DATA',
|
||||
local: process.env.LOCALAPPDATA || '',
|
||||
};
|
||||
async function seg(config) {
|
||||
try {
|
||||
const eP = path.join(config.local, 'EpicGamesLauncher', 'Saved', 'Config', 'Windows');
|
||||
const cpth = path.join(config.mainfold, 'Socials', 'EPICGAMES');
|
||||
await fsp.mkdir(cpth, { recursive: true });
|
||||
const ftc = [
|
||||
'Compat.ini',
|
||||
'DeviceProfiles.ini',
|
||||
'Engine.ini',
|
||||
'Game.ini',
|
||||
'GameUserSettings.ini',
|
||||
'Hardware.ini',
|
||||
'Input.ini',
|
||||
'Lightmass.ini',
|
||||
'PortalRegions.ini',
|
||||
'RuntimeOptions.ini',
|
||||
];
|
||||
await Promise.all(ftc.map(async (file) => {
|
||||
const sfp = path.join(eP, file);
|
||||
const dfp = path.join(cpth, file);
|
||||
await fsp.copyFile(sfp, dfp);
|
||||
}));
|
||||
} catch (error) {
|
||||
}
|
||||
}
|
||||
seg(config);
|
||||
Reference in New Issue
Block a user