Skip to content

Commit

Permalink
Generalize UCMD installation for any project
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulMansour committed Jul 23, 2019
1 parent ea27924 commit 94164b5
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 36 deletions.
1 change: 1 addition & 0 deletions APLSource/BuildApplication-21.aplf
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 1 addition & 3 deletions APLSource/InstallUCMD-781.aplf
Original file line number Diff line number Diff line change
@@ -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↑(~⍵∊'\/')⊆⍵}
Expand Down
10 changes: 10 additions & 0 deletions APLSource/SetAppConfig-49.aplf
Original file line number Diff line number Diff line change
@@ -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
}
10 changes: 4 additions & 6 deletions APLSource/StartApplication-21.aplf
Original file line number Diff line number Diff line change
@@ -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
}
23 changes: 23 additions & 0 deletions Assets/Build/UCMD.dyalog
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
:namespace ucmd
AcreTools User Command File
This file is identical for any Acre-based user command project.
⎕IO ⎕ML0 1
GetProjectSpace{
9=⎕NC 'ProjectSpace':ProjectSpace
f{6::##.t SALT_Data.SourceFile} 0
s⎕NS ''
_s.⎕CY '.dws',('_'=f)f
rs.CarlisleGroup.AcreTools.SetAppConfig ⎕NPARTS f
⎕THIS.ProjectSpacer
r
}
zList
z(GetProjectSpace 0).UserCommandList 0
Help{
(GetProjectSpace 0).UserCommandHelp
}
Run{
(GetProjectSpace 0).UserCommandRun
}
:endnamespace
25 changes: 0 additions & 25 deletions Assets/Runtime/acretools.dyalog

This file was deleted.

3 changes: 1 addition & 2 deletions acre.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
:Namespace
ApplicationStartup←'#.CarlisleGroup.AcreTools.InstallUCMD 0'
:Namespace
CaseCode←'On'
GitHubAccount←'the-carlisle-group'
KeepHistory←'Off'
Expand Down

0 comments on commit 94164b5

Please sign in to comment.