3 |
# $Id$ |
# $Id$ |
4 |
# |
# |
5 |
# Authors: Rich Kilmer <rich@infoether.com> |
# Authors: Rich Kilmer <rich@infoether.com> |
6 |
# Contributors: |
# Contributors: |
7 |
|
# - Laurent Julliard <laurent AT moldus DOT org) |
8 |
# |
# |
9 |
# This file is part of the FreeRIDE project |
# This file is part of the FreeRIDE project |
10 |
# |
# |
15 |
# Copyright (c) 2001 Rich Kilmer. All rights reserved. |
# Copyright (c) 2001 Rich Kilmer. All rights reserved. |
16 |
# |
# |
17 |
|
|
18 |
|
require 'rbconfig' |
19 |
|
|
20 |
module FreeBASE |
module FreeBASE |
21 |
|
|
22 |
## |
## |
24 |
# the installed plugins. |
# the installed plugins. |
25 |
# |
# |
26 |
class Core |
class Core |
27 |
|
|
28 |
|
include Config |
29 |
|
|
30 |
## |
## |
31 |
# Starts the Core service. This method blocks until shutdown. |
# Starts the Core service. This method blocks until shutdown. |
32 |
# |
# |
53 |
load_setup |
load_setup |
54 |
@bus["/log/info"] << "--- #{@properties['config/product_name']} Started on #{Time.now.to_s}" |
@bus["/log/info"] << "--- #{@properties['config/product_name']} Started on #{Time.now.to_s}" |
55 |
|
|
56 |
# --- BEGIN HACK (part 1) --- |
|
57 |
# the following code is a temporary workaround for a problem using FXRuby in |
if (Config::CONFIG['os_host'] == 'mswin32') |
58 |
# an mswin build of Ruby. This should be removed once that problem has been fixed. |
# --- BEGIN HACK (part 1) --- |
59 |
|
# the following code is a temporary workaround for a problem using FXRuby in |
60 |
# default to a do-nothing message pump |
# an mswin build of Ruby. This should be removed once that problem has been fixed. |
61 |
@bus["/system/ui/messagepump"].set_proc do sleep(0.5) end |
# also see plugins/System_GuiRenderFox/foxhacks.rb |
62 |
# --- END HACK --- |
|
63 |
|
# default to a do-nothing message pump |
64 |
|
@bus["/system/ui/messagepump"].set_proc do sleep(0.5) end |
65 |
|
# --- END HACK (part 1) --- |
66 |
|
end |
67 |
|
|
68 |
@bus["/system/state/all_plugins_loaded"].data = false; |
@bus["/system/state/all_plugins_loaded"].data = false; |
69 |
load_plugins |
load_plugins |
70 |
@bus["/system/state/all_plugins_loaded"].data = true; |
@bus["/system/state/all_plugins_loaded"].data = true; |
71 |
|
|
72 |
# --- BEGIN HACK (part 2) --- |
if (Config::CONFIG['os_host'] == 'mswin32') |
73 |
while true do |
# --- BEGIN HACK (part 2) --- |
74 |
@bus["/system/ui/messagepump"].call() |
while true do |
75 |
sleep(0.1) |
@bus["/system/ui/messagepump"].call() |
76 |
|
sleep(0.1) |
77 |
|
end |
78 |
|
# --- END HACK (part 2) --- |
79 |
|
else |
80 |
|
tui = Thread.new { |
81 |
|
@bus["/system/ui/messagepump"].call() |
82 |
|
} |
83 |
|
tui.join |
84 |
end |
end |
85 |
# --- END HACK --- |
|
|
|
|
86 |
end |
end |
87 |
|
|
88 |
## |
## |