From 1fc04f15a4c47ef1ff15d44549b257aff5debf18 Mon Sep 17 00:00:00 2001 From: Jupiter Jones Date: Sat, 20 Jul 2024 06:01:12 +1000 Subject: [PATCH] Update populateClientLibsIn.fromProductNamed.ifAbsent..st --- .../populateClientLibsIn.fromProductNamed.ifAbsent..st | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/GsDevKit_stones-Core.package/GDKStonesRegistry.class/instance/populateClientLibsIn.fromProductNamed.ifAbsent..st b/src/GsDevKit_stones-Core.package/GDKStonesRegistry.class/instance/populateClientLibsIn.fromProductNamed.ifAbsent..st index 0adae7a2..d9984ad4 100644 --- a/src/GsDevKit_stones-Core.package/GDKStonesRegistry.class/instance/populateClientLibsIn.fromProductNamed.ifAbsent..st +++ b/src/GsDevKit_stones-Core.package/GDKStonesRegistry.class/instance/populateClientLibsIn.fromProductNamed.ifAbsent..st @@ -1,6 +1,6 @@ product management populateClientLibsIn: productsDirPath fromProductNamed: productName ifAbsent: absentBlock - | productsDir productTreeDir clientLibDir libDir libNames readOnlyPermissions | + | productsDir productTreeDir clientLibDir libDir libNames readOnlyPermissions libExtensions | productsDir := productsDirPath asFileReference. productTreeDir := (self products at: productName ifAbsent: absentBlock) asFileReference. @@ -9,11 +9,12 @@ populateClientLibsIn: productsDirPath fromProductNamed: productName ifAbsent: ab libDir := clientLibDir / productName / '64bit'. libDir ensureCreateDirectory. libNames := #('libgcirpc' 'libgcits' 'libkrb5' 'libssl'). + libExtensions := #('so' 'dylib'). readOnlyPermissions := FileSystemPermission posixPermissions: 8r444. (productTreeDir / 'lib') children do: [ :each | - each extension = 'so' - ifTrue: [ + (libExtensions detect: [ :libExt | libExt = each extension] ifNone: [ nil ]) + ifNotNil: [ :libExtension | libNames do: [ :libName | (each basename beginsWith: libName) @@ -30,7 +31,7 @@ populateClientLibsIn: productsDirPath fromProductNamed: productName ifAbsent: ab "if an alpha or beta is downloaded the product name will look something like 370_rowanv3-Alpha1 and JfP will be looking for a lilbgcits using that product name ... create a symbol link" - link := libDir / (libName , '-' , productName , '-64.so'). + link := libDir / (libName , '-' , productName , '-64.', libExtension). link basename ~= target basename ifTrue: [ | cwd |