1414from botocore .config import Config
1515
1616C4D_INSTALLERS = {
17+ "2024" : {
18+ "windows" : {
19+ "s3_key" : "cinema4d/2024/Cinema4D_2024_2024.5.1_Win.exe" ,
20+ "sha256" : "e71f7f103bb783fc5155e1b43e057d20c839052a0fe712ea3f42e447acff46b1" ,
21+ "type" : "exe" ,
22+ },
23+ "macos" : {
24+ "s3_key" : "cinema4d/2024/Cinema4D_2024_2024.5.1_Mac.dmg" ,
25+ "sha256" : "08d3d0efc8dd06f69fae8f86bf50539689b12029a2ac79c0d6c358f7d9d63edc" ,
26+ "type" : "dmg" ,
27+ },
28+ },
1729 "2025" : {
1830 "windows" : {
19- "s3_key" : "cinema4d/2025/Cinema4D_2025_2025.3.3_Win.zip " ,
20- "sha256" : "fcf0ea40af73727f1bc1fb1a47ea0c2f3476f0652824d3b740181dc1a6123e09 " ,
21- "type" : "zip " ,
31+ "s3_key" : "cinema4d/2025/Cinema4D_2025_2025.3.3_Win.exe " ,
32+ "sha256" : "66f5f5b74f93b32490d32386c642d6857aef98629a5b3eaa88fa366b1598a18e " ,
33+ "type" : "exe " ,
2234 },
2335 "macos" : {
2436 "s3_key" : "cinema4d/2025/Cinema4D_2025_2025.3.3_Mac.dmg" ,
4153}
4254
4355C4D_INSTALL_PATHS = {
56+ "2024" : {
57+ "windows" : Path ("C:/Program Files/Maxon Cinema 4D 2024" ),
58+ "macos" : Path ("/Applications/Maxon Cinema 4D 2024" ),
59+ },
4460 "2025" : {
4561 "windows" : Path ("C:/Program Files/Maxon Cinema 4D 2025" ),
4662 "macos" : Path ("/Applications/Maxon Cinema 4D 2025" ),
5571def run (cmd , check = True ):
5672 """Run a shell command, exiting on failure if check is True."""
5773 print (f"Running: { ' ' .join (cmd )} " )
58- result = subprocess .run (cmd )
74+ result = subprocess .run (cmd , check = False )
5975 if check and result .returncode != 0 :
6076 sys .exit (result .returncode )
6177 return result
@@ -154,6 +170,7 @@ def setup_windows(versions):
154170 ],
155171 capture_output = True ,
156172 text = True ,
173+ check = False ,
157174 )
158175 print (f"Installer exit code: { result .returncode } " )
159176 print (f"Installer stdout: { result .stdout } " )
@@ -182,17 +199,17 @@ def setup_windows(versions):
182199def setup_macos (versions ):
183200 """Install Cinema 4D on macOS for each version."""
184201 for version in versions :
202+ if "macos" not in C4D_INSTALLERS .get (version , {}):
203+ print (f"ERROR: No macOS installer configured for version { version } " )
204+ sys .exit (1 )
205+
185206 install_dir = C4D_INSTALL_PATHS [version ]["macos" ]
186207 marker = install_dir / ".installed"
187208
188209 if marker .exists ():
189210 print (f"Cinema 4D { version } already installed at { install_dir } " )
190211 continue
191212
192- if "macos" not in C4D_INSTALLERS .get (version , {}):
193- print (f"ERROR: No macOS installer configured for version { version } " )
194- sys .exit (1 )
195-
196213 print (f"Installing Cinema 4D { version } ..." )
197214 installer_info = C4D_INSTALLERS [version ]["macos" ]
198215 local_installer = Path (f"/tmp/{ Path (installer_info ['s3_key' ]).name } " )
@@ -259,6 +276,7 @@ def setup_macos(versions):
259276 ],
260277 stdin = subprocess .DEVNULL ,
261278 timeout = 600 ,
279+ check = False ,
262280 )
263281 print (f"Installer exit code: { result .returncode } " )
264282
@@ -317,9 +335,8 @@ def _configure_rlm_licensing(versions, platform_key):
317335 # write to a temp file first then sudo cp it into place.
318336 import tempfile
319337
320- tmp = tempfile .NamedTemporaryFile (mode = "w" , delete = False , suffix = ".txt" )
321- tmp .write (new_content )
322- tmp .close ()
338+ with tempfile .NamedTemporaryFile (mode = "w" , delete = False , suffix = ".txt" ) as tmp :
339+ tmp .write (new_content )
323340 run (["sudo" , "cp" , tmp .name , str (config_txt )])
324341 os .unlink (tmp .name )
325342 else :
@@ -333,7 +350,7 @@ def _configure_rlm_licensing(versions, platform_key):
333350 "--versions" ,
334351 nargs = "+" ,
335352 required = True ,
336- help = "Cinema 4D versions to install (e.g., 2025 2026)" ,
353+ help = "Cinema 4D versions to install (e.g., 2024 2025 2026)" ,
337354 )
338355 args = parser .parse_args ()
339356
0 commit comments