✨ Extract manifest.xml in installPatch
This commit is contained in:
parent
78ac8ae304
commit
46b0cbbf70
1 changed files with 8 additions and 0 deletions
|
@ -1,7 +1,11 @@
|
||||||
|
import { TextDecoder } from 'util';
|
||||||
|
import extractFile from './ssn/extractFile';
|
||||||
import getPatchmanifest from './ssn/getPatchmanifest';
|
import getPatchmanifest from './ssn/getPatchmanifest';
|
||||||
import getSolidpkg from './ssn/getSolidpkg';
|
import getSolidpkg from './ssn/getSolidpkg';
|
||||||
import readSsnFile from './ssn/readSsnFile';
|
import readSsnFile from './ssn/readSsnFile';
|
||||||
|
|
||||||
|
const Decoder = new TextDecoder('utf-8');
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
//----- PATCHMANIFEST -----
|
//----- PATCHMANIFEST -----
|
||||||
//.patchmanifest files contain a single XML file called "manifest.xml"
|
//.patchmanifest files contain a single XML file called "manifest.xml"
|
||||||
|
@ -11,6 +15,10 @@ import readSsnFile from './ssn/readSsnFile';
|
||||||
const patchmanifestFiles = readSsnFile(patchmanifestBuffer);
|
const patchmanifestFiles = readSsnFile(patchmanifestBuffer);
|
||||||
console.log(patchmanifestFiles);
|
console.log(patchmanifestFiles);
|
||||||
|
|
||||||
|
const patchmanifestFile = extractFile(patchmanifestFiles[0], [new DataView(patchmanifestBuffer.buffer)]);
|
||||||
|
const patchmanifestXml = Decoder.decode(patchmanifestFile);
|
||||||
|
console.log(patchmanifestXml);
|
||||||
|
|
||||||
//----- SOLIDPKG -----
|
//----- SOLIDPKG -----
|
||||||
//.solidpkg files contain a single Bencode file called "metafile.solid"
|
//.solidpkg files contain a single Bencode file called "metafile.solid"
|
||||||
const solidpkgBuffer = await getSolidpkg('assets_swtor_de_de', -1, 0);
|
const solidpkgBuffer = await getSolidpkg('assets_swtor_de_de', -1, 0);
|
||||||
|
|
Loading…
Reference in a new issue