Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel
bgColor#F7D6C1
borderStyledashed

gmcs -out:<target>.exe -r<linkedLib_1>.dll,<linkedLib_k>.dll -pkg:<package_1>.pc;...;<package_m>.pc <source_1>.cs <source_n>.cs

Further compile information for resources is given in section 3.3..
Applications compiled with Mono do not run directly on the linux system, they are interpreted on a runtime engine, comparable to the virtual machine in java. Thus, the command in the terminal window command line has to start with mono, e.g.:

Panel
bgColor#F7D6C1
borderStyledashed

mono Oatc.OpenMI.GUI.ConfigurationEditor.exe

3.2. Mono and Grapical User Interfaces GUIs

...

4.1. Download from SourceForge

Image Modified
Fig. 1: Directory structure

...

Use Subversion (svn) for download of the C# sources:

4.2. Building with shell scripts

  • Go to $OPENMI_DIR/Oatc/src/csharp/Linux/
    Edit the package files *.pc:
  • drawing.pc: replace the path for System.Drawing.dll
  • nunit-framework.pc: replace the path for nunit.framework.dll
  • windows-forms.pc: replace the path for System.Windows.Forms.dll
  • Run build.Standard.sh
  • Run build.Sdk.sh and the Sdk including UnitTest will be built.
  • Run build.Gui.sh and the Gui including UnitTest will be built.
  • Run build.Examples.ModelComponents.SpatialModels.sh will generate test models.
    All dlls and exe files will be copied to $OPENMI_DIR/Oatc/src/csharp/bin/.

4.3. Running the applications

Mono applications do not run directly on the Linux system, they are interpreted in a runtime engine, comparable to the virtual machine in java. Thus, the command in the terminal window command line has to start with mono:
mono Oatc.OpenMI.Gui.ConfigurationEditor.exe
mono Oatc.OpenMI.Gui.ConfigurationEditor.exe

4.4. UnitTests

  • Go to $OPENMI_DIR/Oatc/src/csharp/Linux/
  • runNunit.Sdk.sh for all Sdk dlls
  • runNunit.Gui.sh for Oatc.OpenMI.Gui.Core.dll
  • runNunit.Examples.ModelComponents.SpatialModels.sh e.g. for a RiverModel and a GroundWaterModel

4.5

...

The Simple River model uses the migration pattern shown in Figure 12. Figure 13 gives a detailed explanation of how the Simple River wrapper works in terms of the wrapper classes.

...

. Can I use the same sources for Linux and Windows

Yes, you can generate a set of dlls and exe files for Linux and a set for Windows with the same sources. The method Gui/Core/Utils.IsRunningOnMono decides during runtime, whether it runs on Mono or not. The build.*.sh scripts are tailored for Linux, for Windows you can use the Visual Studio projects.

4.6. Buildung the OpenMI with MonoDevelop

The IDE MonoDevelop is an alternative to the scripts, s. 4.2. It import Microsoft projects by loading the *.sln file. The author had some compilation problems with MonoDevelop 2.0 Alpha without clear error messages. Experienced developers may find a solution. Furthermore, MonoDevelop will be constantly improved in 2009, s. http://www.mono-project.com/Roadmap

5. Miscellaneous

5.1. Running on non-SUSE Linux?

The generated applications will probably run on further platforms, especially non-SUSE Linux derivates, without re-compilation. But it has not been proved yet. Interested persons are invited to try. A short notice to the community, e.g. to the OpenMI Forum on SourceForge would be great.

5.2. Todo list

  • portation of the OpenMI Tools
  • portation of the SimpleRiver example
  • ConfigurationEditor: Help page
  • ConfigurationEditor ConnectionProperties-Dialogue: Buttons "Use Element Type Filter" and "Use Dimension Filter" do not work.
  • ConfigurationEditor: RegisterFileExtensions can not work on Linux.

Filters for ElementSet and Dimension