1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace VoidEngine; |
4
|
|
|
|
5
|
|
|
function packages__updateCaption () |
6
|
|
|
{ |
7
|
|
|
$source = VoidStudioAPI::getObjects ('addPackage')['Package__Source']; |
|
|
|
|
8
|
|
|
$version = VoidStudioAPI::getObjects ('addPackage')['Package__Version']; |
9
|
|
|
|
10
|
|
|
$source = $source->selectedItem != 'github' ? |
11
|
|
|
$source->selectedItem .':' : ''; |
12
|
|
|
|
13
|
|
|
$version = $version->text != 'latest' && $version->text ? |
14
|
|
|
'@'. $version->text : ''; |
15
|
|
|
|
16
|
|
|
VoidStudioAPI::getObjects ('addPackage')['Package__Path']->caption = ($package = $source . VoidStudioAPI::getObjects ('addPackage')['Package__Author']->text .'/'. VoidStudioAPI::getObjects ('addPackage')['Package__Name']->text) . $version; |
17
|
|
|
|
18
|
|
|
VoidStudioAPI::getObjects ('addPackage')['Package__Add']->enabled = true; |
19
|
|
|
|
20
|
|
|
foreach (VoidStudioAPI::getObjects ('modules')['ModulesList__QeroPackages']->items->list as $line) |
21
|
|
|
if ((($pos = strrpos ($line, '@')) !== false && substr ($line, 0, $pos) == $package) || ($pos === false && $line == $package)) |
22
|
|
|
{ |
23
|
|
|
VoidStudioAPI::getObjects ('addPackage')['Package__Add']->enabled = false; |
24
|
|
|
|
25
|
|
|
break; |
26
|
|
|
} |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
function packages__update () |
30
|
|
|
{ |
31
|
|
|
global $controller; |
32
|
|
|
|
33
|
|
|
$controller->manager->updateManager (); |
34
|
|
|
|
35
|
|
|
$modulesList = VoidStudioAPI::getObjects ('modules')['ModulesList']; |
36
|
|
|
$modulesList->items->clear (); |
37
|
|
|
|
38
|
|
|
$imageList = new ImageList; |
39
|
|
|
$qeroGroup = VoidStudioAPI::getObjects ('modules')['ModulesListGroup__QeroPackage']; |
40
|
|
|
$index = 0; |
41
|
|
|
|
42
|
|
|
foreach ($controller->manager->packages as $package) |
43
|
|
|
{ |
44
|
|
|
$item = new ListViewItem (' '. $package->name); |
45
|
|
|
$item->group = $qeroGroup; |
|
|
|
|
46
|
|
|
$item->imageIndex = $index++; |
|
|
|
|
47
|
|
|
|
48
|
|
|
$imageList->images->add ((new Image)->loadFromFile (APP_DIR .'/components/icons/Library_16x.png')); |
|
|
|
|
49
|
|
|
$modulesList->items->add ($item); |
50
|
|
|
} |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
$name = basenameNoExt (__FILE__); |
54
|
|
|
|
55
|
|
|
$parser = new VLFParser (__DIR__. '/'. $name .'.vlf', [ |
56
|
|
|
'strong_line_parser' => false, |
57
|
|
|
'ignore_postobject_info' => true, |
58
|
|
|
'ignore_unexpected_method_args' => true, |
59
|
|
|
|
60
|
|
|
'use_caching' => true, |
61
|
|
|
'debug_mode' => false |
62
|
|
|
]); |
63
|
|
|
|
64
|
|
|
// file_put_contents ('SyntaxTree__'. $name .'.json', json_encode ($parser->tree, JSON_PRETTY_PRINT)); |
65
|
|
|
|
66
|
|
|
VoidStudioAPI::addObjects ($name, VLFInterpreter::run ($parser)); |
67
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths