Bitcoin Forum
May 07, 2024, 05:52:04 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2] 3 4 5 6 »  All
  Print  
Author Topic: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]  (Read 10382 times)
Daily Anarchist
Hero Member
*****
Offline Offline

Activity: 614
Merit: 500



View Profile WWW
March 10, 2013, 09:42:04 PM
 #21

I really like the bounty idea. Any chance of you doing that for the rest of Armory development? I mean, I'd really like to see a Bitcoin Armory rpm for fedora users. Slap up a bounty and I'll donate to it, eventually there's bound to be enough fedora users that would like to have that. It was a real workaround for me to figure out how to get Bitcoin Armory to work for me on Fedora.
There's not even a current Bitcoin-Qt rpm for Fedora, is there?

Sadly, no. My understanding is it's because of Fedora's non-free software licensing stance. Or something rather.

Discover anarcho-capitalism today!
1715061124
Hero Member
*
Offline Offline

Posts: 1715061124

View Profile Personal Message (Offline)

Ignore
1715061124
Reply with quote  #2

1715061124
Report to moderator
1715061124
Hero Member
*
Offline Offline

Posts: 1715061124

View Profile Personal Message (Offline)

Ignore
1715061124
Reply with quote  #2

1715061124
Report to moderator
Whoever mines the block which ends up containing your transaction will get its fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715061124
Hero Member
*
Offline Offline

Posts: 1715061124

View Profile Personal Message (Offline)

Ignore
1715061124
Reply with quote  #2

1715061124
Report to moderator
1715061124
Hero Member
*
Offline Offline

Posts: 1715061124

View Profile Personal Message (Offline)

Ignore
1715061124
Reply with quote  #2

1715061124
Report to moderator
1715061124
Hero Member
*
Offline Offline

Posts: 1715061124

View Profile Personal Message (Offline)

Ignore
1715061124
Reply with quote  #2

1715061124
Report to moderator
Mr. Coinman
Sr. Member
****
Offline Offline

Activity: 277
Merit: 250



View Profile
March 10, 2013, 09:47:05 PM
 #22

Why is it not on Github?

I'm not sure what you mean.  All the code is on github.  But we can't have regular users installing Xcode, Python, Qt4, etc, and compiling from source.  Unfortunately, to make a standalone installer, all that needs to be included somehow.  

Actually, I just got a PM from someone who claims to have done something like this already!  He's stuck in the Newbies forum, but will post here soon.  He said was able to jam everything into a .app and it works.  But it's 232 MB.  I suspect that most of it can be pruned out.  For reference, the Windows installer (*.msi) has everything and is less than 20 MB.

Question:  is *.app what I want?  Is that a sign-able container?  Is it easily converted to a .dmg? Or pkg?  What do I want?  (I don't even know, myself)

EDIT: upon reviewing what he said, I suspect that 180 MB is instantly removable:  the entire cppForSwig directory and the .git directory.  If so, this may already be in a usable state.   Anyone have comments about the idea of bulk including a python installation, PyQt4, etc?  It would require me updating them when necessary, but on the other hand, it reduces the number of libraries that are system-dependent (and thus, probably also increases security a bit).

Yes, you want a .app file. A .dmg file is the standard disk image format used to package Mac OS X applications, where the .app file and other relevent files such as licence information, installation, or read-me text files are placed. I can help design and package a .dmg file once the .app is finished. Here's a quick sample I cooked up:


etotheipi (OP)
Legendary
*
expert
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
March 10, 2013, 09:48:45 PM
 #23

I'll donate if you'll just put the instructions I offered on the install page under the ubuntu instructions.

Can you link me?

https://bitcointalk.org/index.php?topic=56424.msg1463846#msg1463846

My apologies. I misread that thread the first time, and assumed that my planned fix would... fix it.  It's strange to me that Fedora would install those packages, and not put a symlink in a standard location to find them.  You really shouldn't be linking directly to  "package.so.X.Y", it should be linking to "package.so" which is a symlink to the latest one, which in your case happens to be .X.Y.

Perhaps the details don't matter to you -- the point being that I don't think that's a long-term solution, exactly.  I'll still post it on the webpage, since it obviously works for at least one person (you!), and I'm sure other Fedora users will benefit.  But that's likely to break when the system is updated... so I'll have to work on something more robust.

  


Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
etotheipi (OP)
Legendary
*
expert
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
March 10, 2013, 09:49:48 PM
 #24

Just received another PM from "higuys" who is still stuck in the newbies forum.

He just sent me this gist:

https://gist.github.com/bsmt/5130568

"It still needs a few minor changes, and it hasn't been tested, but it should give everyone an idea on how to do this."

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
Daily Anarchist
Hero Member
*****
Offline Offline

Activity: 614
Merit: 500



View Profile WWW
March 10, 2013, 09:58:22 PM
 #25

I'll donate if you'll just put the instructions I offered on the install page under the ubuntu instructions.

Can you link me?

https://bitcointalk.org/index.php?topic=56424.msg1463846#msg1463846

My apologies. I misread that thread the first time, and assumed that my planned fix would... fix it.  It's strange to me that Fedora would install those packages, and not put a symlink in a standard location to find them.  You really shouldn't be linking directly to  "package.so.X.Y", it should be linking to "package.so" which is a symlink to the latest one, which in your case happens to be .X.Y.

Perhaps the details don't matter to you -- the point being that I don't think that's a long-term solution, exactly.  I'll still post it on the webpage, since it obviously works for at least one person (you!), and I'm sure other Fedora users will benefit.  But that's likely to break when the system is updated... so I'll have to work on something more robust.

  



It's a hack, but if you put the install instructions up it will get viewed by more eyeballs, and therefore will have a greater likelihood of somebody finding a more robust solution.

Discover anarcho-capitalism today!
picobit
Hero Member
*****
Offline Offline

Activity: 547
Merit: 500


Decor in numeris


View Profile
March 10, 2013, 10:05:10 PM
 #26

PROGRESS REPORT:

I am so close, but still no cigar.  Now I will write up what I have done and go to bed.  If no-one has claimed the bounty tomorrow evening, I might give it a second try.

I try to build the app with py2app.  Unfortunately, it corrupts the PyQt files, but I think I got that solved.  The second problem is that it makes an app that depends on the system Python being exactly the same as on my machine, and that does not work when I test on another mac.  The problem is probably that I use the system Python with my Homebrew installation.  I thought I knew what I was doing when I made that decision, but no...   Switching to Homebrews python did not help, I got this error when trying to run Armory (not the .app I am trying to create, just running it in the development directory):
Code:
BitcoinArmory$ python ArmoryQt.py 
********************************************************************************
Loading Armory Engine:
   Armory Version:       0.87.3
   PyBtcWallet  Version: 1.35
Detected Operating system: Mac/OSX
   User home-directory   : /Users/schiotz/Library/Application Support
   Satoshi BTC directory : /Users/schiotz/Library/Application Support/Bitcoin/
   First blkX.dat file   : /Users/schiotz/Library/Application Support/Bitcoin/blocks/blk00000.dat
   Armory home dir       : /Users/schiotz/Library/Application Support/Armory/
   Armory settings file  : /Users/schiotz/Library/Application Support/Armory/ArmorySettings.txt
   Armory log file       : /Users/schiotz/Library/Application Support/Armory/armorylog.txt
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6


Anyway, here is what I have been doing.

1) Have qt, pyqt and other Armory dependencies installed with Homebrew.

2) Install py2app
Code:
sudo easy_install -U py2app

3) Compile Armory, then create the app with these commands
Code:
make
python setup.py py2app --no-strip
where setup.py is this script (should probably be renamed to not conflict with Armory's own setup.py)
Code:
"""
This is a setup.py script generated by py2applet

Usage:
    python setup.py py2app
"""

from setuptools import setup

APP = ['ArmoryQt.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True}

setup(
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)

4) Now an .app has been created in the dist subdirectory, but it is broken as all PyQt dynamic libraries and friends are b0rked.  One of them is easy to fix, by copying in the normal version:
Code:
rm -f dist/ArmoryQt.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore
cp /usr/local/lib/QtCore.framework/Versions/4/QtCore dist/ArmoryQt.app/Contents/Frameworks/QtCore.framework/Versions/4/QtCore

5) The rest of the PyQt stuff is fixed by this Python script (warning, ugly hacks inside - and no, I do not know what I am doing!)
Code:
import os
import subprocess

qtdir = 'dist/ArmoryQt.app/Contents/Resources/lib/python2.7/lib-dynload/PyQt4'
origdir = '/usr/local/lib/python2.7/site-packages/PyQt4'

oldprefix = '/usr/local/lib'
newprefix = '@executable_path/../Frameworks'

def fix_paths(f):
    paths = []
    # Slightly silly to call Python like this :-)
    for line in subprocess.Popen("python -mmacholib dump "+f, shell=True,
                                 stdout=subprocess.PIPE).stdout:
        line = line.strip()
        if line.startswith(oldprefix):
            paths.append(line)
    for p in paths:
        assert p.find('.framework') > 0
        new = newprefix + p[len(oldprefix):]
        cmd = 'install_name_tool -change "%s" "%s" "%s"' % (p, new, f)
        print cmd
        os.system(cmd)

for f in os.listdir(qtdir):
    if f.endswith('.so'):
        os.remove(os.path.join(qtdir, f))
        os.system('cp "%s" "%s"' % (os.path.join(origdir, f), os.path.join(qtdir)))
        os.system('chmod +w "%s"' % (os.path.join(qtdir, f),))
        fix_paths(os.path.join(qtdir, f))

The resulting .app will work on the local machine (try "open dist/ArmoryQt.app").  But it depends on the system Python in a nonportable way.  I am stuck here, and need to sleep on it.  If anyone can use this as a starting point, and proceed from here, please do so!
  
EDIT: The resulting app is 109 MB, but compresses to 32 in a tar.gz.
higuys
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile
March 10, 2013, 10:06:16 PM
Last edit: March 10, 2013, 10:51:52 PM by higuys
 #27

Okay, I'm whitelisted now. I see etotheipi posted my gist already.

Here's my .app: http://goo.gl/73v3b

I'd love it if you guys test it, since I can't. Syncing the blockchain for the first time sucks.

Some comments distributing python inside the app:
The interpreter itself is really small, but the largest portion of any python distribution is the stdlib (lib dir if you use virtualenv), which is around 40MB. You could probably remove some stuff from that, but IMO that's not something you should mess with.

I include the needed Qt libraries (QtCore and QtGui) inside the app so that users don't have to worry about it, this adds 70MB, so it's now the largest part. Unfortunately there aren't many ways to remove this without making it less fool-proof.
higuys
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile
March 10, 2013, 10:10:45 PM
 #28

The resulting .app will work on the local machine (try "open dist/ArmoryQt.app").  But it depends on the system Python in a nonportable way.  I am stuck here, and need to sleep on it.  If anyone can use this as a starting point, and proceed from here, please do so!
  
EDIT: The resulting app is 109 MB, but compresses to 32 in a tar.gz.

Imo py2app is a lost cause, making an app bundle really isn't that hard. Also, since it relies on the system python, which differs from 10.6 to 10.8, it adds some possibility for problems. Using virtualenv I have my app bundle at 134.8 MB and 38.3MB when zipped. http://imgur.com/8uVm8fv
picobit
Hero Member
*****
Offline Offline

Activity: 547
Merit: 500


Decor in numeris


View Profile
March 10, 2013, 10:14:36 PM
 #29

You are probably right - but py2app is at least a place to start.  I will look at how you did it.

I just tried your download, but unfortunately is misses a dependency (I am trying it out on an almost pristine MacBook):

Code:
$ ./Armory.app/Contents/MacOS/Armory 
Traceback (most recent call last):
  File "armorysrc/ArmoryQt.py", line 31, in <module>
    from PyQt4.QtGui import *
ImportError: dlopen(/Users/schiotz/test/Armory.app/Contents/MacOS/lib/python2.7/site-packages/PyQt4/QtGui.so, 2): Library not loaded: /usr/local/lib/libpng15.15.dylib
  Referenced from: /Users/schiotz/test/Armory.app/Contents/Dependencies/QtGui.framework/Versions/Current/QtGui
  Reason: image not found
higuys
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile
March 10, 2013, 10:16:15 PM
 #30

The resulting .app will work on the local machine (try "open dist/ArmoryQt.app").  But it depends on the system Python in a nonportable way.  I am stuck here, and need to sleep on it.  If anyone can use this as a starting point, and proceed from here, please do so!
  
EDIT: The resulting app is 109 MB, but compresses to 32 in a tar.gz.

Imo py2app is a lost cause, making an app bundle really isn't that hard. Also, since it relies on the system python, which differs from 10.6 to 10.8, it adds some possibility for problems. Using virtualenv I have my app bundle at 134.8 MB and 38.3MB when zipped. http://imgur.com/8uVm8fv

Ah, of course i forgot the Qt dependencies. I guess brew didn't remove them when I uninstalled qt. Let me add them real quick.
higuys
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile
March 10, 2013, 10:18:03 PM
 #31


Working great so far on my Mac OSX 10.8.2, just needs to clean up the look a bit. Like add the armory logo, also in the dock it shows the name as python, and has a terminal logo.

I can't really do anything about it showing python in the dock, unless someone wants to dick around with PyObjC. I can give the app itself an armory logo easily, though.
higuys
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile
March 10, 2013, 10:23:12 PM
Last edit: March 10, 2013, 10:52:04 PM by higuys
 #32

Okay, I fixed the libpng problem. New app here: http://goo.gl/73v3b

I wouldn't be surprised if there are more dependencies that I missed. Let me know if you come across any, adding them is trivial.

I also updated the gist to reflect the changes I had to make.
vamdor
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
March 10, 2013, 10:26:07 PM
 #33

https://gist.github.com/bsmt/5130568

"It still needs a few minor changes, and it hasn't been tested, but it should give everyone an idea on how to do this."

The check for virtualenv fails, I am not a shell script wizard, but I think it should be "if [ ! -x `which virtualenv` ];"  (added exclamation mark)

It also seems to miss the part needed for swig.

And while I haven't tried that part of the script, I am surprised that PyQt built and installed without any problem. I had to modify all the makefiles, as the include directories pointed to the system dirs instead of the virtualenv ones, crashing the make & make install dance.
picobit
Hero Member
*****
Offline Offline

Activity: 547
Merit: 500


Decor in numeris


View Profile
March 10, 2013, 10:29:25 PM
 #34

Okay, I fixed the libpng problem. New app here: http://goo.gl/e3cCX

I wouldn't be surprised if there are more dependencies that I missed. Let me know if you come across any, adding them is trivial.

I also updated the gist to reflect the changes I had to make.

Code:
$ ./Armory.app/Contents/MacOS/Armory 
 2013-03-10 23:27:37.915 python[573:707] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
(ERROR) Traceback (most recent call last):
  File "armorysrc/ArmoryQt.py", line 3667, in <module>
    form = ArmoryMainWindow()
  File "armorysrc/ArmoryQt.py", line 106, in __init__
    DlgEULA(self,self).exec_()
  File "/Volumes/Cipher/home/Desktop/BitcoinArmory/qtdialogs.py", line 3504, in __init__
ImportError: No module named LICENSE

Traceback (most recent call last):
  File "armorysrc/ArmoryQt.py", line 3667, in <module>
    form = ArmoryMainWindow()
  File "armorysrc/ArmoryQt.py", line 106, in __init__
    DlgEULA(self,self).exec_()
  File "/Volumes/Cipher/home/Desktop/BitcoinArmory/qtdialogs.py", line 3504, in __init__
ImportError: No module named LICENSE


Something is still missing ...

And the path /Volumes/Cipher/... looks wrong, it must be a path on your computer.

higuys
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile
March 10, 2013, 10:29:39 PM
 #35

https://gist.github.com/bsmt/5130568

"It still needs a few minor changes, and it hasn't been tested, but it should give everyone an idea on how to do this."

The check for virtualenv fails, I am not a shell script wizard, but I think it should be "if [ ! -x `which virtualenv` ];"  (added exclamation mark)

It also seems to miss the part needed for swig.

And while I haven't tried that part of the script, I am surprised that PyQt built and installed without any problem. I had to modify all the makefiles, as the include directories pointed to the system dirs instead of the virtualenv ones, crashing the make & make install dance.

Fixed the virtualenv problem. I didn't check for swig, because I assumed if they had qt, they had all of the other dependencies (bad assumption, I know). I'm absolutely shit at bash scripting, so there are likely more issues. I made this mostly to show how to do it manually. I'll test and fix bugs a little bit later, I need a break right now.
higuys
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile
March 10, 2013, 10:31:58 PM
 #36

Okay, I fixed the libpng problem. New app here: http://goo.gl/e3cCX

I wouldn't be surprised if there are more dependencies that I missed. Let me know if you come across any, adding them is trivial.

I also updated the gist to reflect the changes I had to make.

Code:
$ ./Armory.app/Contents/MacOS/Armory 
 2013-03-10 23:27:37.915 python[573:707] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
(ERROR) Traceback (most recent call last):
  File "armorysrc/ArmoryQt.py", line 3667, in <module>
    form = ArmoryMainWindow()
  File "armorysrc/ArmoryQt.py", line 106, in __init__
    DlgEULA(self,self).exec_()
  File "/Volumes/Cipher/home/Desktop/BitcoinArmory/qtdialogs.py", line 3504, in __init__
ImportError: No module named LICENSE

Traceback (most recent call last):
  File "armorysrc/ArmoryQt.py", line 3667, in <module>
    form = ArmoryMainWindow()
  File "armorysrc/ArmoryQt.py", line 106, in __init__
    DlgEULA(self,self).exec_()
  File "/Volumes/Cipher/home/Desktop/BitcoinArmory/qtdialogs.py", line 3504, in __init__
ImportError: No module named LICENSE


Something is still missing ...

And the path /Volumes/Cipher/... looks wrong, it must be a path on your computer.

That is strange... Looks like I missed some settings files, or something.
higuys
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile
March 10, 2013, 10:44:54 PM
 #37

I forgot to put License.pyc file in! Weird that it shows the path to my hard drive...

I just tested it on my macbook that hasn't run Armory before, and it worked. I could still be missing dependencies though.

Anyways, revision 3: http://goo.gl/73v3b

Thanks for being patient with me guys.
Mr. Coinman
Sr. Member
****
Offline Offline

Activity: 277
Merit: 250



View Profile
March 10, 2013, 10:46:50 PM
 #38

Okay, I'm whitelisted now. I see etotheipi posted my gist already.

Here's my .app: http://goo.gl/WUmVc

I'd love it if you guys test it, since I can't. Syncing the blockchain for the first time sucks.

Some comments distributing python inside the app:
The interpreter itself is really small, but the largest portion of any python distribution is the stdlib (lib dir if you use virtualenv), which is around 40MB. You could probably remove some stuff from that, but IMO that's not something you should mess with.

I include the needed Qt libraries (QtCore and QtGui) inside the app so that users don't have to worry about it, this adds 70MB, so it's now the largest part. Unfortunately there aren't many ways to remove this without making it less fool-proof.

Working great so far on my Mac OSX 10.8.2, just needs to clean up the look a bit. Like add the armory logo, also in the dock it shows the name as python, and has a terminal logo.

I'm also on Mac OS X 10.8.2, but the app crashes every time I open it.

higuys
Newbie
*
Offline Offline

Activity: 28
Merit: 0



View Profile
March 10, 2013, 10:48:55 PM
 #39

I'm also on Mac OS X 10.8.2, but the app crashes every time I open it.

Terminal output? Also, what version did you try? I've had to fix it three times already.
vamdor
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
March 10, 2013, 10:57:54 PM
 #40

Anyways, revision 3: http://goo.gl/73v3b
Now it works on my mac. (the previous one had the same problem as listed above by picobit)

And for the swig dependency: I am trying to install it within virtualenv, but it again mixes up the global directories and the virtualenv ones. Then I tried to put it in one of the locations the makefiles tries, but even then there is some problem... So the build process is definitely not as straight-forward as your hand-written script suggests Smiley   (at least not when insisting on virtualenv)
Pages: « 1 [2] 3 4 5 6 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!