Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make wallet portable? #41

Open
zhmrab opened this issue Mar 9, 2018 · 32 comments
Open

How to make wallet portable? #41

zhmrab opened this issue Mar 9, 2018 · 32 comments

Comments

@zhmrab
Copy link

zhmrab commented Mar 9, 2018

Been using this with command "python wallet.py" and was wondering how to compile this into an .app on Mac ?

I tried running py2app but doesn't work or i do not have the right setup.py

@sumogr
Copy link
Contributor

sumogr commented Mar 10, 2018

Download the dmg file from the releases section and extract it https://github.com/sumoprojects/SumoGUIWallet/releases/download/v0.0.2/Sumokoin_Wallet-v0.0.2-MacOSX.dmg
It already contains the .app :)
untitled

@zhmrab
Copy link
Author

zhmrab commented Mar 10, 2018

@sumogr Thanks for getting back to me!

I have tried that but for some reason the wallet crashes on my mac (MacOS 10.13)
The wallet does open with source code using "python wallet.py" so I am trying to compile it myself, it's also good for me to get familiar with the code :)

When trying to compile it I use (Python 2.7 with Anaconda2)

pyinstaller --add-data Resources:Resources -i Resources/icons/sumokoin.ico -w -n SumoGUIWallet wallet.py

And keep on getting this error : Would you know how to link those libs ?

22046 ERROR: Can not find path ./libpyside-python2.7.1.2.dylib (needed by /anaconda2/lib/python2.7/site-packages/PySide/QtCore.so)
22046 ERROR: Can not find path ./libshiboken-python2.7.1.2.dylib (needed by /anaconda2/lib/python2.7/site-packages/PySide/QtCore.so)
22056 ERROR: Can not find path ./libpyside-python2.7.1.2.dylib (needed by /anaconda2/lib/python2.7/site-packages/PySide/QtNetwork.so)
22056 ERROR: Can not find path ./libshiboken-python2.7.1.2.dylib (needed by /anaconda2/lib/python2.7/site-packages/PySide/QtNetwork.so)
22280 ERROR: Can not find path ./libpyside-python2.7.1.2.dylib (needed by /anaconda2/lib/python2.7/site-packages/PySide/QtWebKit.so)
22280 ERROR: Can not find path ./libshiboken-python2.7.1.2.dylib (needed by /anaconda2/lib/python2.7/site-packages/PySide/QtWebKit.so)
22311 ERROR: Can not find path ./libpyside-python2.7.1.2.dylib (needed by /anaconda2/lib/python2.7/site-packages/PySide/QtGui.so)
22311 ERROR: Can not find path ./libshiboken-python2.7.1.2.dylib (needed by /anaconda2/lib/python2.7/site-packages/PySide/QtGui.so)

@zhmrab
Copy link
Author

zhmrab commented Mar 10, 2018

Edit :

This is what i am getting now :


ImportError: dlopen(/anaconda2/lib/python2.7/site-packages/PySide/QtCore.so, 2): Library not loaded: @loader_path/../../../libpyside-python2.7.1.1.dylib
  Referenced from: /anaconda2/lib/python2.7/site-packages/PySide/QtCore.so
  Reason: image not found]

@sumogr
Copy link
Contributor

sumogr commented Mar 10, 2018

Hi @zhmrab ! My Python skills are quite limited if nonexistent. Kindly wait for @quangvu3 to reply to this.
In the meantime I would suggest trying this command and then try to recompile
export DYLD_LIBRARY_PATH=/usr/local/lib/python2.7/site-packages/PySide

Waiting for your feedback

@zhmrab
Copy link
Author

zhmrab commented Mar 10, 2018

Just tried export DYLD_LIBRARY_PATH=/usr/local/lib/python2.7/site-packages/PySide

but still getting the same issue, here's the full output, hope this gives you more details,


(venv) zhmrab:sumoguiwallet zhmrab$ pyinstaller --add-data Resources:Resources -i Resources/icons/sumokoin.ico -w -n SumoGUIWallet wallet.py
225 INFO: PyInstaller: 3.3.1
225 INFO: Python: 2.7.10
234 INFO: Platform: Darwin-17.4.0-x86_64-i386-64bit
235 INFO: wrote /Users/zhmrab/SumoGUIWallet/SumoGUIWallet.spec
242 INFO: UPX is not available.
243 INFO: Extending PYTHONPATH with paths
['/Users/zhmrab/SumoGUIWallet', '/Users/zhmrab/SumoGUIWallet']
243 INFO: checking Analysis
244 INFO: Building Analysis because out00-Analysis.toc is non existent
244 INFO: Initializing module dependency graph...
247 INFO: Initializing module graph hooks...
313 INFO: running Analysis out00-Analysis.toc
324 INFO: Caching module hooks...
327 INFO: Analyzing /Users/zhmrab/SumoGUIWallet/wallet.py
2681 INFO: Processing pre-find module path hook   distutils
2682 INFO: distutils: retargeting to non-venv dir '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils'
4608 INFO: Processing pre-safe import module hook   _xmlplus
5043 INFO: Processing pre-safe import module hook   urllib3.packages.six.moves
7807 INFO: Loading module hooks...
7807 INFO: Loading module hook "hook-PySide.QtGui.py"...
8250 INFO: Loading module hook "hook-distutils.py"...
8253 INFO: Loading module hook "hook-xml.py"...
8345 INFO: Loading module hook "hook-httplib.py"...
8345 INFO: Loading module hook "hook-encodings.py"...
9036 INFO: Loading module hook "hook-PySide.QtCore.py"...
9124 INFO: Loading module hook "hook-requests.py"...
9128 INFO: Loading module hook "hook-certifi.py"...
9130 INFO: Loading module hook "hook-PySide.py"...
9246 INFO: Looking for ctypes DLLs
9271 INFO: Analyzing run-time hooks ...
9277 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
9288 INFO: Including run-time hook 'pyi_rth_qt4plugins.py'
9304 INFO: Looking for dynamic libraries
9374 ERROR: Can not find path ./libpyside-python2.7.1.2.dylib (needed by /Users/zhmrab/venv/lib/python2.7/site-packages/PySide/QtCore.so)
9374 ERROR: Can not find path ./libshiboken-python2.7.1.2.dylib (needed by /Users/zhmrab/venv/lib/python2.7/site-packages/PySide/QtCore.so)
9377 ERROR: Can not find path ./libpyside-python2.7.1.2.dylib (needed by /Users/zhmrab/venv/lib/python2.7/site-packages/PySide/QtNetwork.so)
9378 ERROR: Can not find path ./libshiboken-python2.7.1.2.dylib (needed by /Users/zhmrab/venv/lib/python2.7/site-packages/PySide/QtNetwork.so)
9578 ERROR: Can not find path ./libpyside-python2.7.1.2.dylib (needed by /Users/zhmrab/venv/lib/python2.7/site-packages/PySide/QtWebKit.so)
9578 ERROR: Can not find path ./libshiboken-python2.7.1.2.dylib (needed by /Users/zhmrab/venv/lib/python2.7/site-packages/PySide/QtWebKit.so)
9591 ERROR: Can not find path ./libpyside-python2.7.1.2.dylib (needed by /Users/zhmrab/venv/lib/python2.7/site-packages/PySide/QtGui.so)
9591 ERROR: Can not find path ./libshiboken-python2.7.1.2.dylib (needed by /Users/zhmrab/venv/lib/python2.7/site-packages/PySide/QtGui.so)
9662 INFO: Looking for eggs
9662 INFO: Python library not in binary dependencies. Doing additional searching...
9668 INFO: Using Python library /Users/zhmrab/venv/bin/../.Python
9674 INFO: Warnings written to /Users/zhmrab/SumoGUIWallet/build/SumoGUIWallet/warnSumoGUIWallet.txt
9718 INFO: Graph cross-reference written to /Users/zhmrab/SumoGUIWallet/build/SumoGUIWallet/xref-SumoGUIWallet.html
9927 INFO: Appending 'datas' from .spec
9931 INFO: checking PYZ
9931 INFO: Building PYZ because out00-PYZ.toc is non existent
9931 INFO: Building PYZ (ZlibArchive) /Users/zhmrab/SumoGUIWallet/build/SumoGUIWallet/out00-PYZ.pyz
10619 INFO: Building PYZ (ZlibArchive) /Users/zhmrab/SumoGUIWallet/build/SumoGUIWallet/out00-PYZ.pyz completed successfully.
10791 INFO: checking PKG
10791 INFO: Building PKG because out00-PKG.toc is non existent
10791 INFO: Building PKG (CArchive) out00-PKG.pkg
10807 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
10812 INFO: Bootloader /Users/zhmrab/venv/lib/python2.7/site-packages/PyInstaller/bootloader/Darwin-64bit/runw
10812 INFO: checking EXE
10812 INFO: Building EXE because out00-EXE.toc is non existent
10812 INFO: Building EXE from out00-EXE.toc
10813 INFO: Appending archive to EXE /Users/zhmrab/SumoGUIWallet/build/SumoGUIWallet/SumoGUIWallet
10816 INFO: Fixing EXE for code signing /Users/zhmrab/SumoGUIWallet/build/SumoGUIWallet/SumoGUIWallet
10824 INFO: Building EXE from out00-EXE.toc completed successfully.
10829 INFO: checking COLLECT
10830 INFO: Building COLLECT because out00-COLLECT.toc is non existent
10830 INFO: Building COLLECT out00-COLLECT.toc
14083 WARNING: failed to copy flags of /Users/zhmrab/venv/include/python2.7/pyconfig.h
14091 WARNING: failed to copy flags of /Users/zhmrab/venv/lib/python2.7/config/Makefile
14093 INFO: Building COLLECT out00-COLLECT.toc completed successfully.
14140 INFO: checking BUNDLE
14140 INFO: Building BUNDLE because out00-BUNDLE.toc is non existent
14140 INFO: Building BUNDLE out00-BUNDLE.toc
17291 INFO: moving BUNDLE data files to Resource directory
(venv) zhmrab:sumoguiwallet zhmrab$ 

@sumogr
Copy link
Contributor

sumogr commented Mar 10, 2018

Ok the QtCore.so cannot locate pyside libs due to wrong path. Copy paste on your terminal and run the below.(I know it is long it fixes the path of each library one by one) If it fails to execute try replacing all && with ; (or run each install_name_tool command one by one)
If this doesnt work wait for @quangvu3 :)

sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtCore.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtCore.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtGui.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtGui.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtOpenGL.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtOpenGL.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtDeclarative.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtDeclarative.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtHelp.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtHelp.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtMultimedia.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtMultimedia.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtNetwork.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtNetwork.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtScript.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtScript.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtScriptTools.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtScriptTools.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtSql.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtSql.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtSvg.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtSvg.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtTest.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtTest.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtUiTools.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtUiTools.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtWebKit.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtWebKit.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtXml.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtXml.so && sudo install_name_tool -change @rpath/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtXmlPatterns.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtXmlPatterns.so && sudo install_name_tool -change @rpath/libshiboken-python2.7.1.2.dylib @loader_path/libshiboken-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib

@zhmrab
Copy link
Author

zhmrab commented Mar 10, 2018

Ok thanks I appreciate the help! Just did it this is what I get now


zhmrab:~ zhmrab$ pyinstaller --add-data Resources:Resources -i Resources/icons/sumokoin.ico -w -n SumoGUIWallet wallet.py
38 INFO: PyInstaller: 3.4.dev0+9f4eca801
39 INFO: Python: 2.7.14
49 INFO: Platform: Darwin-17.4.0-x86_64-i386-64bit
50 INFO: wrote /Users/zhmrab/SumoGUIWallet.spec
57 INFO: UPX is not available.
Traceback (most recent call last):
  File "/usr/local/bin/pyinstaller", line 11, in <module>
    load_entry_point('PyInstaller==3.4.dev0+9f4eca801', 'console_scripts', 'pyinstaller')()
  File "/usr/local/lib/python2.7/site-packages/PyInstaller/__main__.py", line 94, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "/usr/local/lib/python2.7/site-packages/PyInstaller/__main__.py", line 46, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/PyInstaller/building/build_main.py", line 791, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "/usr/local/lib/python2.7/site-packages/PyInstaller/building/build_main.py", line 737, in build
    exec(text, spec_namespace)
  File "<string>", line 16, in <module>
  File "/usr/local/lib/python2.7/site-packages/PyInstaller/building/build_main.py", line 162, in __init__
    raise ValueError("script '%s' not found" % script)
ValueError: script '/Users/zhmrab/wallet.py' not found

Also for clarifiation, for install_name_tool should it be :

sudo install_name_tool -change libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtCore.so &&

Or

sudo install_name_tool -change .7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/libpyside-python2.7.1.2.dylib /usr/local/lib/python2.7/site-packages/PySide/QtCore.so &&

@sumogr
Copy link
Contributor

sumogr commented Mar 10, 2018

Sorry dude f...ing github messed up my copy paste due to the @ character before rpath
Get it from here
https://pastebin.com/2vX5GGsQ

@zhmrab
Copy link
Author

zhmrab commented Mar 10, 2018

Ok I think we are making progress!

The error for missing lib is gone, this is what I get now but app is still not functionning :


(venv) zhmrab:sumoguiwallet zhmrab$ pyinstaller --add-data Resources:Resources -i Resources/icons/sumokoin.ico -w -n SumoGUIWallet wallet.py
79 INFO: PyInstaller: 3.4.dev0+9f4eca801
79 INFO: Python: 2.7.14
88 INFO: Platform: Darwin-17.4.0-x86_64-i386-64bit
90 INFO: wrote /Users/zhmrab/SumoGUIWallet/SumoGUIWallet.spec
98 INFO: UPX is not available.
100 INFO: Extending PYTHONPATH with paths
['/Users/zhmrab/SumoGUIWallet', '/Users/zhmrab/SumoGUIWallet']
100 INFO: checking Analysis
100 INFO: Building Analysis because out00-Analysis.toc is non existent
100 INFO: Initializing module dependency graph...
104 INFO: Initializing module graph hooks...
181 INFO: running Analysis out00-Analysis.toc
192 INFO: Caching module hooks...
200 INFO: Analyzing /Users/zhmrab/SumoGUIWallet/wallet.py
2634 INFO: Processing pre-find module path hook   distutils
4690 INFO: Processing pre-safe import module hook   _xmlplus
5143 INFO: Processing pre-safe import module hook   urllib3.packages.six.moves
8102 INFO: Loading module hooks...
8102 INFO: Loading module hook "hook-PySide.QtGui.py"...
8538 INFO: Loading module hook "hook-distutils.py"...
8540 INFO: Loading module hook "hook-xml.py"...
8643 INFO: Loading module hook "hook-httplib.py"...
8644 INFO: Loading module hook "hook-encodings.py"...
9417 INFO: Loading module hook "hook-PySide.QtCore.py"...
9501 INFO: Loading module hook "hook-requests.py"...
9506 INFO: Loading module hook "hook-certifi.py"...
9509 INFO: Loading module hook "hook-PySide.py"...
9628 INFO: Looking for ctypes DLLs
9680 INFO: Analyzing run-time hooks ...
9686 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
9692 INFO: Including run-time hook 'pyi_rth_qt4plugins.py'
9710 INFO: Looking for dynamic libraries
9964 INFO: Looking for eggs
9964 INFO: Using Python library /usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/Python
9970 INFO: Warnings written to /Users/zhmrab/SumoGUIWallet/build/SumoGUIWallet/warnSumoGUIWallet.txt
10026 INFO: Graph cross-reference written to /Users/zhmrab/SumoGUIWallet/build/SumoGUIWallet/xref-SumoGUIWallet.html
10275 INFO: Appending 'datas' from .spec
10281 INFO: checking PYZ
10281 INFO: Building PYZ because out00-PYZ.toc is non existent
10281 INFO: Building PYZ (ZlibArchive) /Users/zhmrab/SumoGUIWallet/build/SumoGUIWallet/out00-PYZ.pyz
10896 INFO: Building PYZ (ZlibArchive) /Users/zhmrab/SumoGUIWallet/build/SumoGUIWallet/out00-PYZ.pyz completed successfully.
11094 INFO: checking PKG
11094 INFO: Building PKG because out00-PKG.toc is non existent
11095 INFO: Building PKG (CArchive) out00-PKG.pkg
11107 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
11112 INFO: Bootloader /usr/local/lib/python2.7/site-packages/PyInstaller/bootloader/Darwin-64bit/runw
11112 INFO: checking EXE
11113 INFO: Building EXE because out00-EXE.toc is non existent
11113 INFO: Building EXE from out00-EXE.toc
11113 INFO: Appending archive to EXE /Users/zhmrab/SumoGUIWallet/build/SumoGUIWallet/SumoGUIWallet
11116 INFO: Fixing EXE for code signing /Users/zhmrab/SumoGUIWallet/build/SumoGUIWallet/SumoGUIWallet
11125 INFO: Building EXE from out00-EXE.toc completed successfully.
11131 INFO: checking COLLECT
11131 INFO: Building COLLECT because out00-COLLECT.toc is non existent
11131 INFO: Building COLLECT out00-COLLECT.toc
13472 INFO: Building COLLECT out00-COLLECT.toc completed successfully.
13526 INFO: checking BUNDLE
13527 INFO: Building BUNDLE because out00-BUNDLE.toc is non existent
13527 INFO: Building BUNDLE out00-BUNDLE.toc
15439 INFO: moving BUNDLE data files to Resource directory

Now this line :

9970 INFO: Warnings written to /Users/zhmrab/SumoGUIWallet/build/SumoGUIWallet/warnSumoGUIWallet.txt
[
Points me to the warning logs which has this :

missing module named PyQt4 - imported by /usr/local/lib/python2.7/site-packages/PyInstaller/loader/rthooks/pyi_rth_qt4plugins.py
missing module named org - imported by copy
missing module named _sha512 - imported by hashlib
missing module named _sha256 - imported by hashlib
missing module named _md5 - imported by hashlib
missing module named _sha - imported by hashlib
missing module named 'org.python' - imported by pickle, xml.sax
missing module named _subprocess - imported by subprocess, multiprocessing.forking, multiprocessing.reduction
missing module named msvcrt - imported by subprocess, getpass, multiprocessing.forking
missing module named riscosenviron - imported by os
missing module named riscospath - imported by os
missing module named riscos - imported by os
missing module named ce - imported by os
missing module named _emx_link - imported by os
missing module named os2 - imported by os
missing module named nt - imported by os, ntpath
missing module named 'multiprocessing.popen_fork' - imported by /usr/local/lib/python2.7/site-packages/PyInstaller/loader/rthooks/pyi_rth_multiprocessing.py
missing module named 'multiprocessing.popen_spawn_win32' - imported by /usr/local/lib/python2.7/site-packages/PyInstaller/loader/rthooks/pyi_rth_multiprocessing.py
missing module named 'multiprocessing.spawn' - imported by /usr/local/lib/python2.7/site-packages/PyInstaller/loader/rthooks/pyi_rth_multiprocessing.py
missing module named _dummy_threading - imported by dummy_threading
missing module named _winreg - imported by mimetypes, urllib, winreg, platform, requests.utils
missing module named OverrideFrom23 - imported by Carbon.Res
missing module named SOCKS - imported by ftplib
missing module named rourl2path - imported by urllib
missing module named 'java.lang' - imported by platform, xml.sax._exceptions
missing module named _xmlplus - imported by xml
missing module named _xmlrpclib - imported by xmlrpclib
missing module named psutil._psutil_aix - imported by psutil, psutil._psaix
missing module named psutil._psutil_sunos - imported by psutil, psutil._pssunos
missing module named ElementC14N - imported by xml.etree.ElementTree
missing module named psutil._psutil_bsd - imported by psutil, psutil._psbsd
missing module named enum - imported by psutil._common, psutil._pslinux, psutil._pswindows
missing module named psutil._psutil_windows - imported by psutil, psutil._pswindows
missing module named _psutil_linux - imported by psutil
missing module named netbios - imported by uuid
missing module named win32wnet - imported by uuid
runtime module named urllib3.packages.six.moves - imported by httplib, urllib3.connectionpool, urllib3.util.response, 'urllib3.packages.six.moves.urllib', urllib3.response
missing module named ipaddress - imported by urllib3.packages.ssl_match_hostname._implementation
missing module named backports - imported by urllib3.packages.ssl_match_hostname
missing module named "'urllib3.packages.six.moves.urllib'.parse" - imported by urllib3.request, urllib3.poolmanager
missing module named 'urllib.request' - imported by requests.compat
missing module named 'urllib.parse' - imported by requests.compat
missing module named simplejson - imported by requests.compat
missing module named socks - imported by urllib3.contrib.socks
missing module named vms_lib - imported by platform
missing module named java - imported by platform
missing module named winreg.HKEY_LOCAL_MACHINE - imported by winreg, platform
missing module named winreg.CloseKey - imported by winreg, platform
missing module named winreg.QueryValueEx - imported by winreg, platform
missing module named winreg.OpenKeyEx - imported by winreg, platform
missing module named win32pipe - imported by platform
missing module named 'OpenSSL.crypto' - imported by urllib3.contrib.pyopenssl
missing module named 'cryptography.x509' - imported by urllib3.contrib.pyopenssl
missing module named 'cryptography.hazmat' - imported by urllib3.contrib.pyopenssl
missing module named cryptography - imported by urllib3.contrib.pyopenssl
missing module named OpenSSL - imported by urllib3.contrib.pyopenssl
missing module named win32evtlog - imported by logging.handlers
missing module named win32evtlogutil - imported by logging.handlers
missing module named winpaths - imported by utils.common](url)

@zhmrab
Copy link
Author

zhmrab commented Mar 11, 2018

Hmm some of these modules aren't even in pip so I'm really wondering how you guys compiled this in the first place!

another solution would be if you guys could provide the setup.py to compile the software?

pyinstaller is pretty messy but with a setup.py script the same way we use "CmakeLists.txt" in other projects.. I could use py2app on mac, and other users who need to compile from source could as well, either with py2app on Mac or py2exe on windows ..

@zhmrab
Copy link
Author

zhmrab commented Mar 11, 2018 via email

@sumogr
Copy link
Contributor

sumogr commented Mar 11, 2018

:) I am just trying to help you here, I never had any reason to compile it into an app since it works both from source or the released app for me. Anyhow we are most likely missing a step since the first problem with the libs path wasnot an actual code issue. I ll ask for a walkthrough on how to compile the source into an app and post it here.

@zhmrab
Copy link
Author

zhmrab commented Mar 11, 2018 via email

@zhmrab
Copy link
Author

zhmrab commented Mar 11, 2018

@sumogr quick update Ive been installing some of these modules with pip and easy_install so the warning list is reducing but there still are a lot of modules that cannot be found pip or easy_install

Hope this helps!

[missing module named org - imported by copy
missing module named 'pkg_resources.extern.pyparsing' - imported by pkg_resources._vendor.packaging.requirements, pkg_resources._vendor.packaging.markers
missing module named netbios - imported by uuid
missing module named win32wnet - imported by uuid
missing module named _thread.RLock - imported by _thread, pkg_resources._vendor.pyparsing
missing module named 'win32com.shell' - imported by pkg_resources._vendor.appdirs
missing module named 'com.sun' - imported by pkg_resources._vendor.appdirs
missing module named com - imported by pkg_resources._vendor.appdirs
missing module named win32api - imported by pkg_resources._vendor.appdirs
missing module named win32com - imported by pkg_resources._vendor.appdirs
missing module named _winreg - imported by winreg, platform, mimetypes, urllib, requests.utils, pkg_resources._vendor.appdirs
missing module named pkg_resources.extern.packaging - imported by pkg_resources.extern, pkg_resources
missing module named pkg_resources.extern.appdirs - imported by pkg_resources.extern, pkg_resources
missing module named 'importlib.machinery' - imported by pkg_resources
missing module named 'pkg_resources.extern.six.moves' - imported by pkg_resources, pkg_resources._vendor.packaging.requirements
missing module named pkg_resources.extern.six - imported by pkg_resources.extern, pkg_resources
missing module named _imp - imported by pkg_resources
missing module named OverrideFrom23 - imported by Carbon.Res
missing module named SOCKS - imported by ftplib
missing module named rourl2path - imported by urllib
missing module named 'java.lang' - imported by platform, xml.sax._exceptions
missing module named _xmlplus - imported by xml
missing module named vms_lib - imported by platform
missing module named java - imported by platform
missing module named winreg.HKEY_LOCAL_MACHINE - imported by winreg, platform
missing module named winreg.CloseKey - imported by winreg, platform
missing module named winreg.QueryValueEx - imported by winreg, platform
missing module named winreg.OpenKeyEx - imported by winreg, platform
missing module named win32pipe - imported by platform
missing module named 'org.python' - imported by pickle, xml.sax
missing module named _subprocess - imported by subprocess, multiprocessing.forking, multiprocessing.reduction
missing module named msvcrt - imported by getpass, subprocess, multiprocessing.forking
missing module named riscosenviron - imported by os
missing module named riscospath - imported by os
missing module named riscos - imported by os
missing module named ce - imported by os
missing module named _emx_link - imported by os
missing module named os2 - imported by os
missing module named nt - imported by os, ntpath
missing module named 'multiprocessing.popen_fork' - imported by /usr/local/lib/python2.7/site-packages/PyInstaller-3.3.1-py2.7.egg/PyInstaller/loader/rthooks/pyi_rth_multiprocessing.py
missing module named 'multiprocessing.popen_spawn_win32' - imported by /usr/local/lib/python2.7/site-packages/PyInstaller-3.3.1-py2.7.egg/PyInstaller/loader/rthooks/pyi_rth_multiprocessing.py
missing module named 'multiprocessing.spawn' - imported by /usr/local/lib/python2.7/site-packages/PyInstaller-3.3.1-py2.7.egg/PyInstaller/loader/rthooks/pyi_rth_multiprocessing.py
missing module named _dummy_threading - imported by dummy_threading
missing module named _xmlrpclib - imported by xmlrpclib
missing module named pyimod03_importers - imported by /usr/local/lib/python2.7/site-packages/PyInstaller-3.3.1-py2.7.egg/PyInstaller/loader/rthooks/pyi_rth_pkgres.py
missing module named psutil._psutil_aix - imported by psutil, psutil._psaix
missing module named psutil._psutil_sunos - imported by psutil, psutil._pssunos
missing module named ElementC14N - imported by xml.etree.ElementTree
missing module named psutil._psutil_bsd - imported by psutil, psutil._psbsd
missing module named psutil._psutil_windows - imported by psutil, psutil._pswindows
missing module named _psutil_linux - imported by psutil
runtime module named urllib3.packages.six.moves - imported by httplib, urllib3.connectionpool, urllib3.util.response, 'urllib3.packages.six.moves.urllib', urllib3.response
missing module named backports - imported by urllib3.packages.ssl_match_hostname
missing module named "'urllib3.packages.six.moves.urllib'.parse" - imported by urllib3.request, urllib3.poolmanager
missing module named 'urllib.request' - imported by requests.compat
missing module named 'urllib.parse' - imported by asn1crypto._iri, requests.compat
missing module named importlib.reload - imported by importlib, simplejson.compat
missing module named socks - imported by urllib3.contrib.socks
missing module named 'six.moves.urllib_parse' - imported by 'six.moves.urllib_parse'
runtime module named six.moves - imported by cryptography.x509.general_name
missing module named win32evtlog - imported by logging.handlers
missing module named win32evtlogutil - imported by logging.handlers
missing module named winpaths - imported by utils.common]

@sumogr
Copy link
Contributor

sumogr commented Mar 12, 2018

pip install -r requirements.txt should have solved that you know
Try searching for the missing packages here
http://packages.pypy.org/

@zhmrab
Copy link
Author

zhmrab commented Mar 12, 2018

Ok thanks!

I will try and write full instructions on how to compile from source for anyone interested

@zhmrab
Copy link
Author

zhmrab commented Mar 12, 2018

@sumogr could you confirm the pyinstaller command? I'm using

pyinstaller --add-data Resources:Resources -i Resources/icons/sumokoin.ico -w -n SumoGUIWallet wallet.py

@sumogr
Copy link
Contributor

sumogr commented Mar 12, 2018

On your source Resources folder dont forget to create a subfolder named bin and paste into it the sumo-wallet-cli sumo-wallet-rpc and sumokoind binaries. Doublecheck they are bundled into the app after it is produced.
pyinstaller --add-data="Resources:Resources" --icon=Resources/icons/sumokoin.ico --windowed --name SumoGUIWallet wallet.py

@zhmrab
Copy link
Author

zhmrab commented Mar 12, 2018

Ok thanks,

I installed the modules from http://packages.pypy.org/ but the warning still persist about missing modules even though installation is successful ..

I checked and the binaries are bundled into SumoGUIWallet.app/Contents/MacOS/Resources/bin, so are the sumokoin icon files and www resources so technically should be working but still nothing functionnal

@sumogr
Copy link
Contributor

sumogr commented Mar 12, 2018

The Resoures folder should have been bundled outside the MacOS folder.
It should have been SumoGUIWallet.app/Contents/Resources/bin

@zhmrab
Copy link
Author

zhmrab commented Mar 12, 2018

Yes you are right my bad it's there as :

SumoGUIWallet.app/Contents/Resources/Resources/bin

On a side note I compile a few other Python scripts and they give similar warnings but the app are fully functional on MacOS High Sierra ...

I will keep on digging, the wallet is working fine with python wallet.py for now but would be nice to have it as an actual .app , please let me know if you have someone you could refer for compiling the wallet from source!

@sumogr
Copy link
Contributor

sumogr commented Mar 12, 2018

ok

@zhmrab
Copy link
Author

zhmrab commented Mar 13, 2018

@sumogr Could you share the sumoGUIWallet.spec file used by pyinstaller to compile? I think thats where my issue is ...

@sumogr
Copy link
Contributor

sumogr commented Mar 14, 2018

There you go https://pastebin.com/4EqnVjuu

Vu will reply as well shortly on this thread and give you step by step instructions

@zhmrab
Copy link
Author

zhmrab commented Mar 14, 2018

Ok this is very helpful thanks! Whenever we get the step by step instructions I'll test them and let you know, maybe could be added to readme.md :)

@zhmrab
Copy link
Author

zhmrab commented Mar 14, 2018

@sumogr Ok I used the .spec you provided and compiling is successful, BUT, when trying to open the app it says

File integrity check failed! 

This could be a result of unknown (maybe, malicious) action
to wallet code files.

which I find here in this file :

if not _check_file_integrity(app):

So I can compile the app but can't open it because the hash isn't the same ?

@sumogr
Copy link
Contributor

sumogr commented Mar 15, 2018

it's because of the Javascript/css files in Resources directory
You must copy/paste all to app Resources folder
Search into this file for hints
https://github.com/sumoprojects/SumoGUIWallet/blob/master/main.py
All these files must be in resources
file_hashes = [
('www/scripts/jquery-1.9.1.min.js', 'c12f6098e641aaca96c60215800f18f5671039aecf812217fab3c0d152f6adb4'),
('www/scripts/bootstrap.min.js', '2979f9a6e32fc42c3e7406339ee9fe76b31d1b52059776a02b4a7fa6a4fd280a'),
('www/scripts/mustache.min.js', '3258bb61f5b69f33076dd0c91e13ddd2c7fe771882adff9345e90d4ab7c32426'),
('www/scripts/jquery.qrcode.min.js', 'f4ccf02b69092819ac24575c717a080c3b6c6d6161f1b8d82bf0bb523075032d'),
('www/scripts/utils.js', 'd0c6870ed19c92cd123c7443cb202c7629f9cd6807daed698485fda25214bdb4'),

    ('www/css/bootstrap.min.css', '9d517cad6f1744ab5eba382ccf0f53969f7d326e1336a6c2771e82830bc2c5ac'),
    ('www/css/font-awesome.min.css', 'b8b02026a298258ce5069d7b6723c2034058d99220b6612b54bc0c5bf774dcfb'),
    
    ('www/css/fonts/fontawesome-webfont.ttf', '7b5a4320fba0d4c8f79327645b4b9cc875a2ec617a557e849b813918eb733499'),
    ('www/css/fonts/glyphicons-halflings-regular.ttf', 'e395044093757d82afcb138957d06a1ea9361bdcf0b442d06a18a8051af57456'),
    ('www/css/fonts/RoboReg.ttf', 'dc66a0e6527b9e41f390f157a30f96caed33c68d5db0efc6864b4f06d3a41a50'),

@sumogr
Copy link
Contributor

sumogr commented Mar 15, 2018

If you still fail, download the released app, open it with 7-zip and just copy the contents of the Resources folder in your app Resources folder

@zhmrab
Copy link
Author

zhmrab commented Mar 15, 2018

Ok thanks! That actually works now gui opens but when creating wallet I get stuck at
"processing blocks.... height #0"


[ERROR] [Errno 2] No such file or directory
Traceback (most recent call last):
  File "app/hub.py", line 245, in create_new_wallet
AttributeError: 'Hub' object has no attribute 'wallet_cli_manager'


@sumogr
Copy link
Contributor

sumogr commented Mar 15, 2018

check folder permissions

@zhmrab
Copy link
Author

zhmrab commented Mar 16, 2018

Ok thanks!

App compiles successfully but still stuck at processing blocks height #0
But no error messages so I think it should be good ! the solution was pyinstaller --onefile for me

@zhmrab
Copy link
Author

zhmrab commented Mar 20, 2018

@sumogr sorry to bother you i'm having an issue again with the sumo gui, it recompiled it just now on MacOS, copied the 'resources' in contents/resources and the app crashes on startup, but works perfectly in console mode, have you experienced this issue ?

I compiled it with the .spec file you provided and all seems to be there using pyinstaller 3.3.1 python 2.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants