From ad3c9c978e7ce8dbd008ef3da748de580a0f22a2 Mon Sep 17 00:00:00 2001
From: Sandro Mani <manisandro@gmail.com>
Date: Mon, 1 May 2017 23:12:20 +0200
Subject: [PATCH 3/8] Set default NETGENDIR
---
ng/ngappinit.cpp | 8 +++++---
ng/ngtesting.tcl | 4 ++--
py_tutorials/CMakeLists.txt | 2 +-
tutorials/CMakeLists.txt | 2 +-
4 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/ng/ngappinit.cpp b/ng/ngappinit.cpp
index cf2f25b..3d4c399 100644
--- a/ng/ngappinit.cpp
+++ b/ng/ngappinit.cpp
@@ -154,9 +154,11 @@ int main(int argc, char ** argv)
if (getenv ("NETGENDIR") && strlen (getenv ("NETGENDIR")))
ngdir = getenv ("NETGENDIR");
- else
- ngdir = ".";
-
+ else {
+ ngdir = "/usr/share/netgen-mesher";
+ setenv("NETGENDIR", ngdir.c_str(), 1);
+ }
+
verbose = parameters.GetDefineFlag ("V");
if (verbose)
diff --git a/ng/ngtesting.tcl b/ng/ngtesting.tcl
index f0f685e..73ac7a9 100644
--- a/ng/ngtesting.tcl
+++ b/ng/ngtesting.tcl
@@ -64,7 +64,7 @@ proc ngtest { {t all} {f ""}} {
}
puts "\n ** testing in2d files in tutorials/ **"
- set testdir "$::ngdir/../share/netgen"
+ set testdir "$::ngdir/../share/netgen-mesher"
set in2dfiles { demo2d newin2d square v2in2d }
foreach {tfile} $in2dfiles {
if {$f != ""} { puts " * meshing file tutorials/$tfile.in2d..." }
@@ -89,7 +89,7 @@ proc ngtest { {t all} {f ""}} {
}
puts "\n ** testing geo files in tutorials/ **"
- set testdir "$::ngdir/../share/netgen"
+ set testdir "$::ngdir/../share/netgen-mesher"
set geofiles { boxcyl cubemcyl extrusion revolution trafo
circle_on_cube cubemsphere fichera sculpture twobricks
cone cylinder lshape3d shaft twocubes
diff --git a/py_tutorials/CMakeLists.txt b/py_tutorials/CMakeLists.txt
index 895911a..11ece3e 100644
--- a/py_tutorials/CMakeLists.txt
+++ b/py_tutorials/CMakeLists.txt
@@ -1,5 +1,5 @@
install( FILES
shaft.geo mesh.py exportNeutral.py
- DESTINATION share/netgen/py_tutorials
+ DESTINATION share/netgen-mesher/py_tutorials
COMPONENT netgen_tutorial
)
diff --git a/tutorials/CMakeLists.txt b/tutorials/CMakeLists.txt
index 0fea9d3..293e9a3 100644
--- a/tutorials/CMakeLists.txt
+++ b/tutorials/CMakeLists.txt
@@ -7,6 +7,6 @@ install( FILES
twobricks.geo twocubes.geo twocyl.geo boundarycondition.geo
hinge.stl part1.stl frame.step screw.step
squarehole.in2d squarecircle.in2d square.in2d
- DESTINATION share/netgen
+ DESTINATION share/netgen-mesher
COMPONENT netgen_tutorial
)
--
2.12.2