Skip to content

Commit dfc9aa0

Browse files
committed
change OMShellGUI from corba to direct interface
1 parent 8d1b078 commit dfc9aa0

14 files changed

+253
-624
lines changed

Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ Makefile: Makefile.in config.status
3333
./config.status
3434
config.status: configure
3535
./config.status -recheck
36-
configure: configure.ac common/m4/corba.m4 common/m4/omhome.m4 common/m4/qmake.m4
36+
configure: configure.ac common/m4/omhome.m4 common/m4/qmake.m4
3737
autoconf

OMShell/OMShellGUI/Makefile.omdev.mingw

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,9 @@ Makefile: OMShellGUI.pro
1818

1919
clean: Makefile
2020
test ! -f Makefile || $(MAKE) -f Makefile clean
21-
rm -rf ../bin/$(NAME)$(EXE) omc_communication.* Makefile Makefile.Debug Makefile.Release object_script.*
21+
rm -rf ../bin/$(NAME)$(EXE) Makefile Makefile.Debug Makefile.Release object_script.*
2222

23-
omc_communication.cc: $(builddir_share)/omc/omc_communication.idl
24-
ifeq (MINGW32,$(findstring MINGW32,$(shell uname)))
25-
$(OMDEV)/lib/omniORB-4.2.0-mingw32/bin/x86_win32/omniidl -T -bcxx -Wbh=.h -Wbs=.cc -p../../lib/python -Wbdebug $<
26-
else
27-
$(OMDEV)/lib/omniORB-4.2.0-mingw64/bin/x86_win32/omniidl -T -bcxx -Wbh=.h -Wbs=.cc -p../../lib/python -Wbdebug $<
28-
endif
29-
omc_communication.h: omc_communication.cc
30-
31-
$(NAME): omc_communication.cc omc_communication.h Makefile
23+
$(NAME): Makefile
3224
$(MAKE) -f Makefile
3325

3426
build: $(NAME)
@@ -37,5 +29,3 @@ build: $(NAME)
3729
cp -p commands.xml $(builddir_share)/omshell/
3830
cp -p OMShell_*.qm $(builddir_share)/omshell/nls/
3931
cp -puf ../../common/pre-commit.sh $(shell git rev-parse --git-dir)/hooks/pre-commit
40-
41-

OMShell/OMShellGUI/Makefile.unix.in

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ Makefile: OMShell.config
1111
$(QMAKE)
1212

1313
clean: Makefile
14-
rm -rf ../bin/$(NAME) ../bin/$(NAME)$(APP) omc_communication.* Makefile
14+
rm -rf ../bin/$(NAME) ../bin/$(NAME)$(APP) Makefile
1515

16-
omc_communication.cc omc_communication.h: @OPENMODELICAHOME@/share/omc/omc_communication.idl
17-
@IDLCMD@ $<
18-
19-
$(NAME): Makefile OMShell.config omc_communication.cc
16+
$(NAME): Makefile OMShell.config
2017
$(MAKE) -f Makefile
2118

2219
build: $(NAME)

OMShell/OMShellGUI/OMShell.config.in

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
QMAKE_CC = @CC@
22
QMAKE_CXX = @CXX@
33
QMAKE_LINK = @CXX@
4-
CORBALIBS = @CORBALIBS@
5-
CORBAINC = @CORBA_QMAKE_INCLUDES@
6-
USE_CORBA = @QT_USE_CORBA@
4+
OMCLIBS = -L@OMBUILDDIR@/lib/@host_short@/omc -Wl,-rpath,@loader_path/../../../../lib/@host_short@/omc,-rpath,@loader_path/../../../../lib/,-rpath,@OMBUILDDIR@/lib/@host_short@/omc,-rpath,@OMBUILDDIR@/lib/ -lOpenModelicaCompiler -lOpenModelicaRuntimeC -lfmilib_shared -lModelicaExternalC -lomcgc -lomantlr3
75
INCLUDEPATH += $$system(echo @CFLAGS@ | sed "s/\ //g" | grep ^-I | sed s/^-I//)
8-
QMAKE_CFLAGS = @CFLAGS@ @CPPFLAGS@
9-
QMAKE_CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@
6+
QMAKE_CFLAGS = -g @CFLAGS@ @CPPFLAGS@
7+
QMAKE_CXXFLAGS = -g @CXXFLAGS@ @CPPFLAGS@
108
QMAKE_LFLAGS += @LDFLAGS@

OMShell/OMShellGUI/OMShellGUI.pro

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@ TARGET = OMShell
1111
TEMPLATE = app
1212

1313
SOURCES += commandcompletion.cpp \
14-
omc_communication.cc \
15-
omc_communicator.cpp \
1614
omcinteractiveenvironment.cpp \
1715
oms.cpp \
1816
main.cpp
1917

2018
HEADERS += commandcompletion.h \
21-
omc_communication.h \
22-
omc_communicator.h \
2319
omcinteractiveenvironment.h \
2420
oms.h
2521

@@ -32,15 +28,11 @@ win32 {
3228
ISMINGW32 = $$find(UNAME, MINGW32)
3329
message(uname: $$UNAME)
3430
count( ISMINGW32, 1 ) {
35-
CORBAINC = $$(OMDEV)/lib/omniORB-4.2.0-mingw32/include
36-
CORBALIBS = -L$$(OMDEV)/lib/omniORB-4.2.0-mingw32/lib/x86_win32 -lomniORB420_rt -lomnithread40_rt
3731
DEFINES += __x86__ \
3832
__NT__ \
3933
__OSVERSION__=4 \
4034
__WIN32__
4135
} else {
42-
CORBAINC = $$(OMDEV)/lib/omniORB-4.2.0-mingw64/include
43-
CORBALIBS = -L$$(OMDEV)/lib/omniORB-4.2.0-mingw64/lib/x86_win32 -lomniORB420_rt -lomnithread40_rt
4436
DEFINES += __x86__ \
4537
__x86_64__ \
4638
__NT__ \
@@ -54,8 +46,8 @@ win32 {
5446
}
5547
#---------End OMNIorb
5648

57-
INCLUDEPATH += $${CORBAINC}
58-
LIBS += $${CORBALIBS}
49+
LIBS += $${OMCLIBS}
50+
INCLUDEPATH += ../../../build/include/omc/c
5951

6052
CONFIG += warn_off
6153

OMShell/OMShellGUI/inputcelldelegate.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ namespace IAEX
5555
public:
5656
virtual QString getResult() = 0;
5757
virtual void evalExpression(QString expr) = 0;
58-
virtual void closeConnection() = 0; // Added 2006-02-02 AF
59-
virtual void reconnect() = 0; // Added 2006-02-09 AF
60-
virtual bool startDelegate() = 0; // Added 2006-02-09 AF
6158
};
6259

6360
}

OMShell/OMShellGUI/main.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,9 @@ int main(int argc, char *argv[])
9090
{
9191
QApplication app(argc, argv);
9292

93-
OMS::startServer();
94-
95-
IAEX::OmcInteractiveEnvironment env;
96-
env.evalExpression("getInstallationDirectoryPath()");
97-
QString dir = unparse(env.getResult()) + "/share/omshell/nls";
93+
IAEX::OmcInteractiveEnvironment *env = IAEX::OmcInteractiveEnvironment::getInstance();
94+
env->evalExpression("getInstallationDirectoryPath()");
95+
QString dir = unparse(env->getResult()) + "/share/omshell/nls";
9896
QString locale = QString("OMShell_") + QLocale::system().name();
9997

10098
QTranslator translator;

OMShell/OMShellGUI/omc_communicator.cpp

Lines changed: 0 additions & 229 deletions
This file was deleted.

0 commit comments

Comments
 (0)