Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
fb389b7
Create draft PR for #666
TomKovac Apr 11, 2025
869f648
BA=>KR
TomKovac Apr 11, 2025
9150ab5
wip
TomKovac Apr 14, 2025
e1db21c
wip
Apr 16, 2025
aa85f45
tmpu
TomKovac Apr 16, 2025
9670dfb
Merge branch 'dev' into 666-cognex-vision-pro
PTKu Apr 16, 2025
a066079
wip
TomKovac Apr 16, 2025
cc6a700
wip
TomKovac Apr 22, 2025
dbf2ce2
AxoVisionPro reset all cameras
TomKovac Apr 22, 2025
2d65ff5
AxoVisionPro reset added
TomKovac Apr 22, 2025
ca43d53
trigger
TomKovac Apr 22, 2025
223c59c
AxoVosionPro ReadResultData added
TomKovac Apr 22, 2025
2eabdb7
SendData
TomKovac Apr 22, 2025
6eab671
wip
TomKovac Apr 23, 2025
9a154c0
wip
TomKovac Apr 23, 2025
8c522db
wip
TomKovac Apr 26, 2025
224d238
wip
Apr 26, 2025
5fb3abc
16
TomKovac Apr 29, 2025
ca12139
ba2kr
TomKovac Apr 30, 2025
a335c1f
wip
Apr 30, 2025
54797bc
wip
Apr 30, 2025
b39457a
wip
Apr 30, 2025
d938eb7
wip
Apr 30, 2025
a9f37a2
wip
Apr 30, 2025
002fc56
kr2ba
Apr 30, 2025
33447ea
Merge branch 'dev' into dev666
May 5, 2025
a82dd03
wip
TomKovac May 5, 2025
50878c6
wip
TomKovac May 5, 2025
c585379
wip
TomKovac May 5, 2025
7ccaf17
wip
TomKovac May 6, 2025
e3f86f7
wip
TomKovac May 6, 2025
06f269c
wip
TomKovac May 6, 2025
ceec652
wip
TomKovac May 6, 2025
2f3fbdf
wip
TomKovac May 6, 2025
479b7b0
wip
May 6, 2025
41d86fa
wip
TomKovac May 7, 2025
6078ec2
wip
TomKovac May 13, 2025
25fcb6d
wip
TomKovac May 13, 2025
d6eda09
wip
TomKovac May 13, 2025
f0737a4
wip
TomKovac May 13, 2025
a331c45
wip
TomKovac May 13, 2025
447b347
wip
TomKovac May 13, 2025
c7c3e2e
wip
TomKovac May 13, 2025
6ca0f53
wip
TomKovac May 14, 2025
df40fb5
wip
May 14, 2025
6ba7f6e
wip
TomKovac May 14, 2025
ca30281
wip
TomKovac May 14, 2025
d1528db
wip
May 15, 2025
40dca45
wip
TomKovac May 15, 2025
fab8e01
wip
May 16, 2025
4994a0c
uk
TomKovac May 16, 2025
84b5632
wip
TomKovac May 19, 2025
fe49577
wip
TomKovac May 19, 2025
09b8090
updateCatalog
TomKovac May 20, 2025
040ed64
wip
May 20, 2025
f7accb5
wip
May 21, 2025
acd276e
wip
TomKovac May 21, 2025
d85552f
wip
TomKovac May 21, 2025
a6b1c05
cognex
May 23, 2025
6c5e8e3
cognex
May 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 73 additions & 22 deletions cake/ApaxTraversal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using YamlDotNet.Core;
using YamlDotNet.RepresentationModel;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
using Path = Cake.Core.IO.Path;
Expand Down Expand Up @@ -85,35 +87,84 @@ private static void CollectApaxFileInfoRecursively(string directoryPath, List<st

private static void CreateDependenciesFile(List<ApaxFileInfo> dependencies, string filePath)
{
var serializer = new SerializerBuilder()
.WithNamingConvention(CamelCaseNamingConvention.Instance) // Adjust this as per your desired YAML file's naming convention
.Build();
//var serializer = new SerializerBuilder()
// .WithNamingConvention(CamelCaseNamingConvention.Instance) // Adjust this as per your desired YAML file's naming convention
// .Build();

var dependenciesDictionary = new Dictionary<string, string>();
//var dependenciesDictionary = new Dictionary<string, string>();

//foreach (var dependency in dependencies.Where(p => p.Name != "apax.traversal"
// && p.Name != "@inxton/ax-sdk"
// && !p.Name.EndsWith("-test")
// && p.Name != "inxton"))
//{
// if (!dependenciesDictionary.ContainsKey(dependency.Name))
// {
// dependenciesDictionary.Add(dependency.Name , dependency.Version);
// }
//}

//var yamlContent = serializer.Serialize(new { name = "apax.traversal",
// version = "0.0.0-dev.0",
// type = "app",
// targets = new string[] {"\"1500\""},
// registries = new Dictionary<string, string>()
// { {"@inxton", "https://npm.pkg.github.com/"} },
// devDependencies = new Dictionary<string, string>()
// { {"@inxton/ax-sdk", dependencies.First(p => p.Name == "@inxton/ax-sdk").Version} },
// dependencies = dependenciesDictionary,
// installStrategy = "overridable"});

foreach (var dependency in dependencies.Where(p => p.Name != "apax.traversal"
&& p.Name != "@inxton/ax-sdk"
&& !p.Name.EndsWith("-test")
&& p.Name != "inxton"))
//File.WriteAllText(filePath, yamlContent);

var dependenciesDictionary = new Dictionary<string, string>();
foreach (var dependency in dependencies.Where(p =>
p.Name != "apax.traversal" &&
p.Name != "@inxton/ax-sdk" &&
!p.Name.EndsWith("-test") &&
p.Name != "inxton"))
{
if (!dependenciesDictionary.ContainsKey(dependency.Name))
{
dependenciesDictionary.Add(dependency.Name , dependency.Version);
dependenciesDictionary.Add(dependency.Name, dependency.Version);
}
}

var yamlContent = serializer.Serialize(new { name = "apax.traversal",
version = "0.0.0-dev.0",
type = "app",
targets = new string[] {"llvm"},
registries = new Dictionary<string, string>()
{ {"@inxton", "https://npm.pkg.github.com/"} },
devDependencies = new Dictionary<string, string>()
{ {"@inxton/ax-sdk", dependencies.First(p => p.Name == "@inxton/ax-sdk").Version} },
dependencies = dependenciesDictionary,
installStrategy = "overridable"});

File.WriteAllText(filePath, yamlContent);

// Build YAML manually with correct quoting
var yaml = new YamlStream();
var root = new YamlMappingNode
{
{ "name", new YamlScalarNode("apax.traversal") { Style = ScalarStyle.DoubleQuoted } },
{ "version", new YamlScalarNode("0.0.0-dev.0") { Style = ScalarStyle.DoubleQuoted } },
{ "type", new YamlScalarNode("app") { Style = ScalarStyle.DoubleQuoted } },
{ "targets", new YamlSequenceNode(new YamlScalarNode("1500") { Style = ScalarStyle.DoubleQuoted }) },
{ "registries", new YamlMappingNode
{
{ "@inxton", new YamlScalarNode("https://npm.pkg.github.com/") { Style = ScalarStyle.DoubleQuoted } }
}
},
{ "devDependencies", new YamlMappingNode
{
{ "@inxton/ax-sdk", new YamlScalarNode(dependencies.First(p => p.Name == "@inxton/ax-sdk").Version) { Style = ScalarStyle.DoubleQuoted } }
}
},
{ "dependencies", new YamlMappingNode(
dependenciesDictionary.Select(kv =>
new KeyValuePair<YamlNode, YamlNode>(
new YamlScalarNode(kv.Key) { Style = ScalarStyle.DoubleQuoted },
new YamlScalarNode(kv.Value) { Style = ScalarStyle.DoubleQuoted }
)
)
)},
{ "installStrategy", new YamlScalarNode("overridable") { Style = ScalarStyle.DoubleQuoted } }
};

yaml.Documents.Add(new YamlDocument(root));

using (var writer = new StreamWriter(filePath))
{
yaml.Save(writer, assignAnchors: false);
}
}

public static void CreateApaxTraversal(this BuildContext context, string dir, string outputFile)
Expand Down
14 changes: 9 additions & 5 deletions scripts/_pack_and_publish_catalog.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ if (Test-Path -Path $catalogAbsPath)

# Get all .tgz files in the folder, there should be just one, currently generated
$Files = Get-ChildItem -Path $catalogAbsPath -Filter "*.tgz"
if($Files.Count -ne 1)
{
Write-Host "Error: Several *.tgz files found in the directory $catalogAbsPath." -ForegroundColor Red
}
else
if($Files.Count -eq 1)
{
$catalogFileName = $Files[0].Name

Expand All @@ -80,6 +76,14 @@ if (Test-Path -Path $catalogAbsPath)
Write-Host "Error: $publishResult[0]: $publishResult[1]" -ForegroundColor Red
}
}
elseif ($Files.Count -ge 1)
{
Write-Host "Error: Several *.tgz files found in the directory $catalogAbsPath." -ForegroundColor Red
}
else
{
Write-Host "Error: No *.tgz files found in the directory $catalogAbsPath." -ForegroundColor Red
}
Remove-Item -Path $Files[0].FullName -Force

}
Expand Down
2 changes: 1 addition & 1 deletion scripts/check_requisites.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $dotNetWingetInstall = "Microsoft.DotNet.SDK.9 --version 9.0.100"

$visualStudioRequiredVersionRange = "[17.8.0,18.0)";

$apaxRequiredVersion = "3.4.2"
$apaxRequiredVersion = "3.5.0"
$apaxUrl = "https://console.simatic-ax.siemens.io/"
$axCodeRequiredVersion = "1.94.2"

Expand Down
Loading
Loading