Skip to content

Commit

Permalink
Renamed MasterSimulator to mastersim and MasterSimulatorUI to masters…
Browse files Browse the repository at this point in the history
…im-gui (closes #47)
  • Loading branch information
ghorwin committed Jan 7, 2025
1 parent 0840232 commit cea26cf
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 44 deletions.
4 changes: 2 additions & 2 deletions MasterSim/src/MSIM_ArgParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace MASTER_SIM {

ArgParser::ArgParser() : m_verbosityLevel(1) {
m_appname = "MasterSimulator";
m_appname = "mastersim";
m_syntaxArguments = "[flags] [options] <project file>";
// configure man page output
m_manManualName = "MasterSim Manual";
Expand All @@ -17,7 +17,7 @@ ArgParser::ArgParser() : m_verbosityLevel(1) {
m_manShortDescription = "FMI Co-Simulation Master";

// Note: mind the line breaks that end format commands!
m_manLongDescription = ".B MasterSimulator\n"
m_manLongDescription = ".B mastersim\n"
"simulates the co-simulation scenario defined in the msim "
"project file. By default all temporary and output files are created in a subdirectory "
"with the same name as the project. You can change that with the\n"
Expand Down
10 changes: 5 additions & 5 deletions MasterSimulator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ target_link_libraries( ${PROJECT_NAME}
${LINK_Z_LIBS}
)

# we want the binary to be named 'mastersim'
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "mastersim")

if (UNIX AND NOT APPLE)

Expand All @@ -40,12 +42,10 @@ if (UNIX AND NOT APPLE)

# MasterSimulator -> /usr/bin/mastersim
install(TARGETS ${PROJECT_NAME} RUNTIME
DESTINATION bin
RENAME mastersim)
DESTINATION bin)

# Man-page -> /usr/share/man/man1/mastersim.1.gz
install(FILES ${PROJECT_SOURCE_DIR}/doc/${PROJECT_NAME}.1
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
RENAME mastersim.1)
install(FILES ${PROJECT_SOURCE_DIR}/doc/mastersim.1
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)

endif (UNIX AND NOT APPLE)
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.TH "MASTERSIMULATOR" 1 "December 31st, 2024" "0.9.7" "MasterSim Manual"
.TH "MASTERSIM" 1 "December 31st, 2024" "0.9.8" "MasterSim Manual"
.SH NAME
.B MasterSimulator\fR \- FMI Co-Simulation Master
.B mastersim\fR \- FMI Co-Simulation Master
.SH SYNOPSIS
.B MasterSimulator\fR [flags] [options] <project file>
.B mastersim\fR [flags] [options] <project file>
.SH DESCRIPTION
.B MasterSimulator
.B mastersim
simulates the co-simulation scenario defined in the msim project file. By default all temporary and output files are created in a subdirectory with the same name as the project. You can change that with the
.BR --working-dir
option.
Expand Down
11 changes: 6 additions & 5 deletions MasterSimulatorUI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ target_link_libraries( ${PROJECT_NAME}
${WIN_FRAMEWORKS}
)

# we want the binary to be named 'mastersim-gui'
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "mastersim-gui")

# Support for 'make install' on Unix/Linux (not on MacOS!)
if (UNIX AND NOT APPLE)

Expand All @@ -102,13 +105,11 @@ if (UNIX AND NOT APPLE)

# MasterSimulator -> /usr/bin/mastersim-gui
install(TARGETS ${PROJECT_NAME} RUNTIME
DESTINATION bin
RENAME mastersim-gui)
DESTINATION bin)

# Man-page -> /usr/share/man/man1/mastersim-gui.1.gz
install(FILES ${PROJECT_SOURCE_DIR}/doc/${PROJECT_NAME}.1
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
RENAME mastersim-gui.1)
install(FILES ${PROJECT_SOURCE_DIR}/doc/mastersim-gui.1
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)

# Translation files
install(FILES ${PROJECT_SOURCE_DIR}/resources/translations/MasterSimulatorUI_de.qm
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.TH "MASTERSIMULATORUI" 1 "December 31st, 2024" "0.9.7" "MasterSim Manual"
.TH "MASTERSIM-GUI" 1 "December 31st, 2024" "0.9.8" "MasterSim Manual"
.SH NAME
.B MasterSimulatorUI\fR \- FMI Co-Simulation Graphical Configuration Tool
.B mastersim-gui\fR \- FMI Co-Simulation Graphical Configuration Tool
.SH SYNOPSIS
.B MasterSimulatorUI\fR [flags] [options] [project file]
.B mastersim-gui\fR [flags] [options] [project file]
.SH DESCRIPTION
.B MasterSimulatorUI
.B mastersim-gui
is a graphical user interface to configure/define FMI co-simulation scenarios and generate MasterSim project files. These project files are used by the commandline co-simulator
.BR MasterSimulator\fR.
.BR mastersim\fR.
.SH FLAGS
.IP "\fB\-\-help\fR" 4
Prints the help page.
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion MasterSimulatorUI/resources/translations/release_tr.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
set PATH=c:\Qt\5.11.3\msvc2015_64\bin;%PATH%
lrelease MasterSimulatorUI_de.ts -qm MasterSimulatorUI_de.qm
lrelease MasterSimulatorUI_de.ts -qm mastersim-gui_de.qm
pause

2 changes: 1 addition & 1 deletion MasterSimulatorUI/resources/translations/release_tr.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
export PATH=~/Qt/5.11.3/gcc_64/bin:$PATH
lrelease MasterSimulatorUI_de.ts -qm MasterSimulatorUI_de.qm
lrelease MasterSimulatorUI_de.ts -qm mastersim-gui_de.qm

4 changes: 2 additions & 2 deletions MasterSimulatorUI/src/MSIMDirectories.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ QString MSIMDirectories::resourcesRootDir() {
QString MSIMDirectories::translationsFilePath(const QString & langID) {
#ifdef IBK_BUILDING_DEBIAN_PACKAGE
QString installPath = qApp->applicationDirPath();
return installPath + QString("/../share/locale/%1/LC_MESSAGES/MasterSimulatorUI.qm").arg(langID);
return installPath + QString("/../share/locale/%1/LC_MESSAGES/mastersim-gui.qm").arg(langID);
#else // IBK_BUILDING_DEBIAN_PACKAGE
return QFileInfo(resourcesRootDir() + QString("/translations/MasterSimulatorUI_%1.qm").arg(langID)).absoluteFilePath();
return QFileInfo(resourcesRootDir() + QString("/translations/mastersim-gui_%1.qm").arg(langID)).absoluteFilePath();
#endif // IBK_BUILDING_DEBIAN_PACKAGE
}

Expand Down
6 changes: 3 additions & 3 deletions MasterSimulatorUI/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,18 @@ int main(int argc, char *argv[]) {
parser.parse(argc, argv);

// configure man page output
parser.m_appname = "MasterSimulatorUI";
parser.m_appname = "mastersim-gui";
parser.m_syntaxArguments = "[flags] [options] [project file]";
parser.m_manManualName = "MasterSim Manual";
parser.m_manReleaseDate = MASTER_SIM::RELEASE_DATE;
parser.m_manVersionString = MASTER_SIM::LONG_VERSION;
parser.m_manShortDescription = "FMI Co-Simulation Graphical Configuration Tool";

// Note: mind the line breaks that end format commands!
parser.m_manLongDescription = ".B MasterSimulatorUI\n"
parser.m_manLongDescription = ".B mastersim-gui\n"
"is a graphical user interface to configure/define FMI co-simulation "
"scenarios and generate MasterSim project files. These project files "
"are used by the commandline co-simulator \n.BR MasterSimulator\\fR.";
"are used by the commandline co-simulator \n.BR mastersim\\fR.";

// handle default arguments (--help and --man-page)
if (parser.handleDefaultFlags(std::cout))
Expand Down
2 changes: 2 additions & 0 deletions bin/release/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
/translations/
/MasterSimulator
/MasterSimulatorUI
/mastersim
/mastersim-gui
26 changes: 13 additions & 13 deletions build/cmake/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,27 +150,27 @@ cd $CMAKELISTSDIR &&
# create top-level dir
mkdir -p bin/release &&
echo "*** Copying executables to bin/release ***" &&
if [ -e $BUILDDIR/MasterSimulator/MasterSimulator ]; then
echo "*** Copying MasterSimulator to bin/release ***" &&
cp $BUILDDIR/MasterSimulator/MasterSimulator $CMAKELISTSDIR/bin/release/MasterSimulator &&
bin/release/MasterSimulator --man-page > $CMAKELISTSDIR/MasterSimulator/doc/MasterSimulator.1
if [ -e $BUILDDIR/MasterSimulator/mastersim ]; then
echo "*** Copying mastersim to bin/release ***" &&
cp $BUILDDIR/MasterSimulator/mastersim $CMAKELISTSDIR/bin/release/mastersim &&
bin/release/mastersim --man-page > $CMAKELISTSDIR/MasterSimulator/doc/mastersim.1
fi &&
if [ -e $BUILDDIR/MasterSimulatorUI/MasterSimulatorUI ]; then
echo "*** Copying MasterSimulatorUI to bin/release ***" &&
cp $BUILDDIR/MasterSimulatorUI/MasterSimulatorUI $CMAKELISTSDIR/bin/release/MasterSimulatorUI
if [ -e $BUILDDIR/MasterSimulatorUI/mastersim-gui ]; then
echo "*** Copying mastersim-gui to bin/release ***" &&
cp $BUILDDIR/MasterSimulatorUI/mastersim-gui $CMAKELISTSDIR/bin/release/mastersim-gui &&
# next call may fail on GitHub actions, so we do not require this to succeed
bin/release/MasterSimulatorUI --man-page > $CMAKELISTSDIR/MasterSimulatorUI/doc/MasterSimulatorUI.1
bin/release/mastersim-gui --man-page > $CMAKELISTSDIR/MasterSimulatorUI/doc/mastersim-gui.1
fi
if [ -e $BUILDDIR/MasterSimulatorUI/MasterSimulatorUI.app ]; then
if [ -e bin/release/MasterSimulatorUI.app ]; then
rm -rf $CMAKELISTSDIR/bin/release/MasterSimulatorUI.app
if [ -e $BUILDDIR/MasterSimulatorUI/mastersim-gui.app ]; then
if [ -e bin/release/MasterSim.app ]; then
rm -rf $CMAKELISTSDIR/bin/release/MasterSim.app
fi &&
echo "*** Copying MasterSimulatorUI.app to bin/release ***" &&
cp -r $BUILDDIR/MasterSimulatorUI/MasterSimulatorUI.app $CMAKELISTSDIR/bin/release/MasterSimulatorUI.app
cp -r $BUILDDIR/MasterSimulatorUI/mastersim-gui.app $CMAKELISTSDIR/bin/release/MasterSim.app
fi &&
cd $BUILDDIR/.. &&

echo "*** Build MasterSimulator ***" &&
echo "*** Build MasterSim ***" &&
if [[ $SKIP_TESTS = "false" ]]; then
./run_tests.sh
fi
6 changes: 3 additions & 3 deletions build/cmake/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

if [ -e ../../bin/release/MasterSimulatorUI.app ]; then
python ../../scripts/TestSuite/run_tests.py -p ../../data/tests/darwin64 -s ../../bin/release/MasterSimulator -e msim $*
if [ -e ../../bin/release/MasterSim.app ]; then
python ../../scripts/TestSuite/run_tests.py -p ../../data/tests/darwin64 -s ../../bin/release/mastersim -e msim $*
else
python3 ../../scripts/TestSuite/run_tests.py -p ../../data/tests/linux64 -s ../../bin/release/MasterSimulator -e msim $*
python3 ../../scripts/TestSuite/run_tests.py -p ../../data/tests/linux64 -s ../../bin/release/mastersim -e msim $*
fi

0 comments on commit cea26cf

Please sign in to comment.