Commit d9108410 by Christophe Geuzaine

look for models in 2-level dirs

parent 5ab1ea92
......@@ -14,7 +14,7 @@ else(APPNAME)
set(APPNAME Onelab)
endif(APPNAME)
# find all benchmarks who provide infos.xml
# find all benchmarks (in a two-level dir hierarchy) who provide infos.xml
file(GLOB BENCHMARKSDIR ${MODELS_DIR}/*)
foreach(SUBDIR ${BENCHMARKSDIR})
if(IS_DIRECTORY ${SUBDIR})
......@@ -22,6 +22,17 @@ foreach(SUBDIR ${BENCHMARKSDIR})
if(INFOSFILE)
message(STATUS "Found benchmark ${SUBDIR}")
list(APPEND BENCHMARKS ${SUBDIR})
else()
file(GLOB BENCHMARKSDIR2 ${SUBDIR}/*)
foreach(SUBDIR2 ${BENCHMARKSDIR2})
if(IS_DIRECTORY ${SUBDIR2})
file(GLOB INFOSFILE ${SUBDIR2}/infos.xml)
if(INFOSFILE)
message(STATUS "Found benchmark ${SUBDIR2}")
list(APPEND BENCHMARKS ${SUBDIR2})
endif()
endif()
endforeach()
endif()
endif()
endforeach()
......
......@@ -50,7 +50,7 @@ occt_framework="$frameworks_dir/occt.framework"
if [ "$appname" != "Onelab" ] ; then
models_dir="${HOME}/src/getdp/benchmarks_private"
else
models_dir="${HOME}/src/onelab_doc/models"
models_dir="${HOME}/src/onelab_doc"
fi
if [ -f ${models_dir}/cleanup.sh ]; then
cd ${models_dir} && ./cleanup.sh
......
// Merge this once you have a nice view of the model to generate the master
// 1024x1024 screenshot for the mobile app, as well as the scaled 128x128 thumbnail
Print.Width = 1014;
Print.Height = 1014;
Print.Background = 1;
model = AbsolutePath(General.FileName);
dir = DirName(model);
Save StrCat(dir, "infos_large.png");
SystemCall StrCat("convert -scale 128 ", dir, "infos_large.png ", dir, "infos.png");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment