eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ApplicationDefinition':

Home

everywhere
www.exept.de
for:
[back]

Class: ApplicationDefinition


Inheritance:

   Object
   |
   +--ProjectDefinition
      |
      +--ApplicationDefinition
         |
         +--stx_projects_webServer

Package:
stx:libbasic
Category:
System-Support-Projects
Version:
rev: 1.158 date: 2009/12/10 17:59:27
user: cg
file: ApplicationDefinition.st directory: libbasic
module: stx stc-classLibrary: libbasic
Author:
Felix Madrid
Claus Gittinger

Description:


subclasses provide the info on the contents of a package/project and
how to build executables and class libraries and how to load/unload packages.
Actually, subclasses MUST be subclasses of the two abstract classes LibraryDefinition or
ApplicationDefinition. These two know how to generate all required help files for the
making/building/loading processa.
The makefile creation is driven by file templates which are expanded using strings from the file mappings.

Concrete definition classes MUST redefine:
    classNamesAndAttributes
                            list of classes which are part of the dll/exe

    extensionMethodNames
                            list of extension methods

    startupClassName / startupSelector
                            class and selector with which the show starts

    buildTarget             name of the generated exe-file

    
should redefine:
    preRequisites           list of required packages

    iconFileName            name of a .ico file containing the applications icon

    companyName             name of your company - will be shown by windows explorer
                            as attribute of a .dll or .exe

    description             short description; shown by windows explorer

    legalCopyright          copyright message; shown by windows explorer

    productName             product name; shown by windows explorer

    applicationName         app name; shown by windows explorer


might redefine:    
    isConsoleApplication    if true, windows-build generates a console app.

    isGUIApplication        if true, the GUI framework is linked in
                            (as opposed to a non-GUI server-like executable)


The above info might be outdated a bit - see stx_projects_smalltalk as a concrete example.


Related information:

    stx_projects_smalltalk
    stx_libbasic
    stx_libbasic2

Class protocol:

accessing
o  appSourcesProjects
Returns only the application projects (which are included in the application module)

o  stxSourcesProjects
Returns only the required STX projects (which are included in the STX module)

code generation
o  forEachMethodsCodeToCompileDo: aTwoArgBlock ignoreOldDefinition: ignoreOldDefinition

o  startupClassName_code

o  startupClassName_codeFor: aClassName

o  startupSelector_code
generate a the code that answers the startupSelector.
try #open and #start.

o  startupSelector_codeFor: aSelector

o  subProjects_code

defaults
o  buildTarget
which target in the Makefile should be built by default?
For now, reasonable return values are 'exe', which builds the executable(s),
and 'ALL', which builds everything, including an installable package.
Here, 'ALL' is returned.
There is usually no need to redefine this default - we at exept do it for the
stx package only to speed up our own build, as we seldom need new install packages,
put often build new executables...

o  extraTargets
extra targets to be built when creating the exe

o  guiClassFileNames_unix

o  guiClassFileNames_win32

o  guiClasses_unix

o  guiClasses_win32

o  needResources
answer true, if this application
needs resources to be installed. This is normally true.
Even non-GUI apps need some (libbasic/resources)

description
o  additionalFilesToInstall
application-specific files to be installed.
Can be redefined in subclasses.

o  additionalResourceTargets
application-specific additional resource targets to be invoked.
Can be redefined in subclasses.

o  applicationIconFileName
answer the base-name of the application icon (i.e. 'app' in <app>.ico).

Subclasses MUST redefine this to either return the name of the icon file or
nil, if they dont have one.
We NO LONGER SUPPORT THE PREVIOUS APPNAME-DEFAULT,
because users tend to forget to add the icon file and then get a failing build.

** This method raises an error - it must be redefined in concrete classes **

o  applicationInstallIconFileName
answer the base-name of the installer icon (i.e. 'app' in <app>.ico).

Default is the same as the application icon

o  applicationName
answer the name of the application.
This is also the name of the generated .exe file.

Subclasses may redefine this

o  applicationNameConsole

o  applicationNameFromPackage
answer the name of the application.
This is also the name of the generated .exe file.

Subclasses may redefine this

o  applicationNameNoConsole

o  applicationPackage

o  applicationType

o  commonFilesToInstall
files installed for applications.
Do not redefine - see additionalFilesToInstall for a redefinable variant of this

o  documentExtensions
list extensions which should be registered with the application.
Results in the application to be started when double-clicking on such a file (win32)

o  isConsoleApplication
Used with WIN32 only (i.e. affects bc.mak).
Return true, if this is a console application.
Console applications have stdout and stderr and open up a command-window
when started. Only console applications can interact with the user in the
command line window.
By default, GUI apps are compiled as non-console apps.
If you need both (as in expecco), redefine this as true AND in addition redefine
makeConsoleApplication to return true.

o  isGUIApplication
Return true, if this is a GUI app.
Redefine to return false for non-GUI applications (affects inclusion of Display classes).

o  isSingleThreadedApplication
Return true, if this should be started without multiple threads.
(not possible with gui applications)

o  logFilenameNoConsole
^ (self applicationNameNoConsole , '_%d.log')

o  mainDefines

o  makeConsoleApplication
Used with WIN32 only (i.e. affects bc.mak).
Return true, if this should be built as a console application.
Redefine to return true, if you want one always 8i.e. to generate both).

o  makeNonConsoleApplication
Used with WIN32 only (i.e. affects bc.mak).
Return true, if this should be built as a non-console application

o  offerApplicationSourceCode
Return true, if the source code of the application should be offered as install option

o  offerSmalltalkSourceCode
Return true, if the source code of the smalltalk base system should be offered as install option

o  startupClassName
The name of the class which provides the entry point for the application.

** This method raises an error - it must be redefined in concrete classes **

o  startupSelector
The name of the entry point method (in startUpClass) used to start the application.

description - project information
o  description
Returns a description string which will appear in nt.def / bc.def

o  docDirPath
path relative to my dir to the documentation - or empty.

o  docDirPath_unix
path relative to my dir to the documentation - or nil

o  docDirPath_win32
path relative to my dir to the documentation - or nil

o  hasLicenceToAcceptDuringInstallation

file generation
o  basicFileNamesToGenerate
answer a dictionary (filename -> generator method) with all the files, that have to be generated for this
package

o  generateFile: filename

o  generate_modules_dot_c

o  generate_modules_dot_stx

o  generate_packageName_dot_nsi

o  nsiFilename

o  rcFilename

o  resourceFilename

file mappings
o  additionalFilesToInstall_dot_nsi: bindings

o  additionalSectionsDescriptions_dot_nsi

o  additionalSectionsDescriptions_dot_nsi: bindings

o  additionalSectionsInsertDescriptions_dot_nsi

o  additionalSectionsInsertDescriptions_dot_nsi: bindings

o  additionalSections_dot_nsi

o  additionalSections_dot_nsi: bindings

o  appSourcesLines_dot_nsi: bindings

o  bc_dot_mak_mappings

o  buildDate_dot_h_mappings

o  commonFilesToInstall_dot_nsi: bindings

o  directoryUninstallLines_dot_nsi
%(DIRECTORY_UNINSTALL_LINES)

o  fileExtensionDefinitionLines_dot_nsi: bindings

o  fileExtensionUndefinitionLines_dot_nsi: bindings

o  make_dot_proto_mappings

o  modules_dot_c_mappings

o  modules_dot_stx_mappings

o  nsiDeliveredConsoleExecutable

o  nsiDeliveredExecutables
by default, an executable named after the application.
Redefine, if thats not the case. If multiple have to be delivered,
return a string containing each individually double-quoted.

o  packageName_dot_nsi_mappings

o  preRequisiteLine_bc_dot_mak_mappings: aProjectID

o  preRequisiteLine_bc_dot_mak_mappingsForClass: aClass

o  preRequisiteLine_make_dot_proto_mappings: aProjectID

o  preRequisiteLine_make_dot_proto_mappingsForClass: aClass

o  stxSourcesLines_dot_nsi: bindings

o  subProjectLine_bc_dot_mak_mappings: aProjectID

o  subProjectLine_make_dot_proto_mappings: aProjectID

file mappings support
o  generateAllPreRequisiteLibs_modules_dot_stx

o  generatePreRequisiteLibs_modules_dot_stx

o  generatePreRequisiteLines_bc_dot_mak

o  generatePreRequisiteLines_make_dot_proto

o  generateRequiredLibobjs_make_dot_proto

o  generateRequiredLibs_bc_dot_mak

o  generateRequiredLibs_make_dot_proto
cg: why not (self libraryNameFor:projectID),'.so'; ???

o  generateRequiredLinkLibobjs_make_dot_proto

o  generateSubProjectLines_bc_dot_mak

o  generateSubProjectLines_make_dot_proto

o  generateSubProjectLines_modules_dot_stx

file templates
o  bc_dot_def
the template code for the bc.def file

o  bc_dot_mak
answer a template for the bc.mak makefile.
Any variable definition %(Variable) will be later replaced by the mapping.
$% characters have to be duplicated

o  bc_dot_mak_app_source_rules

o  bc_dot_mak_resource_rules

o  bc_dot_mak_stx_resource_rules

o  bc_dot_mak_stx_source_rules

o  buildDate_dot_h
the template code for the buildDate.h file

o  classLine_modules_dot_c

o  classLine_modules_dot_c_extern

o  defineAPPSourceLine_nsi_for: projectID

o  defineExtenionLine_nsi_for: extension
the template code for a single extenions definition line in the <appname>.nsi file

o  defineSTXSourceLine_nsi_for: projectID

o  installFileLine_nsi_for: filePattern
the template code for a single file-install pattern to be added to the <appname>.nsi file

o  make_dot_proto

o  make_dot_proto_app_source_rules

o  make_dot_proto_app_source_rules_for: projectID

o  make_dot_proto_resource_rules

o  make_dot_proto_source_title_for: projectID

o  make_dot_proto_stx_resource_rules

o  make_dot_proto_stx_source_rules

o  make_dot_proto_stx_source_rules_for: projectID

o  modules_dot_c

o  modules_dot_stx

o  packageName_dot_nsi
the template code for the <appname>.nsi file

o  packageName_dot_rc
the template code for the <appname>.rc file

o  preRequisiteLine_bc_dot_mak
Note: the trailing blank in 'CFLAGS_LOCAL=$(GLOBALDEFINES) '
is required!

o  preRequisiteLine_make_dot_proto
Note: the trailing blank in 'CFLAGS_LOCAL=$(GLOBALDEFINES) '
is required!

o  subProjectLine_bc_dot_mak

o  undefineExtenionLine_nsi_for: extension
the template code for a single extenions undefinition line in the <appname>.nsi file

queries
o  canHaveExtensions
return true, if this class allows extensions from other packages.
Private classes, namespaces and projectDefinitions dont allow this

o  projectType

sanity checks
o  validateDescription

testing
o  isAbstract

o  isApplicationDefinition

o  isProjectDefinition



ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 07:45:39 GMT