Skip to content

Commit

Permalink
Version check
Browse files Browse the repository at this point in the history
  • Loading branch information
jginternational committed May 31, 2024
1 parent 5938b99 commit 2212a37
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 32 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions dockers/create-release.sh
Original file line number Diff line number Diff line change
@@ -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 *

2 changes: 1 addition & 1 deletion dockers/deploy.bat
Original file line number Diff line number Diff line change
@@ -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%"
Expand Down
2 changes: 1 addition & 1 deletion dockers/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
18 changes: 1 addition & 17 deletions kratos.gid/kratos.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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 { } {
Expand Down
2 changes: 1 addition & 1 deletion kratos.gid/kratos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Name>Kratos</Name>
<Version>9.5.2</Version>
<ExecutableVersion></ExecutableVersion>
<MinimumGiDVersion>16.1.4d</MinimumGiDVersion>
<MinimumGiDVersion>16.1.10d</MinimumGiDVersion>
<MaximumGiDVersion>17.1.99d</MaximumGiDVersion>
<CustomLibAutomatic>0</CustomLibAutomatic>
<CustomLibNativeGroups>1</CustomLibNativeGroups>
Expand Down
2 changes: 1 addition & 1 deletion kratos.gid/kratos_default.spd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- -*- coding: utf-8; mode: SGML -*- -->
<Kratos_data version='9.4.6'>
<Kratos_data version='9.5.1'>
<style show_menubutton_about='0' show_menubutton_search='1'></style>
<groups/>
<units></units>
Expand Down
13 changes: 7 additions & 6 deletions kratos.gid/scripts/Utils.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
}
}

Expand Down
2 changes: 1 addition & 1 deletion tools/create-release.bat
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 2212a37

Please sign in to comment.