Skip to content

Commit

Permalink
Merge pull request #22 from zweidenker/clean-startup
Browse files Browse the repository at this point in the history
Trying to cleanup stuff from startup
  • Loading branch information
noha authored Jan 17, 2020
2 parents caf5f66 + f0be253 commit 5bde56f
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ COPY source /opt/source
ARG CACHEBUST=1
RUN \
/opt/pharo /opt/SnapDump.image eval --save "Metacello new repository: 'filetree:///opt/source'; baseline: #SnapDump; load: #('server')" && \
/opt/pharo /opt/SnapDump.image eval --save "LGitLibrary class compile: 'startUp: isImageStarting'" && \
rm -rf /opt/pharo-local /opt/source
/opt/pharo /opt/SnapDump.image eval --save "SnapDump prepareForDeployment" && \
rm -rf /opt/pharo-local

RUN \
apt-get -y remove --purge unzip libgit2-26 && \
Expand Down
61 changes: 61 additions & 0 deletions source/SnapDump-Server/SnapDeployment.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
Class {
#name : #SnapDeployment,
#superclass : #Object,
#category : #'SnapDump-Server'
}

{ #category : #decoration }
SnapDeployment class >> closeMorphs [
World submorphs do: #delete

]

{ #category : #decoration }
SnapDeployment class >> disableChangesLog [
ChangesLog reset.
self
removeFromStartup: SmalltalkImage
]

{ #category : #decoration }
SnapDeployment class >> disableEpicea [
EpMonitor current disable.
self
removeFromStartup: EpLostChangesDetector;
removeFromStartup: OmDeferrer;
removeFromStartup: OmSessionStore

]

{ #category : #decoration }
SnapDeployment class >> disableFreeType [
FreeTypeSystemSettings loadFt2Library: false.
self
removeFromStartup: FreeTypeCache;
removeFromStartup: FreeTypeSettings;
removeFromStartup: LogicalFont;
removeFromStartup: StrikeFont


]

{ #category : #decoration }
SnapDeployment class >> disableIceberg [
self removeFromStartup: LGitLibrary

]

{ #category : #decoration }
SnapDeployment class >> prepare [
self closeMorphs.
self disableEpicea.
self disableFreeType.
self disableIceberg

]

{ #category : #decoration }
SnapDeployment class >> removeFromStartup: aClass [
SessionManager default unregisterClassNamed: aClass name

]
6 changes: 6 additions & 0 deletions source/SnapDump-Server/SnapDump.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Extension { #name : #SnapDump }

{ #category : #'*SnapDump-Server' }
SnapDump class >> prepareForDeployment [
^ SnapDeployment prepare
]

0 comments on commit 5bde56f

Please sign in to comment.