Skip to content

Commit

Permalink
changed bundling process for 32-bit capture and player bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBarz committed Jul 24, 2015
1 parent cafff14 commit 6c04d8f
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions deploy_capture/bundle.spec
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ elif platform.system() == 'Windows':
[('_videoInput.lib', os.path.join(python_path, '_videoInput.lib'),'BINARY')],
[('msvcp110.dll', os.path.join(system_path, 'msvcp110.dll'),'BINARY')],
[('msvcr110.dll', os.path.join(system_path, 'msvcr110.dll'),'BINARY')],
[('msvcr120.dll', os.path.join(system_path, 'msvcr120.dll'),'BINARY')],
[('OpenSans-Regular.ttf', os.path.join(package_path, 'pyglui/OpenSans-Regular.ttf'),'DATA')],
[('Roboto-Regular.ttf', os.path.join(package_path, 'pyglui/Roboto-Regular.ttf'),'DATA')],
strip=None,
Expand Down
65 changes: 65 additions & 0 deletions deploy_player/bundle.spec
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,68 @@ elif platform.system() == 'Linux':
strip=True,
upx=True,
name='pupil_player')

elif platform.system() == 'Windows':
import sys, os, os.path

system_path = os.path.join(os.environ['windir'], 'system32')

print "Using Environment:"
python_path = None
package_path = None
for path in sys.path:
print " -- " + path
if path.endswith("scripts"):
python_path = os.path.abspath(os.path.join(path, os.path.pardir))
elif path.endswith("site-packages"):
lib_dir = os.path.abspath(os.path.join(path, os.path.pardir))
python_path = os.path.abspath(os.path.join(lib_dir, os.path.pardir))
package_path = path
if (python_path and package_path):
print "PYTHON PATH @ " + python_path
print "PACKAGE PATH @ " + package_path
else:
print "could not find python_path or package_path. EXIT."
quit()
scipy_imports = ['scipy.integrate']
scipy_imports += ['scipy.integrate._ode', 'scipy.integrate.quadrature', 'scipy.integrate.odepack', 'scipy.integrate._odepack', 'scipy.integrate.quadpack', 'scipy.integrate._quadpack']
scipy_imports += ['scipy.integrate.vode', 'scipy.integrate.lsoda', 'scipy.integrate._dop', 'scipy.special._ufuncs', 'scipy.special._ufuncs_cxx']

a = Analysis(['../pupil_src/player/main.py'],
pathex=['../pupil_src/shared_modules/'],
hiddenimports=['pyglui.cygl.shader']+scipy_imports+av_hidden_imports,
hookspath=None,
runtime_hooks=None,
excludes=['pyx_compiler','matplotlib'])


pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='pupil_player.exe',
icon='pupil-player.ico',
debug=False,
strip=None,
upx=True,
console=True,
resources=['pupil-player.ico,ICON,GLFW_ICON'])

coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
[('methods.so', '../pupil_src/shared_modules/c_methods/methods.so','BINARY')],
[('glfw3.dll', '../pupil_src/shared_modules/external/glfw3.dll','BINARY')],
[('glfw3.lib', '../pupil_src/shared_modules/external/glfw3.lib','BINARY')],
[('glfw3dll.lib', '../pupil_src/shared_modules/external/glfw3dll.lib','BINARY')],
[('opencv_ffmpeg2411.dll', os.path.join(python_path, 'opencv_ffmpeg2411.dll'),'BINARY')],
[('_videoInput.lib', os.path.join(python_path, '_videoInput.lib'),'BINARY')],
[('msvcp110.dll', os.path.join(system_path, 'msvcp110.dll'),'BINARY')],
[('msvcr110.dll', os.path.join(system_path, 'msvcr110.dll'),'BINARY')],
[('msvcr120.dll', os.path.join(system_path, 'msvcr120.dll'),'BINARY')],
[('OpenSans-Regular.ttf', os.path.join(package_path, 'pyglui/OpenSans-Regular.ttf'),'DATA')],
[('Roboto-Regular.ttf', os.path.join(package_path, 'pyglui/Roboto-Regular.ttf'),'DATA')],
strip=None,
upx=True,
name='Pupil Player')
2 changes: 2 additions & 0 deletions deploy_player/finalize_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
call("ln -s /Applications/ %s/Applications"%src_dir,shell=True)
call("hdiutil create -volname '%s' -srcfolder %s -format UDZO '%s.dmg'"%(bundle_dmg_name,src_dir,bundle_name),shell=True)

elif platform.system() == 'Windows':
write_version_file(os.path.join('dist', 'Pupil Player'))

elif platform.system() == 'Linux':

Expand Down

0 comments on commit 6c04d8f

Please sign in to comment.