From f8d0301f47fdb5a53e4f3be6757f31a09d676afe Mon Sep 17 00:00:00 2001 From: c3-builder Date: Tue, 26 Nov 2024 10:35:19 +0000 Subject: [PATCH] Update STAR-CCM+ easyblock for new installer --- easybuild/easyblocks/s/star_ccm.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/easybuild/easyblocks/s/star_ccm.py b/easybuild/easyblocks/s/star_ccm.py index 9acff54a65..ba71d560a2 100644 --- a/easybuild/easyblocks/s/star_ccm.py +++ b/easybuild/easyblocks/s/star_ccm.py @@ -32,6 +32,7 @@ import easybuild.tools.environment as env from easybuild.framework.easyblock import EasyBlock +from easybuild.tools import LooseVersion from easybuild.tools.config import build_option from easybuild.tools.filetools import change_dir, find_glob_pattern from easybuild.tools.run import run_cmd @@ -57,7 +58,16 @@ def build_step(self): def install_step(self): """Custom install procedure for STAR-CCM+.""" - install_script_pattern = "./STAR-CCM+%s_*.sh" % self.version + loose_ver = LooseVersion(self.version) + local_ver = 2410 + + # New installer and new versioning for the installer. + # It uses 24xx instead of 19.xx.xxx. Ignore version in pattern search. + if loose_ver >= LooseVersion('19.06.008'): + install_script_pattern = "./STAR-CCM+*.aol" + else: + install_script_pattern = "./STAR-CCM+%s_*.sh" % self.version + if self.dry_run: install_script = install_script_pattern else: @@ -69,13 +79,21 @@ def install_step(self): env.setvar('IATEMPDIR', tempfile.mkdtemp()) + if loose_ver >= LooseVersion('19.06.008'): + other_install_opts = ' '.join([ + "-DINSTALL_LICENSING=false", + "-DPRODUCTEXCELLENCEPROGRAM=decline", + ]) + else: + other_install_opts = "-DINSTALLFLEX=false" + cmd = ' '.join([ self.cfg['preinstallopts'], install_script, "-i silent", "-DINSTALLDIR=%s" % self.installdir, - "-DINSTALLFLEX=false", "-DADDSYSTEMPATH=false", + other_install_opts, self.cfg['installopts'], ])