Added standalone Tea compiler - teak
It allows for compilation of .tea files from the command line.
"
Copyright (C) 2015-now Jan Vrany
This code is not an open-source (yet). You may use this code
for your own experiments and projects, given that:
* all modification to the code will be sent to the
original author for inclusion in future releases
* this is not used in any commercial software
This license is provisional and may (will) change in
a future.
"
"{ Package: 'jv:tea/compiler/cli' }"
"{ NameSpace: Smalltalk }"
ApplicationDefinition subclass:#jv_tea_compiler_cli
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'* Projects & Packages *'
!
!jv_tea_compiler_cli class methodsFor:'documentation'!
copyright
"
Copyright (C) 2015-now Jan Vrany
This code is not an open-source (yet). You may use this code
for your own experiments and projects, given that:
* all modification to the code will be sent to the
original author for inclusion in future releases
* this is not used in any commercial software
This license is provisional and may (will) change in
a future.
"
! !
!jv_tea_compiler_cli class methodsFor:'description'!
applicationName
"answer the name of the application.
This is also the name of the generated .exe file.
Subclasses may redefine this"
^ 'teak'
"
bosch_dapasx_application applicationName
stx_projects_smalltalk applicationName
"
"Created: / 25-09-2015 / 03:46:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
excludedFromPreRequisites
"list packages which are to be explicitely excluded from the automatic constructed
prerequisites list. If empty, everything that is found along the inheritance of any of
my classes is considered to be a prerequisite package."
^ #(
)
!
isGUIApplication
"return true, if this is a GUI application.
(these need more libraries and use a different startup procedure)"
^ false
!
mandatoryPreRequisites
"list packages which are mandatory as a prerequisite.
This are packages containing superclasses of my classes and classes which
are extended by myself.
They are mandatory, because we need these packages as a prerequisite for loading and compiling.
This method is generated automatically,
by searching along the inheritance chain of all of my classes."
^ #(
#'stx:libbasic' "ApplicationDefinition - superclass of jv_tea_compiler_cli"
)
!
referencedPreRequisites
"list packages which are a prerequisite, because they contain
classes which are referenced by my classes.
We do not need these packages as a prerequisite for compiling or loading,
however, a class from it may be referenced during execution and having it
unloaded then may lead to a runtime doesNotUnderstand error, unless the caller
includes explicit checks for the package being present.
This method is generated automatically,
by searching all classes (and their packages) which are referenced by my classes."
^ #(
#'jv:tea/compiler' "TCompiler - referenced by TCompilerCommand class>>process:"
)
!
subProjects
"list packages which are known as subprojects.
This method is generated automatically; however, when generating automatically,
packages are only added - never removed, unless listed in #excludedFromSubProjects."
^ #(
)
! !
!jv_tea_compiler_cli class methodsFor:'description - contents'!
classNamesAndAttributes
"lists the classes which are to be included in the project.
Each entry in the list may be: a single class-name (symbol),
or an array-literal consisting of class name and attributes.
Attributes are: #autoload or #<os> where os is one of win32, unix,..."
^ #(
"<className> or (<className> attributes...) in load order"
TCompilerCommand
#'jv_tea_compiler_cli'
)
!
extensionMethodNames
"list class/selector pairs of extensions.
A correponding method with real names must be present in my concrete subclasses"
^ #(
)
! !
!jv_tea_compiler_cli class methodsFor:'description - project information'!
applicationIconFileName
"Return the name (without suffix) of an icon-file (the app's icon); will be included in the rc-resource file"
^ nil
" ^ self applicationName "
!
companyName
"Returns a company string which will appear in <lib>.rc.
Under win32, this is placed into the dlls file-info"
^ 'Jan Vrany'
"Modified: / 25-09-2015 / 03:42:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
description
"Returns a description string which will appear in nt.def / bc.def"
^ 'Tea Language Compiler'
"Modified: / 25-09-2015 / 03:44:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
legalCopyright
"Returns a copyright string which will appear in <lib>.rc.
Under win32, this is placed into the dlls file-info"
^ '(C) 2015 Jan Vrany'
"Modified: / 25-09-2015 / 03:43:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
productInstallDirBaseName
"Returns a default installDir which will appear in <app>.nsi.
This is usually not the one you want to keep"
^ (self package asCollectionOfSubstringsSeparatedByAny:':/') last
!
productName
"Returns a product name which will appear in <lib>.rc.
Under win32, this is placed into the dlls file-info.
This method is usually redefined in a concrete application definition"
^ 'TeaCompiler'
"Modified: / 25-09-2015 / 03:44:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!jv_tea_compiler_cli class methodsFor:'description - startup'!
startupClassName
"the class that starts the show in its startupSelector method"
^ 'TCompilerCommand'
!
startupSelector
"the message that is sent to the startupClass to start the show"
^ #'start'
! !
!jv_tea_compiler_cli class methodsFor:'documentation'!
version_HG
^ '$Changeset: <not expanded> $'
! !