Follow these instructions to be executing Smalltalk code with Redline Smalltalk as quickly as possible. Note: '>' represents the prompt on your command line / shell.
You should see the following message from Redline Smalltalk (CURRENTLY with a lot of debug output):
To execute your own Smalltalk code create a file with a '.st' extension using your favourite editor and then execute it with the above 'java -jar' command. Note: Don't add the '.st' when executing with 'stic'. Open the HelloWorld.st file to see an example of Smalltalk code.
If you have decided to adopt a class and help Redline then you need to create a '.st' file in the corresponding folder, and you need to put the associated test under the 'test' folder. For example, if you have adopted the Date class then you would create the 'Date.st' file that defines the Date class in the 'src/main/smalltalk/st/redline/kernel' folder, and a 'DateTest.st' file in the 'src/test/st/redline/kernel' folder.
Don't forget that you may need to edit the 'test/st/redline/kernel/TestSuite.st' file to ensure your test is run as part of the suite.
When you are happy with your adopted class and its tests you can email them to firstname.lastname@example.org along with the DEVELOPER-CERTIFICATE-OF-ORIGIN to have them added to the project sources.
Follow these instructions to get Redline Smalltalk started with a clean build from source code, and a running Smalltalk Hello World example. First you will need to get some of the dependencies for Redline sorted out, these include:
- JDK - To compile Redline Smalltalks Java source code.
- Apache Maven - To handle the building, dependencies, testing and packaging for the Redline Smalltalk Java source code.
- Git - To fetch the source code for Redline Smalltalk.
When you can do the following commands from your command prompt and get the associated results your environment is ready for Redline Smalltalk. Note: '>' represents the prompt on your command line / shell.
*Note: Java versions 1.8 or greater and Maven version 3.0 or greater is ok.
You will need to get the Redline Smalltalk source code checked out from the GitHub repository into a folder where you want to build Redline Smalltalk. Git will check out the source into a subfolder so the folder you should make and cd (change directory) into should be a level above. For example, I put my projects in a 'dev' folder so I would be in that folder when I get the source code. To get the source code execute the following command:
To compile the Redline Smalltalk source code you need to be in the 'redline-smalltalk' folder and execute the following command:
The first time you issue this command Apache Maven will go out to the internet and fetch a lot of dependencies, and this may take a lot of time. This happens only the first time, and subsequent runs will be much quicker. When Maven has completed you should see the following output:
This process has built and Redline Smalltalk Java Archive and run a few tests against it. All of the build outputs we care about are in the 'target' sub-folder.
Redline Smalltalk comes with a few examples and one such example is a simple 'Hello World' script that displays a message on your screen. Note that this is 'Hello World' example is a Smalltalk script and not a class, as Redline Smalltalk can be used for simple scripts as well as full applications. Of course there are example classes as well. To execute the example you need to follow these steps from your command prompt:You should see the following message from Redline Smalltalk (CURRENTLY WITH A LOT OF DEBUG):
You can see the script for the Hello World example under the 'script' sub-folder. By convention Redline and Java keep source files in sub-folders that correspond to the namespace of the class or script. So HelloWorld.st can be found in the sub-folder 'st/redline'. Please take a moment to look at the contents of this file.
This process has got the latest Redline Smalltalk source code, built it and ran a Smalltalk example. You may want to put the resulting Redline Smalltalk code elsewhere on your system. If you do want to do this then copy the JAR from the target folder to that location and be sure to set and export the REDLINE_HOME environment variable to that location.
You are now ready to work with Redline.