|
1 " |
|
2 Copyright (C) 2015-now Jan Vrany |
|
3 |
|
4 This code is not an open-source (yet). You may use this code |
|
5 for your own experiments and projects, given that: |
|
6 |
|
7 * all modification to the code will be sent to the |
|
8 original author for inclusion in future releases |
|
9 * this is not used in any commercial software |
|
10 |
|
11 This license is provisional and may (will) change in |
|
12 a future. |
|
13 " |
|
14 "{ Package: 'jv:tea/compiler/cli' }" |
|
15 |
|
16 "{ NameSpace: Smalltalk }" |
|
17 |
|
18 ApplicationDefinition subclass:#jv_tea_compiler_cli |
|
19 instanceVariableNames:'' |
|
20 classVariableNames:'' |
|
21 poolDictionaries:'' |
|
22 category:'* Projects & Packages *' |
|
23 ! |
|
24 |
|
25 !jv_tea_compiler_cli class methodsFor:'documentation'! |
|
26 |
|
27 copyright |
|
28 " |
|
29 Copyright (C) 2015-now Jan Vrany |
|
30 |
|
31 This code is not an open-source (yet). You may use this code |
|
32 for your own experiments and projects, given that: |
|
33 |
|
34 * all modification to the code will be sent to the |
|
35 original author for inclusion in future releases |
|
36 * this is not used in any commercial software |
|
37 |
|
38 This license is provisional and may (will) change in |
|
39 a future. |
|
40 " |
|
41 ! ! |
|
42 |
|
43 !jv_tea_compiler_cli class methodsFor:'description'! |
|
44 |
|
45 applicationName |
|
46 "answer the name of the application. |
|
47 This is also the name of the generated .exe file. |
|
48 |
|
49 Subclasses may redefine this" |
|
50 |
|
51 ^ 'teak' |
|
52 |
|
53 " |
|
54 bosch_dapasx_application applicationName |
|
55 stx_projects_smalltalk applicationName |
|
56 " |
|
57 |
|
58 "Created: / 25-09-2015 / 03:46:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
59 ! |
|
60 |
|
61 excludedFromPreRequisites |
|
62 "list packages which are to be explicitely excluded from the automatic constructed |
|
63 prerequisites list. If empty, everything that is found along the inheritance of any of |
|
64 my classes is considered to be a prerequisite package." |
|
65 |
|
66 ^ #( |
|
67 ) |
|
68 ! |
|
69 |
|
70 isGUIApplication |
|
71 "return true, if this is a GUI application. |
|
72 (these need more libraries and use a different startup procedure)" |
|
73 |
|
74 ^ false |
|
75 ! |
|
76 |
|
77 mandatoryPreRequisites |
|
78 "list packages which are mandatory as a prerequisite. |
|
79 This are packages containing superclasses of my classes and classes which |
|
80 are extended by myself. |
|
81 They are mandatory, because we need these packages as a prerequisite for loading and compiling. |
|
82 This method is generated automatically, |
|
83 by searching along the inheritance chain of all of my classes." |
|
84 |
|
85 ^ #( |
|
86 #'stx:libbasic' "ApplicationDefinition - superclass of jv_tea_compiler_cli" |
|
87 ) |
|
88 ! |
|
89 |
|
90 referencedPreRequisites |
|
91 "list packages which are a prerequisite, because they contain |
|
92 classes which are referenced by my classes. |
|
93 We do not need these packages as a prerequisite for compiling or loading, |
|
94 however, a class from it may be referenced during execution and having it |
|
95 unloaded then may lead to a runtime doesNotUnderstand error, unless the caller |
|
96 includes explicit checks for the package being present. |
|
97 This method is generated automatically, |
|
98 by searching all classes (and their packages) which are referenced by my classes." |
|
99 |
|
100 ^ #( |
|
101 #'jv:tea/compiler' "TCompiler - referenced by TCompilerCommand class>>process:" |
|
102 ) |
|
103 ! |
|
104 |
|
105 subProjects |
|
106 "list packages which are known as subprojects. |
|
107 This method is generated automatically; however, when generating automatically, |
|
108 packages are only added - never removed, unless listed in #excludedFromSubProjects." |
|
109 |
|
110 ^ #( |
|
111 ) |
|
112 ! ! |
|
113 |
|
114 !jv_tea_compiler_cli class methodsFor:'description - contents'! |
|
115 |
|
116 classNamesAndAttributes |
|
117 "lists the classes which are to be included in the project. |
|
118 Each entry in the list may be: a single class-name (symbol), |
|
119 or an array-literal consisting of class name and attributes. |
|
120 Attributes are: #autoload or #<os> where os is one of win32, unix,..." |
|
121 |
|
122 ^ #( |
|
123 "<className> or (<className> attributes...) in load order" |
|
124 TCompilerCommand |
|
125 #'jv_tea_compiler_cli' |
|
126 ) |
|
127 ! |
|
128 |
|
129 extensionMethodNames |
|
130 "list class/selector pairs of extensions. |
|
131 A correponding method with real names must be present in my concrete subclasses" |
|
132 |
|
133 ^ #( |
|
134 ) |
|
135 ! ! |
|
136 |
|
137 !jv_tea_compiler_cli class methodsFor:'description - project information'! |
|
138 |
|
139 applicationIconFileName |
|
140 "Return the name (without suffix) of an icon-file (the app's icon); will be included in the rc-resource file" |
|
141 |
|
142 ^ nil |
|
143 " ^ self applicationName " |
|
144 ! |
|
145 |
|
146 companyName |
|
147 "Returns a company string which will appear in <lib>.rc. |
|
148 Under win32, this is placed into the dlls file-info" |
|
149 |
|
150 ^ 'Jan Vrany' |
|
151 |
|
152 "Modified: / 25-09-2015 / 03:42:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
153 ! |
|
154 |
|
155 description |
|
156 "Returns a description string which will appear in nt.def / bc.def" |
|
157 |
|
158 ^ 'Tea Language Compiler' |
|
159 |
|
160 "Modified: / 25-09-2015 / 03:44:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
161 ! |
|
162 |
|
163 legalCopyright |
|
164 "Returns a copyright string which will appear in <lib>.rc. |
|
165 Under win32, this is placed into the dlls file-info" |
|
166 |
|
167 ^ '(C) 2015 Jan Vrany' |
|
168 |
|
169 "Modified: / 25-09-2015 / 03:43:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
170 ! |
|
171 |
|
172 productInstallDirBaseName |
|
173 "Returns a default installDir which will appear in <app>.nsi. |
|
174 This is usually not the one you want to keep" |
|
175 |
|
176 ^ (self package asCollectionOfSubstringsSeparatedByAny:':/') last |
|
177 ! |
|
178 |
|
179 productName |
|
180 "Returns a product name which will appear in <lib>.rc. |
|
181 Under win32, this is placed into the dlls file-info. |
|
182 This method is usually redefined in a concrete application definition" |
|
183 |
|
184 ^ 'TeaCompiler' |
|
185 |
|
186 "Modified: / 25-09-2015 / 03:44:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
187 ! ! |
|
188 |
|
189 !jv_tea_compiler_cli class methodsFor:'description - startup'! |
|
190 |
|
191 startupClassName |
|
192 "the class that starts the show in its startupSelector method" |
|
193 |
|
194 ^ 'TCompilerCommand' |
|
195 ! |
|
196 |
|
197 startupSelector |
|
198 "the message that is sent to the startupClass to start the show" |
|
199 |
|
200 ^ #'start' |
|
201 ! ! |
|
202 |
|
203 !jv_tea_compiler_cli class methodsFor:'documentation'! |
|
204 |
|
205 version_HG |
|
206 ^ '$Changeset: <not expanded> $' |
|
207 ! ! |
|
208 |