-
Notifications
You must be signed in to change notification settings - Fork 65
/
SqueakMacOSX32x86Config.class.st
321 lines (252 loc) · 12.8 KB
/
SqueakMacOSX32x86Config.class.st
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
"
N.B. Don't use me until I am refactored for this platform. tty does not own a Mac.
SqueakMacOSX32x86Config is an Abstract base class that provides common information for my subclasses.
I am not meant to be built.
I configure a VM according to my name's form: [Operating System] [WordSize] [Processor Language][VM MemoryManager][BuildType]Conf
SqueakMacOSX32x86Builder
configureABuildFor: #ONE OF MY SUBCLASSES NAME HERE withBuildType: #build;
enableMessageTracking: true;
generateByTemplate.
HelpBrowser openOn: CMakeVMMakerSqueakDeveloperHelp
"
Class {
#name : #SqueakMacOSX32x86Config,
#superclass : #SqueakMacintoshConfig,
#category : #'CMakeVMMakerSqueak-MacOSX32x86'
}
{ #category : #'as yet unclassified' }
SqueakMacOSX32x86Config class >> licenseTemplate [
^'Squeak {1} license information
==============================
About Squeak
-----------
Squeak is a modern, open source, full-featured implementation of the powerful Smalltalk programming language and environment. Squeak is highly-portable, running on almost any platform you could name and you can really truly write once run anywhere. Squeak is the vehicle for a wide range of projects from multimedia applications and educational platforms to commercial web application development. Read on and join in!
http://www.squeak.org
LIcense
Note: The current release of Squeak is a combination of source code originating from it''s origins at Apple which Apple agreed to license under the Apache license and more recent contributions licensed under the MIT license. The vast majority of the code is under the MIT license.
MIT License
Copyright (c) The individual, corporate, and institutional contributors who have collectively contributed elements to this software ("The Squeak Community"), 1996-2010 All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Portions of Squeak are covered by the following license:
Apache License, Version 2.0
Copyright (c) Xerox Corp. 1981, 1982 All rights reserved. Copyright (c) Apple Computer, Inc. 1985-1996 All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
About Cog
---------
Cog is a virtual machine designed for Smalltalk and other similar dynamic languages. Cog builds on the
Squeak virtual machine adding a stack-to-register-mapping just-in-time compiler, aggressive in-line message
cacheing and effective optimization of Smalltalk’s first-class activation records. Cog is the virtual machine
underlying Teleplace''s Croquet-based enterprise virtual collaboration spaces software, the fastest virtual
machine for Squeak, and for Gilad Bracha''s Newspeak modular language inspired by Beta and Smalltalk.
Like the original Squeak VM, Cog is implemented and developed in Smalltalk, and translated into a lower-level
language to produce the production VM. Being a Smalltalk program it is a delight to develop. Cog is
available under the MIT open source license and is unencumbered for commercial deployment.
Cog''s performance relative to the existing Squeak interpreter varies, depending on the benchmark chosen.
As of early-2011, the Cog JIT uses strong inline cacheing techniques and stack-to-register mapping that
results in a register-based calling convention for low-arity methods. Due to the complexity of the Squeak
object representation it has a limited set of primitives implemented in machine code that, for example,
exclude object allocation. Performance of the early-2011 JIT for the nbody, binarytrees and chameneos
redux benchmarks from the computer language shootout is in the range of 4 to 6 times faster than the
interpreter.
'
]
{ #category : #'as yet unclassified' }
SqueakMacOSX32x86Config class >> pluginsTemplate [
^'Squeak {1} ships with the following plugins already built:
Internal:
=========
{2}
External:
=========
{3}
'
]
{ #category : #cmake }
SqueakMacOSX32x86Config >> availableBuildTypes [
^SqueakCMakeVMMakerAbstractBuilder default allBuildTypes
" subclasses should use
^super availableBuildTypes copyWithoutAll: #( #assertWithHeartbeatTimer #debugWithHeartbeatTimer debugMultiThreadedFFI.....etc)) "
]
{ #category : #plugins }
SqueakMacOSX32x86Config >> defaultExternalPlugins [
^ #(
BochsIA32Plugin
CroquetPlugin
ThreadedIA32FFIPlugin "SqueakFFIPrims"
FloatArrayPlugin
FloatMathPlugin
Mpeg3Plugin
QuicktimePlugin
" TestOSAPlugin - not works"
"UnixOSProcessPlugin ?? "
)
]
{ #category : #plugins }
SqueakMacOSX32x86Config >> defaultInternalPlugins [
^ #(
ADPCMCodecPlugin
AsynchFilePlugin
B3DAcceleratorPlugin
BalloonEnginePlugin "B2DPlugin"
BitBltSimulation "BitBltPlugin"
BMPReadWriterPlugin
DeflatePlugin "ZipPlugin"
DropPlugin
DSAPlugin "DSAPrims"
FFTPlugin
FilePlugin
HostWindowPlugin
IA32ABIPlugin "IA32ABI"
InternetConfigPlugin
JoystickTabletPlugin
JPEGReaderPlugin
JPEGReadWriter2Plugin
KlattSynthesizerPlugin "Klatt"
LargeIntegersPlugin "LargeIntegers"
LocalePlugin
MacMenubarPlugin
Matrix2x3Plugin
MIDIPlugin
MiscPrimitivePlugin
QVMProfileMacSupportPlugin
RePlugin
SecurityPlugin
SerialPlugin
SocketPlugin
SoundCodecPlugin "SoundCodecPrims"
SoundGenerationPlugin
SoundPlugin
StarSqueakPlugin
SurfacePlugin
UUIDPlugin
)
]
{ #category : #cmake }
SqueakMacOSX32x86Config >> dirBuildPlatform [
^self dirMacOSX32x86
]
{ #category : #cmake }
SqueakMacOSX32x86Config >> excludeFromBuild [
"over-ride to exclude yourself from a build or not"
^true
]
{ #category : #cmake }
SqueakMacOSX32x86Config >> executableName [
"AbstractBaseClass configurations are not meant to be executable"
^ self vmIShouldNotBeHereExecutableName
]
{ #category : #'cmake buildType redirects' }
SqueakMacOSX32x86Config >> externalPluginsBuild [
^ externalPlugins ifNil: [ externalPlugins := self defaultExternalPlugins ]
]
{ #category : #'cmake buildType redirects' }
SqueakMacOSX32x86Config >> extraPluginSettingsBuild: aMaker [
"Cog currently runs only in 32 bit mode"
self flag: 'tty'. "adapted from pharo code. I have no idea if this is appropriate for this platform"
aMaker templates
addLast:((CMakeSet new) variable:'CMAKE_OSX_ARCHITECTURES' value: 'i386')
]
{ #category : #'cmake buildType redirects' }
SqueakMacOSX32x86Config >> extraVMSettingsBuild: aMaker [
"SystemNavigation default browseMethodsWhoseNamesContain: 'extraVMSettingsBuild:'"
(enabledebugmessages)
ifTrue:[ templates
addLast:((CMakeMessage new) message: (self class name) , 'extraVMSettingsBuild: aMaker')
] .
templates
addLast:((CMakeSet new) variable: 'CMAKE_OSX_ARCHITECTURES' value: 'i386');
addLast:((CMakeSet new) variable: 'resourceDir' quotedValue: ((self resourcesDir pathName), FileDirectory slash, 'ProjectBuilder'));
addLast:((CMakeSet new)
variable: 'resources'
value:'"${resourceDir}/Squeak VM.r"
"${resourceDir}/Cog.icns"
"${resourceDir}/Squeak.icns"
"${resourceDir}/SqueakChanges.icns"
"${resourceDir}/SqueakImage.icns"
"${resourceDir}/SqueakPlugin.icns"
"${resourceDir}/SqueakScript.icns"
"${resourceDir}/SqueakGeneric.icns"
"${resourceDir}/SqueakProject.icns"
"${resourceDir}/SqueakSources.icns"').
]
{ #category : #cmake }
SqueakMacOSX32x86Config >> fixLibsTemplate [
^
'include(GetPrerequisites)
message("Fixing library references in: ${externalModulesDir}")
FILE(GLOB libs "${externalModulesDir}/*.dylib")
set(all_imports "")
foreach(lib ${libs})
get_filename_component(libName "${lib}" NAME)
list(APPEND libNames "${libName}")
set(prereq "")
get_prerequisites(${lib} prereq 1 0 "${bundlePath}" "")
list(APPEND all_imports ${prereq})
endforeach(lib)
list(REMOVE_DUPLICATES all_imports)
set(replacements "")
message ( "Found imports: ${all_imports} " )
foreach(import ${all_imports})
foreach(lib ${libNames})
set(match "^.*${lib}$")
if(import MATCHES ${match})
set(replacement "${pluginsRelPath}/${lib}")
message("Will replace: ${import} with: ${replacement}")
set(replacements ${replacements} "-change" "${import}" "${replacement}")
endif(import MATCHES ${match})
endforeach(lib)
endforeach(import)
foreach(lib ${libs})
get_filename_component(name ${lib} NAME)
set(fixedName "${pluginsRelPath}/${name}")
message("Fixing up: ${name}")
execute_process(COMMAND install_name_tool -id "${fixedName}" "${lib}" )
execute_process(COMMAND install_name_tool ${replacements} ${lib} )
endforeach(lib)
'
]
{ #category : #'cmake buildType redirects' }
SqueakMacOSX32x86Config >> internalPluginsBuild [
^ internalPlugins ifNil: [ internalPlugins := self defaultInternalPlugins ]
]
{ #category : #'cmake buildType redirects' }
SqueakMacOSX32x86Config >> standardIncludesBuild [
(enabledebugmessages)
ifTrue:[
templates
addLast: ((CMakeMessage new) message: (self class name), ' standardIncludesBuild' )
].
templates
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${crossDir}/plugins/SerialPlugin' ));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${targetPlatform}/plugins/FilePlugin'));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${crossDir}/plugins/FilePlugin'));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${targetPlatform}/plugins/HostWindowPlugin'));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${platformsDir}/iOS/vm/iPhone/plugins/HostWindowPlugin' ));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${crossDir}/plugins/HostWindowPlugin'));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${crossDir}/plugins/DropPlugin'));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${crossDir}/plugins/SocketPlugin'));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${crossDir}/plugins/SoundPlugin'));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${crossDir}/plugins/AsynchFilePlugin'));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${platformsDir}/unix/vm'));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${platformsDir}/iOS/plugins/SoundPlugin'));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${platformsDir}/iOS/vm/OSX/plugins/SoundPlugin'));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${platformsDir}/iOS/vm/Common/Classes'));
addLast: ((CMakeIncludeDirectories new) dirs: (OrderedCollection with: '${platformsDir}/iOS/vm/OSX')).
(enabledebugmessages)
ifTrue:[
templates
addLast: ((CMakeMessage new) message: 'CMAKE_INCLUDE_PATH = ${CMAKE_INCLUDE_PATH}' );
addLast: ((CMakeMessage new) message: 'CMAKE_SYSTEM_INCLUDE_PATH = ${CMAKE_SYSTEM_INCLUDE_PATH}' );
addLast: ((CMakeMessage new) message: 'CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES = ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES}' );
addLast: ((CMakeMessage new) message: 'CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES = ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}' );
addLast: ((CMakeMessage new) message: 'CMAKE_FIND_ROOT_PATH_MODE_INCLUDE = ${CMAKE_FIND_ROOT_PATH_MODE_INCLUDE}' );
addLast: ((CMakeMessage new) message: 'CMAKE_FIND_ROOT_PATH_MODE_INCLUDE = ${CMAKE_INCLUDE_CURRENT_DIR}' );
addLast: ((CMakeMessage new) message: 'CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE = ${CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE}' );
addLast: ((CMakeMessage new) message: 'CMAKE_INCLUDE_DIRECTORIES_BEFORE = ${CMAKE_INCLUDE_DIRECTORIES_BEFORE}' );
addLast: ((CMakeMessage new) message: 'CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE = ${CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE}' )
].
]