From 2212a3715b10f0606f6da0653107469fef174ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20G=C3=A1rate?= Date: Fri, 31 May 2024 16:33:43 +0200 Subject: [PATCH] Version check --- README.md | 4 ++-- dockers/create-release.sh | 4 ++-- dockers/deploy.bat | 2 +- dockers/dockerfile | 2 +- kratos.gid/kratos.tcl | 18 +----------------- kratos.gid/kratos.xml | 2 +- kratos.gid/kratos_default.spd | 2 +- kratos.gid/scripts/Utils.tcl | 13 +++++++------ tools/create-release.bat | 2 +- 9 files changed, 17 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 12940aab0..a3c7d3a51 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ If you need the developer version, you are on the right place. * 4.1- To execute Kratos using the standard pip packages: * Python version recommended: 3.8, 3.9, 3.10, 3.11 * Open a terminal and run - - Linux: `python3 -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.4.6` - - Windows: `python -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.4.6` + - Linux: `python3 -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.5.1` + - Windows: `python -m pip install --upgrade --force-reinstall --no-cache-dir KratosMultiphysics-all==9.5.1` * 4.2- To execute Kratos using your compiled binaries: * Fill the Kratos preferences windows with - Path to the python folder diff --git a/dockers/create-release.sh b/dockers/create-release.sh index 98636e6f5..44f60cb50 100644 --- a/dockers/create-release.sh +++ b/dockers/create-release.sh @@ -1,12 +1,12 @@ #!/bin/bash # Change directory to the specified directory -cd /tmp/dist/kratos-9.4.6/ +cd /tmp/dist/kratos-9.5.1/ find . -type f -name "*.unix.bat" -print0 | xargs -0 dos2unix # Add execute permission to all .bat files in the directory # chmod 755 *.bat # Create a tgz file from the directory -tar -czf ../kratos-9.4.6-linux-64.tgz * +tar -czf ../kratos-9.5.1-linux-64.tgz * diff --git a/dockers/deploy.bat b/dockers/deploy.bat index 3b868f017..6768ce8a8 100644 --- a/dockers/deploy.bat +++ b/dockers/deploy.bat @@ -1,4 +1,4 @@ -set krversion=9.4.6 +set krversion=9.5.1 set pyversion=3.11 @REM 3.10.10-alpine3.17 echo "Building kratos %krversion% on python %pyversion%" diff --git a/dockers/dockerfile b/dockers/dockerfile index 0208b8fba..2dbc4fd55 100644 --- a/dockers/dockerfile +++ b/dockers/dockerfile @@ -8,7 +8,7 @@ FROM python:$pyversion # Update pip RUN pip install --upgrade pip -ARG krversion=9.4.6 +ARG krversion=9.5.1 # WORKDIR /tmp # COPY ./wheels/ ./wheels/ diff --git a/kratos.gid/kratos.tcl b/kratos.gid/kratos.tcl index 8a49455a6..6fa599101 100644 --- a/kratos.gid/kratos.tcl +++ b/kratos.gid/kratos.tcl @@ -13,24 +13,8 @@ namespace eval ::Kratos { variable namespaces } -# Hard minimum GiD Version is 14 -if {[GidUtils::VersionCmp "14.0.1"] >=0 } { - if {[GidUtils::VersionCmp "14.1.1"] >=0 } { - # GiD Developer versions - proc GiD_Event_InitProblemtype { dir } { +proc GiD_Event_InitProblemtype { dir } { Kratos::Event_InitProblemtype $dir - } - } { - # GiD Official versions - proc InitGIDProject { dir } { - Kratos::Event_InitProblemtype $dir - } - } -} { - # GiD versions previous to 15 are no longer allowed - # As we dont register the event InitProblemtype, the rest of events are also unregistered - # So no chance to open anything in GiD 13.x or earlier - WarnWin "The minimum GiD Version for Kratos is 15 or later \nUpdate at gidhome.com" } proc Kratos::Events { } { diff --git a/kratos.gid/kratos.xml b/kratos.gid/kratos.xml index c9f831684..c1aa9bc54 100644 --- a/kratos.gid/kratos.xml +++ b/kratos.gid/kratos.xml @@ -5,7 +5,7 @@ Kratos 9.5.2 - 16.1.4d + 16.1.10d 17.1.99d 0 1 diff --git a/kratos.gid/kratos_default.spd b/kratos.gid/kratos_default.spd index 8f716d7b8..6735991d2 100644 --- a/kratos.gid/kratos_default.spd +++ b/kratos.gid/kratos_default.spd @@ -1,6 +1,6 @@ - + diff --git a/kratos.gid/scripts/Utils.tcl b/kratos.gid/scripts/Utils.tcl index bb81b49bc..c036575f2 100644 --- a/kratos.gid/scripts/Utils.tcl +++ b/kratos.gid/scripts/Utils.tcl @@ -87,12 +87,13 @@ proc Kratos::WarnAboutMinimumRecommendedGiDVersion { } { if { [GidUtils::VersionCmp $kratos_private(MinimumGiDVersion)] < 0 } { W "Warning: kratos interface requires GiD $kratos_private(MinimumGiDVersion) or later." - if { [GidUtils::VersionCmp 14.0.0] < 0 } { - W "If you are still using a GiD version 13.1.7d or later, you can still use most of the features, but think about upgrading to GiD 14." - } { - W "If you are using an official version of GiD 14, we recommend to use the latest developer version" - } - W "Download it from: https://www.gidhome.com/download/developer-versions/" + W "Download it from: https://www.gidsimulation.com/gid-for-science/downloads/" + } + # Check GiD maximum version + if { [GidUtils::VersionCmp $kratos_private(MaximumGiDVersion)] > 0 } { + W "Warning: kratos interface requires GiD $kratos_private(MaximumGiDVersion) or less." + W "You may experience problems with the python packages" + W "You can download it from: https://www.gidsimulation.com/gid-for-science/downloads/" } } diff --git a/tools/create-release.bat b/tools/create-release.bat index 427666b59..73e20693c 100644 --- a/tools/create-release.bat +++ b/tools/create-release.bat @@ -1,4 +1,4 @@ -set VERSION=9.4.6 +set VERSION=9.5.1 @REM git checkout master @REM git fetch -p @REM git pull -p