Skip to content

Commit

Permalink
update the OMDev readme
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed May 10, 2016
1 parent eb0e110 commit 6792db5
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions README-OMDev-MINGW.md
@@ -1,21 +1,26 @@
# Compiling OMC using OMDev package

- Checkout the OMDev package from SVN https://openmodelica.org/svn/OpenModelicaExternal/trunk/tools/windows/OMDev
- this package contains all prerequisites to compile OMC on Windows using MinGW+MSys
- NOTE THAT YOU MUST UPDATE THIS PACKAGE IF YOU CANNOT COMPILE OpenModelica any longer!
- Make sure you place the OMDev package into `c:\OMDev\`
- Follow the instructions in the `c:\OMDev\INSTALL.txt` file
- this package contains all prerequisites to compile OMC on Windows using msys2+mingw32+mingw64
- if you get issues with OpenModelica compilation maybe you should update OMDev
- Make sure you place the OMDev package into `C:\OMDev\`
- Follow the instructions in the `C:\OMDev\INSTALL.txt` file
- You should have an OpenModelica directory you got from OpenModelica GIT repository https://github.com/OpenModelica/OpenModelica
- You could use msys or eclipse to build OMC. Follow the instructions in **Compiling OMC using MSYS** or **Compiling OMC using Eclipse**.
- Follow the instructions at the bottom of the page on how to get OpenModelica sources
- You could use msys2+mingw32 or msys2+mingw64 or Eclipse to build OMC. Follow the instructions in **Compiling OMC using MSYS** or **Compiling OMC using Eclipse**.

## Compiling OMC using MSYS

- For 32-bit OMC start `$OMDEV\tools\msys\mingw32_shell.bat` and for 64-bit OMC start `$OMDEV\tools\msys\mingw64_shell.bat`
- To compile 32bit OMC start `$OMDEV\tools\msys\mingw32_shell.bat`
- To compile 64bit OMC start `$OMDEV\tools\msys\mingw64_shell.bat`

After starting the terminal type:
```bash
cd \path\to\OpenModelica
cd /path/to/OpenModelica
make -f Makefile.omdev.mingw -j8
```


## Compiling OMC using Eclipse

- Inside the OpenModelica directory you will find a `.project-sample` file
Expand All @@ -26,27 +31,25 @@ make -f Makefile.omdev.mingw -j8
- $ cd \path\to\OpenModelica
- $ ren ".project-sample" ".project"
- rename the file `OpenModelica/.externalToolBuilders/OMDev-MINGW-OpenModelicaBuilder32bit.launch-sample` or `OpenModelica/.externalToolBuilders/OMDev-MINGW-OpenModelicaBuilder64bit.launch-sample`
to `OpenModelica/.externalToolBuilders/OMDev-MINGW-OpenModelicaBuilder32bit.launch` or `OpenModelica/.externalToolBuilders/OMDev-MINGW-OpenModelicaBuilder64bit.launch` and do whatever
modifications are needed on it to reflect your paths.
to `OpenModelica/.externalToolBuilders/OMDev-MINGW-OpenModelicaBuilder32bit.launch` or `OpenModelica/.externalToolBuilders/OMDev-MINGW-OpenModelicaBuilder64bit.launch` and do whatever modifications are needed on it to reflect your paths.
- Installing Modelica Development Tooling (MDT) and setting your Eclipse workspace
Start Eclipse and follow instructions from https://trac.openmodelica.org/documents/MDT/install/InstallingMDT.pdf
to install MDT. Eclipse will restart at the end. Start Eclipse, change workspace to your installation:
- note here that your workspace must point one directory up the OpenModelica svn directory (for me named OpenModelica).
- Example: if you downloaded OpenModelica in a directory like this `c:\some_paths\dev\OpenModelica` then your workspace must point to `c:\some_paths\dev\`
- note here that your workspace must point one directory up the OpenModelica GIT directory (for me named OpenModelica).
- Example: if you cloned OpenModelica in a directory like this `c:\some_paths\dev\OpenModelica` then your workspace must point to `c:\some_paths\dev\`
- Setting your project.
- File -> New -> (Modelica Project) or File -> New -> Project -> Modelica -> Modelica Project
- Type the name of your OpenModelica directory installation. For me **OpenModelica**
- Say Finish.
- Editing the OMDev-MINGW-OpenModelicaBuilder
- Project->Project Properties->Builders->OMDev-MINGW-OpenModelicaBuilder->Edit
- NOTE: In tab Main you have to change the Working Directory from "OpenModelica" to your directory name
- Go to Environment tab and change the name of the OMDEV variable from there to point to your OMDev installation `/c/path/to/your/omdev (/c/OMDev)`
- Running the OMDev-MINGW-OpenModelica builder:
- To run the OMDev-MINGW-OpenModelicaBuilder press Ctrl+B or right-click project and say rebuild.
- Then the OMDev-MINGW-OpenModelicaBuilder will start and compile an OpenModelica/build/omc.exe.
- If the builder refuse to start, please check the **NOTES** below.

## NOTES ON PROBLEMS WITH THE ECLIPSE PROJECT/OMDev BUILDER
## Troubleshooting Eclipse/OMDev builder

If something does not work in Eclipse, please check:

Expand All @@ -55,20 +58,18 @@ If something does not work in Eclipse, please check:
- Be sure in C:\OMDev you have directories **tools**, **bin**, **include** and not another OMDev directory.
- Set a OMDEV variable to point to it. Right Click on My Computer->Properties->Advanced Tab->Environment Variables. Add variable OMDEV and set the text to C:\OMDev
- Close and restart Eclipse to pick up the OMDEV variable.
3. Rename the file `OpenModelica/.externalToolBuilders/OMDev-MINGW-OpenModelicaBuilder32bit.launch-sample` or `OpenModelica/.externalToolBuilders/OMDev-MINGW-OpenModelicaBuilder64bit.launch-sample`
to `OpenModelica/.externalToolBuilders/OMDev-MINGW-OpenModelicaBuilder32bit.launch` or `OpenModelica/.externalToolBuilders/OMDev-MINGW-OpenModelicaBuilder64bit.launch`.
4. Right click on the OpenModelica project in Eclipse and say Refresh
5. Right click on the OpenModelica project in Eclipse and say Properties
- Go to Builders and see if you have the builder `OMDev-MINGW-OpenModelicaBuilder` available.
- Go to Builders and see if you have the builder `OMDev-MINGW-OpenModelicaBuilder32bit` or `OMDev-MINGW-OpenModelicaBuilder64bit` available.
6. Right click on the OpenModelica project and say **Rebuild**.

If these do not work, look into your OpenModelica/.project
to see if you have any reference to: OMDev-MINGW-OpenModelicaBuilder there. If you don't, then:
to see if you have any reference to: `OMDev-MINGW-OpenModelicaBuilder32bit` or `OMDev-MINGW-OpenModelicaBuilder64bit` there. If you don't, then:
- close Eclipse
- copy your .project-sample to .project again from DOS:
- Start->Run->cmd
- $ cd \path\to\OpenModelica
- $ ren ".project-sample" ".project"
- open Eclipse and do step 3-5 above.

For problems with OMDev package, contact Adrian Pop, adrpo@ida.liu.se
For problems with OMDev package, contact Adrian Pop, adrian.pop@liu.se

0 comments on commit 6792db5

Please sign in to comment.