1
0
mirror of https://github.com/lxsang/DiyaSDK.git synced 2024-12-26 11:28:22 +01:00

resolve some core image dependencies

This commit is contained in:
Dany LE 2022-08-08 16:37:24 +02:00
parent 9d7559ada0
commit 1f49b1ed35
2 changed files with 35 additions and 5 deletions

View File

@ -31,7 +31,7 @@ echo "Creating image...."
$VM "$IMG" $VM "$IMG"
$VM "$IMG" loadHermes "$BASE_DIR/bootstrap/Hermes-Extensions.hermes" \ $VM "$IMG" loadHermes "$BASE_DIR/bootstrap/Hermes-Extensions.hermes" \
"$BASE_DIR/bootstrap/TraitsV2.hermes" \ "$BASE_DIR/bootstrap/TraitsV2.hermes" \
"$BASE_DIR/tmp/$NAME.hermes" --on-duplication=ignore \ "$BASE_DIR/tmp/$NAME.hermes" --on-duplication=replace \
--no-fail-on-undeclared --save --quit --no-fail-on-undeclared --save --quit
#init the image #init the image

View File

@ -1,5 +1,6 @@
|pkgn dest pkg fileReference fileName writer core hePackage ignoresClasses| |pkgn dest pkg fileReference fileName writer core hePackage ignoresClasses|
FFIMethodRegistry resetAll. FFIMethodRegistry resetAll.
Smalltalk garbageCollect.
dest := Smalltalk arguments first. dest := Smalltalk arguments first.
pkgn := Smalltalk arguments at:2. pkgn := Smalltalk arguments at:2.
@ -14,6 +15,7 @@ packages := #(
'Jobs' 'Jobs'
'Collections-Arithmetic' 'Collections-Arithmetic'
'Ring-Deprecated-Core-Kernel' 'Ring-Deprecated-Core-Kernel'
'Ring-Deprecated-Core-Containers'
'Math-Operations-Extensions' 'Math-Operations-Extensions'
'Collections-Atomic' 'Collections-Atomic'
'Collections-DoubleLinkedList' 'Collections-DoubleLinkedList'
@ -52,8 +54,8 @@ packages := #(
). ).
ignoresClasses := { ignoresClasses := {
RGCommentDefinition. "RGCommentDefinition.
RGMethodDefinition. RGMethodDefinition."
ChangeRecord. ChangeRecord.
PluggableListMorph. PluggableListMorph.
TextLine. TextLine.
@ -75,11 +77,37 @@ Form class
removeSelector: #services. removeSelector: #services.
Form Form
removeSelector: #setAsBackground; removeSelector: #setAsBackground;
removeSelector: #scaledByDisplayScaleFactor. compile: 'scaledByDisplayScaleFactor
'.
AbstractFileReference
removeSelector: #fileIn.
FileStream
removeSelector: #fileIn.
GZipReadStream class
removeSelector: #fileIn:.
STCommandLineHandler
removeSelector: #installSourceFile:;
compile: 'installSourceFiles
';
removeSelector: #loadSourceFiles:;
compile: 'selectSourceFiles
'.
PharoCommandLineHandler
compile: 'changePreferences
';
compile: 'runPreferences
'.
GIFReadWriter class
removeSelector: #exampleAnim.
Rectangle class
removeSelector: #fromUser:;
removeSelector: #fromUser.
packages do:[:name | |pkg trait classes extensionMethods| packages do:[:name | |pkg trait classes extensionMethods|
Transcript show: 'Processing package ',name;cr. Transcript show: 'Processing package ',name;cr.
FFIMethodRegistry resetAll. FFIMethodRegistry resetAll.
Smalltalk garbageCollect.
pkg := RPackageOrganizer default packageNamed: name asSymbol. pkg := RPackageOrganizer default packageNamed: name asSymbol.
traits := (pkg definedClasses select: #isTrait) do: [ :e | core traits add:(HETrait for: e) ]. traits := (pkg definedClasses select: #isTrait) do: [ :e | core traits add:(HETrait for: e) ].
(pkg definedClasses reject: #isTrait) do: [ :e | (pkg definedClasses reject: #isTrait) do: [ :e |
@ -112,6 +140,7 @@ pkg := RPackageOrganizer default packageNamed: 'FreeType' asSymbol.
core addClass: (HEClass for:OSWindowPlatformSpecificHandle); core addClass: (HEClass for:OSWindowPlatformSpecificHandle);
addClass: (HEClass for:ChunkWriteStream); addClass: (HEClass for:ChunkWriteStream);
addClass: (HEClass for:ChunkReadStream); addClass: (HEClass for:ChunkReadStream);
addClass: (HEClass for: PharoCommandLineHandler);
addClass: (HEClass for:STCommandLineHandler); addClass: (HEClass for:STCommandLineHandler);
addClass: (HEClass for:FreeTypeFace); addClass: (HEClass for:FreeTypeFace);
"form object support" "form object support"
@ -120,7 +149,8 @@ core addClass: (HEClass for:OSWindowPlatformSpecificHandle);
addClass: (HEClass for:Form); addClass: (HEClass for:Form);
addClass: (HEClass for:ColorForm); addClass: (HEClass for:ColorForm);
addClass: (HEClass for:ColorArray); addClass: (HEClass for:ColorArray);
addClass: (HEClass for: AnimatedImageFrame) addClass: (HEClass for: AnimatedImageFrame);
addClass: (HEClass for: ShortIntegerArray)
. .
fileReference := (dest,'/',(pkgn replaceAll: Character space with: $-),'.hermes') asFileReference. fileReference := (dest,'/',(pkgn replaceAll: Character space with: $-),'.hermes') asFileReference.