Giter Site home page Giter Site logo

sparta's Introduction

Sparta

Sparta is an almost stateless vector graphics API for Pharo that provides bindings to the Skia rendering backend.

Install

More detailed installation guide is described in INSTALL.md

Sparta requires an extra Skia vm plugin. The plugin for the current OS and VM (64 bit) is downloaded and installed automatically together with all needed packages.

Metacello new
    baseline: 'Sparta';
    repository: 'github://feenkcom/sparta/src';
    load

Overview

(All images are rendered using Sparta in Glamorous Toolkit)

"Sparta" string rendered with applied neon filter

Backends

Skia, and as result Sparta, has support of native OS graphic engines, as well as cross platform ones.

On all platforms Sparta provides support of Cairo and Skia. Additionally, high performant CoreGraphics and CoreGraphics Accelerated on Mac OS and Direct2D on Windows. In total Sparta supports 5 different rendering backends.

Text

One of the biggest improvements compared to existing graphics engines from Pharo is advanced high quality text rendering with multi-language support.

Multilanguage support in Sparta

The current Pharo text rendering engines draw a piece of text with one concrete font and style. If the font does not have an appropriate character, a stub glyph will be rendered instead. Sparta introduces a notion of font groups that allow us to achieve a smooth fallback font detection based on the selected font style, language and missing glyphs. Fallback font support requires more complex text measurement, as multiple fonts faces are involved to render a single piece of text.

Filters

Since Sparta is based on the Moz2D backend that was designed for web browsers, we can get support for a wide variety of filter primitives. Sparta provides an ability to compose multiple filter primitives to get a single, advanced filter. For example, with the help of ColorMatrix and TableTransfer filters we can simulate some popular Instagram-like filters, for example Nashville, Inkwell or Brannan.

Instagram-like filters implemented with Sparta

Basic drawings

We should not forget that first of all Sparta is a vector graphics engine. It allows developers to create, fill and stroke custom paths and shapes. Together with gaussian blur, we can achieve astonishing results that were not possible before.

Basic vector graphics in Sparta

sparta's People

Contributors

syrel avatar akgrant43 avatar georgeganea avatar jurajkubelka avatar girba avatar chisandrei avatar refactoringdr avatar akgrant avatar maenu avatar stephaneggermont avatar j-brant avatar nolwennfournier avatar

Stargazers

Delon R. Newman avatar Sam Tran avatar Martin Kinoo avatar Jared Forsyth avatar  avatar Ryosuke avatar astrolemonade avatar auslegungssache avatar Yubao Liu avatar Joel Boehland avatar  avatar Daniel avatar  avatar  avatar Me avatar J Atkin avatar latrokles avatar Peter W avatar  avatar Jonathan van Alteren avatar Seif avatar Sean DeNigris avatar Rahul Goma Phulore avatar Peter H. Meadows avatar Joe avatar Julien Delplanque avatar Denis Kudriashov avatar Marcus Denker avatar Serge Stinckwich avatar  avatar  avatar

Watchers

 avatar  avatar Dale Henrichs avatar James Cloos avatar  avatar  avatar Joe avatar  avatar  avatar Denis Kudriashov avatar GlennCavarle avatar Peter H. Meadows avatar  avatar

sparta's Issues

Is Skia in Linux 64 bits supported?

Hello,

I'm on a Debian 10 64 bits (1) and get this message in terminal:

[Skia] Could not init env logger
[Skia] Could not init icu

In the image, I see that skia binary file is detected (SkiaLibrary uniqueInstance unixModuleName asFileReference exists is true).
But the Skia option is not available in the Pharo System Settings because SkiaLibrary uniqueInstance hasModule is false.

I looked a bit how GtLibraryInstaller downloads the library, but before digging more I prefer to ask: Is linux 64 bits supported?


(1): uname shows: "4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux"

Moz2D installation will fail on Windows if you have image opened using the same VM

The full error at the end.

It seems that every time bloc is installed into new image, Moz2D deletes/replaces libMoz2D.dll in the VM's folder.

This fails on Windows, when you have another image opened that uses the same VM, because then Windows will lock the file. You cannot delete locked/used file, so the whole installation fails.

Note that the backend was still set to Moz2D even after the failure and running any bloc-related code resulted in segfault (in case of an error, I would expect that it automatically falls back onto cairo).


AssertionFailure: File @ C:\Users\uhnak\Documents\Pharo\vms\61\libMoz2D.dll must not exist

Unknown error... Please copy the whole text

System information:

Pharo 6.0
Latest update: #60528

Virtual Machine

C:\Users\uhnak\Documents\Pharo\vms\61\Pharo.exe
CoInterpreter VMMaker.oscog-eem.2254 uuid: 4f2c2cce-f4a2-469a-93f1-97ed941df0ad Jul 20 2017
StackToRegisterMappingCogit VMMaker.oscog-eem.2252 uuid: 2f3e9b0e-ecd3-4adf-b092-cce2e2587a5c Jul 20 2017
VM: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $ Date: Thu Jul 20 12:42:21 2017 -0700 $ Plugins: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $

Win32 built on Jul 20 2017 20:21:26 GMT Compiler: 5.4.0
VMMaker versionString VM: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $ Date: Thu Jul 20 12:42:21 2017 -0700 $ Plugins: 201707201942 https://github.com/OpenSmalltalk/opensmalltalk-vm.git $
CoInterpreter VMMaker.oscog-eem.2254 uuid: 4f2c2cce-f4a2-469a-93f1-97ed941df0ad Jul 20 2017
StackToRegisterMappingCogit VMMaker.oscog-eem.2252 uuid: 2f3e9b0e-ecd3-4adf-b092-cce2e2587a5c Jul 20 2017

Stack trace:

an OrderedCollection(MozInstallerInstallStep(Object)>>assert:description: MozInstallerInstallStep>>ensureNotExist: MozInstallerInstallStep>>doActionIn: MozInstallerInstallStep(MozInstallerStep)>>runIn: [ aStep runIn: self ] in [ [ aStep runIn: self ]
on: MozInstallerError
do: [ :anError | ^ aStep handleError: anError in: self ] ] in [ :aStep |
[ [ aStep runIn: self ]
on: MozInstallerError
do: [ :anError | ^ aStep handleError: anError in: self ] ]
on: Error
do: [ :anError |
^ aStep
handleError: (MozInstallerUnhandledError new error: anError)
in: self ] ] in MozInstaller>>run BlockClosure>>on:do: [ [ aStep runIn: self ]
on: MozInstallerError
do: [ :anError | ^ aStep handleError: anError in: self ] ] in [ :aStep |
[ [ aStep runIn: self ]
on: MozInstallerError
do: [ :anError | ^ aStep handleError: anError in: self ] ]
on: Error
do: [ :anError |
^ aStep
handleError: (MozInstallerUnhandledError new error: anError)
in: self ] ] in MozInstaller>>run BlockClosure>>on:do: [ :aStep |
[ [ aStep runIn: self ]
on: MozInstallerError
do: [ :anError | ^ aStep handleError: anError in: self ] ]
on: Error
do: [ :anError |
^ aStep
handleError: (MozInstallerUnhandledError new error: anError)
in: self ] ] in MozInstaller>>run OrderedCollection>>do: MozInstaller>>run MozLibraryPlatform class>>install MozLibraryPlatform class>>mozPostLoad [ :each | each method methodClass baseClass perform: each method selector ] in BaselineOfSparta>>postLoadSparta: OrderedCollection>>do: BaselineOfSparta>>postLoadSparta: [ :aLoader | self project configuration perform: selector with: aLoader ] in MetacelloMCVersionSpec(MetacelloSpec)>>doItBlock: BlockClosure>>valueWithPossibleArgs: [ block
valueWithPossibleArgs:
(Array with: aPostloadDirective loader with: aPostloadDirective spec) ] in MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadPostloadDirective: MetacelloPostLoadDirective(MetacelloPrePostLoadDirective)>>evaluateSupplyingAnswers: MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadPostloadDirective: MetacelloPostLoadDirective>>loadUsing:gofer: [ :directive | directive loadUsing: aLoaderDirective gofer: aGofer ] in MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: OrderedCollection>>do: MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: MetacelloLinearLoadDirective>>loadUsing:gofer: MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadWithPolicy: MetacelloLoaderPolicy>>load MetacelloFetchingMCSpecLoader>>doLoad [ fetchLoader doLoad ] in [ | fetchLoader |
fetchLoader := self
fetchRequiredFromArray: (self defaultPackageNamesToLoad: anArray).
MetacelloPlatform current
do: [ fetchLoader doLoad ]
displaying: 'Loading ' , displayString.
Transcript
cr;
show: '...finished ' , self versionNumber printString.
^ fetchLoader ] in MetacelloMCVersion>>doLoadRequiredFromArray: [ :bar |
bar value: 1.
aBlock value.
bar value: 2 ] in IceMetacelloPharoPlatform(MetacelloPharoCommonPlatform)>>do:displaying: BlockClosure>>cull: [ ^ block cull: self ] in [ self prepareForRunning.
CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run [ activeProcess psValueAt: index put: anObject.
aBlock value ] in CurrentJob(DynamicVariable)>>value:during: BlockClosure>>ensure: CurrentJob(DynamicVariable)>>value:during: CurrentJob class(DynamicVariable class)>>value:during: [ self prepareForRunning.
CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run BlockClosure>>ensure: Job>>run FDMorphicUIManager(UIManager)>>displayProgress:from:to:during: ByteString(String)>>displayProgressFrom:to:during: IceMetacelloPharoPlatform(MetacelloPharoCommonPlatform)>>do:displaying: [ | fetchLoader |
fetchLoader := self
fetchRequiredFromArray: (self defaultPackageNamesToLoad: anArray).
MetacelloPlatform current
do: [ fetchLoader doLoad ]
displaying: 'Loading ' , displayString.
Transcript
cr;
show: '...finished ' , self versionNumber printString.
^ fetchLoader ] in MetacelloMCVersion>>doLoadRequiredFromArray: BlockClosure>>ensure: MetacelloMCVersion>>doLoadRequiredFromArray: ByteSymbol(String)>>loadRequiredForMetacelloMCVersion: MetacelloMCVersion>>load: [ | version loadedSpec |
self setDefaultsAndValidateProjectSpec.
[ loadedSpec := (self lookupProjectSpecFor: self projectSpec) copy ]
on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
do:
[ :ex | ex handleOnDownGrade: onDownGradeBlock onUpgrade: onUpgradeBlock ].
version := loadedSpec versionForScriptEngine: self.
self
root:
(required isEmpty
ifTrue: [ version load ]
ifFalse: [ version load: required ]) loadDirective.
loadedSpec loads: required.
MetacelloProjectRegistration
registrationForProjectSpec: loadedSpec
ifAbsent: [ :new |
new
loadedInImage: true;
registerProject ]
ifPresent: [ :existing :new |
existing
copyOnWrite: [ :existingCopy |
existingCopy
loadedInImage: true;
merge: new ] ] ] in [ self
handleNotificationsForAction: [ | version loadedSpec |
self setDefaultsAndValidateProjectSpec.
[ loadedSpec := (self lookupProjectSpecFor: self projectSpec) copy ]
on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
do:
[ :ex | ex handleOnDownGrade: onDownGradeBlock onUpgrade: onUpgradeBlock ].
version := loadedSpec versionForScriptEngine: self.
self
root:
(required isEmpty
ifTrue: [ version load ]
ifFalse: [ version load: required ]) loadDirective.
loadedSpec loads: required.
MetacelloProjectRegistration
registrationForProjectSpec: loadedSpec
ifAbsent: [ :new |
new
loadedInImage: true;
registerProject ]
ifPresent: [ :existing :new |
existing
copyOnWrite: [ :existingCopy |
existingCopy
loadedInImage: true;
merge: new ] ] ] ] in MetacelloScriptEngine>>load:onProjectDownGrade:onProjectUpgrade: BlockClosure>>on:do: [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ] in [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ] in [ [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ]
on: MetacelloAllowLockedProjectChange
do:
[ :ex | "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ex handleResolutionFor: self ] ] in MetacelloScriptEngine>>handleNotificationsForAction: BlockClosure>>on:do: [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ] in [ [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ]
on: MetacelloAllowLockedProjectChange
do:
[ :ex | "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ex handleResolutionFor: self ] ] in MetacelloScriptEngine>>handleNotificationsForAction: BlockClosure>>on:do: [ [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ]
on: MetacelloAllowLockedProjectChange
do:
[ :ex | "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ex handleResolutionFor: self ] ] in MetacelloScriptEngine>>handleNotificationsForAction: BlockClosure>>on:do: MetacelloScriptEngine>>handleNotificationsForAction: [ self
handleNotificationsForAction: [ | version loadedSpec |
self setDefaultsAndValidateProjectSpec.
[ loadedSpec := (self lookupProjectSpecFor: self projectSpec) copy ]
on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
do:
[ :ex | ex handleOnDownGrade: onDownGradeBlock onUpgrade: onUpgradeBlock ].
version := loadedSpec versionForScriptEngine: self.
self
root:
(required isEmpty
ifTrue: [ version load ]
ifFalse: [ version load: required ]) loadDirective.
loadedSpec loads: required.
MetacelloProjectRegistration
registrationForProjectSpec: loadedSpec
ifAbsent: [ :new |
new
loadedInImage: true;
registerProject ]
ifPresent: [ :existing :new |
existing
copyOnWrite: [ :existingCopy |
existingCopy
loadedInImage: true;
merge: new ] ] ] ] in MetacelloScriptEngine>>load:onProjectDownGrade:onProjectUpgrade: BlockClosure>>ensure: MetacelloProjectRegistration class>>copyRegistryRestoreOnErrorWhile: MetacelloScriptEngine>>load:onProjectDownGrade:onProjectUpgrade: MetacelloScriptEngine>>load: [ :projectSpec |
| engine |
engine := MetacelloScriptEngine new
options: self options copy;
projectSpec: projectSpec;
yourself.
engine perform: actionArg key withArguments: actionArg value.
engine root ifNotNil: [ :root | self roots add: root ] ] in MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: [ :projectSpec |
projectSpec
ifNotNil: [ projectSpecBlock
value: (self applyArgsToProjectSpec: projectSpec copy) ] ] in MetacelloScriptApiExecutor>>executeString:do: Array(SequenceableCollection)>>do: MetacelloScriptApiExecutor>>executeString:do: ByteString(String)>>execute:against: MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: Metacello>>execute:args: Metacello>>load: BaselineOfBloc>>postLoadSparta: [ :aLoader | self project configuration perform: selector with: aLoader ] in MetacelloMCBaselineOfProjectSpec(MetacelloSpec)>>doItBlock: BlockClosure>>valueWithPossibleArgs: [ block
valueWithPossibleArgs:
(Array with: aPostloadDirective loader with: aPostloadDirective spec) ] in MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadPostloadDirective: MetacelloPostLoadDirective(MetacelloPrePostLoadDirective)>>evaluateSupplyingAnswers: MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadPostloadDirective: MetacelloPostLoadDirective>>loadUsing:gofer: [ :directive | directive loadUsing: aLoaderDirective gofer: aGofer ] in MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: OrderedCollection>>do: MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: MetacelloLinearLoadDirective>>loadUsing:gofer: [ :directive | directive loadUsing: aLoaderDirective gofer: aGofer ] in MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: OrderedCollection>>do: MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: MetacelloLinearLoadDirective>>loadUsing:gofer: [ :directive | directive loadUsing: aLoaderDirective gofer: aGofer ] in MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: OrderedCollection>>do: MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadLinearLoadDirective:gofer: MetacelloLinearLoadDirective>>loadUsing:gofer: MetacelloLinearLoadDirective(MetacelloVersionLoadDirective)>>loadWithPolicy: MetacelloLoaderPolicy>>load MetacelloFetchingMCSpecLoader>>doLoad [ fetchLoader doLoad ] in [ | fetchLoader |
fetchLoader := self
fetchRequiredFromArray: (self defaultPackageNamesToLoad: anArray).
MetacelloPlatform current
do: [ fetchLoader doLoad ]
displaying: 'Loading ' , displayString.
Transcript
cr;
show: '...finished ' , self versionNumber printString.
^ fetchLoader ] in MetacelloMCVersion>>doLoadRequiredFromArray: [ :bar |
bar value: 1.
aBlock value.
bar value: 2 ] in IceMetacelloPharoPlatform(MetacelloPharoCommonPlatform)>>do:displaying: BlockClosure>>cull: [ ^ block cull: self ] in [ self prepareForRunning.
CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run [ activeProcess psValueAt: index put: anObject.
aBlock value ] in CurrentJob(DynamicVariable)>>value:during: BlockClosure>>ensure: CurrentJob(DynamicVariable)>>value:during: CurrentJob class(DynamicVariable class)>>value:during: [ self prepareForRunning.
CurrentJob value: self during: [ ^ block cull: self ] ] in Job>>run BlockClosure>>ensure: Job>>run FDMorphicUIManager(UIManager)>>displayProgress:from:to:during: ByteString(String)>>displayProgressFrom:to:during: IceMetacelloPharoPlatform(MetacelloPharoCommonPlatform)>>do:displaying: [ | fetchLoader |
fetchLoader := self
fetchRequiredFromArray: (self defaultPackageNamesToLoad: anArray).
MetacelloPlatform current
do: [ fetchLoader doLoad ]
displaying: 'Loading ' , displayString.
Transcript
cr;
show: '...finished ' , self versionNumber printString.
^ fetchLoader ] in MetacelloMCVersion>>doLoadRequiredFromArray: BlockClosure>>ensure: MetacelloMCVersion>>doLoadRequiredFromArray: MetacelloMCVersion>>load [ | version loadedSpec |
self setDefaultsAndValidateProjectSpec.
[ loadedSpec := (self lookupProjectSpecFor: self projectSpec) copy ]
on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
do:
[ :ex | ex handleOnDownGrade: onDownGradeBlock onUpgrade: onUpgradeBlock ].
version := loadedSpec versionForScriptEngine: self.
self
root:
(required isEmpty
ifTrue: [ version load ]
ifFalse: [ version load: required ]) loadDirective.
loadedSpec loads: required.
MetacelloProjectRegistration
registrationForProjectSpec: loadedSpec
ifAbsent: [ :new |
new
loadedInImage: true;
registerProject ]
ifPresent: [ :existing :new |
existing
copyOnWrite: [ :existingCopy |
existingCopy
loadedInImage: true;
merge: new ] ] ] in [ self
handleNotificationsForAction: [ | version loadedSpec |
self setDefaultsAndValidateProjectSpec.
[ loadedSpec := (self lookupProjectSpecFor: self projectSpec) copy ]
on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
do:
[ :ex | ex handleOnDownGrade: onDownGradeBlock onUpgrade: onUpgradeBlock ].
version := loadedSpec versionForScriptEngine: self.
self
root:
(required isEmpty
ifTrue: [ version load ]
ifFalse: [ version load: required ]) loadDirective.
loadedSpec loads: required.
MetacelloProjectRegistration
registrationForProjectSpec: loadedSpec
ifAbsent: [ :new |
new
loadedInImage: true;
registerProject ]
ifPresent: [ :existing :new |
existing
copyOnWrite: [ :existingCopy |
existingCopy
loadedInImage: true;
merge: new ] ] ] ] in MetacelloScriptEngine>>load:onProjectDownGrade:onProjectUpgrade: BlockClosure>>on:do: [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ] in [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ] in [ [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ]
on: MetacelloAllowLockedProjectChange
do:
[ :ex | "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ex handleResolutionFor: self ] ] in MetacelloScriptEngine>>handleNotificationsForAction: BlockClosure>>on:do: [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ] in [ [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ]
on: MetacelloAllowLockedProjectChange
do:
[ :ex | "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ex handleResolutionFor: self ] ] in MetacelloScriptEngine>>handleNotificationsForAction: BlockClosure>>on:do: [ [ [ actionBlock
on:
MetacelloLookupProjectSpec , MetacelloLookupProjectSpecForLoad
, MetacelloProjectSpecLoadedNotification
, MetacelloScriptEnsureProjectLoadedForDevelopment
, MetacelloLookupBaselineSpecForEnsureLoad
do:
[ :ex | "lookup and registration handlers need to be innermost set of handlers ...they may throw option notifications" ex handleResolutionFor: self ] ]
on:
MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
, MetacelloAllowConflictingProjectUpgrade
do:
[ :ex | "option handlers need to be outermost set of handlers ... last line of defense before users are involved" ex handleResolutionFor: self ] ]
on: MetacelloAllowLockedProjectChange
do:
[ :ex | "MetacelloAllowLockedProjectChange need to be outermost handler ... since it is signaled from second line of handlers" ex handleResolutionFor: self ] ] in MetacelloScriptEngine>>handleNotificationsForAction: BlockClosure>>on:do: MetacelloScriptEngine>>handleNotificationsForAction: [ self
handleNotificationsForAction: [ | version loadedSpec |
self setDefaultsAndValidateProjectSpec.
[ loadedSpec := (self lookupProjectSpecFor: self projectSpec) copy ]
on: MetacelloAllowProjectDowngrade , MetacelloAllowProjectUpgrade
do:
[ :ex | ex handleOnDownGrade: onDownGradeBlock onUpgrade: onUpgradeBlock ].
version := loadedSpec versionForScriptEngine: self.
self
root:
(required isEmpty
ifTrue: [ version load ]
ifFalse: [ version load: required ]) loadDirective.
loadedSpec loads: required.
MetacelloProjectRegistration
registrationForProjectSpec: loadedSpec
ifAbsent: [ :new |
new
loadedInImage: true;
registerProject ]
ifPresent: [ :existing :new |
existing
copyOnWrite: [ :existingCopy |
existingCopy
loadedInImage: true;
merge: new ] ] ] ] in MetacelloScriptEngine>>load:onProjectDownGrade:onProjectUpgrade: BlockClosure>>ensure: MetacelloProjectRegistration class>>copyRegistryRestoreOnErrorWhile: MetacelloScriptEngine>>load:onProjectDownGrade:onProjectUpgrade: MetacelloScriptEngine>>load: [ :projectSpec |
| engine |
engine := MetacelloScriptEngine new
options: self options copy;
projectSpec: projectSpec;
yourself.
engine perform: actionArg key withArguments: actionArg value.
engine root ifNotNil: [ :root | self roots add: root ] ] in MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: [ :projectSpec |
projectSpec
ifNotNil: [ projectSpecBlock
value: (self applyArgsToProjectSpec: projectSpec copy) ] ] in MetacelloScriptApiExecutor>>executeString:do: Array(SequenceableCollection)>>do: MetacelloScriptApiExecutor>>executeString:do: ByteString(String)>>execute:against: MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: Metacello>>execute:args: Metacello>>load UndefinedObject>>DoIt OpalCompiler>>evaluate RubSmalltalkEditor>>evaluate:andDo: RubSmalltalkEditor>>highlightEvaluateAndDo: [ textMorph textArea editor highlightEvaluateAndDo: ann action.
textMorph shoutStyler style: textMorph text ] in [ textMorph textArea
handleEdit: [ textMorph textArea editor highlightEvaluateAndDo: ann action.
textMorph shoutStyler style: textMorph text ] ] in GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>>actOnHighlightAndEvaluate: RubEditingArea(RubAbstractTextArea)>>handleEdit: [ textMorph textArea
handleEdit: [ textMorph textArea editor highlightEvaluateAndDo: ann action.
textMorph shoutStyler style: textMorph text ] ] in GLMMorphicPharoScriptRenderer(GLMMorphicPharoCodeRenderer)>>actOnHighlightAndEvaluate: WorldState>>runStepMethodsIn: WorldMorph>>runStepMethods WorldState>>doOneCycleNowFor: WorldState>>doOneCycleFor: WorldMorph>>doOneCycle WorldMorph class>>doOneCycle [ [ WorldMorph doOneCycle.
Processor yield.
false ] whileFalse: [ ] ] in MorphicUIManager>>spawnNewProcess [ self value.
Processor terminateActive ] in BlockClosure>>newProcess)

404 not found when downloading libSkia library

Probably the SkiaLibrary>>install method should be updated to reflect changes in the resources URL.
Trying to install in a clean Pharo 8 under Windows:

Metacello new
	baseline: 'SpartaSkia';
	repository: 'github://feenkcom/sparta/src';
	load.

and checking in the Transcript with:

SkiaLibrary uniqueInstance detectLibrary: 'libSkia.dll'.
SkiaLibrary install.

Reports:


Downloading https://dl.feenk.com/Skia/windows/development/i386/libSkia.dll to File @ C:\.....\Sparta\pharo-local\gtoolkit-installer\libSkia_i386.dll ...

Progress 
2020-08-25 15:50:50 013 Connection Established dl.feenk.com:443 54.93.131.205 760ms 
2020-08-25 15:50:50 014 Request Written a ZnRequest(GET /Skia/windows/development/i386/libSkia.dll) 2ms
2020-08-25 15:50:50 015 Response Read a ZnResponse(404 Not Found text/html 178B) 239ms
2020-08-25 15:50:50 016 GET /Skia/windows/development/i386/libSkia.dll 404 178B 241ms Done!


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.