Skip to content

Commit

Permalink
Add 'OMShell/' from commit 'cf210ceb0fe1d26744b0d62eaee0daa39c9169f5'
Browse files Browse the repository at this point in the history
git-subtree-dir: OMShell
git-subtree-mainline: 0824d63
git-subtree-split: cf210ce
  • Loading branch information
sjoelund committed Apr 1, 2019
2 parents 0824d63 + cf210ce commit a900aea
Show file tree
Hide file tree
Showing 46 changed files with 5,419 additions and 0 deletions.
11 changes: 11 additions & 0 deletions OMShell/.gitattributes
@@ -0,0 +1,11 @@
*.c text eol=lf
*.cpp text eol=lf
*.h text eol=lf
*.m4 text eol=lf
.gitattributes text eol=lf
.gitignore text eol=lf
*.md text eol=lf
LICENSE text eol=lf
configure.ac text eol=lf
Makefile* text eol=lf
*.pro text eol=lf
30 changes: 30 additions & 0 deletions OMShell/.gitignore
@@ -0,0 +1,30 @@
*.o
/autom4te.cache/
/build
/config.guess
/config.log
/config.status
/config.sub
/configure
/install-sh
/Makefile
/mosh/src/Makefile
/mosh/src/omc_communication.cc
/mosh/src/omc_communication.h
/mosh/src/omc_config.h
/mosh/src/OMShell-terminal
/OMShell/bin
/OMShell/generatedfiles
/OMShell/OMShellGUI/.qmake.stash
/OMShell/OMShellGUI/*.qm
/OMShell/OMShellGUI/Makefile
/OMShell/OMShellGUI/Makefile.Debug
/OMShell/OMShellGUI/Makefile.Release
/OMShell/OMShellGUI/Makefile.unix
/OMShell/OMShellGUI/object_script.*
/OMShell/OMShellGUI/omc_communication.cc
/OMShell/OMShellGUI/omc_communication.h
/OMShell/OMShellGUI/omc_config.h
/OMShell/OMShellGUI/OMShell.config
/OMShell/OMShellGUI/OMShellGUI.pro.*
/qmake.sh
3 changes: 3 additions & 0 deletions OMShell/.gitmodules
@@ -0,0 +1,3 @@
[submodule "common"]
path = common
url = ../OpenModelica-common.git
37 changes: 37 additions & 0 deletions OMShell/Makefile.in
@@ -0,0 +1,37 @@
all: omshell @OMSHELL_TERMINAL@

prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
CMAKE=CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" cmake
CMAKE_TARGET = "Unix Makefiles"

ifeq (@APP@,)
install:
mkdir -p ${DESTDIR}/@bindir@
cp -a build/bin/OMShell@EXE@ ${DESTDIR}/@bindir@
else
install:
mkdir -p ${DESTDIR}/Applications/
cp -a build/Applications/OMShell@APP@ ${DESTDIR}/Applications/
endif
mkdir -p ${DESTDIR}/lib/@host_short@/omc/ ${DESTDIR}/share/omshell/nls/
cp -a build/lib/@host_short@/omc/* ${DESTDIR}/lib/@host_short@/omc/

mkbuilddirs:
mkdir -p @OMBUILDDIR@/bin @OMBUILDDIR@/lib/@host_short@/omc
omshell: mkbuilddirs
$(MAKE) -C OMShell/OMShellGUI -f Makefile.unix
mosh: mkbuilddirs
$(MAKE) -C mosh/src
clean:
$(MAKE) -C OMShell/OMShellGUI -f Makefile.unix clean
$(MAKE) -C mosh/src clean
distclean: clean
rm -f config.status configure Makefile OMShell/OMShellGUI/Makefile.unix
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status -recheck
configure: configure.ac common/m4/omhome.m4 common/m4/qmake.m4
autoconf
31 changes: 31 additions & 0 deletions OMShell/OMShell/OMShellGUI/Makefile.omdev.mingw
@@ -0,0 +1,31 @@
ifeq ($(OMBUILDDIR),)
$(error OMBUILDDIR variable is not set.)
endif

builddir_bin=$(OMBUILDDIR)/bin
builddir_share=$(OMBUILDDIR)/share/

QMAKE=qmake
EXE=.exe
NAME=OMShell

.PHONY: always $(NAME)

all: build

Makefile: OMShellGUI.pro
$(QMAKE) "CONFIG+=release"

clean: Makefile
test ! -f Makefile || $(MAKE) -f Makefile clean
rm -rf ../bin/$(NAME)$(EXE) Makefile Makefile.Debug Makefile.Release object_script.*

$(NAME): Makefile
$(MAKE) -f Makefile

build: $(NAME)
mkdir -p $(builddir_share)/omshell/nls/
cp -p ../bin/$(NAME)$(EXE) $(builddir_bin)
cp -p commands.xml $(builddir_share)/omshell/
cp -p OMShell_*.qm $(builddir_share)/omshell/nls/
cp -puf ../../common/pre-commit.sh $(shell git rev-parse --git-dir)/hooks/pre-commit
28 changes: 28 additions & 0 deletions OMShell/OMShell/OMShellGUI/Makefile.unix.in
@@ -0,0 +1,28 @@
QMAKE=@QMAKE@
APP=@APP@
EXE=@EXE@
NAME=OMShell

.PHONY: always $(NAME)

all: build

Makefile: OMShell.config
$(QMAKE)

clean: Makefile
rm -rf ../bin/$(NAME) ../bin/$(NAME)$(APP) Makefile

$(NAME): Makefile OMShell.config
$(MAKE) -f Makefile

build: $(NAME)
mkdir -p @OMBUILDDIR@/share/omshell/nls/
if [ "$(APP)" = ".app" ]; then mkdir -p @OMBUILDDIR@/Applications/ ; cp -rp ../bin/$(NAME)$(APP) @OMBUILDDIR@/Applications/ ; else cp -p ../bin/$(NAME) @OMBUILDDIR@/bin; fi
cp -p commands.xml @OMBUILDDIR@/share/omshell/
cp -p OMShell_*.qm @OMBUILDDIR@/share/omshell/nls/

Makefile.unix: Makefile.unix.in
cd @top_builddir@ && ./config.status
OMShell.config: OMShell.config.in
cd @top_builddir@ && ./config.status
14 changes: 14 additions & 0 deletions OMShell/OMShell/OMShellGUI/OMShell.config.in
@@ -0,0 +1,14 @@
QMAKE_CC = @CC@
QMAKE_CXX = @CXX@
QMAKE_LINK = @CXX@
OMCLIBS = -L@OPENMODELICAHOME@/lib/@host_short@/omc @RPATH_QMAKE@ -lOpenModelicaCompiler -lOpenModelicaRuntimeC -lfmilib_shared -lModelicaExternalC -lomcgc -lomantlr3
OMCINC = @OMBUILDDIR@/include/omc/c
INCLUDEPATH += $$system(echo @CFLAGS@ | sed "s/\ //g" | grep ^-I | sed s/^-I//)
QMAKE_CFLAGS = -g @CFLAGS@ @CPPFLAGS@
QMAKE_CXXFLAGS = -g @CXXFLAGS@ @CPPFLAGS@
QMAKE_LFLAGS += @LDFLAGS@

# 64MB (0x4000000)
mac {
QMAKE_LFLAGS += -Wl,-stack_size,4000000
}
69 changes: 69 additions & 0 deletions OMShell/OMShell/OMShellGUI/OMShellGUI.pro
@@ -0,0 +1,69 @@
QT += core gui xml
greaterThan(QT_MAJOR_VERSION, 4) {
QT *= printsupport widgets webkitwidgets
}

TRANSLATIONS = \
OMShell_de.ts \
OMShell_sv.ts

TARGET = OMShell
TEMPLATE = app

SOURCES += commandcompletion.cpp \
omcinteractiveenvironment.cpp \
oms.cpp \
main.cpp

HEADERS += commandcompletion.h \
omcinteractiveenvironment.h \
oms.h

win32 {
# define used for OpenModelica C-API
DEFINES += IMPORT_INTO=1
# win32 vs. win64
contains(QT_ARCH, i386) { # 32-bit
QMAKE_LFLAGS += -Wl,--stack,16777216,--enable-auto-import,--large-address-aware
} else { # 64-bit
QMAKE_LFLAGS += -Wl,--stack,33554432,--enable-auto-import
}
OMCLIBS = -L$$(OMBUILDDIR)/lib/omc -lOpenModelicaCompiler -lOpenModelicaRuntimeC -lfmilib -lModelicaExternalC -lomcgc -lpthread
OMCINC = $$(OMBUILDDIR)/include/omc/c
} else {
include(OMShell.config)
}

LIBS += $${OMCLIBS}
INCLUDEPATH += $${OMCINC}

CONFIG += warn_off

RESOURCES += oms.qrc

RC_FILE = rc_omshell.rc

DESTDIR = ../bin

UI_DIR = ../generatedfiles/ui

MOC_DIR = ../generatedfiles/moc

RCC_DIR = ../generatedfiles/rcc

ICON = Resources/omshell.icns

!isEmpty(TRANSLATIONS) {
isEmpty(QMAKE_LRELEASE) {
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
}

TSQM.name = lrelease ${QMAKE_FILE_IN}
TSQM.input = TRANSLATIONS
TSQM.output = ${QMAKE_FILE_BASE}.qm
TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
TSQM.CONFIG = no_link
QMAKE_EXTRA_COMPILERS += TSQM
PRE_TARGETDEPS += compiler_TSQM_make_all
} else:message(No translation files in project)
166 changes: 166 additions & 0 deletions OMShell/OMShell/OMShellGUI/OMShell_de.ts
@@ -0,0 +1,166 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="de_DE">
<context>
<name>OMS</name>
<message>
<location filename="oms.cpp" line="268"/>
<source>OMShell - OpenModelica Shell</source>
<translation>OMShell - OpenModelica Shell</translation>
</message>
<message>
<location filename="oms.cpp" line="369"/>
<source>Open mo-file</source>
<oldsource>Load mo-file</oldsource>
<translation>Öffne .mo Datei</translation>
</message>
<message>
<location filename="oms.cpp" line="373"/>
<source>Load &amp;Modelica Library</source>
<translation>Modelica Bibliothek &amp;laden</translation>
</message>
<message>
<location filename="oms.cpp" line="367"/>
<source>&amp;Open</source>
<oldsource>&amp;Load</oldsource>
<translation>&amp;Öffnen</translation>
</message>
<message>
<location filename="oms.cpp" line="375"/>
<source>Load the Modelica Standard Library</source>
<translation>Lädt die Modelica Standardbibliothek</translation>
</message>
<message>
<location filename="oms.cpp" line="379"/>
<source>&amp;Exit</source>
<translation>&amp;Beenden</translation>
</message>
<message>
<location filename="oms.cpp" line="381"/>
<source>Quit the application</source>
<translation>Programm beenden</translation>
</message>
<message>
<location filename="oms.cpp" line="385"/>
<source>Cu&amp;t</source>
<translation>Aus&amp;schneiden</translation>
</message>
<message>
<location filename="oms.cpp" line="391"/>
<source>&amp;Copy</source>
<translation>&amp;Kopieren</translation>
</message>
<message>
<location filename="oms.cpp" line="397"/>
<source>&amp;Paste</source>
<translation>&amp;Einfügen</translation>
</message>
<message>
<location filename="oms.cpp" line="404"/>
<source>&amp;FontSize</source>
<translation>Schrift&amp;größe</translation>
</message>
<message>
<location filename="oms.cpp" line="409"/>
<source>&amp;About OMShell</source>
<translation>Über &amp;OMShell</translation>
</message>
<message>
<location filename="oms.cpp" line="415"/>
<source>About &amp;Qt</source>
<translation>Über &amp;Qt</translation>
</message>
<message>
<location filename="oms.cpp" line="387"/>
<source>Cut the selection</source>
<translation>Auswahl ausschneiden</translation>
</message>
<message>
<location filename="oms.cpp" line="275"/>
<source>
To get help on using OMShell and OpenModelica, type &quot;help()&quot; and press enter.
</source>
<translation>
Um Hilfe zur Benutzung von OMShell und OpenModelica zu bekommen, tippen Sie &quot;help()&quot; und dann Enter.</translation>
</message>
<message>
<location filename="oms.cpp" line="393"/>
<source>Copy the selection</source>
<translation>Kopiert die Auswahl</translation>
</message>
<message>
<location filename="oms.cpp" line="399"/>
<source>Insert from clipboard</source>
<translation>Einfügen aus Zwischenablage</translation>
</message>
<message>
<location filename="oms.cpp" line="410"/>
<source>About this application</source>
<translation>Über dieses Programm</translation>
</message>
<message>
<location filename="oms.cpp" line="416"/>
<source>About Qt</source>
<translation>Über Qt</translation>
</message>
<message>
<location filename="oms.cpp" line="420"/>
<source>Cl&amp;ear</source>
<translation>&amp;Löschen</translation>
</message>
<message>
<location filename="oms.cpp" line="422"/>
<source>Clear the input window</source>
<translation>Ausgabe löschen</translation>
</message>
<message>
<location filename="oms.cpp" line="430"/>
<source>&amp;File</source>
<translation>&amp;Datei</translation>
</message>
<message>
<location filename="oms.cpp" line="431"/>
<source>&amp;Edit</source>
<translation>&amp;Bearbeiten</translation>
</message>
<message>
<location filename="oms.cpp" line="432"/>
<source>&amp;Help</source>
<translation>&amp;Hilfe</translation>
</message>
<message>
<location filename="oms.cpp" line="589"/>
<source>Communication Error with OMC</source>
<translation>Kommunikationsfehler mit OMC</translation>
</message>
<message>
<location filename="oms.cpp" line="611"/>
<source>Communication Error</source>
<translation>Kommunikationsfehler</translation>
</message>
<message>
<location filename="oms.cpp" line="612"/>
<source>&lt;B&gt;Unable to communication correctlly with OMC. OMShell will therefore close.&lt;/B&gt;</source>
<translation>&lt;B&gt;Kann nicht mit OMC kommunizieren. OMShell wird deshalb beendet.&lt;/B&gt;</translation>
</message>
<message>
<location filename="oms.cpp" line="816"/>
<source>Close OMC</source>
<translation>OMC schließen</translation>
</message>
<message>
<location filename="oms.cpp" line="818"/>
<source>OK to quit running OpenModelica Compiler process at exit?
(Answer No if other OMShell/OMNotebook/Graphic editor is still running)</source>
<translation>OK zum Beenden des OpenModelica Compiler Prozesses beim Verlassen.
(Wählen Sie Nein, wenn noch andere OMShell/OMNotebook Instanzen laufen.)</translation>
</message>
<message>
<location filename="oms.cpp" line="865"/>
<source>[ERROR] Selected fontsize not between 8 and 120.
</source>
<translation>[FEHLER] Ausgewählte Schriftgröße nicht zwischen 8 und 120.
</translation>
</message>
</context>
</TS>

0 comments on commit a900aea

Please sign in to comment.