"{ Package: 'cvut:fel/cface' }"
"{ NameSpace: Cface }"
Object subclass:#GeneratorCommand
instanceVariableNames:'platform mappings definitions unixLibraryName win32LibraryName'
classVariableNames:''
poolDictionaries:''
category:'Cface-Generators'
!
!GeneratorCommand class methodsFor:'projects'!
generateCairo
|cairoDir cairoDefFile |
cairoDir := '/home/jv/Projects/Cface/cface/resources/examples/libcairo/'.
cairoDefFile := cairoDir , 'libcairo.def'.
^Cface::Platform theInstance generatorCommand
definitions: cairoDefFile asFilename;
mappings: Cface::CairoMapping new;
unixLibraryName:'libcairo.so.2';
win32LibraryName:'cairo.dll';
process.
"
Cface::GeneratorCommand generateCairo
"
"Created: / 03-07-2008 / 23:55:14 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 22-01-2009 / 19:10:08 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
generateGTK
|gtkDir gtkDefFile|
gtkDir := '/home/jv/Projects/Cface/cface/resources/examples/libgtk/'.
gtkDefFile := gtkDir , 'libgtk.def'.
^Cface::Platform theInstance generatorCommand
definitions: gtkDefFile asFilename;
mappings: Cface::GTKMapping new;
unixLibraryName:'libgtk-x11-2.0.so';
process
"
Cface::GeneratorCommand generateSubversion
"
"Created: / 22-02-2009 / 14:44:00 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
generateSubversion
|svnDir svnDefFile|
svnDir := '/home/jv/Projects/Cface/cface/resources/examples/libsvn/'.
svnDefFile := svnDir , 'libsvn.def'.
^Cface::Platform theInstance generatorCommand
definitions: svnDefFile asFilename;
mappings: Cface::SVNMapping new;
unixLibraryName:'libsvn.so';
process
"
Cface::GeneratorCommand generateSubversion
"
"Created: / 03-07-2008 / 23:55:54 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 06-01-2009 / 12:16:47 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !
!GeneratorCommand methodsFor:'accessing'!
definitions
^ definitions
"Created: / 18-02-2008 / 15:36:22 / janfrog"
!
definitions:aFilename
definitions := self platform parser parse: aFilename contents asString.
"Created: / 18-02-2008 / 15:36:22 / janfrog"
!
mappings
^ mappings ifNil:[platform mappings]
"Created: / 18-02-2008 / 15:35:04 / janfrog"
"Modified: / 27-05-2008 / 14:22:00 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
mappings:something
mappings := something.
"Created: / 18-02-2008 / 15:35:04 / janfrog"
!
platform
platform ifNil:[platform := Cface::Platform theInstance].
^platform
"Created: / 18-02-2008 / 15:28:45 / janfrog"
!
platform:something
platform := something.
"Created: / 18-02-2008 / 15:30:12 / janfrog"
!
typeMapper
^platform typeMapper
"Created: / 18-02-2008 / 15:30:40 / janfrog"
!
typeResolver
^platform typeResolver
"Created: / 18-02-2008 / 15:30:32 / janfrog"
!
unixLibraryName
^ unixLibraryName
"Created: / 10-07-2008 / 09:07:56 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
unixLibraryName:something
unixLibraryName := something.
"Created: / 10-07-2008 / 09:07:56 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
win32LibraryName
^ win32LibraryName
"Created: / 10-07-2008 / 09:07:56 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
win32LibraryName:something
win32LibraryName := something.
"Created: / 10-07-2008 / 09:07:56 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !
!GeneratorCommand methodsFor:'processing'!
process
self platform typeResolver process: definitions.
self platform typeMapper process: definitions using: self mappings.
^self platform generator
unixLibraryName: unixLibraryName;
win32LibraryName: win32LibraryName;
process: definitions.
"Created: / 18-02-2008 / 15:25:54 / janfrog"
"Modified: / 10-07-2008 / 09:08:18 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !
!GeneratorCommand class methodsFor:'documentation'!
version
^ '$Header: /opt/data/cvs/cvut-fel/cface/Cface__GeneratorCommand.st,v 1.1 2008/02/26 15:58:30 vranyj1 Exp $'
!
version_SVN
^ '$Id$'
! !