From a7b48dff3b85d0a75a82162851dd155c0e83e909 Mon Sep 17 00:00:00 2001 From: Kai Jaeger Date: Mon, 25 Sep 2023 19:02:26 +0200 Subject: [PATCH] Fix for Link options --- APLSource/Admin/GetProgramFilesFolder.aplf | 31 ++++++++----- APLSource/Cider/AddNuGetDependencies.aplf | 2 +- APLSource/Cider/ExtractLinkOptions.aplf | 43 ++++++++++++------- APLSource/Cider/FindNuGetAPI.aplf | 15 ++++--- APLSource/Cider/ListNuGetDependencies.aplf | 23 +++++----- APLSource/Cider/LoadNugetDependencies.aplf | 2 +- APLSource/Cider/Version.aplf | 2 +- .../Foo2-Project/packages/apl-buildlist.json | 2 +- .../Test_Open_020/packages/apl-buildlist.json | 2 +- .../Test_Open_021/packages/apl-buildlist.json | 2 +- .../packages_dev/apl-buildlist.json | 2 +- .../Test_Open_052/packages/apl-buildlist.json | 2 +- .../packages_dev/apl-buildlist.json | 2 +- .../packages_dev/apl-buildlist.json | 2 +- Tests/Test_UC_020/packages/apl-buildlist.json | 2 +- .../packages_dev/apl-buildlist.json | 2 +- Tests/Test_UC_021/packages/apl-buildlist.json | 2 +- .../packages_dev/apl-buildlist.json | 2 +- Tests/Test_UC_022/packages/apl-buildlist.json | 2 +- .../packages_dev/apl-buildlist.json | 2 +- apl-package.json | 2 +- tatin-packages_dev/apl-buildlist.json | 2 +- 22 files changed, 87 insertions(+), 61 deletions(-) diff --git a/APLSource/Admin/GetProgramFilesFolder.aplf b/APLSource/Admin/GetProgramFilesFolder.aplf index 38454f93..88246d5f 100644 --- a/APLSource/Admin/GetProgramFilesFolder.aplf +++ b/APLSource/Admin/GetProgramFilesFolder.aplf @@ -1,15 +1,26 @@ - r←GetProgramFilesFolder add;version;aplVersion;OS -⍝ Returns standard path for Dyalog's version-specific folder in %USERPROFILE%\Documents\.\\ + r←{current}GetProgramFilesFolder postFix;version;aplVersion;OS +⍝ Returns standard path for Dyalog's version-specific program files folder.\\ ⍝ Works on all platforms but returns different results.\\ ⍝ Under Windows typically:\\ -⍝ `C:\Users\<⎕AN>\Documents\Dyalog APL[-64] 19.0 Unicode Files' ←→ GetProgramFilesFolder '' - OS←3↑⊃# ⎕WG'APLVersion' - add←{(((~'/\'∊⍨⊃⍵)∧0≠≢⍵)/'/'),⍵}add +⍝ `C:\Users\<⎕AN>\Documents\Dyalog APL[-64] 19.0 Unicode Files' ←→ GetMyUCMDsFolder +⍝ ⍺ is optional and defaults to 0, meaning the version-agnostic folder is returned. +⍝ If ⍺←1, the folder associated with the currently running version of Dyalog is returned. + current←{0<⎕NC ⍵:⍎⍵ ⋄ 0}'current' + OS←3↑# ⎕WG'APLVersion' + postFix←{(((~'/\'∊⍨⊃⍵)∧0≠≢⍵)/'/'),⍵}postFix aplVersion←# ⎕WG'APLVersion' - :If OS≡'Win' - version←((∨/'-64'⍷1⊃aplVersion)/'-64'),' ',({⍵/⍨2>+\⍵='.'}2⊃aplVersion),' ',(80=⎕DR' ')/'Unicode' - r←(2 ⎕NQ #'GetEnvironment' 'USERPROFILE'),'\Documents\Dyalog APL',version,' Files',add + :If current + :If OS≡'Win' + version←((∨/'-64'⍷1⊃aplVersion)/'-64'),' ',({⍵/⍨2>+\⍵='.'}2⊃aplVersion),' ',(80=⎕DR' ')/'Unicode' + r←(2 ⎕NQ #'GetEnvironment' 'USERPROFILE'),'\Documents\Dyalog APL',version,' Files',postFix + :Else + version←({'.'~⍨⍵/⍨2>+\⍵='.'}2⊃aplVersion),((80=⎕DR' ')/'U'),((1+∨/'-64'⍷1⊃aplVersion)⊃'32' '64') + r←(⊃⎕SH'echo $HOME'),'/dyalog.',version,'.files',postFix + :EndIf :Else - version←({'.'~⍨⍵/⍨2>+\⍵='.'}2⊃aplVersion),((80=⎕DR' ')/'U'),((1+∨/'-64'⍷1⊃aplVersion)⊃'32' '64') - r←(⊃⎕SH'echo $HOME'),'/dyalog.',version,'.files',add + :If OS≡'Win' + r←(2 ⎕NQ #'GetEnvironment' 'USERPROFILE'),'\Documents\Dyalog APL Files',postFix + :Else + r←(⊃⎕SH'echo $HOME'),'/dyalog.files',postFix + :EndIf :EndIf diff --git a/APLSource/Cider/AddNuGetDependencies.aplf b/APLSource/Cider/AddNuGetDependencies.aplf index 6e2aa712..1f0e9dc1 100644 --- a/APLSource/Cider/AddNuGetDependencies.aplf +++ b/APLSource/Cider/AddNuGetDependencies.aplf @@ -20,7 +20,7 @@ :If 0<≢nuGetFolder nuGetFolder←FilesAndDirs.EnforceSlash nuGetFolder ⍝ .NET requirement {}⎕MKDIR⍣(~⎕NEXISTS nuGetFolder)⊣nuGetFolder - 'Unable to locate NuGet API'Assert 0≢NuGet←FindNuGetAPI ⍬ + 'Unable to locate NuGet API'Assert 0<≢NuGet←FindNuGetAPI ⍬ msg←NuGet.Setup nuGetFolder msg Assert~∨/'error:'⍷⎕C msg list←'' diff --git a/APLSource/Cider/ExtractLinkOptions.aplf b/APLSource/Cider/ExtractLinkOptions.aplf index 24ca7cd2..e61299ff 100644 --- a/APLSource/Cider/ExtractLinkOptions.aplf +++ b/APLSource/Cider/ExtractLinkOptions.aplf @@ -1,45 +1,58 @@ - options←ExtractLinkOptions config;C;overWrite + r←ExtractLinkOptions config;C;options ⍝ This is slowly going to disappear because Link 4.0 will come with its own set of features ⍝ for setting Link parameters. options←⎕SE.Link.U.DefaultOpts ⎕NS'' + r←⎕NS'' C←config.LINK - overWrite←{0=≢⍵:⍺ ⋄ ⍵} :If 0