Skip to content

Commit

Permalink
Update STAR-CCM+ easyblock for new installer
Browse files Browse the repository at this point in the history
  • Loading branch information
c3-builder committed Nov 26, 2024
1 parent 57c0eae commit f8d0301
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions easybuild/easyblocks/s/star_ccm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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'],
])

Expand Down

0 comments on commit f8d0301

Please sign in to comment.