From f4e1a10370ba33abfa42c97354e8ecc8739efea7 Mon Sep 17 00:00:00 2001 From: Dale Henrichs Date: Tue, 6 Jun 2023 13:42:54 -0700 Subject: [PATCH] Issue #4: TDExternalSessionClient is now functional and passes tODE commands along to remote tODE image ... superDoit does not do well with passing args with embedded spaces, so going with plan B --- bin/todeIt.solo | 4 ++-- .../instance/environmentId.st | 3 +++ .../instance/evaluateCommand.batchMode..st | 9 ++++----- .../TDExternalSessionClient.class/instance/login.st | 6 +++--- .../instance/todeServerAccessString.st | 3 +++ .../TDShell.class/instance/shellId.st | 4 ++-- 6 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/environmentId.st create mode 100644 src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/todeServerAccessString.st diff --git a/bin/todeIt.solo b/bin/todeIt.solo index a839e201..775a6c63 100755 --- a/bin/todeIt.solo +++ b/bin/todeIt.solo @@ -77,8 +77,8 @@ doit stoneSpec := (self globalNamed: 'GDKAbstractRegistryStore') fromPath: specFile ifAbsent: [] ]. sessionDescription := (self globalNamed: 'TDSessionDescription') fromFile: stoneSpec todeHome asFileReference / 'sys' / 'local' / 'sessions' / stoneSpec stoneName. - (self globalNamed: 'TDShell') + ^ (self globalNamed: 'TDShell') sessionDescription: sessionDescription - evaluate: '3+4' + evaluate: (self positionalArgs at: 1) debugMode: self debug % diff --git a/src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/environmentId.st b/src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/environmentId.st new file mode 100644 index 00000000..eec38165 --- /dev/null +++ b/src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/environmentId.st @@ -0,0 +1,3 @@ +accessing +environmentId + ^ 0 \ No newline at end of file diff --git a/src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/evaluateCommand.batchMode..st b/src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/evaluateCommand.batchMode..st index a43ec05d..ed1748b8 100644 --- a/src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/evaluateCommand.batchMode..st +++ b/src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/evaluateCommand.batchMode..st @@ -1,9 +1,8 @@ evaluation evaluateCommand: command batchMode: batchBool | stonString | - stonString := (STON toString: command) encodeAsUTF8. + stonString := STON toString: command. ^ self session - executeStringExpectingStringNB: - '(' , self todeServerAccessString , ' for: ' , self shell shellId asString , ') evaluateSTONCommand:' - , stonString printString - envId: self environmentId \ No newline at end of file + executeString: + '(' , self todeServerAccessString , ' for: ' , self shell shellId asString + , ') evaluateSTONCommand:' , stonString printString \ No newline at end of file diff --git a/src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/login.st b/src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/login.st index 1ac3fdfc..f38f8bc7 100644 --- a/src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/login.st +++ b/src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/login.st @@ -1,6 +1,6 @@ session management login - | sess gemNRS stoneNRS sessionDescription | + | gemNRS stoneNRS sessionDescription | sessionDescription := self sessionDescription. gemNRS := GsNetworkResourceString gemNRSForNetLDI: sessionDescription netLDIPort @@ -8,8 +8,8 @@ login stoneNRS := GsNetworkResourceString stoneNRSForStoneName: sessionDescription stoneName onHost: sessionDescription stoneHost. - sess := GsTsExternalSession + ^ (GsTsExternalSession gemNRS: gemNRS stoneNRS: stoneNRS username: sessionDescription userId - password: sessionDescription password \ No newline at end of file + password: sessionDescription password) login \ No newline at end of file diff --git a/src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/todeServerAccessString.st b/src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/todeServerAccessString.st new file mode 100644 index 00000000..cc9024ac --- /dev/null +++ b/src/GsDevKit_stones-Tode.package/TDExternalSessionClient.class/instance/todeServerAccessString.st @@ -0,0 +1,3 @@ +accessing +todeServerAccessString + ^ 'TDTopezServer' \ No newline at end of file diff --git a/src/GsDevKit_stones-Tode.package/TDShell.class/instance/shellId.st b/src/GsDevKit_stones-Tode.package/TDShell.class/instance/shellId.st index e00ca82e..a98e62d0 100644 --- a/src/GsDevKit_stones-Tode.package/TDShell.class/instance/shellId.st +++ b/src/GsDevKit_stones-Tode.package/TDShell.class/instance/shellId.st @@ -1,4 +1,4 @@ stash shellId - shellId ifNil: [ shellId := self windowStatus nextShellWindowId ]. - ^ shellId \ No newline at end of file + shellId ifNil: [ shellId := 1 ]. + ^ shellId \ No newline at end of file