Skip to content

Commit

Permalink
More 16.0 ==> 17.0 stuff plus some other stuff
Browse files Browse the repository at this point in the history
* Improved chapters on testing and Windows Services
* Code revisted
* Typos
  • Loading branch information
aplteam committed Sep 18, 2018
1 parent 87e3fa4 commit c40eea4
Show file tree
Hide file tree
Showing 30 changed files with 407 additions and 520 deletions.
114 changes: 27 additions & 87 deletions HTML/06-Debugging-EXEs.html

Large diffs are not rendered by default.

187 changes: 68 additions & 119 deletions HTML/08-Testing.html

Large diffs are not rendered by default.

162 changes: 51 additions & 111 deletions HTML/13-Windows-Services.html

Large diffs are not rendered by default.

45 changes: 25 additions & 20 deletions code/v06/MyApp.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

{r}SetLX dummy
Set Latent Expression (needed in order to export workspace as EXE)
#.⎕IO1 #.⎕ML1 #.⎕WX3 #.⎕PP15 #.⎕DIV1
#.⎕IO1 #.⎕ML1 #.⎕WX3 #.⎕PP15 #.⎕DIV1
r
⎕LX'#.MyApp.StartFromCmdLine #.MyApp.GetCommandLineArg ⍬'
Expand Down Expand Up @@ -142,24 +142,29 @@
Config.DumpFolder'expand'F.NormalizePath Config.DumpFolder

{r}CheckForRide (ridePort waitFlag);rc;msg
Depending on what is provided as right argument we prepare for a Ride
or we do not. In case `waitFlag` is 1 we enter an endless loop.
r1
:If 0<ridePort
rc35020
rc3502'SERVE::',ridePort
:If 0rc
msg'Problem setting the Ride connecion string to SERVE::'
msg,,(ridePort),', rc=',rc
11 ⎕SIGNALmsg
:EndIf
rc35021
:If ~rc0 ¯1
11 ⎕SIGNAL'Problem switching on Ride, rc=',rc
:EndIf
{}{_⎕DL }(waitFlag)1 Endless loop for an early RIDE
:EndIf
{r}CheckForRide(ridePort waitFlag);rc;init;msg
Depending on what's provided as right argument we prepare for a Ride
or we do not. In case `waitFlag` is 1 we enter an endless loop.
r1
:If 0<ridePort
:AndIf 0=3501 Only if not already riding
init'SERVE::',ridePort Initialisation string
rc3502init Specify INIT string
:If 32=rc
11 ⎕SIGNAL'Cannot Ride: Conga DLLs are missing'
:ElseIf 64=rc
11 ⎕SIGNAL'Cannot Ride; invalid initialisation string: ',init
:ElseIf 0rc
msg'Problem setting the Ride connecion string to SERVE::'
msg,,(ridePort),', rc=',rc
11 ⎕SIGNALmsg
:EndIf
rc35021
:If ~rc0 ¯1
11 ⎕SIGNAL'Switching on Ride failed, rc=',rc
:EndIf
{}{_⎕DL }(waitFlag)1 Endless loop for an early RIDE
:EndIf

:EndNamespace
:EndNamespace
19 changes: 12 additions & 7 deletions code/v07/MyApp.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -190,21 +190,26 @@
Config.DumpFolder'expand'F.NormalizePath Config.DumpFolder

{r}CheckForRide (ridePort waitFlag);rc;msg
Depending on what is provided as right argument we prepare for a Ride
or we do not. In case `waitFlag` is 1 we enter an endless loop.
{r}CheckForRide(ridePort waitFlag);rc;init;msg
Depending on what's provided as right argument we prepare for a Ride
or we do not. In case `waitFlag` is 1 we enter an endless loop.
r1
:If 0<ridePort
rc35020
rc3502'SERVE::',ridePort
:If 0rc
:AndIf 0=3501 Only if not already riding
init'SERVE::',ridePort Initialisation string
rc3502init Specify INIT string
:If 32=rc
11 ⎕SIGNAL'Cannot Ride: Conga DLLs are missing'
:ElseIf 64=rc
11 ⎕SIGNAL'Cannot Ride; invalid initialisation string: ',init
:ElseIf 0rc
msg'Problem setting the Ride connecion string to SERVE::'
msg,,(ridePort),', rc=',rc
11 ⎕SIGNALmsg
:EndIf
rc35021
:If ~rc0 ¯1
11 ⎕SIGNAL'Problem switching on Ride, rc=',rc
11 ⎕SIGNAL'Switching on Ride failed, rc=',rc
:EndIf
{}{_⎕DL }(waitFlag)1 Endless loop for an early RIDE
:EndIf
Expand Down
19 changes: 12 additions & 7 deletions code/v08/MyApp.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -190,21 +190,26 @@
Config.DumpFolder'expand'F.NormalizePath Config.DumpFolder

{r}CheckForRide (ridePort waitFlag);rc;msg
Depending on what is provided as right argument we prepare for a Ride
or we do not. In case `waitFlag` is 1 we enter an endless loop.
{r}CheckForRide(ridePort waitFlag);rc;init;msg
Depending on what's provided as right argument we prepare for a Ride
or we do not. In case `waitFlag` is 1 we enter an endless loop.
r1
:If 0<ridePort
rc35020
rc3502'SERVE::',ridePort
:If 0rc
:AndIf 0=3501 Only if not already riding
init'SERVE::',ridePort Initialisation string
rc3502init Specify INIT string
:If 32=rc
11 ⎕SIGNAL'Cannot Ride: Conga DLLs are missing'
:ElseIf 64=rc
11 ⎕SIGNAL'Cannot Ride; invalid initialisation string: ',init
:ElseIf 0rc
msg'Problem setting the Ride connecion string to SERVE::'
msg,,(ridePort),', rc=',rc
11 ⎕SIGNALmsg
:EndIf
rc35021
:If ~rc0 ¯1
11 ⎕SIGNAL'Problem switching on Ride, rc=',rc
11 ⎕SIGNAL'Switching on Ride failed, rc=',rc
:EndIf
{}{_⎕DL }(waitFlag)1 Endless loop for an early RIDE
:EndIf
Expand Down
4 changes: 2 additions & 2 deletions code/v08/Tests.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

RInitial;list;rc
U##.Utilities F##.FilesAndDirs A##.APLTreeUtils
∆PathF.GetTempPath,'\MyApp_Tests'
∆PathF.GetTempPath,'MyApp_Tests'
F.RmDir ∆Path
'Create!'F.CheckPath ∆Path
listF.Dir'..\..\texts\en\*.txt'
Expand Down Expand Up @@ -42,7 +42,7 @@
R∆Failed
##.MyApp.(Config MyLogger)##.MyApp.Initial
rc##.MyApp.TxtToCsv'This_file_does_not_exist'
GoToTidyUp rc##.MyApp.EXIT.SOURCE_NOT_FOUND
PassesIf rc##.MyApp.EXIT.SOURCE_NOT_FOUND
R∆OK

Expand Down
19 changes: 12 additions & 7 deletions code/v09/MyApp.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -207,21 +207,26 @@
Config.DumpFolder'expand'F.NormalizePath Config.DumpFolder

{r}CheckForRide(ridePort waitFlag);rc;msg
Depending on what is provided as right argument we prepare for a Ride
or we do not. In case `waitFlag` is 1 we enter an endless loop.
{r}CheckForRide(ridePort waitFlag);rc;init;msg
Depending on what's provided as right argument we prepare for a Ride
or we do not. In case `waitFlag` is 1 we enter an endless loop.
r1
:If 0<ridePort
rc35020
rc3502'SERVE::',ridePort
:If 0rc
:AndIf 0=3501 Only if not already riding
init'SERVE::',ridePort Initialisation string
rc3502init Specify INIT string
:If 32=rc
11 ⎕SIGNAL'Cannot Ride: Conga DLLs are missing'
:ElseIf 64=rc
11 ⎕SIGNAL'Cannot Ride; invalid initialisation string: ',init
:ElseIf 0rc
msg'Problem setting the Ride connecion string to SERVE::'
msg,,(ridePort),', rc=',rc
11 ⎕SIGNALmsg
:EndIf
rc35021
:If ~rc0 ¯1
11 ⎕SIGNAL'Problem switching on Ride, rc=',rc
11 ⎕SIGNAL'Switching on Ride failed, rc=',rc
:EndIf
{}{_⎕DL }(waitFlag)1 Endless loop for an early RIDE
:EndIf
Expand Down
4 changes: 2 additions & 2 deletions code/v09/Tests.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

RInitial;list;rc
U##.Utilities F##.FilesAndDirs A##.APLTreeUtils
∆PathF.GetTempPath,'\MyApp_Tests'
∆PathF.GetTempPath,'MyApp_Tests'
F.RmDir ∆Path
'Create!'F.CheckPath ∆Path
listF.Dir'..\..\texts\en\*.txt'
Expand Down Expand Up @@ -42,7 +42,7 @@
R∆Failed
##.MyApp.(Config MyLogger)##.MyApp.Initial
rc##.MyApp.TxtToCsv'This_file_does_not_exist'
FailsIf rc##.MyApp.EXIT.SOURCE_NOT_FOUND
PassesIf rc##.MyApp.EXIT.SOURCE_NOT_FOUND
R∆OK

Expand Down
19 changes: 12 additions & 7 deletions code/v10/MyApp.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -208,21 +208,26 @@
Config.DumpFolder'expand'F.NormalizePath Config.DumpFolder

{r}CheckForRide(ridePort waitFlag);rc;msg
Depending on what is provided as right argument we prepare for a Ride
or we do not. In case `waitFlag` is 1 we enter an endless loop.
{r}CheckForRide(ridePort waitFlag);rc;init;msg
Depending on what's provided as right argument we prepare for a Ride
or we do not. In case `waitFlag` is 1 we enter an endless loop.
r1
:If 0<ridePort
rc35020
rc3502'SERVE::',ridePort
:If 0rc
:AndIf 0=3501 Only if not already riding
init'SERVE::',ridePort Initialisation string
rc3502init Specify INIT string
:If 32=rc
11 ⎕SIGNAL'Cannot Ride: Conga DLLs are missing'
:ElseIf 64=rc
11 ⎕SIGNAL'Cannot Ride; invalid initialisation string: ',init
:ElseIf 0rc
msg'Problem setting the Ride connecion string to SERVE::'
msg,,(ridePort),', rc=',rc
11 ⎕SIGNALmsg
:EndIf
rc35021
:If ~rc0 ¯1
11 ⎕SIGNAL'Problem switching on Ride, rc=',rc
11 ⎕SIGNAL'Switching on Ride failed, rc=',rc
:EndIf
{}{_⎕DL }(waitFlag)1 Endless loop for an early RIDE
:EndIf
Expand Down
4 changes: 2 additions & 2 deletions code/v10/Tests.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

RInitial;list;rc
U##.Utilities F##.FilesAndDirs A##.APLTreeUtils
∆PathF.GetTempPath,'\MyApp_Tests'
∆PathF.GetTempPath,'MyApp_Tests'
F.RmDir ∆Path
'Create!'F.CheckPath ∆Path
listF.Dir'..\..\texts\en\*.txt'
Expand Down Expand Up @@ -44,7 +44,7 @@
R∆Failed
##.MyApp.(Config MyLogger)##.MyApp.Initial
rc##.MyApp.TxtToCsv'This_file_does_not_exist'
FailsIf rc##.MyApp.EXIT.SOURCE_NOT_FOUND
PassesIf rc##.MyApp.EXIT.SOURCE_NOT_FOUND
R∆OK

Expand Down
19 changes: 12 additions & 7 deletions code/v11/MyApp.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -210,21 +210,26 @@
Config.DumpFolder'expand'F.NormalizePath Config.DumpFolder

{r}CheckForRide (ridePort waitFlag);rc;msg
Depending on what is provided as right argument we prepare for a Ride
or we do not. In case `waitFlag` is 1 we enter an endless loop.
{r}CheckForRide(ridePort waitFlag);rc;init;msg
Depending on what's provided as right argument we prepare for a Ride
or we do not. In case `waitFlag` is 1 we enter an endless loop.
r1
:If 0<ridePort
rc35020
rc3502'SERVE::',ridePort
:If 0rc
:AndIf 0=3501 Only if not already riding
init'SERVE::',ridePort Initialisation string
rc3502init Specify INIT string
:If 32=rc
11 ⎕SIGNAL'Cannot Ride: Conga DLLs are missing'
:ElseIf 64=rc
11 ⎕SIGNAL'Cannot Ride; invalid initialisation string: ',init
:ElseIf 0rc
msg'Problem setting the Ride connecion string to SERVE::'
msg,,(ridePort),', rc=',rc
11 ⎕SIGNALmsg
:EndIf
rc35021
:If ~rc0 ¯1
11 ⎕SIGNAL'Problem switching on Ride, rc=',rc
11 ⎕SIGNAL'Switching on Ride failed, rc=',rc
:EndIf
{}{_⎕DL }(waitFlag)1 Endless loop for an early RIDE
:EndIf
Expand Down
4 changes: 2 additions & 2 deletions code/v11/Tests.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

RInitial;list;rc
U##.Utilities F##.FilesAndDirs A##.APLTreeUtils
∆PathF.GetTempPath,'\MyApp_Tests'
∆PathF.GetTempPath,'MyApp_Tests'
∆ExeFilename'MyApp\MyApp.exe'
F.RmDir ∆Path
'Create!'F.CheckPath ∆Path
Expand Down Expand Up @@ -45,7 +45,7 @@
R∆Failed
##.MyApp.(Config MyLogger)##.MyApp.Initial
rc##.MyApp.TxtToCsv'This_file_does_not_exist'
FailsIf ##.MyApp.EXIT.SOURCE_NOT_FOUNDrc
PassesIf rc##.MyApp.EXIT.SOURCE_NOT_FOUND
R∆OK

Expand Down
19 changes: 12 additions & 7 deletions code/v12/MyApp.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -213,21 +213,26 @@
Config.DumpFolder'expand'F.NormalizePath Config.DumpFolder

{r}CheckForRide (ridePort waitFlag);rc;msg
Depending on what is provided as right argument we prepare for a Ride
or we do not. In case `waitFlag` is 1 we enter an endless loop.
{r}CheckForRide(ridePort waitFlag);rc;init;msg
Depending on what's provided as right argument we prepare for a Ride
or we do not. In case `waitFlag` is 1 we enter an endless loop.
r1
:If 0<ridePort
rc35020
rc3502'SERVE::',ridePort
:If 0rc
:AndIf 0=3501 Only if not already riding
init'SERVE::',ridePort Initialisation string
rc3502init Specify INIT string
:If 32=rc
11 ⎕SIGNAL'Cannot Ride: Conga DLLs are missing'
:ElseIf 64=rc
11 ⎕SIGNAL'Cannot Ride; invalid initialisation string: ',init
:ElseIf 0rc
msg'Problem setting the Ride connecion string to SERVE::'
msg,,(ridePort),', rc=',rc
11 ⎕SIGNALmsg
:EndIf
rc35021
:If ~rc0 ¯1
11 ⎕SIGNAL'Problem switching on Ride, rc=',rc
11 ⎕SIGNAL'Switching on Ride failed, rc=',rc
:EndIf
{}{_⎕DL }(waitFlag)1 Endless loop for an early RIDE
:EndIf
Expand Down
6 changes: 2 additions & 4 deletions code/v12/Tests.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

RInitial;list;rc
U##.Utilities F##.FilesAndDirs A##.APLTreeUtils
∆PathF.GetTempPath,'\MyApp_Tests'
∆PathF.GetTempPath,'MyApp_Tests'
∆ExeFilename'MyApp\MyApp.exe'
F.RmDir ∆Path
'Create!'F.CheckPath ∆Path
Expand Down Expand Up @@ -45,10 +45,8 @@
R∆Failed
##.MyApp.(Config MyLogger)##.MyApp.Initial
rc##.MyApp.TxtToCsv'This_file_does_not_exist'
GoToTidyUp rc##.MyApp.EXIT.SOURCE_NOT_FOUND
PassesIf rc##.MyApp.EXIT.SOURCE_NOT_FOUND
R∆OK
∆TidyUp:
##.MyApp.Cleanup

RTest_exe_01(stopFlag batchFlag);⎕TRAP;rc
Expand Down
2 changes: 1 addition & 1 deletion code/v13/MakeService.dyalog
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
(F U)##.(FilesAndDirs Utilities)
(rc en more)F.RmDir DESTINATION
U.Assert 0=rc
U.Assert 'Create!'##.FilesAndDirs.CheckPath DESTINATION
U.Assert 'Create!'F.CheckPath DESTINATION
'MyApp.ini.template' CopyTo DESTINATION,'\MyApp.ini'
'Install_Service.bat' CopyTo DESTINATION,'\'
'Uninstall_Service.bat' CopyTo DESTINATION,'\'
Expand Down
Loading

0 comments on commit c40eea4

Please sign in to comment.