preliminary win32 support
This commit is contained in:
parent
f660c0d22b
commit
3d6ff40dab
32
houy.py
32
houy.py
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
from sys import argv, platform, exit, stderr
|
from sys import argv, platform, exit, stderr
|
||||||
from os import environ, chdir
|
from os import environ, getenv, chdir
|
||||||
import shlex
|
import shlex
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
@ -11,9 +11,10 @@ if __name__ == '__main__':
|
|||||||
setup_path = {
|
setup_path = {
|
||||||
'darwin': '/Applications/Houdini/Houdini17.5.173/Frameworks/Houdini.framework/Versions/Current/Resources',
|
'darwin': '/Applications/Houdini/Houdini17.5.173/Frameworks/Houdini.framework/Versions/Current/Resources',
|
||||||
'linux': '/opt/hfs17.5.229',
|
'linux': '/opt/hfs17.5.229',
|
||||||
|
'win32': 'C:\Program Files\Side Effects Software\Houdini 17.5.173'
|
||||||
}
|
}
|
||||||
if platform not in setup_path:
|
if platform not in setup_path:
|
||||||
print('Platform `{}` not supported... yet.', file=stderr)
|
print('Platform `{}` not supported... yet.'.format(platform), file=stderr)
|
||||||
exit(1)
|
exit(1)
|
||||||
chdir(setup_path[platform])
|
chdir(setup_path[platform])
|
||||||
if '-rs3' in argv:
|
if '-rs3' in argv:
|
||||||
@ -28,12 +29,23 @@ if __name__ == '__main__':
|
|||||||
'HOUDINI_PATH': '{}/redshift4houdini/17.5.173;&'.format(redshift_path),
|
'HOUDINI_PATH': '{}/redshift4houdini/17.5.173;&'.format(redshift_path),
|
||||||
'REDSHIFT_COREDATAPATH': '{}'.format(redshift_path),
|
'REDSHIFT_COREDATAPATH': '{}'.format(redshift_path),
|
||||||
})
|
})
|
||||||
command = shlex.split("env -i sh -c '. houdini_setup >/dev/null && env'")
|
if platform == 'win32':
|
||||||
proc = subprocess.Popen(command, stdout=subprocess.PIPE,
|
#call(['runas', '/noprofile', '/user:Administrator', r'"c:\Windows\System32\tscon.exe {} /dest:console"'.format(getenv('SessionName'))], env=environ)
|
||||||
universal_newlines=True)
|
environ.update({
|
||||||
for line in proc.stdout:
|
'PATH': "C:/ProgramData/Redshift/bin;$PATH",
|
||||||
(key, _, value) = str(line.strip()).partition('=')
|
'HOUDINI_PATH': "C:/ProgramData/Redshift/Plugins/Houdini/17.5.173;&",
|
||||||
environ[key] = value
|
'HOUDINI_OCL_DEVICETYPE': 'GPU',
|
||||||
print(key, '=', value)
|
'HOUDINI_OCL_DEVICENUMBER': '0',
|
||||||
proc.communicate()
|
})
|
||||||
|
|
||||||
|
# Initialize env vars.
|
||||||
|
if platform != 'win32':
|
||||||
|
command = shlex.split("env -i sh -c '. houdini_setup >/dev/null && env'")
|
||||||
|
proc = subprocess.Popen(command, stdout=subprocess.PIPE,
|
||||||
|
universal_newlines=True)
|
||||||
|
for line in proc.stdout:
|
||||||
|
(key, _, value) = str(line.strip()).partition('=')
|
||||||
|
environ[key] = value
|
||||||
|
print(key, '=', value)
|
||||||
|
proc.communicate()
|
||||||
call(['./bin/houdini'], env=environ)
|
call(['./bin/houdini'], env=environ)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user