Feature: Minor reorganisation of Windows port. Author: Hrvoje Jasak. Merge: Hrvoje Jasak.

This commit is contained in:
Hrvoje Jasak 2015-08-28 15:50:05 +01:00
commit a45a6d72ae
50 changed files with 155 additions and 130 deletions

2
.gitignore vendored
View file

@ -41,7 +41,7 @@ lnInclude
# build folders - anywhere # build folders - anywhere
linux*Gcc*/ linux*Gcc*/
linux*Icc*/ linux*Icc*/
MINGW32*Gcc*/ mingw*Gcc*/
darwin*Gcc*/ darwin*Gcc*/
darwin*Intel*/ darwin*Intel*/
linuxming*/ linuxming*/

View file

@ -20,6 +20,11 @@
TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUX64 -DUSEENUM -DTHREED -U_WIN32 -DENGINE TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DLINUX64 -DUSEENUM -DTHREED -U_WIN32 -DENGINE
#elif defined(mingw)
# warning "MSWin mingw architecture detected"
TECIO_FLAGS = -DMAKEARCHIVE -DLINUX -DUSEENUM -DTHREED -DENGINE
#else #else
#error "architecture not supported for compiling tecio." #error "architecture not supported for compiling tecio."

View file

@ -0,0 +1,105 @@
/*
******************************************************************
******************************************************************
******* ********
****** (C) 1988-2010 Tecplot, Inc. *******
******* ********
******************************************************************
******************************************************************
*/
#ifndef _W__BASE_h
#define _W__BASE_h
#if defined TECPLOTKERNEL
#include "C__BASE.h"
typedef ULONG_PTR Widget;
#define NULLWIDGET ((unsigned long)0)
extern BOOL MSWinIsLargeFont;
extern CWnd *(TPClassArray[TPNUMCLASSES]);
typedef struct
{
CRect Rect;
BOOL RectSet;
CRect MinRect; // Only used for resizable dialogs
BOOL MinRectSet; // Only used for resizable dialogs
} TPDialogRect_s;
extern TPDialogRect_s TPDialogRect[TPNUMCLASSES];
#define WindowIsResizable(wnd) ((wnd)->GetStyle() & WS_THICKFRAME)
/*
* NOTE: C = class number in TPClassArray (see C__BASE.h)
* 0=no class
* 1=TPMAINWND
* O = offset within container
* 0 means the container itself
* any other number is the offset within control (starting at 1)
* I = control number/id
* 0 = class itself
* for bitmap button groups, this is the container id
* for all other controls, this is the control id
* WidgetValue 0 is the NULL widget.
*/
//#define MAKEWIDGET(C,I,O) ((Widget)((((C)&0xFFFF)<<16)|(((O)&0xFF)<<8)|((I)&0xFF)))
#define CLASS_NUM_BITS 10
#define ITEM_ID_BITS 16 /* must be at least 16-bits to fit in the workarea */
#define ITEM_OFFSET_BITS 6
/* The FILTER is also the maximum value. */
#define CLASS_NUM_FILTER ((1<<CLASS_NUM_BITS)-1)
#define ITEM_ID_FILTER ((1<<ITEM_ID_BITS)-1)
#define ITEM_OFFSET_FILTER ((1<<ITEM_OFFSET_BITS)-1)
#define TP_CLASS_NO_CLASS 0
#define TP_ITEM_CLASS_ITSELF 0
#define TP_OFFSET_ITEM_ITSELF 0
#define TP_OFFSET_MENU_CASCADE (ITEM_OFFSET_FILTER-1)
#define TP_OFFSET_MENU_OPTION ITEM_OFFSET_FILTER
/* MAKEWIDGET must be a define and not an inline function so widget's can be used in case statements. */
#define MAKEWIDGET(ClassNum, ItemID, ItemOffset) ((Widget)( ( ( ((ClassNum)<<ITEM_ID_BITS) | (ItemID) ) << ITEM_OFFSET_BITS ) | (ItemOffset) ))
inline INT_PTR GetClassNum(Widget W)
{
return (W >> ITEM_ID_BITS) >> ITEM_OFFSET_BITS;
}
inline INT_PTR GetItemID(Widget W)
{
return (W >> ITEM_OFFSET_BITS) & ITEM_ID_FILTER;
}
inline INT_PTR GetItemOffset(Widget W)
{
return W & ITEM_OFFSET_FILTER;
}
/*
* We cannot use Boolean_t here because it is not defined yet.
*/
extern CWnd *GetWindowFromWidget(Widget);
extern CWnd *GetParentWndFromWidget(Widget);
extern Widget GetWidgetFromWindow(CWnd *);
extern BOOL WidgetExists(Widget W);
extern BOOL TPEnableDialog(CWnd *wnd,
BOOL bEnable);
extern void TPEnableAllDialogs(BOOL bEnable);
extern TPDialogRect_s* GetDialogRectFromWidget(Widget);
extern TPDialogRect_s* GetDialogRectFromWindow(CWnd* pWnd);
#endif /* TECPLOTKERNEL */
/*
* This is the start of the translated string ID's
* in the resource file
*/
#define TP_TRANSLATED_STRING_START_ID 20000
#endif

View file

@ -145,7 +145,7 @@ For : Graphically visualising foam results.
Name : PExports Name : PExports
Version: 0.44 (or above) Version: 0.44 (or above)
URL : http://sourceforge.net/projects/mingw/files/MinGW/Extension/pexports/pexports-0.46/pexports-0.46-mingw32-bin.tar.xz/download URL : http://sourceforge.net/projects/mingw/files/MinGW/Extension/pexports/pexports-0.46/pexports-0.46-mingw32-bin.tar.xz/download
For : Extracting symbols from OpenMPI DLLs to pass to dlltool.exe (supplied in MinGW-w64 package). Rename directory "bin" to "pexports" after unpacking. For : Extracting symbols from OpenMPI DLLs to pass to dlltool.exe (supplied in MinGW-w64 package). Move directory "bin" to "pexports-0.46" after unpacking.
Name : Strawberry Perl Name : Strawberry Perl
Version: 5.20.2.1 (or above) Version: 5.20.2.1 (or above)
@ -208,9 +208,9 @@ M4: /bin/m4.exe [m4 (GNU M4) 1.4.16]
Make: /bin/make.exe [GNU Make 3.81] Make: /bin/make.exe [GNU Make 3.81]
MinGW-w64: /c/Programs/mingw64 MinGW-w64: /c/Programs/mingw64
OpenMPI: /c/Programs/OpenMPI_v1.6.1-x64/bin/mpirun.exe [mpirun.exe (OpenRTE) 1.6.1] OpenMPI: /c/Programs/OpenMPI_v1.6.1-x64/bin/mpirun.exe [mpirun.exe (OpenRTE) 1.6.1]
PEexports: /c/Programs/strawberry-perl-5.20.2.1-64bit/c/bin/pexports.exe [PExports 0.44 Copyright 1998, Anders Norlander] PEexports: /c/Programs/pexports-0.46/bin/pexports.exe [PExports 0.44 Copyright 1998, Anders Norlander]
ParaView: /c/Programs/ParaView-4.3.1 ParaView: /c/Programs/ParaView-4.3.1
Perl: /c/Programs/strawberry-perl-5.20.2.1-64bit/perl/bin/perl.exe [ This is perl 5, version 20, subversion 2 (v5.20.2) built for MSWin32-x64-multi-thread] Perl: /bin/perl.exe [ This is perl, v5.8.8 built for msys-64int]
Python: /c/Programs/Python27/python.exe [Python 2.7.9] Python: /c/Programs/Python27/python.exe [Python 2.7.9]
Subversion: /c/Programs/svn-win32-1.8.13/bin/svn.exe [svn, version 1.8.13 (r1667537)] Subversion: /c/Programs/svn-win32-1.8.13/bin/svn.exe [svn, version 1.8.13 (r1667537)]
Vim: /bin/vim.exe [VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Mar 19 2011 15:37:04)] Vim: /bin/vim.exe [VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Mar 19 2011 15:37:04)]

View file

@ -202,7 +202,7 @@ export WM_ARCH=`uname -s`
case $WM_ARCH in case $WM_ARCH in
MINGW32_NT-6.1) MINGW32_NT-6.1)
WM_ARCH=MINGW32_NT-6.1 WM_ARCH=mingw
export WM_ARCH_BASE=mingw export WM_ARCH_BASE=mingw
export WM_COMPILER_LIB_ARCH=64 export WM_COMPILER_LIB_ARCH=64
export WM_CFLAGS='-m64 -fPIC' export WM_CFLAGS='-m64 -fPIC'
@ -211,7 +211,7 @@ MINGW32_NT-6.1)
;; ;;
MINGW32_NT-6.2) MINGW32_NT-6.2)
WM_ARCH=MINGW32_NT-6.2 WM_ARCH=mingw
export WM_ARCH_BASE=mingw export WM_ARCH_BASE=mingw
export WM_COMPILER_LIB_ARCH=64 export WM_COMPILER_LIB_ARCH=64
export WM_CFLAGS='-m64 -fPIC' export WM_CFLAGS='-m64 -fPIC'

View file

@ -46,7 +46,7 @@ set_system_paths() {
export MPI_ROOTDIR=$PROGRAMS_HOME/OpenMPI_v1.6.1-x64 export MPI_ROOTDIR=$PROGRAMS_HOME/OpenMPI_v1.6.1-x64
export PARAVIEW_HOME=$PROGRAMS_HOME/ParaView-4.3.1 export PARAVIEW_HOME=$PROGRAMS_HOME/ParaView-4.3.1
#export PERL_HOME=$PROGRAMS_HOME/strawberry-perl-5.20.2.1-64bit/perl #export PERL_HOME=$PROGRAMS_HOME/strawberry-perl-5.20.2.1-64bit/perl
export PEXPORTS_HOME=$PROGRAMS_HOME/pexports export PEXPORTS_HOME=$PROGRAMS_HOME/pexports-0.46
export PYTHON_HOME=$PROGRAMS_HOME/Python27 export PYTHON_HOME=$PROGRAMS_HOME/Python27
export SUBVERSION_HOME=$PROGRAMS_HOME/svn-win32-1.8.13 export SUBVERSION_HOME=$PROGRAMS_HOME/svn-win32-1.8.13
export WGET_HOME=$PROGRAMS_HOME/wget-1.11.4-1 export WGET_HOME=$PROGRAMS_HOME/wget-1.11.4-1

View file

@ -25,7 +25,7 @@ License
#include "regExp.H" #include "regExp.H"
#include "label.H" #include "label.H"
#include "string.H" #include "foamString.H"
#include "List.H" #include "List.H"
#include "IOstreams.H" #include "IOstreams.H"

View file

@ -1,5 +1,6 @@
ifeq ($(WM_ARCH_BASE), mingw) #if defined(mingw)
EXE_INC = -g \
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
@ -9,8 +10,10 @@ EXE_INC = -g \
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-L$(PARMGRIDGEN_LIB_DIR) -lIMlib -lmgrid -L$(PARMGRIDGEN_LIB_DIR) -lIMlib -lmgrid
else
EXE_INC = -g \ #else
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
@ -21,4 +24,5 @@ EXE_INC = -g \
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-L$(PARMGRIDGEN_LIB_DIR) -lIMlib -lMGridGen -L$(PARMGRIDGEN_LIB_DIR) -lIMlib -lMGridGen
endif
#endif

View file

@ -2,22 +2,28 @@ EXE_INC = \
-I$(SCOTCH_INCLUDE_DIR) \ -I$(SCOTCH_INCLUDE_DIR) \
-I../decompositionMethods/lnInclude -I../decompositionMethods/lnInclude
ifeq ($(WM_ARCH_BASE), darwin) #if defined(darwinIntel)
/* No librt for Mac OS X */ /* No librt for Mac OS X */
LIB_LIBS = \ LIB_LIBS = \
-lfoam \ -lfoam \
-L$(SCOTCH_LIB_DIR) -lscotch \ -L$(SCOTCH_LIB_DIR) -lscotch \
-L$(SCOTCH_LIB_DIR) -lscotcherrexit -L$(SCOTCH_LIB_DIR) -lscotcherrexit
else ifeq ($(WM_ARCH_BASE), mingw)
#elif defined(mingw)
/* No librt for MinGW */ /* No librt for MinGW */
LIB_LIBS = \ LIB_LIBS = \
-ldecompositionMethods \ -ldecompositionMethods \
-L$(SCOTCH_LIB_DIR) -lscotch \ -L$(SCOTCH_LIB_DIR) -lscotch \
-L$(SCOTCH_LIB_DIR) -lscotcherrexit \ -L$(SCOTCH_LIB_DIR) -lscotcherrexit \
-L$(OPENMPI_DIR)/lib -lmpi -L$(OPENMPI_DIR)/lib -lmpi
else
#else
LIB_LIBS = \ LIB_LIBS = \
-L$(SCOTCH_LIB_DIR) -lscotch \ -L$(SCOTCH_LIB_DIR) -lscotch \
-L$(SCOTCH_LIB_DIR) -lscotcherrexit \ -L$(SCOTCH_LIB_DIR) -lscotcherrexit \
-lrt -lrt
endif
#endif

View file

@ -3,7 +3,8 @@ include $(RULES)/mplib$(WM_MPLIB)
EXE_INC = $(PFLAGS) $(PINC)\ EXE_INC = $(PFLAGS) $(PINC)\
-I$(WM_THIRD_PARTY_DIR)/zlib-1.2.3 -I$(WM_THIRD_PARTY_DIR)/zlib-1.2.3
ifeq ($(WM_ARCH_BASE), mingw) #if defined(mingw)
LIB_LIBS = $(PLIBS)\ LIB_LIBS = $(PLIBS)\
$(FOAM_LIBBIN)/libOSspecific.o \ $(FOAM_LIBBIN)/libOSspecific.o \
-lz \ -lz \
@ -11,11 +12,14 @@ LIB_LIBS = $(PLIBS)\
-ldl \ -ldl \
-lpsapi \ -lpsapi \
-lpthread -lpthread
else
#else
LIB_LIBS = $(PLIBS)\ LIB_LIBS = $(PLIBS)\
$(FOAM_LIBBIN)/libOSspecific.o \ $(FOAM_LIBBIN)/libOSspecific.o \
-lz -lz
endif
#endif
$(OBJECTS_DIR)/global.o: FORCE $(OBJECTS_DIR)/global.o: FORCE

View file

@ -1,11 +1,15 @@
ParMGridGen = $(WM_THIRD_PARTY_DIR)/packages/ParMGridGen-1.0 ParMGridGen = $(WM_THIRD_PARTY_DIR)/packages/ParMGridGen-1.0
TYPE_REAL= TYPE_REAL=
#if defined(WM_SP) #if defined(WM_SP)
TYPE_REAL=-DTYPE_REAL TYPE_REAL=-DTYPE_REAL
#endif #endif
ifeq ($(WM_ARCH_BASE), mingw) #if defined(mingw)
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(PARMGRIDGEN_INCLUDE_DIR) \ -I$(PARMGRIDGEN_INCLUDE_DIR) \
@ -14,7 +18,8 @@ EXE_INC = \
LIB_LIBS = \ LIB_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-L$(PARMGRIDGEN_LIB_DIR) -lmgrid -L$(PARMGRIDGEN_LIB_DIR) -lmgrid
else #else
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(PARMGRIDGEN_INCLUDE_DIR)/Lib \ -I$(PARMGRIDGEN_INCLUDE_DIR)/Lib \
@ -23,4 +28,5 @@ EXE_INC = \
LIB_LIBS = \ LIB_LIBS = \
-L$(PARMGRIDGEN_LIB_DIR) -lMGridGen -L$(PARMGRIDGEN_LIB_DIR) -lMGridGen
endif
#endif

View file

@ -1,3 +0,0 @@
XFLAGS =
XINC = $(XFLAGS) -I/usr/X11R6/include
XLIBS = -L/usr/X11R6/lib64 -lXext -lX11

View file

@ -1,16 +0,0 @@
.SUFFIXES: .c .h
cWARN = -Wall
cc = gcc
include $(RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
LINK_LIBS = $(cDBUG)
LINKLIBSO = $(cc) -shared
LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs

View file

@ -1,22 +0,0 @@
.SUFFIXES: .C .cxx .cc .cpp
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor
CC = g++
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-200
GFLAGS = -DWM_$(WM_PRECISION_OPTION)
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -I$(OPENMPI_DIR)/include -I$(WM_THIRD_PARTY_DIR)/packages/system/include -Dmingw -DBIG_ENDIAN=0 -DLITTLE_ENDIAN=1 -DBYTE_ORDER=BIG_ENDIAN
Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@
cxxtoo = $(Ctoo)
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
LINK_LIBS = $(c++DBUG) -L$(OPENMPI_DIR)/lib -lmpi -lpthread -lz -L$(WM_THIRD_PARTY_DIR)/packages/system/lib -ldl -lpsapi
LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed $(FOAM_LIBBIN)/libOSspecific.o

View file

@ -1,2 +0,0 @@
c++DBUG = -ggdb3 -DFULLDEBUG
c++OPT = -O0 -fdefault-inline

View file

@ -1,4 +0,0 @@
c++DBUG =
c++OPT = -O3
#c++OPT = -march=nocona -O3
# -ftree-vectorize -ftree-vectorizer-verbose=3

View file

@ -1,2 +0,0 @@
c++DBUG = -pg
c++OPT = -O2

View file

@ -1,2 +0,0 @@
cDBUG = -ggdb -DFULLDEBUG
cOPT = -O1 -fdefault-inline -finline-functions

View file

@ -1,2 +0,0 @@
cDBUG =
cOPT = -O3

View file

@ -1,2 +0,0 @@
cDBUG = -pg
cOPT = -O2

View file

@ -1,11 +0,0 @@
CPP = cpp -traditional-cpp
LD = ld
PROJECT_LIBS = -l$(WM_PROJECT) -liberty
include $(GENERAL_RULES)/standard
include $(RULES)/X
include $(RULES)/c
include $(RULES)/c++
include $(RULES)/nvcc

View file

@ -1,3 +0,0 @@
PFLAGS =
PINC =
PLIBS =

View file

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma

View file

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H
PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi

View file

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich

View file

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm

View file

@ -1,3 +0,0 @@
PFLAGS = -DOMPI_SKIP_MPICXX
PINC = -I$(OPENMPI_DIR)/include
PLIBS = -L$(OPENMPI_DIR)/lib -lmpi

View file

@ -1,3 +0,0 @@
PFLAGS =
PINC = -I$(MPI_ARCH_PATH)/include
PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi

View file

@ -1 +0,0 @@
PFLAGS = -DOMPI_SKIP_MPICXX

View file

@ -1,17 +0,0 @@
.SUFFIXES: .cu
NVCC = nvcc -arch $(CUDA_ARCH)
NVCC_ptFLAGS = -DNoRepository
NVCC_FLAGS = $(NVCC_ptFLAGS) -Xcompiler -fPIC $(LIB_HEADER_DIRS) $(GFLAGS) $(c++OPT) $(c++DBUG)
cutoo = $(WM_SCHEDULER) $(NVCC) $(NVCC_FLAGS) -c $$SOURCE -o $@
LINK_LIBS = $(c++DBUG)
LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed
LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed
.cu.dep:
$(MAKE_DEP)

View file

@ -6,7 +6,7 @@ cc = gcc
include $(RULES)/c$(WM_COMPILE_OPTION) include $(RULES)/c$(WM_COMPILE_OPTION)
cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC -Dmingw
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@

View file

@ -1,4 +1,4 @@
CPP = cpp -traditional-cpp CPP = cpp -traditional-cpp -Dmingw
LD = ld LD = ld
PROJECT_LIBS = -l$(WM_PROJECT) -liberty PROJECT_LIBS = -l$(WM_PROJECT) -liberty