-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #261: preparing the gsdevkit_launcher package structure [ci skip]
- Loading branch information
1 parent
918b904
commit 69ca5d0
Showing
12 changed files
with
189 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env gsdevkit_launcher | ||
" | ||
Example script that signals an error. | ||
" | ||
Class { | ||
#name : 'GsDevKitLauncher_Error', | ||
#superclass : 'AbstractProgram', | ||
#category : 'gsdevKit_launcher-Scripts' | ||
} | ||
|
||
{ #category : 'main' } | ||
StLauncher_Error >> main [ | ||
|
||
Error signal: 'You wanted an error?'. | ||
^ nil | ||
] | ||
|
||
{ #category : 'usage' } | ||
StLauncher_Error >> usageExamples: scriptName [ | ||
|
||
^ scriptName, ' | ||
', scriptName, ' -D -- | ||
' | ||
] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# GsDevKit_launcher | ||
### Intro | ||
This project implements a variant of the [st_launcher project][1]. | ||
The st_launcher project provides a mechanism for turning a Tonel class file[2] into an executable shell script. | ||
The following is an example of a hello world gsdevkit_launcher smalltalk script: | ||
``` smalltalk | ||
#!/usr/bin/env gsdevkit_launcher | ||
" | ||
Hello world GsDevKit script | ||
" | ||
Class { | ||
#name : 'GsDevKitLauncher_Hello', | ||
#superclass : 'AbstractProgram', | ||
#category : 'gsdevKit_launcher-Scripts' | ||
} | ||
{ #category : 'main' } | ||
GsDevKitLauncher_Hello >> main [ | ||
^'hello world' | ||
] | ||
``` | ||
The scripts in gsdevkit_launcher project will be executed against a [GemStone 3.5.0 topaz solo extent][3]. | ||
Note that the shebang line: `#!/usr/bin/env gsdevkit_launcher` does a lookup of gsdevKit_launcher in your path. | ||
The `gsdevkit_launcher` shell interpreter is in `$GS_HOME/alt_bin`, so `$GS_HOME/alt_bin` needs to be located in your path. | ||
|
||
### Setup for development | ||
``` | ||
cd $GS_HOME | ||
git fetch --all | ||
git checkout issue_260 | ||
# add alt_bin and alt_bin/examples to your path | ||
. alt_bin/defHome_PATH.env | ||
# test out the example scripts | ||
hello.st | ||
error.st | ||
``` | ||
|
||
|
||
|
||
[1]: https://github.com/dalehenrich/st_launcher | ||
[2]: https://github.com/pharo-vcs/tonel#tonel-spec | ||
[3]: https://downloads.gemtalksystems.com/docs/GemStone64/3.5.x/GS64-ReleaseNotes-3.5/2-AdministrationChanges.htm#pgfId-1963111 |
39 changes: 39 additions & 0 deletions
39
shared/repos/GsDevKit_launcher/bootstrapping/gemstone/bin/bootstrap_install.tpz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/local/bin/smalltalk/gemstone/topaz | ||
|
||
input $ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/topaz/3.5.0/install_1.tpz | ||
input $ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/topaz/3.5.0/install_2.tpz | ||
input $ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/topaz/3.5.0/install_3.tpz | ||
input $ROWAN_PROJECTS_HOME/Rowan/platforms/gemstone/topaz/3.5.0/install_4.tpz | ||
|
||
iferr_clear | ||
|
||
set u SystemUser p swordfish | ||
login | ||
|
||
run | ||
"Need to patch AbstractDictionary>>at:ifPresent: to use cull:" | ||
AbstractDictionary | ||
compileMethod: 'at: key ifPresent: aBlock | ||
"Lookup the given key in the receiver. If it is present, answer the value of evaluating the given | ||
block with the value associated with the key. Otherwise, answer nil." | ||
|
||
| v | | ||
v := self at: key ifAbsent: [ ^ nil ]. | ||
^ aBlock cull: v' | ||
% | ||
commit | ||
|
||
run | ||
"install gsdevkit_launcher project" | ||
| url projectSetDefinition | | ||
url := 'file:$ROWAN_PROJECTS_HOME/gsdevkit_launcher/rowan/specs/gsdevkit_launcher.ston'. | ||
projectSetDefinition := (RwComponentProjectDefinition newForUrl: url) | ||
projectHome: '$ROWAN_PROJECTS_HOME'; | ||
read. | ||
projectSetDefinition load | ||
% | ||
commit | ||
|
||
errorCount | ||
exit | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
RwComponentLoadConfiguration{ | ||
#name : 'Core', | ||
#comment : '', | ||
#version : '0.1.0', | ||
#definedGroupNames : { | ||
'core' : [ ], | ||
'tests' : [ 'core' ] | ||
}, | ||
#configurationNames : [ | ||
'Properties' | ||
], | ||
#conditionalPackages : { | ||
[ | ||
'common' | ||
] : { | ||
'core' : { | ||
#packageNames : [ | ||
'st_launcher-Core' | ||
] | ||
}, | ||
'tests' : { | ||
#packageNames : [ | ||
] | ||
} | ||
}, | ||
[ | ||
'gs3.[2-]' | ||
] : { | ||
'core' : { | ||
#packageNames : [ | ||
'st_launcher-GemStone-Core', | ||
'st_launcher-GemStone-Services', | ||
'st_launcher-GemStone-Kernel' | ||
] | ||
} | ||
} | ||
}, | ||
#conditionalPackageMapSpecs : { | ||
'gemstone' : { | ||
'SystemUser' : { | ||
#defaultSymbolDictName : 'Globals' | ||
} | ||
} | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
shared/repos/GsDevKit_launcher/rowan/projects/st_launcher.ston
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
RwComponentSpecification{ | ||
#specName : 'st_launcher', | ||
#version : '0.3.0', | ||
#projectUrl : 'https://github.com/dalehenrich/st_launcher', | ||
#configsPath : 'rowan/components', | ||
#projectsPath : 'rowan/projects', | ||
#repoPath : 'rowan/src', | ||
#specsPath : 'rowan/specs', | ||
#defaultComponentName : 'Core', | ||
#defaultGroupNames : [ | ||
'core' | ||
], | ||
#comment : 'Tonel class file shell scripts' | ||
} |
14 changes: 14 additions & 0 deletions
14
shared/repos/GsDevKit_launcher/rowan/specs/gsdevkit_launcher.ston
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
RwComponentSpecification{ | ||
#specName : 'gsdevkit_launcher', | ||
#version : '0.3.0', | ||
#projectUrl : 'https://github.com/GsDevKit_home', | ||
#configsPath : 'rowan/components', | ||
#projectsPath : 'rowan/projects', | ||
#repoPath : 'rowan/src', | ||
#specsPath : 'rowan/specs', | ||
#defaultComponentName : 'Core', | ||
#defaultGroupNames : [ | ||
'tests' | ||
], | ||
#comment : 'GsDevKit_home script support' | ||
} |
2 changes: 2 additions & 0 deletions
2
shared/repos/GsDevKit_launcher/rowan/src/gsdevkit_launcher-Core.package/properties.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
2 changes: 2 additions & 0 deletions
2
shared/repos/GsDevKit_launcher/rowan/src/gsdevkit_launcher-Scripts.package/properties.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
#format : 'filetree', | ||
} |
Empty file.