From 804773f4eb0865a0201976e510260b56d59cd93c Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Wed, 2 Dec 2020 19:00:08 +0100 Subject: [PATCH] Removing not needed languages --- installer/build.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/installer/build.ts b/installer/build.ts index 8a747d6..f5be8ef 100644 --- a/installer/build.ts +++ b/installer/build.ts @@ -382,6 +382,16 @@ new Promise((resolve, reject) => packager(options, (err, appPaths) => err ? reje version = "v" + version; await fs.writeFile(path_helper.join(app_path[0], "version"), version); return app_path; +}).then(async appPaths => { + console.log("Removing locals folder"); + for(const locale of await fs.readdir(path_helper.join(appPaths[0], "locales"))) { + if(locale.match(/en-US\.pak/)) { + continue; + } + + await fs.remove(path_helper.join(appPaths[0], "locales", locale)) + } + return appPaths; }).then(async () => { if(process.argv[2] == "win32") { console.log("Installing local PDB files");