From 46b0cbbf70bcbe3facc06ea2ca798337c918dd18 Mon Sep 17 00:00:00 2001 From: C-3PO Date: Fri, 22 Jun 2018 15:56:51 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Extract=20manifest.xml=20in=20insta?= =?UTF-8?q?llPatch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/installPatch.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/installPatch.ts b/src/installPatch.ts index b4c2830..1dfb1ac 100644 --- a/src/installPatch.ts +++ b/src/installPatch.ts @@ -1,7 +1,11 @@ +import { TextDecoder } from 'util'; +import extractFile from './ssn/extractFile'; import getPatchmanifest from './ssn/getPatchmanifest'; import getSolidpkg from './ssn/getSolidpkg'; import readSsnFile from './ssn/readSsnFile'; +const Decoder = new TextDecoder('utf-8'); + (async () => { //----- PATCHMANIFEST ----- //.patchmanifest files contain a single XML file called "manifest.xml" @@ -11,6 +15,10 @@ import readSsnFile from './ssn/readSsnFile'; const patchmanifestFiles = readSsnFile(patchmanifestBuffer); console.log(patchmanifestFiles); + const patchmanifestFile = extractFile(patchmanifestFiles[0], [new DataView(patchmanifestBuffer.buffer)]); + const patchmanifestXml = Decoder.decode(patchmanifestFile); + console.log(patchmanifestXml); + //----- SOLIDPKG ----- //.solidpkg files contain a single Bencode file called "metafile.solid" const solidpkgBuffer = await getSolidpkg('assets_swtor_de_de', -1, 0);