StartupLoader default executeAtomicItems: {
StartupAction
name: 'EpiceaStudy'
code: [
| button total shouldLoad |
"If it isn't already installed and if it's Pharo 3"
((Smalltalk globals includesKey: #EpMonitor) not and: [ Smalltalk version = 'Pharo3.0' ]) ifTrue: [
"Give a change to cancel load..."
total := 3.
shouldLoad := true.
button := ButtonModel new.
(button
label: 'Cancel';
extent: 500@100;
action: [
shouldLoad := false.
button window close ];
openWithSpec)
centered.
0 to: total do: [ :n |
[ button window title: 'Epicea: Load starting in ', ((total - n) asString, ' seconds') ]
valueAfterWaiting: n seconds ].
[
button window isClosed ifFalse: [ button window close ].
"Finally, start load."
shouldLoad ifTrue: [
| loadingTime |
self inform: 'Epicea: Starting load'.
loadingTime := [
[ Gofer it
smalltalkhubUser: 'MartinDias'
project: 'Epicea';
configuration;
loadStable ] asJob title: 'Epicea: Loading'; run.
] timeToRun.
self inform: 'Epicea: Load finished (', loadingTime asSeconds asString, ' seconds)'.
self inform: 'Epicea: Recording'. ]
] valueAfterWaiting: total seconds
] ]
runOnce: true.
}.
THIS SOFTWARE SERVICE 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
AUTHOR OR SERVICE PROVIDER 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 SERVICE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE SERVICE.