From 94164b507218020c01def34a507507397966da71 Mon Sep 17 00:00:00 2001 From: Paul Mansour Date: Tue, 23 Jul 2019 19:22:31 -0400 Subject: [PATCH] Generalize UCMD installation for any project --- APLSource/BuildApplication-21.aplf | 1 + APLSource/InstallUCMD-781.aplf | 4 +--- APLSource/SetAppConfig-49.aplf | 10 ++++++++++ APLSource/StartApplication-21.aplf | 10 ++++------ Assets/Build/UCMD.dyalog | 23 +++++++++++++++++++++++ Assets/Runtime/acretools.dyalog | 25 ------------------------- acre.config | 3 +-- 7 files changed, 40 insertions(+), 36 deletions(-) create mode 100644 APLSource/SetAppConfig-49.aplf create mode 100644 Assets/Build/UCMD.dyalog delete mode 100644 Assets/Runtime/acretools.dyalog diff --git a/APLSource/BuildApplication-21.aplf b/APLSource/BuildApplication-21.aplf index a9f8be5..558bd39 100644 --- a/APLSource/BuildApplication-21.aplf +++ b/APLSource/BuildApplication-21.aplf @@ -17,6 +17,7 @@ _←tf ⎕NCOPY¨sf,¨⊂'acre.config' ⍝ Copy config file _←tf ⎕NCOPY¨sf,¨⊂'ReleaseNotes' ⍝ Copy release notes Folder _←RunInProcess'#.CarlisleGroup.AcreTools.BuildApplicationWorkspace'pc.ProjectFolder + _←(af,pc.ProjectName,'_UCMD.dyalog')⎕NCOPY AcreConfig.ProjectFolder,'Assets/Build/UCMD.dyalog' rf←pf,'dist/ReleaseArtifacts/' _←3 ⎕MKDIR rf zs←pf,'dist/Application' diff --git a/APLSource/InstallUCMD-781.aplf b/APLSource/InstallUCMD-781.aplf index bcb159a..cd99c67 100644 --- a/APLSource/InstallUCMD-781.aplf +++ b/APLSource/InstallUCMD-781.aplf @@ -1,7 +1,5 @@ InstallUCMD←{ - d←↑⎕NPARTS ⎕WSID - a←↑#.Packages - p←d,a,'\Assets\Runtime' + p←↑⎕NPARTS ⎕WSID o←⎕SE.SALT.Settings'cmddir' e←(';'≠o)⊆o f←{¯3↑(~⍵∊'\/')⊆⍵} diff --git a/APLSource/SetAppConfig-49.aplf b/APLSource/SetAppConfig-49.aplf new file mode 100644 index 0000000..e571c86 --- /dev/null +++ b/APLSource/SetAppConfig-49.aplf @@ -0,0 +1,10 @@ + SetAppConfig←{ + ⍝ ⍵ ←→ Application Folder + ⍝ ← ←→ Primary Project Space + d←{0=≢⍵:↑⎕NPARTS ⎕WSID ⋄ ⍵}⍵ + r←⎕THIS.##.## + c←GetConfigSpace¨d∘,¨r.Packages,¨'/' + s←r⍎¨2↓¨c.ProjectSpace + s.AcreConfig←s.⎕NS c + ↑s + } diff --git a/APLSource/StartApplication-21.aplf b/APLSource/StartApplication-21.aplf index 876ec7b..549788d 100644 --- a/APLSource/StartApplication-21.aplf +++ b/APLSource/StartApplication-21.aplf @@ -1,9 +1,7 @@ StartApplication←{ ⍝ ⍵ ←→ n/a - p←↑⎕NPARTS ⎕WSID - c←GetConfigSpace¨p∘,¨#.Packages,¨'/' - s←⍎¨c.ProjectSpace - s.AcreConfig←s.⎕NS c - 0=(↑c).⎕NC'ApplicationStartup':'' - (↑s)⍎(↑c).ApplicationStartup + s←SetAppConfig 0 + c←s.AcreConfig + 0=c.⎕NC'ApplicationStartup':'' + s⍎c.ApplicationStartup } diff --git a/Assets/Build/UCMD.dyalog b/Assets/Build/UCMD.dyalog new file mode 100644 index 0000000..5a36248 --- /dev/null +++ b/Assets/Build/UCMD.dyalog @@ -0,0 +1,23 @@ + :namespace ucmd + ⍝ AcreTools User Command File + ⍝ This file is identical for any Acre-based user command project. + ⎕IO ⎕ML←0 1 + GetProjectSpace←{ + 9=⎕NC 'ProjectSpace':ProjectSpace + f←{6::##.t ⋄ SALT_Data.SourceFile} 0 + s←⎕NS '' + _←s.⎕CY '.dws',⍨(⊃⌽⍸'_'=f)↑f + r←s.CarlisleGroup.AcreTools.SetAppConfig ⊃⎕NPARTS f + ⎕THIS.ProjectSpace←r + r + } + ∇ z←List + z←(GetProjectSpace 0).UserCommandList 0 + ∇ + Help←{ + (GetProjectSpace 0).UserCommandHelp ⍵ + } + Run←{ + (GetProjectSpace 0).UserCommandRun ⍵ + } + :endnamespace diff --git a/Assets/Runtime/acretools.dyalog b/Assets/Runtime/acretools.dyalog deleted file mode 100644 index 74e1be3..0000000 --- a/Assets/Runtime/acretools.dyalog +++ /dev/null @@ -1,25 +0,0 @@ - :namespace acretools - ⎕io ⎕ml←0 1 - - Load←{ - 9=⎕SE.⎕NC 'AcreTools':0 - f←{6::##.t ⋄ SALT_Data.SourceFile} 0 - ws←'acretools.dws',⍨∊'/',⍨¨¯5↓(~f∊'\/')⊆f - '#.CarlisleGroup.AcreTools' ⎕SE.⎕CY ws - } - - - ∇ z←List;_ - _←Load 0 - z←⎕SE.AcreTools.UserCommandList 0 - ∇ - - Help←{ - ⍺ ⎕SE.AcreTools.UserCommandHelp ⍵ - } - - - Run←{ - ⎕SE.AcreTools.UserCommandRun ⍵ - } - :endnamespace diff --git a/acre.config b/acre.config index f9a204a..e590905 100644 --- a/acre.config +++ b/acre.config @@ -1,5 +1,4 @@ -:Namespace - ApplicationStartup←'#.CarlisleGroup.AcreTools.InstallUCMD 0' +:Namespace CaseCode←'On' GitHubAccount←'the-carlisle-group' KeepHistory←'Off'