Open er1c opened 3 years ago
pip install -U pip setuptools
pip install -U virtualenv
pip install virtualenv
git clone git@github.com:nightgryphon/gryphon-scan.git
cd gryphon-scan
virtualenv venv
source venv/bin/activate
pip install -U pyserial pyopengl pyopengl-accelerate numpy scipy matplotlib==1.4.0 py2app==0.7.2 setuptools==3.4
...
scan/dar_dist/dist/Horus.app/Contents/Resources/mpl-data/stylelib/dark_background.mplstyle
Traceback (most recent call last):
File "setup_mac.py", line 39, in <module>
setup_requires=['py2app'])
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/eric/Work/gryphon-scan/venv/lib/python2.7/site-packages/py2app/build_app.py", line 520, in run
self._run()
File "/Users/eric/Work/gryphon-scan/venv/lib/python2.7/site-packages/py2app/build_app.py", line 708, in _run
self.run_normal()
File "/Users/eric/Work/gryphon-scan/venv/lib/python2.7/site-packages/py2app/build_app.py", line 798, in run_normal
self.create_binaries(py_files, pkgdirs, extensions, loader_files)
File "/Users/eric/Work/gryphon-scan/venv/lib/python2.7/site-packages/py2app/build_app.py", line 921, in create_binaries
dpath = os.path.join(prefix, 'Resources', 'Python.app', 'Contents', 'MacOS')
UnboundLocalError: local variable 'prefix' referenced before assignment
Creating disk image...
......................................................................................................................................................................................................
created: /Users/eric/Work/gryphon-scan/dar_dist/rw.Horus_0.2rc1.dmg
Mounting disk image...
Unmounting disk image...
"disk2" ejected.
Mount directory: /Volumes/Horus Installer
Device name: /dev/disk2
Copying background file...
making link to Applications dir
/Volumes/Horus Installer
Copying volume icon file 'res/horus.icns'...
mktemp: too few X's in template ‘createdmg’
Looks like I had to upgrade python 2.7: python 2.7.18: https://www.python.org/downloads/release/python-2718/
/Volumes/Horus Installer
Copying volume icon file 'res/horus.icns'...
mktemp: too few X's in template ‘createdmg’
~/Work/gryphon-scan develop !1 ?1 41s 10:13:55 AM
❯ ack createdmg
pkg/darwin/create-dmg/create-dmg
183:APPLESCRIPT=$(mktemp -t createdmg)
~/Work/gryphon-scan develop !1 ?1 10:14:13 AM
❯ mktemp -t createdmg
mktemp: too few X's in template ‘createdmg’
~/Work/gryphon-scan develop !1 ?1 10:14:27 AM
❯ mktemp -t createdmgXXXXX
/var/folders/xd/h9x37m7s5fx_14m7ltfj2vjc0000gn/T/createdmgYgiiB
~/Work/gryphon-scan develop !1 ?1 10:14:30 AM
❯
On latest OSX there is one OpenGL issue:
File "/Applications/Horus.app/Contents/Resources/lib/python2.7/OpenGL/platform/darwin.py", line 41, in GL
raise ImportError("Unable to load OpenGL library", *err.args)
ImportError: ('Unable to load OpenGL library', 'dlopen(OpenGL, 10): image not found', 'OpenGL', None)
This can be fixed by editing: /Applications/Horus.app/Contents/Resources/lib/python2.7/OpenGL/platform/ctypesloader.py
Replace: fullName = util.find_library( name )
with: fullName = '/System/Library/Frameworks/OpenGL.framework/OpenGL'
It will load the app, but it doesn't appear to have access to the camera, so looks like there is still some other issue.
❯ ./Horus
/Applications/Horus.app/Contents/Resources/lib/python27.zip
/Applications/Horus.app/Contents/Resources/lib/python2.7
/Applications/Horus.app/Contents/Resources/lib/python2.7/plat-darwin
/Applications/Horus.app/Contents/Resources/lib/python2.7/plat-mac
/Applications/Horus.app/Contents/Resources/lib/python2.7/plat-mac/lib-scriptpackages
/Applications/Horus.app/Contents/Resources/lib/python2.7/lib-tk
/Applications/Horus.app/Contents/Resources/lib/python2.7/lib-old
/Applications/Horus.app/Contents/Resources/lib/python2.7/lib-dynload
dlopen(/Applications/Horus.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core.so, 2): Library not loaded: @loader_path/libwx_osx_cocoau_core-3.1.5.0.0.dylib
Referenced from: /Applications/Horus.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core.so
Reason: image not found
Traceback (most recent call last):
File "/Applications/Horus.app/Contents/Resources/__boot__.py", line 47, in <module>
_run()
File "/Applications/Horus.app/Contents/Resources/__boot__.py", line 38, in _run
exec(compile(source, path, 'exec'), globals(), globals())
File "/Applications/Horus.app/Contents/Resources/horus", line 23, in <module>
exit(1)
NameError: name 'exit' is not defined
2021-07-31 10:18:34.414 Horus[54857:2550638] Horus Error
HRMFP
regarding missing "uvcc.so" error take a look at src/horus/engine/driver/uvc/mac/ build it separately with "make" before running the app. You has to get uvcc.so file if build succeeds. this library overcomes missing parameters within MAC camera API
also do not use package.sh as it is outdated. just run the app directly
I think some of the packages need to be pinned to specific versions - the error below has some errors - maybe some of the packages (e.g. pyopengl need to be pinned to specific versions?) Do you know which versions you have installed?
Setup Instructions
Package Output
Running directly