mirror of
https://github.com/vishapoberon/vipak.git
synced 2026-04-06 04:52:26 +00:00
Opium works, end to end
This commit is contained in:
parent
70e1e1efe4
commit
7e0050c496
5 changed files with 44 additions and 30 deletions
|
|
@ -39,7 +39,7 @@ BEGIN
|
|||
|
||||
dependencies.GetTerminalKeys(dependencies, keys);
|
||||
|
||||
FOR i := 0 TO dependencies.TerminalNumber - 1 DO (* TODO: rewrite this logic to work with key count *)
|
||||
FOR i := 0 TO dependencies.TerminalNumber - 1 DO (* TODO: rewrite with working getter everywhere*)
|
||||
keyFound := dependencies.GetTerminal(dependencies, keys[i], version);
|
||||
|
||||
IF ~keyFound THEN Logger.Log('ERROR while searching key'); Logger.Log(keys[i]); END;
|
||||
|
|
@ -60,7 +60,6 @@ BEGIN
|
|||
Settings.port,
|
||||
filePath,
|
||||
keys[i],
|
||||
version,
|
||||
Settings.packageFileName,
|
||||
returnedJSON
|
||||
);
|
||||
|
|
@ -90,30 +89,27 @@ END ResolveVersionFiles;
|
|||
|
||||
PROCEDURE ResolvePackages*();
|
||||
VAR
|
||||
i, j: LONGINT;
|
||||
i: LONGINT;
|
||||
keyFound: BOOLEAN;
|
||||
jsonRecord, filesRecord: JsonParser.JsonTypePointer;
|
||||
values: ARRAY ArrayMaxNumber OF JsonParser.TString;
|
||||
host, port, path, packageName, version: JsonParser.TString;
|
||||
values: ARRAY 10 OF JsonParser.TString;
|
||||
host, port, path, packageName, version: ARRAY 50 OF CHAR;
|
||||
BEGIN
|
||||
FOR i := 0 TO j - 1 DO
|
||||
IF ~Strings.Match(moduleNames[i], "") THEN
|
||||
jsonRecord := JsonParser.Create(moduleJson[i]);
|
||||
filesRecord := jsonRecord.GetNonTerminal(jsonRecord, "Files");
|
||||
|
||||
IF filesRecord = NIL THEN
|
||||
Logger.Log("Error: no files section found");
|
||||
END;
|
||||
|
||||
ASSERT(filesRecord # NIL);
|
||||
keyFound := jsonRecord.GetTerminal(jsonRecord, "Remote", host);
|
||||
keyFound := jsonRecord.GetTerminal(jsonRecord, "Port", port);
|
||||
keyFound := jsonRecord.GetTerminal(jsonRecord, "Path", path);
|
||||
keyFound := jsonRecord.GetTerminal(jsonRecord, "Package", packageName);
|
||||
keyFound := jsonRecord.GetTerminal(jsonRecord, "Version", version);
|
||||
filesRecord.GetTerminalValues(filesRecord, values);
|
||||
PackageResolver.Resolve(host, port, path, packageName, version, values);
|
||||
jsonRecord := JsonParser.Create(moduleJson[i]);
|
||||
filesRecord := jsonRecord.GetNonTerminal(jsonRecord, "Files");
|
||||
|
||||
IF filesRecord = NIL THEN
|
||||
Logger.Log("Error: no files section found");
|
||||
END;
|
||||
|
||||
ASSERT(filesRecord # NIL);
|
||||
keyFound := jsonRecord.GetTerminal(jsonRecord, "Remote", host);
|
||||
keyFound := jsonRecord.GetTerminal(jsonRecord, "Port", port);
|
||||
keyFound := jsonRecord.GetTerminal(jsonRecord, "Path", path);
|
||||
keyFound := jsonRecord.GetTerminal(jsonRecord, "Package", packageName);
|
||||
keyFound := jsonRecord.GetTerminal(jsonRecord, "Version", version);
|
||||
PackageResolver.Resolve(host, port, path, packageName, version, filesRecord.TerminalValues); (* TODO: filesRecord.TerminalValues create working getter for this*)
|
||||
END;
|
||||
END ResolvePackages;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue