Difference between revisions of "Installation/Windows/Cross-Compiling OpenFOAM 2.1.x in Linux For Windows with MinGW"

From OpenFOAMWiki
m
Line 12: Line 12:
 
===Preparing OpenMPI===
 
===Preparing OpenMPI===
  
===Getting All Required Files===
+
===Getting The Source===
 +
There are two options to get the source prepared:
 +
#Clone the official repository, checkout the version used to generate the Symscape patch and patch the source
 +
#Clone the repository maintained by J-Light at aims to keep up the official repository in terms of bug fixes.
 +
The second may not always be the best option. After updating the code the only criteria used to push the source is if it compiles without any errors. If the first one is enough then go ahead and use it. However, if you need source from a more recent commit then use the repo maintained by J-Light.
  
 +
====Source: Official + Symscape Patch====
 +
<ol>
 +
<li>Clone the official repo using git
 +
<bash>git clone https://github.com/OpenFOAM/OpenFOAM-2.1.x.git
 +
git clone https://github.com/OpenFOAM/ThirdParty-2.1.x.git </bash></li>
 +
<li>Get and extract the Symscape patch
 +
<bash>wget http://www.symscape.com/files/articles/openfoam21x-windows/v7-mingw-openfoam-2-1-x.patch.gz
 +
gzip -d v7-mingw-openfoam-2-1-x.patch.gz</bash></li>
 +
<li>Checkout the correct version of OpenFOAM
 +
<bash>cd OpenFOAM-2.1.x
 +
git checkout -b Symscape 971882b657c1730e27a8df8dcf06e6d5e5a47991 </bash></li>
 +
<li>Check and apply patch
 +
<bash>git apply --check -p0 ../v7-mingw-openfoam-2-1-x.patch
 +
git apply -p0 ../v7-mingw-openfoam-2-1-x.patch </bash></li>
 +
</ol>
 
===Checking Out And Patching The Source===
 
===Checking Out And Patching The Source===
  

Revision as of 14:21, 7 January 2013

Valid versions: OF Version 21x.png

1 Introduction

To Do

2 Packages Required to Cross-Compile OpenFOAM

To Do

3 Preparing To Cross-Compile

3.1 Preparing OpenMPI

3.2 Getting The Source

There are two options to get the source prepared:

  1. Clone the official repository, checkout the version used to generate the Symscape patch and patch the source
  2. Clone the repository maintained by J-Light at aims to keep up the official repository in terms of bug fixes.

The second may not always be the best option. After updating the code the only criteria used to push the source is if it compiles without any errors. If the first one is enough then go ahead and use it. However, if you need source from a more recent commit then use the repo maintained by J-Light.

3.2.1 Source: Official + Symscape Patch

  1. Clone the official repo using git
    git clone https://github.com/OpenFOAM/OpenFOAM-2.1.x.git
    git clone https://github.com/OpenFOAM/ThirdParty-2.1.x.git
  2. Get and extract the Symscape patch
    wget http://www.symscape.com/files/articles/openfoam21x-windows/v7-mingw-openfoam-2-1-x.patch.gz
    gzip -d v7-mingw-openfoam-2-1-x.patch.gz
  3. Checkout the correct version of OpenFOAM
    cd OpenFOAM-2.1.x
    git checkout -b Symscape 971882b657c1730e27a8df8dcf06e6d5e5a47991
  4. Check and apply patch
    git apply --check -p0 ../v7-mingw-openfoam-2-1-x.patch
    git apply -p0 ../v7-mingw-openfoam-2-1-x.patch

3.3 Checking Out And Patching The Source

4 Building Scotch and Tecplot Reader

5 Building OpenFOAM

6 Preparing the move to Windows

--Nishit Joseph (talk) 14:08, 5 December 2012 (CET)