/
StackIPhoneConfig.class.st
695 lines (596 loc) · 18.1 KB
/
StackIPhoneConfig.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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
Class {
#name : #StackIPhoneConfig,
#superclass : #StackCocoaIOSConfig,
#category : #'CMakeVMMaker-IOS'
}
{ #category : #accessing }
StackIPhoneConfig class >> deviceIPad [
^#(2)
]
{ #category : #accessing }
StackIPhoneConfig class >> deviceIPhone [
^#(1)
]
{ #category : #accessing }
StackIPhoneConfig class >> deviceUniversal [
^#(1 2)
]
{ #category : #'bundle strings' }
StackIPhoneConfig >> CFBundleIconFile [
"512 x512 icon"
^'Cog.png'
]
{ #category : #'bundle strings' }
StackIPhoneConfig >> CFBundleIconFile1024 [
"1024x1024 icon"
^'Cog.png'
]
{ #category : #'bundle strings' }
StackIPhoneConfig >> CFBundleIconFile57 [
"57x57 icon"
^'Cog.png'
]
{ #category : #'bundle strings' }
StackIPhoneConfig >> CFBundleIconFile72 [
"72x72 icon"
^'Cog.png'
]
{ #category : #'bundle strings' }
StackIPhoneConfig >> CFBundleVersion [
^'1.0.0'
]
{ #category : #'bundle strings' }
StackIPhoneConfig >> ImageIsScrollable [
^false
]
{ #category : #'bundle strings' }
StackIPhoneConfig >> ImageIsWritable [
^true
]
{ #category : #'bundle strings' }
StackIPhoneConfig >> UIDeviceFamily [
^self targetedDeviceFamilyAsTemplateString
]
{ #category : #'bundle strings' }
StackIPhoneConfig >> UIFileSharingEnabled [
^false
]
{ #category : #'bundle strings' }
StackIPhoneConfig >> VMMemorySize [
^1024 * 1024 * 64 "64M"
]
{ #category : #'bundle strings' }
StackIPhoneConfig >> WebViewAsUI [
^false
]
{ #category : #'bundle strings' }
StackIPhoneConfig >> WebViewUrl [
^'http://localhost:8080'
]
{ #category : #accessing }
StackIPhoneConfig >> architecture [
^'armv7'
]
{ #category : #'build script' }
StackIPhoneConfig >> buildScript [
"answer the build script for building everything"
^
'#!/usr/bin/env bash
set -e
if [ ! -e vmVersionInfo.h ]; then
../scripts/extract-commit-info.sh
fi
cmake .
make
find ../{1}/{2}.app/Contents -type f -exec mv ''\{\}'' ../{1}/{2}.app \\;
rm -Rf ../{1}/{2}.app/Contents
' format: { self outputDirName. self executableName }
]
{ #category : #accessing }
StackIPhoneConfig >> codeSignIdentity [
^'iPhone Developer'
]
{ #category : #settings }
StackIPhoneConfig >> commonCompilerFlags [
"Common compiler flags"
^{
'-arch {1}' format: { self architecture }.
"CLANG >>"
'-fwrapv'. "Non optimization of stackoverflow (to allow number conversions)"
'-Wno-return-type'. "to avoid clang to complain about plugins that do not return properly."
'-Qunused-arguments'.
"CLANG <<"
'-isysroot {1}' format: { self sysroot }.
'-x objective-c'.
'-std=gnu99'.
'-falign-functions=16'.
'-fno-gcse'.
'-fvisibility=hidden'.
'-funroll-loops'.
'-finline-functions'.
'-mno-thumb'.
'-DSTACKVM=1'.
'-DCOGMTVM=0'.
'-DUSE_GLOBAL_STRUCT=0'.
'-DBASE_HEADER_SIZE=4'.
'-DTARGET_OS_IS_IPHONE'.
'-DHAVE_UUID_GENERATE'.
'-DHAVE_SYS_TIME_H'.
'-DLSB_FIRST'.
'-DHAVE_NANOSLEEP'.
'-DISQUEAK_IMAGE={1}' format: { self imageName }.
'-DISQUEAK_SOURCES=PharoV10'.
'-DSTACKVM'}
]
{ #category : #settings }
StackIPhoneConfig >> compilerFlagsDebug [
^#('-g3' '-O0' '-DDEBUGVM=1')
]
{ #category : #settings }
StackIPhoneConfig >> compilerFlagsRelease [
^#('-g0' '-O3' '-fomit-frame-pointer' '-DNDEBUG' '-DDEBUGVM=0')
]
{ #category : #'plugin extra rules' }
StackIPhoneConfig >> configureFT2Plugin: maker [
"extra rules for Freetype plugin.
a custom rule to build freetype library"
| lib |
"add freetype library into loop"
lib := self addThirdpartyLibrary: 'freetype2'.
lib configurationFlags: self ft2PluginConfigurationFlags.
"link plugin with freetype lib"
maker includeDirectories: lib includeDir.
maker addExternalLibrary: '${thirdpartyDir}/out/lib/', lib libraryFileName.
maker addExternalDependency: 'freetype2'.
]
{ #category : #'plugin extra rules' }
StackIPhoneConfig >> configureHostWindowPlugin: maker [
maker includeDirectories: '${platformsDir}/Cross/plugins/HostWindowPlugin'.
maker
addSources: #('sqMacHostWindow.m' )
prefixed: '${platformsDir}/iOS/vm/iPhone/plugins/HostWindowPlugin/'
]
{ #category : #'plugin extra rules' }
StackIPhoneConfig >> configureIOSPlugin: maker [
maker
addSources: #('sqTouch.m' )
prefixed: '${platformsDir}/iOS/vm/iPhone/plugins/IOSPlugin/'
]
{ #category : #'plugin extra rules' }
StackIPhoneConfig >> configureSocketPlugin: maker [
super configureSocketPlugin: maker.
maker includeDirectories: '${SDKROOT}/usr/include'. "for tcp.h"
]
{ #category : #settings }
StackIPhoneConfig >> defaultExternalPlugins [
^#()
]
{ #category : #settings }
StackIPhoneConfig >> defaultInternalPlugins [
^ #(
ADPCMCodecPlugin
BMPReadWriterPlugin
BalloonEnginePlugin
BitBltSimulation
DSAPlugin
DeflatePlugin
"DropPlugin"
LocalePlugin
FFTPlugin
FilePlugin
FloatArrayPlugin
HostWindowPlugin
JPEGReadWriter2Plugin
JPEGReaderPlugin
LargeIntegersPlugin
Matrix2x3Plugin
MiscPrimitivePlugin
"RePlugin"
SecurityPlugin
SocketPlugin
SoundCodecPlugin
SoundGenerationPlugin
SoundPlugin
SurfacePlugin
UUIDPlugin
ObjectiveCPlugin
IOSPlugin)
]
{ #category : #accessing }
StackIPhoneConfig >> deploymentTargetVersion [
^'4.0'
]
{ #category : #accessing }
StackIPhoneConfig >> executableName [
^ 'iStackVM'
]
{ #category : #'plugin extra rules' }
StackIPhoneConfig >> extraPluginSettings: maker [
self architecture
ifNotNil: [ :arch | maker set: 'CMAKE_OSX_ARCHITECTURES' toString: arch ].
self setCommonProperties: maker.
maker
setTargetProperty: 'COMPILE_FLAGS'
to: '"-include \"', (self buildDir / self prefixHeaderFileName) fullName, '\""'.
maker isExternal ifTrue: [
"copy result to results dir "
maker set: 'LIBRARY_OUTPUT_PATH' toString: self outputDir.
maker set: 'EXECUTABLE_OUTPUT_PATH' toString: self outputDir.
maker puts: 'list(APPEND linkFlags "-undefined dynamic_lookup")' ].
"maker addXCodeProperty: 'GCC_VERSION' value: '4.3'."
maker addXCodeProperty: 'GCC_PREFIX_HEADER' value: '${buildDir}/' , self executableName , '_Prefix.pch'.
]
{ #category : #'source files' }
StackIPhoneConfig >> extraSources [
" mac VM using some unix sources "
^'${buildDir}/', self prefixHeaderFileName, '
${resources} ',
'${buildDir}/', self prefixHeaderFileName, '
${resourcesLocaleEnglish}
${platformsDir}/unix/vm/sqUnixHeartbeat.c
${platformsDir}/unix/vm/sqUnixThreads.c
${platformsDir}/unix/vm/aio.c
'
]
{ #category : #accessing }
StackIPhoneConfig >> frameworks [
^ #(
CoreAudio
CoreGraphics
CoreLocation
UIKit
CoreFoundation
Foundation
QuartzCore
OpenGLES
AudioToolbox
SystemConfiguration)
]
{ #category : #accessing }
StackIPhoneConfig >> freetypeLibClass [
^CMIOSFreetype2
]
{ #category : #'plugin extra rules' }
StackIPhoneConfig >> ft2PluginConfigurationFlags [
^ {'--without-zlib'.
'--without-bzip2'.
'--host=arm-apple-darwin'.
'--enable-static=yes'.
'--enable-shared=no'.
'CFLAGS=\\"-arch {1} -std=c99 -Wno-trigraphs -O2 -fpascal-strings -fwrapv -Wreturn-type -Wunused-variable -fvisibility=hidden -fmessage-length=0 -miphoneos-version-min={3} -I{2}/usr/include/libxml2 -isysroot {2}\\"'.
'LDFLAGS=\\"-arch {1} -miphoneos-version-min={3} -isysroot {2}\\"' }
collect: [ :each |
each format: {
self architecture.
self sysroot.
self sdkVersion } ]
]
{ #category : #accessing }
StackIPhoneConfig >> imageName [
^'iOS'
]
{ #category : #settings }
StackIPhoneConfig >> imageResources [
^{
self imageName, '.changes'.
'PharoV10.sources' }
]
{ #category : #'source files' }
StackIPhoneConfig >> platformSources [
"files added from platform/iOS/vm dir "
^ #(
'Common/main.m'
'Common/Classes/Queue.m'
'Common/Classes/sqMacV2Time.c'
'Common/Classes/sqSqueakAppDelegate.m'
'Common/Classes/sqSqueakFileDirectoryAPI.m'
'Common/Classes/sqSqueakFileDirectoryInterface.m'
'Common/Classes/sqSqueakInfoPlistInterface.m'
'Common/Classes/sqSqueakMainApplication.m'
'Common/Classes/sqSqueakMainApplication+attributes.m'
'Common/Classes/sqSqueakMainApplication+events.m'
'Common/Classes/sqSqueakMainApplication+imageReadWrite.m'
'Common/Classes/sqSqueakMainApplication+sound.m'
'Common/Classes/sqSqueakMainApplication+vmAndImagePath.m'
'Common/Classes/sqSqueakMainApplication+screen.m'
'Common/Classes/sqSqueakMainApplication+cursor.m'
"'Common/Classes/sqSqueakCursorAPI.m'"
'Common/Classes/sqSqueakAttributesAPI.m'
'Common/Classes/sqSqueakSoundAPI.m'
'Common/Classes/sqSqueakVmAndImagePathAPI.m'
'Common/Classes/sqSqueakMainApp.m'
'Common/Classes/sqSqueakEventsAPI.m'
'Common/Classes/sqSqueakScreenAPI.m'
'Common/Classes/sqSqueakScreenAndWindow.m'
'iPhone/Classes/SqueakNoOGLIPhoneAppDelegate.m'
'iPhone/Classes/sqSqueakIPhoneApplication.m'
'iPhone/Classes/sqSqueakIPhoneApplication+attributes.m'
'iPhone/Classes/sqSqueakIPhoneApplication+clipboard.m'
'iPhone/Classes/sqSqueakIPhoneApplication+imageReadWrite.m'
'iPhone/Classes/sqSqueakIPhoneApplication+events.m'
'iPhone/Classes/sqSqueakIPhoneApplication+Network.m'
'iPhone/Classes/sqSqueakiPhoneApplication+sound.m'
'iPhone/Classes/sqSqueakIPhoneFileDirectoryInterface.m'
'iPhone/Classes/sqSqueakIPhoneInfoPlistInterface.m'
'iPhone/Classes/sqiPhoneScreenAndWindow.m'
'iPhone/Classes/SqueakUIView.m'
'iPhone/Classes/SqueakUIViewCALayer.m'
'iPhone/Classes/SqueakUIViewOpenGL.m'
'iPhone/Classes/SqueakUIController.m'
'iPhone/Classes/sqSqueakIPhoneClipboardAPI.m'
'iPhone/macintoshextra.c'
'iPhone/osExports.c'
"'iPhone/sqDummyaio.c'" "I'm using real aio.c from unix (and seems to work)"
'iPhone/sqMacV2Memory.c'
'iPhone/sqMacUnixExternalPrims.m'
)
]
{ #category : #'bundle strings' }
StackIPhoneConfig >> plistKeys [
^super plistKeys,
#(CFBundleIconFile57
CFBundleIconFile72
CFBundleIconFile1024
CFBundleVersion
UIDeviceFamily
UIFileSharingEnabled
VMMemorySize
ImageIsWritable
ImageIsScrollable
WebViewAsUI
WebViewUrl)
]
{ #category : #'bundle strings' }
StackIPhoneConfig >> plistTemplate [
^'<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleVersion</key>
<string>@CFBundleVersion@</string>
<key>CFBundleDisplayName</key>
<string>@CFBundleExecutable@</string>
<key>CFBundleExecutable</key>
<string>@CFBundleExecutable@</string>
<key>CFBundleIconFile</key>
<string>@CFBundleIconFile@</string>
<key>CFBundleIconFiles</key>
<array>
<string>@CFBundleIconFile@</string>
<string>@CFBundleIconFile57@</string>
<string>@CFBundleIconFile72@</string>
<string>@CFBundleIconFile1024@</string>
</array>
<key>CFBundleIdentifier</key>
<string>@CFBundleIdentifier@</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>@CFBundleName@</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleResourceSpecification</key>
<string>ResourceRules.plist</string>
<key>CFBundleSignature</key>
<string>FRAC</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>iPhoneOS</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>MinimumOSVersion</key>
<string>3.1.3</string>
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>UIDeviceFamily</key>
<array>
@UIDeviceFamily@
</array>
<key>UIPrerenderedIcon</key>
<false/>
<key>UIStatusBarHidden</key>
<true/>
<key>UIFileSharingEnabled</key>
<@UIFileSharingEnabled@/>
<key>ImageIsWritable</key>
<@ImageIsWritable@/>
<key>ImageIsScrollable</key>
<@ImageIsScrollable@/>
<key>VMMemorySize</key>
<integer>@VMMemorySize@</integer>
<key>WebViewAsUI</key>
<@WebViewAsUI@/>
<key>WebViewUrl</key>
<string>@WebViewUrl@</string>
</dict>
</plist>
'
]
{ #category : #settings }
StackIPhoneConfig >> precompiledImports [
^#(
'Foundation/Foundation.h'
'UIKit/UIKit.h')
]
{ #category : #settings }
StackIPhoneConfig >> resources [
^{
self CFBundleIconFile.
self CFBundleIconFile57.
self CFBundleIconFile72.
self CFBundleIconFile1024.
self imageName, '.image'},
self imageResources
]
{ #category : #accessing }
StackIPhoneConfig >> resourcesDir [
"Answer the value of resourcesDir"
^ resourcesDir ifNil: [ resourcesDir := (self topDir / 'iosbuild' / 'resources') fullName ]
]
{ #category : #accessing }
StackIPhoneConfig >> sdkTarget [
^'iphoneos', self sdkVersion
]
{ #category : #accessing }
StackIPhoneConfig >> sdkVersion [
^'7.0'
]
{ #category : #settings }
StackIPhoneConfig >> setCommonProperties: maker [
maker set: 'CMAKE_CROSSCOMPILING' to: 'TRUE'.
maker set: 'CMAKE_SYSTEM_NAME' to: 'Darwin'.
maker set: 'CMAKE_SYSTEM_PROCESSOR' to: 'arm'.
maker set: 'SDKVER' toString: self sdkVersion.
maker
set: 'DEVROOT'
toString: ('/Applications/Xcode.app/Contents/Developer/Platforms/{1}.platform/Developer'
format: { self targetDevice }).
maker
set: 'SDKROOT'
toString: '${DEVROOT}/SDKs/', self targetDevice,'${SDKVER}.sdk'.
maker set: 'CMAKE_OSX_SYSROOT' to: 'iphoneos${SDKVER}'.
maker set: 'CMAKE_FIND_ROOT_PATH' to: '"${SDKROOT}" "${DEVROOT}"'.
maker set: 'CMAKE_FIND_ROOT_PATH_MODE_PROGRAM' to: 'ONLY'.
maker set: 'CMAKE_FIND_ROOT_PATH_MODE_LIBRARY' to: 'ONLY'.
maker set: 'CMAKE_FIND_ROOT_PATH_MODE_INCLUDE' to: 'ONLY'.
maker set: 'CMAKE_EXE_LINKER_FLAGS' toString: '--sysroot ${SDKROOT} -L${SDKROOT}/usr/lib -L${SDKROOT}/usr/lib/system'.
maker set: 'CMAKE_C_FLAGS' toString: '--sysroot ${SDKROOT} -L${SDKROOT}/usr/lib -L${SDKROOT}/usr/lib/system'.
maker set: 'CMAKE_CXX_FLAGS' toString: '--sysroot ${SDKROOT} -L${SDKROOT}/usr/lib -L${SDKROOT}/usr/lib/system'.
maker addFrameworks: self frameworks.
]
{ #category : #settings }
StackIPhoneConfig >> setExtraTargetProperties: maker [
"super setExtraTargetProperties: maker."
| precompiledHeaders plist |
precompiledHeaders := (self executableName, '_Prefix.pch').
(FileStream forceNewFileNamed: (maker buildDir / precompiledHeaders) fullName)
nextPutAll: self precompiledHeaders;
close.
maker addXCodeProperty: 'GCC_PREFIX_HEADER' value: '${buildDir}/', precompiledHeaders.
self setCommonProperties: maker.
" generated and add Info.plist file "
plist := self plistFile.
(FileStream forceNewFileNamed: (maker buildDir / 'Info.plist') fullName)
nextPutAll: plist;
close.
maker addProperty: 'MACOSX_BUNDLE_INFO_PLIST' value: '${buildDir}/Info.plist'.
maker
cmd: 'set_target_properties'
params: self executableName, ' PROPERTIES COMPILE_FLAGS "-include \"', (self buildDir / self prefixHeaderFileName) fullName, '\""'.
maker
set: 'CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY'
toString: self codeSignIdentity.
maker
set: 'CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY'
toString: self targetedDeviceFamilyAsString.
maker
set: 'CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET'
to: self deploymentTargetVersion.
maker
set: 'CMAKE_XCODE_ATTRIBUTE_CONFIGURATION_BUILD_DIR'
toString: '$(BUILD_DIR)/$(CONFIGURATION)'.
maker
set: 'CMAKE_XCODE_ATTRIBUTE_CONFIGURATION_TEMP_DIR'
toString: '$(BUILD_DIR)/$(CONFIGURATION)'.
maker set: 'EXECUTABLE_OUTPUT_PATH' toString: self outputDir fullName.
maker puts: 'set_source_files_properties(${srcVMDir}/gcc3x-cointerp.c PROPERTIES COMPILE_FLAGS -O0)'.
]
{ #category : #settings }
StackIPhoneConfig >> setGlobalOptions: maker [
"set any CMake global options, before declaring a project in cmake file"
" maker
set: 'CMAKE_C_COMPILER'
to: ('/Applications/Xcode.app/Contents/Developer/Platforms/{target}.platform/Developer/usr/bin/gcc'
nameFormat: {'target' -> self targetDevice} asDictionary).
maker
set: 'CMAKE_CXX_COMPILER'
to: ('/Applications/Xcode.app/Contents/Developer/Platforms/{target}.platform/Developer/usr/bin/g++'
nameFormat: {'target' -> self targetDevice } asDictionary).
self architecture ifNotNil: [
maker set: 'CMAKE_OSX_ARCHITECTURES' to: self architecture ]."
]
{ #category : #utils }
StackIPhoneConfig >> setGlobalOptionsAfterDetermineSystem: maker [
self setGlobalOptions: maker.
maker
set: 'CMAKE_OSX_SYSROOT'
to: ('/Applications/Xcode.app/Contents/Developer/Platforms/{1}.platform/Developer/SDKs/{1}{2}.sdk'
format: { self targetDevice. self sdkVersion })
]
{ #category : #settings }
StackIPhoneConfig >> setResourceProperties: maker [
maker set: 'resourceDir' toString: self resourcesDir.
maker
set: 'resources'
to: (String streamContents: [ :stream |
self resources
do: [ :each |
stream
nextPut: $";
nextPutAll: '${resourceDir}/';
nextPutAll: each;
nextPut: $"]
separatedBy: [ stream space ] ]).
maker
set: 'resourcesLocaleEnglish'
toString: '${resourceDir}/English.lproj/MainWindow.nib'.
maker
cmd: 'set_source_files_properties'
params: '${resources} PROPERTIES MACOSX_PACKAGE_LOCATION Resources'.
maker
cmd: 'set_source_files_properties'
params: '${resourcesLocaleEnglish} PROPERTIES MACOSX_PACKAGE_LOCATION Resources'.
]
{ #category : #'source files' }
StackIPhoneConfig >> standardIncludes [
^#(
'${srcDir}/vm'
'${platformsDir}/iOS/vm/iPhone'
'${platformsDir}/iOS/vm/iPhone/Classes'
'${platformsDir}/iOS/vm/OSX'
'${platformsDir}/unix/vm'
'${platformsDir}/iOS/vm/Common/Classes'
'${platformsDir}/iOS/plugins/SoundPlugin'
'${platformsDir}/iOS/vm/OSX/plugins/SoundPlugin'
'${crossDir}/plugins/SoundPlugin'
'${crossDir}/plugins/HostWindowPlugin'
'${platformsDir}/Cross/plugins/HostWindowPlugin'
'${platformsDir}/iOS/vm/iPhone/plugins/HostWindowPlugin'
'${crossDir}/plugins/FilePlugin'
)
]
{ #category : #accessing }
StackIPhoneConfig >> sysroot [
^ '/Applications/Xcode.app/Contents/Developer/Platforms/{1}.platform/Developer/SDKs/{1}{2}.sdk'
format: {
self targetDevice.
self sdkVersion }
]
{ #category : #accessing }
StackIPhoneConfig >> targetDevice [
^'iPhoneOS'
]
{ #category : #accessing }
StackIPhoneConfig >> targetedDeviceFamily [
^self class deviceUniversal
]
{ #category : #private }
StackIPhoneConfig >> targetedDeviceFamilyAsString [
^String streamContents: [ :stream |
self targetedDeviceFamily
do: [ :each | stream nextPutAll: each asString ]
separatedBy: [ stream nextPut: $, ].
stream nextPut: Character space ]
]
{ #category : #private }
StackIPhoneConfig >> targetedDeviceFamilyAsTemplateString [
^String streamContents: [ :stream |
self targetedDeviceFamily do: [ :each |
stream
nextPutAll: '<integer>';
nextPutAll: each asString;
nextPutAll: '</integer>' ] ]
]