rem Source general for all soft directives:
call %CGRU_LOCATION%\software_setup\setup__all.cmd
For /F "Tokens=*" %%I in ('dir /b "C:\Program Files\Autodesk\3ds Max*"') Do set "MAX_LOCATION=C:\Program Files\Autodesk\%%I"
set "PATH=%CGRU_LOCATION%\plugins\max;%PATH%"
set APP_DIR=%MAX_LOCATION%
set APP_EXE=3dsmax.exe
rem Define location:
set locate_file=%CGRU_LOCATION%\software_setup\locate_3dsmax.cmd
if exist %locate_file% call %locate_file%
set MAX_LOCATION=%APP_DIR%
Another Newbie question - Error Code=1
-
- Posts: 14
- Joined: Thu Mar 15, 2018 9:53 am
Re: Another Newbie question - Error Code=1
This is from the setup_3dsmax.cmd file, if I am supposed to put double quotes into this file, where exactly do I put them? All paths seem to use double quotes already.
-
- Posts: 14
- Joined: Thu Mar 15, 2018 9:53 am
Re: Another Newbie question - Error Code=1
Making progress.
After trying to figure out the previous cmd files I noticed that inside \software_setup\bin there are respective cmd-files as well.
They contain a line with an %APP_DIR% variable.
If I change this to an absolute path, from:
Likewise if I change aerender.cmd and afterfx.cmd in the same way After Effects will render fine.
So from what I can tell the issue is due to spaces in search paths, but when evaluating the %APP_DIR%\app.exe variable it is not evaluated within double quotes, hence why an absolute path within double quote works, but a variable within double quotes does not.
After trying to figure out the previous cmd files I noticed that inside \software_setup\bin there are respective cmd-files as well.
They contain a line with an %APP_DIR% variable.
If I change this to an absolute path, from:
to:"%APP_DIR%\3dsmaxcmd.exe" %*
the job is successfully launched and rendering."C:\Program Files\Autodesk\3ds Max 2017\3dsmaxcmd.exe" %*
Likewise if I change aerender.cmd and afterfx.cmd in the same way After Effects will render fine.
So from what I can tell the issue is due to spaces in search paths, but when evaluating the %APP_DIR%\app.exe variable it is not evaluated within double quotes, hence why an absolute path within double quote works, but a variable within double quotes does not.
-
- Posts: 14
- Joined: Thu Mar 15, 2018 9:53 am
Re: Another Newbie question - Error Code=1
I can confirm that it is only the cmd-files inside the \software_setup\bin that needs editing.
Re: Another Newbie question - Error Code=1
Hm, strange, as this is in quotes too
Code: Select all
"%APP_DIR%\3dsmaxcmd.exe" %*
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
-
- Posts: 14
- Joined: Thu Mar 15, 2018 9:53 am
Re: Another Newbie question - Error Code=1
Maybe it is the variable itself that is causing this issue. Like, if it refers to a path that contains spaces, the variable will only yield "C:\Program".
In that case it does not matter if %APP_DIR% is contained within double quotes, because the variable will still be "C:\Program", and the resulting path will be "C:\Program\executable.exe", wich is a file that does not exist.
In that case it does not matter if %APP_DIR% is contained within double quotes, because the variable will still be "C:\Program", and the resulting path will be "C:\Program\executable.exe", wich is a file that does not exist.