Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: etotheipi on March 10, 2013, 01:03:36 AM



Title: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on March 10, 2013, 01:03:36 AM
Total Bounty Accumulated:      24.75 BTC
(last updated, Mar 10, 1:10am EST)
(Donation address on blockchain.info (http://blockchain.info/address/1Armory1HBqc8dNEvHDuT9AYWPWf98aCzJ))


User "higuys" has claimed the bounty!   More information here (https://bitcointalk.org/index.php?topic=151313.msg1617571#msg1617571).

You can get the first unofficial release of the OSX build from this thread (https://bitcointalk.org/index.php?topic=175777.0)!


Original Message:

The number of users offering bounties for a native OSX package for Armory has reached critical mass.  Red Emerald (https://bitcointalk.org/index.php?topic=73648.0) has done a phenomenal job making it available through some brew commands at the terminal, but it's not a long-term solution.  Eventually, Armory needs to be accessible to the audience of users that have never seen a terminal.   So, I'm announcing a official bounty for anyone who gives me a solid "recipe" for distributing Armory on OSX:


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The following address is owned by Alan Reiner (Core Armory
Developer) and will be used to collect donations to be given
as a bounty for the successful packaging of Armory for OSX.  
All donations will be maintained by Alan Reiner, and
distributed at his sole discretion.  

1Armory1HBqc8dNEvHDuT9AYWPWf98aCzJ

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBAgAGBQJRO9osAAoJEEqxauqYgyIjzWAP/AubsJ/zQb3/jFbLV5CcK8tR
wF+8JzjVQyOWFH2nPQL3LNQ2pgyUgghBHGzm1FVslHeJ3Ahf+4D3o+W73ntqXKKx
SLjyy6ZQVJLgCazWVlKcKEoE+lwNJs1oj3Zl3BdO3jwpxy6J3LqtufZkPhdawXD2
ul5ECfGFQDcONVLA4RbzgNmrgEbGNvCJdlVeQ/gZ5uMAv5vsbGaIywK55t/lEzrl
2eg3YPjRf0txYQ0/hyqfmc8ZkS0i2OnWR9c+HiKOOdGD6GaZdSUa29EDlMdQnc8T
tcGZI32ym/yxk641UkgjAmC2CbGpSmtbSJWSwrMSCGfWzV57khDYoNZJBS0wfUUP
g/FWPfyAbl2WJ394fYuTHwO2Hknd+d65lW59VlqZU2R/WWWqb+SKOW49OM8PkVFw
YKnI3xJuZFMw6AC7xxZhVB2oF0Pja5xlRjLJKQfJ0Gdk32pU/zfN72CqWjncnxvq
2+jhiP6Tv5PKWa0dB8u56occM2MDWXs0cuXnSHOz3dLCWxXTgFk5/lulsV8Bw8Y3
OO9eVIYQQz9nD4UKXQeUiJaxOl/i1Wq2LBECOWFnExC9FsVbupKPc7NLVtF+OFyS
U8F8hWLISYW+bYaafJxb5XFiYqMdAdLqsiR6Y7XTykVLKuRjH0ImmrPhfgn1OKLD
hvLhfu9rLsxBQuQqu8ww
=IGsm
-----END PGP SIGNATURE-----





I will hold onto the funds and decide how to distribute it.  I will not distribute any to myself, unless there is some reasonable consensus that I should do so (like, I ended up figuring it out myself because no one else did).  Otherwise, I will look to this thread for feedback, and then will make the decision how to proceed.  Partial credit is possible.  

Red Emerald has mentioned that bundling Armory is not easy.  py2app didn't work smoothly at all.  There's a few awkward dependencies, including bundling PyQt4 in its entirety.  Luckily, I know that the Bitcoin-Qt dev team has successfully bundled Qt4 into their package, so their packaging scheme might serve as a good starting point for this task.

@Red Emerald: Of course, I was looking in your direction to be the exalted warrior of this bounty, but there is no obligation.

I don't currently have a developer key for OSX, but I plan to get one eventually so that I can properly sign the OSX packages. I prefer a solution that extends easily to being natively signed, but I guess I'd still be happy with any kind of standalone packaging.  It's worth discussing in this thread what can be done to guarantee the solution allows for that (or acknowledge that any correct solution is signable).





Some of you may have seen my previous rant about how I don't like bounties of this form, and much prefer to raise money to pay someone to work on it up front.  Part of the justification for that rant is that most projects for which bounties are declared, may require months of work, and do not have a clear definition of success -- especially when inter-project priorities change, feasibility issues justify changing directions, and there is vast disagreement about what is "complete", etc.  In this case, I think the task is relative short, and the exit criteria is pretty clear, so there shouldn't be any controversy about it.  

I'd also like to see this thread used for collaboration.  If there is significant progress made through the collaboration with others in this thread, then I will probably decide to split the bounty.   Any splits will be in increments of 10% only.  I will not be giving 0.36% to one, 1.83% to another, etc.  If people feel like they deserve a small piece for their contribution, they can ask the person who received the bounty to toss them a few bits!  Otherwise, your reward for contributing is that you helped make the OSX distributable package possible!


Title: Re: The official Armory-for-OSX Bounty Thread
Post by: etotheipi on March 10, 2013, 01:03:46 AM
First order of business:  I strongly believe that Red Emerald should receive 5-10% of this bounty regardless of any further contributions by him.  Without his help, there might not have been any OSX support for Armory, at all.  And I'm sure his brew installation will be extremelyt useful in figuring out what dependencies are needed, etc.

Discuss! (and donate!)


Title: Re: The official Armory-for-OSX Bounty Thread [7 BTC]
Post by: evoorhees on March 10, 2013, 03:52:08 AM
SatoshiDice just donated 10 btc. Big fan of Armory :)


Title: Re: The official Armory-for-OSX Bounty Thread [17 BTC]
Post by: Severian on March 10, 2013, 04:07:15 AM
1.75 btc donated. Will donate more on completion or good enough, whatever comes first. :)

Thanks for getting around to this, etotheipi.


Title: Re: The official Armory-for-OSX Bounty Thread [23 BTC]
Post by: etotheipi on March 10, 2013, 05:04:37 AM
Wow, excellent!  Already at about $1,000 USD.  Given the nature of this task, and the amount collected so far, I bet this will be a very effective bounty campaign!



Title: Re: The official Armory-for-OSX Bounty Thread [24 BTC]
Post by: bitbutter on March 10, 2013, 02:22:47 PM
Donated! I'd love to see this happen.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: etotheipi on March 10, 2013, 04:47:29 PM
Haha, whoops.  I should've created a new wallet for this.  All the donations are showing up in my donation wallet along with my other donations.   They are, of course, intended for the bounty, but I just want to mention that I may accidentally "spend it".  I will try to remember to use coin control to avoid doing so, but if I forget, the coins may end up moving...

For that reason, I will be going by total BTC received by that address, not how much is still in it when the bounty is to be paid.  Just wanted to clarify that.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: justusranvier on March 10, 2013, 05:01:39 PM
If you publish this donation address somewhere on your web site we could use the blockchain.info tag feature to mark it.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: etotheipi on March 10, 2013, 05:11:50 PM
If you publish this donation address somewhere on your web site we could use the blockchain.info tag feature to mark it.

I just added it to the webpage under the OSX section:

http://bitcoinarmory.com/get-armory/


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: Node on March 10, 2013, 05:15:02 PM
OSX developer here, currently checking whats involved to get a working solution.

Are you looking for a self installing package(requires root/admin password to install)? or a bundle(dependencies are bundled)?, either?


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: Chris911 on March 10, 2013, 06:10:26 PM
Why is it not on Github?


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: etotheipi on March 10, 2013, 08:36:53 PM
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).


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: picobit on March 10, 2013, 08:48:06 PM
I am looking into this too.  Yes, you want a .app.  I am trying to build it with py2app, but the problem right now is that it corrupts the PyQt dynamic libraries.  I am trying to manually copy the libraries into the .app and then fix the linked-in paths so it will run as a standalone app on another machine.  With a bit of luck, I expect to have a solution in an hour or so.  But I need that bit of luck, I cannot claim that I know what I do. :)


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: vamdor on March 10, 2013, 09:06:01 PM
Anyone have comments about the idea of bulk including a python installation, PyQt4, etc?

The python interpreter itself isn't really big when compiled into an executable. I used the freeze tool earlier (http://wiki.python.org/moin/Freeze) and it's pretty straightforward, and the result is truly stand-alone, and very convenient to deploy.

I spent the last hour or so trying to get PyQt and friends compiled/installed in a virtualenv, and this seems to be a nightmare. After this I am convinced that any user-friendly distributions should include it as compiled into the frozen bytecode.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: Daily Anarchist on March 10, 2013, 09:22:06 PM
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.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: etotheipi on March 10, 2013, 09:25:09 PM
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.

I'll offer a bounty to fix the makefile.  Seriously, all I need is the simplest of checks in the make file, and Armory compiles super-cleanly on all these *nix distributions.  Once the makefile goes looking for the .so instead of .a, having any versions of the dependencies should be sufficient. 

But yes, there will probably be more bounties in the future, to help with related things.  As long as they are well-contained, easily-verifiable problems, I am for bounties...


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: Daily Anarchist on March 10, 2013, 09:27:53 PM
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.

I'll offer a bounty to fix the makefile.  Seriously, all I need is the simplest of checks in the make file, and Armory compiles super-cleanly on all these *nix distributions.  Once the makefile goes looking for the .so instead of .a, having any versions of the dependencies should be sufficient. 

But yes, there will probably be more bounties in the future, to help with related things.  As long as they are well-contained, easily-verifiable problems, I am for bounties...

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


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: etotheipi on March 10, 2013, 09:28:56 PM
I'll donate if you'll just put the instructions I offered on the install page under the ubuntu instructions.

Can you link me?


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: Daily Anarchist on March 10, 2013, 09:31:01 PM
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


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: justusranvier on March 10, 2013, 09:40:44 PM
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?


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: Daily Anarchist on March 10, 2013, 09:42:04 PM
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.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: Mr. Coinman on March 10, 2013, 09:47:05 PM
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:

https://s3.amazonaws.com/f.cl.ly/items/2o1F410f0e2T2t0W1o2s/Screen%20Shot%202013-03-10%20at%202.45.37%20PM.png


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: etotheipi on March 10, 2013, 09:48:45 PM
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.

  



Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: etotheipi on March 10, 2013, 09:49:48 PM
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."


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: Daily Anarchist on March 10, 2013, 09:58:22 PM
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.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: picobit on March 10, 2013, 10:05:10 PM
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.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 10, 2013, 10:06:16 PM
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.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 10, 2013, 10:10:45 PM
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


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: picobit on March 10, 2013, 10:14:36 PM
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


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 10, 2013, 10:16:15 PM
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.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 10, 2013, 10:18:03 PM

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.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 10, 2013, 10:23:12 PM
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.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: vamdor on March 10, 2013, 10:26:07 PM
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.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: picobit on March 10, 2013, 10:29:25 PM
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.



Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 10, 2013, 10:29:39 PM
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.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 10, 2013, 10:31:58 PM
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.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 10, 2013, 10:44:54 PM
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.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: Mr. Coinman on March 10, 2013, 10:46:50 PM
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.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 10, 2013, 10:48:55 PM
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.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: vamdor on March 10, 2013, 10:57:54 PM
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 :)   (at least not when insisting on virtualenv)


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 10, 2013, 11:03:10 PM
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 :)   (at least not when insisting on virtualenv)

All you should have to do is install swig with brew, though you also need cryptopp and qt as shown by WyseNynja's guide. I don't see how global python is getting confused with the virtualenv, you have to do bin/python, bin/pip etc in the directory to use the virtualenv. Logs would be awesome.

As for the script, I decided to have it just install swig, cryptopp, qt and virtualenv for you. Now all that's required is brew and pip, which you should have anyways.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: saddambitcoin on March 10, 2013, 11:03:43 PM
seems to be working fine for me, running on 10.8.2.  excited to finally use this!


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: vamdor on March 10, 2013, 11:12:27 PM
All you should have to do is install swig with brew. Are you using bin/python, bin/pip etc? Logs would be awesome.
I have a virtualenv started with -no-site-packages , so that I can be absolutely sure nothing interferes with already installed stuff, and is 100% reproducible in any system. I tried the configure & make route for installing, but unfortunately swig isn't just a python package, so won't respect the virtualenv. So I either give up on being system-independent and use the brew method, or find out where to put what. I copied the content of the built "Lib" dir to "./swig_lib" , which seems to be one of the search paths, but apparently it doesn't work.

Code:
:BitcoinArmory bj$ make
cd cppForSwig; make swig
swig -c++ -python -classic -threads -outdir ../ -v CppBlockUtils.i
Language subdirectory: python
Search paths:
   ./
   ./swig_lib/python/
   /usr/local/share/swig/2.0.9/python/
   ./swig_lib/
   /usr/local/share/swig/2.0.9/
Preprocessing...
:1: Error: Unable to find 'swig.swg'
:3: Error: Unable to find 'python.swg'
CppBlockUtils.i:22: Error: Unable to find 'std_string.i'
CppBlockUtils.i:23: Error: Unable to find 'std_vector.i'


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 10, 2013, 11:16:43 PM
Swig isn't a python package just like you said, so it doesn't matter if you're in an env or using global python. You should be able to use it anywhere.

Using brew isn't going to make it system-dependent. You're installing those so that you can either build armory or put qt into the package. In the end the only things going into the actual package are qt, some python packages installed in the env, python, and armory

Looks like the problem isn't where swig is installed, but that it can't find some files. I'm not sure what you're trying to do with the Lib folder from the env either...


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: vamdor on March 10, 2013, 11:25:39 PM
You're installing those so that you can either build armory or put qt into the package.

I see, but if someones 5 year from now tries to reproduce the steps, and by the time something not backward-compatibly changed in swig, that may lead to some frustration.

Anyway after installing it with brew, Armory compiles and builds.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: vamdor on March 10, 2013, 11:46:30 PM
Okay, last few remarks then I am done for today, I need to sleep.



1. The sip installer in your script has the same idiotic problem I struggled with: it wants to put itself outside the virtualenv.  /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7.  It asks for root password when it gets to that point, that's when I killed it...

2. As I only used this system for iOS development, and I only use python on linux boxes, I didn't really have any "extra" packages. Only wget was missing (in addition to swig), so it's good, no exotic dependencies.

3. the "cd sip-4.14.4.tar.gz" line must be replaced to "cd sip-4.14.4"


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 10, 2013, 11:49:26 PM
Okay, last few remarks then I am done for today, I need to sleep.



1. The sip installer in your script has the same idiotic problem I struggled with: it wants to put itself outside the virtualenv.  /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7.  It asks for root password when it gets to that point, that's when I killed it...

2. As I only used this system for iOS development, and I only use python on linux boxes, I didn't really have any "extra" packages. Only wget was missing (in addition to swig), so it's good, no exotic dependencies.

3. the "cd sip-4.14.4.tar.gz" line must be replaced to "cd sip-4.14.4"

Thanks, I've fixed problem 1 and 3 already. I'm now testing and then I'll update the gist.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 11, 2013, 02:16:48 AM
Alright guys, the script is done. I've tested it a few times and the .app it produces appears to work fine. None of the problems people have had before are present (afaik). I still can't test making transfers or anything like that, but I don't think the wrapper would affect it. How long is syncing the blockchain supposed to take for the first time?

Once again, download the buildarmory.sh file from https://gist.github.com/bsmt/5130568 and run it. You'll have to input your password a few times (unless you run it as root) and say "yes" to one license agreement. The dependencies it needs to run are xcode, brew, and pip. Aside from that, it will install cryptopp, swig, qt, pyqt and wget on your machine. It takes a while to build because it does everything from scratch and pyqt takes a looooooong time to make. There are some optimizations that could be made, but I'm going to hold off until I get feedback from etotheipi and everyone else.

It might be a good idea to integrate this into the Armory makefile, too, provided this is what etotheipi wants.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: etotheipi on March 11, 2013, 02:22:52 AM
Alright guys, the script is done. I've tested it a few times and the .app it produces appears to work fine. None of the problems people have had before are present (afaik). I still can't test making transfers or anything like that, but I don't think the wrapper would affect it. How long is syncing the blockchain supposed to take for the first time?

Once again, download the buildarmory.sh file from https://gist.github.com/bsmt/5130568 and run it. You'll have to input your password a few times (unless you run it as root) and say "yes" to one license agreement. The dependencies it needs to run are xcode, brew, and pip. Aside from that, it will install cryptopp, swig, qt, pyqt and wget on your machine. It takes a while to build because it does everything from scratch and pyqt takes a looooooong time to make. There are some optimizations that could be made, but I'm going to hold off until I get feedback from etotheipi and everyone else.

It might be a good idea to integrate this into the Armory makefile, too, provided this is what etotheipi wants.

Fantastic.  The only problem is that I upgraded my OS recently and borked my OSX virtual machine.  I'm going to have to find another way to test this myself.  But as far as I can tell this is what I was looking for.  I assume I can setup this environment once, and hold the git repo inside it.  Then I can just pull the updates from my development machine and rebuild it and re-run the script to package it up...?   There's already a Darwin branch in the makefile... I can just expand it as necessary.

By the way, how big is the final .app file?  Compressed and uncompressed?  Is it normal to distribute apps as zip files?  If so, I guess the uncompressed size doesn't matter...


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 11, 2013, 02:27:51 AM
Fantastic.  The only problem is that I upgraded my OS recently and borked my OSX virtual machine.  I'm going to have to find another way to test this myself.  But as far as I can tell this is what I was looking for.  I assume I can setup this environment once, and hold the git repo inside it.  Then I can just pull the updates from my development machine and rebuild it and re-run the script to package it up...?   There's already a Darwin branch in the makefile... I can just expand it as necessary.

By the way, how big is the final .app file?  Compressed and uncompressed?  Is it normal to distribute apps as zip files?  If so, I guess the uncompressed size doesn't matter...

You'd have to modify the script a bit for what you want, especially if it's going to be in the makefile. I might play around with that later this week, I'll send you a pull request on github if I get any results.

The final app is about the same as my last version, 134.7MB for the actual app, 38.4MB zipped. Apps are almost always distributed in a zip or dmg, imo zip is better. Dmg doesn't really have any benefit other than being shiny.

Here's an app generated by the script: http://goo.gl/GWeoO


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: colindean on March 11, 2013, 02:40:58 AM
higuys, I added a little bit to the end which should produce a valid dmg for it. I based this off my jperf ant script (https://github.com/colindean/iperf-jperf/blob/master/utilities/build.xml#L89).

https://gist.github.com/colindean/5131539


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 11, 2013, 02:43:21 AM
higuys, I added a little bit to the end which should produce a valid dmg for it. I based this off my jperf ant script (https://github.com/colindean/iperf-jperf/blob/master/utilities/build.xml#L89).

https://gist.github.com/colindean/5131539

Cool, is there a way to merge gists? I think I'll add codesigning later, once I better integrate it with the Armory source.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: etotheipi on March 11, 2013, 02:48:39 AM
Also, if you haven't upgraded to Bitcoin-Qt 0.8, then you should do so.  The older versions sometimes took like 24 hours to sync the blockchain.  Version 0.8 takes only 5-6 hours (at least on Linux).  I'm going to work on getting by VM back up so I can test this!

By the way, does it have the Armory icon in the task tray (or whatever it's called)?  Do you know if there's a way to do that?  

Also, does anyone have experience with digitally signing .app's?  You said .dmgs are shinier... well I don't mind a little shiny, if it doesn't come with drawbacks (beside a little more up front cost of setting it up).  I'm still mostly going mostly by your guys' judgment on what's appropriate...

Sorry picobit... I appreciate you trying, but it looks like higuys just left all the competitors in the dust!


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 11, 2013, 02:53:03 AM
Also, if you haven't upgraded to Bitcoin-Qt 0.8, then you should do so.  The older versions sometimes took like 24 hours to sync the blockchain.  Version 0.8 takes only 5-6 hours (at least on Linux).  I'm going to work on getting by VM back up so I can test this!

By the way, does it have the Armory icon in the task tray (or whatever it's called)?  Do you know if there's a way to do that?  

Also, does anyone have experience with digitally signing .app's?  You said .dmgs are shinier... well I don't mind a little shiny, if it doesn't come with drawbacks (beside a little more up front cost of setting it up).  I'm still mostly going mostly by your guys' judgment on what's appropriate...

Sorry picobit... I appreciate you trying, but it looks like higuys just left all the competitors in the dust!

Signing is easy. Once you have your cert you'll do codesign -s identity Path_to.app, easily scripted. You can check that it signed by making sure the _CodeSignature dir exists inside Contents.

You can add an icon to the app easily, too. It won't really do anything when Armory is running though, since python is a separate task. All you have to do is make an icns file (you can convert a png or something into one), put it in a Resources dir inside Contents of the app, and then add a CFBundleIconFile key to the Info.plist, the value being the name of the icns file (minus extension). By task tray I think you mean the dock, users choose what goes in that. If referring to the menu bar (at the top), then yes, the icon is there while running.

Thanks for reminding about bitcoin-qt, turns out I was on a super old version!


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: colindean on March 11, 2013, 04:07:06 AM
higuys, I added a little bit to the end which should produce a valid dmg for it. I based this off my jperf ant script (https://github.com/colindean/iperf-jperf/blob/master/utilities/build.xml#L89).

https://gist.github.com/colindean/5131539

Cool, is there a way to merge gists? I think I'll add codesigning later, once I better integrate it with the Armory source.

I don't think so, at least not on the interface. You could probably clone your gist locally and merge in mine...? Or just copy paste the differences visible through the revisions (https://gist.github.com/colindean/5131539/revisions) list. There's only a few changes.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: picobit on March 11, 2013, 07:40:11 AM
Sorry picobit... I appreciate you trying, but it looks like higuys just left all the competitors in the dust!

It was fun, but I knew from the start that if someone showed up that actually knows what he is doing, I wouldn't stand a chance. :)
I could have started earlier, I have been thinking about giving this a try for many weeks, just never got around to doing it. But next time I need to build some python stuff into a Mac application (not terribly likely to happen soon), I now know how to start!



Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: vamdor on March 11, 2013, 09:39:03 AM
Once again, download the buildarmory.sh file from https://gist.github.com/bsmt/5130568 and run it.

I am confused. You start with
Code:
brew install cryptopp swig qt pyqt wget
installing pyqt (and its dependencies, including sip) into the system site-packages. Then you create a virtualenv only to download/build/install these two into it. At this point that seems unneccesary,   line 20-39 can be dropped completely.  (and it indeed worked when I tried, bit I didn't run your script)

edit: not only unnecessary, but it doesn't even work without the brew-installed pyqt package. The makefiles of PyQt are messed up, and don't like to be installed within a virtualenv, some paths will point to the system-wide packages, and will produce problems such as:

Code:
../../QtDBus/sipAPIQtDBus.h:33:10: fatal error: 'sip.h' file not found

This is one of the things that held me back yesterday when trying to do everything strictly inside the virtualenv. The solution is to
Code:
find . -name Makefile|xargs sed -i orig 's/\/System\/Library\/Frameworks\/Python\.framework\/Versions\/2\.7\/include/\/path_to_virtualenv\/include/g'
replacing all the incorrect include paths.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 11, 2013, 02:41:42 PM
It seems you need pyqt to make Armory, and it's also obviously needed inside the bundle. Not optimal, sure, but I was having trouble getting it to work otherwise.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: vamdor on March 11, 2013, 09:54:57 PM
It seems you need pyqt to make Armory,
Well, considering that the build instructions say so, this is hardly surprising :)

Quote
but I was having trouble getting it to work otherwise.
Probably because what I said: PyQt needs some small changes to behave properly within the virtualenv. Still, those lines are unnecessary once PyQt is installed by brew.



Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 11, 2013, 10:37:57 PM
It seems you need pyqt to make Armory,
Well, considering that the build instructions say so, this is hardly surprising :)

Of course it's in the instructions, at first I was under the impression that pyqt was just needed at runtime, not for building. By the time everything was working I was rather tired and didn't feel like rewriting a good portion of it plus doing MORE testing just to remove that part, such is life.

Quote from: vamdor
Probably because what I said: PyQt needs some small changes to behave properly within the virtualenv. Still, those lines are unnecessary once PyQt is installed by brew.

It is because of what you said. I'm well aware they're unnecessary, but I'm not able to go through the whole gambit of fixing and testing right now. If you figured it out, that's great. Once I get over this damn flu I'll try to make it less gross, or you can fork that gist, I don't care. I should probably reiterate that this script was in no way intended for production use. I mean, it would work, but it was just intended to be a proof of concept.

Oh, and I'd like to point out that it doesn't actually need any changes. The configure.py file has some handy --bindir, --destdir and --sipdir options.

Is there are IRC channel for Armory or something like it? I'm tired of constantly checking the forum, live chat would be much easier.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: etotheipi on March 11, 2013, 10:43:57 PM
Is there are IRC channel for Armory or something like it? I'm tired of constantly checking the forum, live chat would be much easier.

I had created #bitcoin-armory but no one ever went there, so I stopped reopening it when I would restart.  There's nothing stopping you from using it though.  I just jumped in, myself.


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 11, 2013, 10:45:42 PM
What network?


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: etotheipi on March 11, 2013, 10:46:08 PM
What network?

Sorry, Freenode


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: higuys on March 12, 2013, 12:47:29 AM
Alright, with the help of some pills, I fixed most of the stupid shit that my script did. Now, you only need pyqt installed with brew, and it'll just copy it and sip over to the environment. It's still a bit dirty, but it's better.

I'm also integrating it with the makefile in the Armory root dir. So, all you'll have to do is run make osx, and it'll spit out an Armory.app in an osxbuild dir.


Title: Re: The official Armory-for-OSX Bounty Thread
Post by: Red Emerald on March 12, 2013, 08:27:36 AM
First order of business:  I strongly believe that Red Emerald should receive 5-10% of this bounty regardless of any further contributions by him.  Without his help, there might not have been any OSX support for Armory, at all.  And I'm sure his brew installation will be extremelyt useful in figuring out what dependencies are needed, etc.

Discuss! (and donate!)

Wow! Thanks a bunch!  I haven't had much time for bitcoin recently (besides watching the price climb up and up).

Are these builds deterministic at all?  Would be great if we could have multiple people compile and all end up with the same verifiable hash.

If I get time, I'll tinker a bit.


Title: Re: The official Armory-for-OSX Bounty Thread
Post by: etotheipi on March 12, 2013, 09:23:16 PM

Congratulations to higuys -- Bounty claimed!

He passed the "exit criteria":  He gave me a .zip that I downloaded in a fresh install of an OSX virtual machine, double-clicked, and Armory was running.  Nothing else had been installed.  In fact, there was no installation, either... it just runs!   And of course, he also wrote me a few paragraphs about it to make sure I understood it, and pointed me to a git repo with all the modifications.  It doesn't look hard to do.   The only problem is that I don't have a signing certificate yet, so users will have to disable the strict gatekeeper in order to use it...

And even better, higuys agreed to give RE about 10%.  There wasn't a negotiation, I just threw out a number that sounded like 10% and he agreed (sorry, it's actually 9.1%).  So I will break out my offline system and send higuys 22.5 BTC, and RedEmerald 2.255.  This was, by far, the most effective bounty campaign I could've imagined.  I guess it helps to have a nice compact problem to be solved, and someone who's basically already solved it!  :)

As for timelines... I have some big news coming up (besides OSX support), and the next few days are pretty packed.  I may have to wait until next week before I can actually create the OSX build to officially distribute.  For now, I request that higuys post his latest package and let people try it out.  Remember, he hasn't actually gotten the bounty yet, so he still has incentive to tweak it and help you out :)



Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: higuys on March 12, 2013, 09:48:42 PM
Here's my final proof of concept app: http://goo.gl/UYBEj

Feel free to report any more problems, I think I weeded everything out though. I'm glad you guys found my work useful.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: simonk83 on March 12, 2013, 09:50:54 PM
Great work guys, an excellent example of how a bounty can fix a long running issue in a matter of days :)


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: Rampion on March 12, 2013, 10:02:10 PM
Great!

I installed Armory with Red Emerald's instructions, using terminal - would you recommend switching to the new .app? And uninstalling previous version?

Thank you all for this fantastic piece of software ;)


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on March 12, 2013, 10:04:36 PM
Great!

I installed Armory with Red Emerald's instructions, using terminal - would you recommend switching to the new .app? And uninstalling previous version?

Thank you all for this fantastic piece of software ;)

I can't officially recommend you switch to higuys' .app for your "real savings accounts."  I only ask that you try it out if you don't have Armory yet, to confirm for me that it works.  I will get around to checking the build script, code modifications, building, signing, etc, next week.  Then I will post an official version.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: higuys on March 12, 2013, 10:04:49 PM
I installed Armory with Red Emerald's instructions, using terminal - would you recommend switching to the new .app? And uninstalling previous version?

If you do use the .app, you don't have to worry about uninstalling the old one. Everything that's needed is contained within the .app.

I know you should "never say never", so to speak, but the .app is the exact same thing as what was used before, just self-contained. I tested the basic features myself, making transfers, creating wallets, etc. Of course you should take that with a grain of salt, but that's what I have to say...


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: nelisky on March 12, 2013, 10:24:16 PM
I just got here, so I may need to go back and do some reading, but the app does absolutely nothing for me. Double clicking it does nothing, running ~/Downloads/Armory.app/Contents/MacOS/Armory in terminal simply returns... do I need to install something?

I can perfectly understand if not all dependencies could be bundled, but a little error would help me greatly :) OSX 10.6.8 here.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: vamdor on March 12, 2013, 10:34:15 PM
Because you said that you may want to post bounties later too, here are a few comments:

First of all it would be good to see some progress report occasionally, to know whether there is something else to be done, what is still missing, etc. Pretty much as soon as it turned out that after having the dependencies installed with brew, the app builds trivially, it wasn't clear what else was missing. (codesigning, was it part of that? though that's also only two more lines)

You said in the opening comment that "I'd also like to see this thread used for collaboration". This is difficult without feedback on the process. It seemed like you're not considering anyone else than higuys, but it wasn't clear. Especially after you moved the discussion away from the forum to IRC, pretty much everyone else was closed out.

You also said that the goal is to have a "recipe", but at the end you say the exit criteria was "He gave me a .zip that I downloaded in a fresh install of an OSX virtual machine, double-clicked, and Armory was running.". In that case you should have closed the bounty earlier, or at least indicate that the party was over, because that stage had been reached.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on March 12, 2013, 10:39:19 PM
Because you said that you may want to post bounties later too, here are a few comments:

First of all it would be good to see some progress report occasionally, to know whether there is something else to be done, what is still missing, etc. Pretty much as soon as it turned out that after having the dependencies installed with brew, the app builds trivially, it wasn't clear what else was missing. (codesigning, was it part of that? though that's also only two more lines)

You said in the opening comment that "I'd also like to see this thread used for collaboration". This is difficult without feedback on the process. It seemed like you're not considering anyone else than higuys, but it wasn't clear. Especially after you moved the discussion away from the forum to IRC, pretty much everyone else was closed out.

You also said that the goal is to have a "recipe", but at the end you say the exit criteria was "He gave me a .zip that I downloaded in a fresh install of an OSX virtual machine, double-clicked, and Armory was running.". In that case you should have closed the bounty earlier, or at least indicate that the party was over, because that stage had been reached.

There may be more that is done, but I can handle that.  My goal was to get something that *works*, and I can tweak the rest of it, probably with his help.  The reason the discussion moved was because higuys was essentially done already.  He was simply polishing.

And I guess I forgot to mention the 10 paragraphs he sent me via email, explaining the whole process to me.  Which was probably unnecessary, because his solution includes a fully-automated script that I can pick apart to understand what he did to any level of detail.

I didn't mean to imply that the "double-clickable .app" was the only checkout criteria -- it was necessary condition but not sufficient.  The polished script and extended email that makes the whole process repeatable for me, was the checkout.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: higuys on March 12, 2013, 10:43:37 PM
Quote
You said in the opening comment that "I'd also like to see this thread used for collaboration". This is difficult without feedback on the process. It seemed like you're not considering anyone else than higuys, but it wasn't clear. Especially after you moved the discussion away from the forum to IRC, pretty much everyone else was closed out.
Nothing's stopping you from joining the channel. irc.freenode.com #bitcoin-armory

Quote
You also said that the goal is to have a "recipe", but at the end you say the exit criteria was "He gave me a .zip that I downloaded in a fresh install of an OSX virtual machine, double-clicked, and Armory was running.". In that case you should have closed the bounty earlier, or at least indicate that the party was over, because that stage had been reached.
I also told him how to recreate what I did, which is what he meant by recipe. The app was just proof.

Quote
I just got here, so I may need to go back and do some reading, but the app does absolutely nothing for me. Double clicking it does nothing, running ~/Downloads/Armory.app/Contents/MacOS/Armory in terminal simply returns... do I need to install something?

I can perfectly understand if not all dependencies could be bundled, but a little error would help me greatly  OSX 10.6.8 here.
You shouldn't have to install anything, and afaik all of the dependencies are bundled. Running the Armory executable doesn't even output any errors? That's strange. It seems almost everyone is on 10.8.x, so I'll have to set up a 10.6 and 10.7 VM to test more.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on March 12, 2013, 10:44:00 PM
I should add:  I also expected this to take weeks, not 48 hours.   I expected endless issues with dependencies, py2app, whatever.  And that it would require collaboration between parties to resolve.  In this case, though, higuys had basically already resolved all of that himself, and the rest seemed to be polishing.  For that reason, it didn't play out exactly as I expected.

Although I agree your contributions to the thread were useful, I wouldn't place at the 10% threshold.   Though, I do agree, it probably would've been a good idea to post my intention to payout the bounty, before actually declaring it, and get feedback.  I acted too hastily.  For that, I apologize.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: vamdor on March 12, 2013, 10:59:42 PM
My goal was to get something that *works*, and I can tweak the rest of it, probably with his help.
And this is what was achieved much earlier, and made it unclear what the state of the bounty was. Obviously what I mean is not going through, but never mind then. I wasn't doubting whether his solution worked, 10 paragraph email or not.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on March 12, 2013, 11:02:44 PM
My goal was to get something that *works*, and I can tweak the rest of it, probably with his help.
And this is what was achieved much earlier, and made it unclear what the state of the bounty was. Obviously what I mean is not going through, but never mind then. I wasn't doubting whether his solution worked, 10 paragraph email or not.

Perhaps, I shouldn't have said "just works".   But I did say I would be the final arbitrator, and what he gave me was fully satisfactory.  The fact that it "worked" was the final test.  Any further polishing or adaptation to my workflow will be handled by me.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: vamdor on March 12, 2013, 11:06:53 PM
I should add:  I also expected this to take weeks, not 48 hours.

Well, when I first saw it, I was expecting much trouble too, having ported many libraries between unix-based platforms. But the fact that it went so smoothly, only shows that this is a well-maintained piece of software :)[/quote]

Quote
Although I agree your contributions to the thread were useful, I wouldn't place at the 10% threshold.
Thank you for acknowledging that. I indeed didn't contribute much, as I had absolutely no idea whether anything I managed is needed, or in what form.

Quote
I acted too hastily.  For that, I apologize.
No problem, keep up the good work!


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: higuys on March 12, 2013, 11:27:35 PM
I just got here, so I may need to go back and do some reading, but the app does absolutely nothing for me. Double clicking it does nothing, running ~/Downloads/Armory.app/Contents/MacOS/Armory in terminal simply returns... do I need to install something?

I can perfectly understand if not all dependencies could be bundled, but a little error would help me greatly :) OSX 10.6.8 here.

I'm working on making a Snow Leopard VM so I can test this. I think I know what the problem is, though. Does your computer have a 32-bit only processor (Core Duo)?


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: nelisky on March 12, 2013, 11:32:40 PM
I just got here, so I may need to go back and do some reading, but the app does absolutely nothing for me. Double clicking it does nothing, running ~/Downloads/Armory.app/Contents/MacOS/Armory in terminal simply returns... do I need to install something?

I can perfectly understand if not all dependencies could be bundled, but a little error would help me greatly :) OSX 10.6.8 here.

I'm working on making a Snow Leopard VM so I can test this. I think I know what the problem is, though. Does your computer have a 32-bit only processor (Core Duo)?

Nope, sorry about that :) It is 64bit.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: Rampion on March 13, 2013, 12:09:13 AM
FYI:

Tested on a 2,53GH Macbook Pro (mid 2009, 15 inch), 4GB RAM, which had Armory already installed through Red Emerald's instructions

Everything ran smooth and I had the same performance and "feeling" running Armory from the .app or Red Emerald's install.

Only difference: with the .app the internally built OSX Firewall asks if I want to allow Python to receive incoming traffic, like it's listening to a port. With the install made with Red Emerald's instruction, OSX Firewall never asked that.

Obviously I did not allow it to receive incoming traffic (I don't see why, it's not bitcoin-qt) and it still ran OK. Outgoing traffic as per Red Emerald's: python connected to google, bitcoinarmory.com and github.

Last but not least, I broadcasted an offline signed transaction OK.

EDITED: I see that I allowed incoming traffic for python (Red Emerald's install), I must have forgot about it. So everything is the same on that sense. Btw: why is python/armory requesting for incoming transaction? Sorry for my ignorance

And thanks again for the best bitcoin client, by fair. Loving it in Linux, btw ;)


Title: Re: The official Armory-for-OSX Bounty Thread [25 BTC]
Post by: Daily Anarchist on March 13, 2013, 01:29:51 AM
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.

I'll offer a bounty to fix the makefile.  Seriously, all I need is the simplest of checks in the make file, and Armory compiles super-cleanly on all these *nix distributions.  Once the makefile goes looking for the .so instead of .a, having any versions of the dependencies should be sufficient. 

But yes, there will probably be more bounties in the future, to help with related things.  As long as they are well-contained, easily-verifiable problems, I am for bounties...

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

Just making good on my promise:

http://blockchain.info/address/15Lf5C4cfmDTccj8XfsiTj6gYcHSq8Lsn6

Thanks again!


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: higuys on March 13, 2013, 06:39:03 AM
Right, I can't for the life of me get a snow leopard VM set up, so I'm going to need some more information. There has to be some error output.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: nelisky on March 13, 2013, 09:21:00 AM
Right, I can't for the life of me get a snow leopard VM set up, so I'm going to need some more information. There has to be some error output.

I love how you are sure of that, it's kinda sweet :)

Ok, all jokes aside, I'll have a proper look at it today and will provide you with details other that "I clicked and it did not work".


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: ErebusBat on March 19, 2013, 02:47:13 PM
Also on Gatekeeper.  The nice thing about gatekeeper is how flexible it is.  If you hold option while you right click and app and select Open then you will have the option to bypass gatekeeper for this one app only (you don't have to turn the whole system off)

I have had occasional problems when this didn't work, if you move the download Quarentine flag then I have never come across a situation where this doesn't work. 

I just hate seeing the advice 'turn off gatekeeper' when it is such a great system.

FYI to remove the flag:
Code:
xattr -d com.apple.quarentine /path/to/app


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on March 19, 2013, 02:50:46 PM
Also on Gatekeeper.  The nice thing about gatekeeper is how flexible it is.  If you hold option while you right click and app and select Open then you will have the option to bypass gatekeeper for this one app only (you don't have to turn the whole system off)

I have had occasional problems when this didn't work, if you move the download Quarentine flag then I have never come across a situation where this doesn't work. 

I just hate seeing the advice 'turn off gatekeeper' when it is such a great system.

FYI to remove the flag:
Code:
xattr -d com.apple.quarentine /path/to/app

Well, hopefully it won't be needed anymore.  I should have a proper, Class 2 code-signing certificate soon.  I assume that Apple trusts the same software as everyone else?  Or at least, it will present it with a non-scary warning (because it will now have my name instead of something else).



Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: brandondayton on March 19, 2013, 06:26:01 PM
Works great for me. Right when I finished setting up ubuntu in a virtual machine to run Armory. Thanks!


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: TAiS46 on March 20, 2013, 12:45:41 AM
Will donate 1 BTC after the Mac version will be public :)


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: nelisky on March 20, 2013, 02:33:03 PM
Took me a lot longer than expected to revisit this, sorry!

Code:
computer-2:MacOS cn$ DYLD_LIBRARY_PATH=../Dependencies/QtCore.framework/Versions/Current:../Dependencies/QtGui.framework/Versions/Current:../Dependencies:$DYLD_LIBRARY_PATH bin/python armorybuild/ArmoryQt.pyc 
Illegal instruction
computer-2:MacOS cn$ DYLD_LIBRARY_PATH=../Dependencies/QtCore.framework/Versions/Current:../Dependencies/QtGui.framework/Versions/Current:../Dependencies:$DYLD_LIBRARY_PATH bin/python
Illegal instruction

And I stand corrected, cause although I have a fairly recent i5 MBP, its kernel seem to be running 32bit mode

Code:
Darwin sc2.lan 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

Hope it helps you help me...


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: sub0 on March 25, 2013, 12:19:04 AM
This is great. I've been wanting to try Armory. When can we expect the public version?


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on March 25, 2013, 12:29:46 AM
This is great. I've been wanting to try Armory. When can we expect the public version?

I'm just finishing the crazy updates for 0.88, and then I will be doing an official release (after a testing period, probably over the next week).  As part of that process, I have to setup a different offline computer just to sign Windows and Mac binaries (this is turning into a real PITA just for signing Windows binaries in Linux, and so far I can't find anything at all that does OSX).  In order to avoid problems with the gatekeeper, I wanted to make sure the first actual OSX release is signed with a real certificate.

So to answer your question, probably next week.  Even if I wanted to, I don't have my system setup yet to do the signing... that's getting done Friday.
(yes, i'm a stickler for making sure identity information/signatures are kept offline)


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: sub0 on March 25, 2013, 07:19:06 PM
Sounds good. Thanks for all the hard work!


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: ralree on March 28, 2013, 11:54:14 PM
Watching this thread for updates.  Can't wait to try this against multibit and the official client!


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: pa on March 31, 2013, 05:38:06 PM
I just got here, so I may need to go back and do some reading, but the app does absolutely nothing for me. Double clicking it does nothing, running ~/Downloads/Armory.app/Contents/MacOS/Armory in terminal simply returns... do I need to install something?

I can perfectly understand if not all dependencies could be bundled, but a little error would help me greatly :) OSX 10.6.8 here.

It seems to be working for me on OSX 10.8.3. At first, after double-clicking the app, it didn't appear to be working. Then I control-clicked on the "python" icon in the launchpad and selected "show all windows". . . Armory then started up.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: Rampion on April 02, 2013, 02:54:30 PM
etotheipi: could you please confirm that higuys .app is 100% safe to use?

I've been using Red Emerald's solution for a while, then I've tested higuys solution which is also working very good. Just wanted to know if you would recommend definitely switching to higuys app while we wait for an official OSX release.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on April 02, 2013, 03:11:02 PM
etotheipi: could you please confirm that higuys .app is 100% safe to use?

I've been using Red Emerald's solution for a while, then I've tested higuys solution which is also working very good. Just wanted to know if you would recommend definitely switching to higuys app while we wait for an official OSX release.

Hi Rampion,

I can't confirm that.  The only way I'll confirm it is if I made it myself, but I haven't done that yet.  Luckily, I'm just about done with what I was doing, and have some time now to try the OSX building as higuys laid out for me.

Let's see how far I get...


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: Rampion on April 02, 2013, 03:14:49 PM
etotheipi: could you please confirm that higuys .app is 100% safe to use?

I've been using Red Emerald's solution for a while, then I've tested higuys solution which is also working very good. Just wanted to know if you would recommend definitely switching to higuys app while we wait for an official OSX release.

Hi Rampion,

I can't confirm that.  The only way I'll confirm it is if I made it myself, but I haven't done that yet.  Luckily, I'm just about done with what I was doing, and have some time now to try the OSX building as higuys laid out for me.

Let's see how far I get...

Well, to be honest now I'm kinda worried of having used extensively higuy's solution. Not your fault of course.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on April 02, 2013, 03:16:22 PM
etotheipi: could you please confirm that higuys .app is 100% safe to use?

I've been using Red Emerald's solution for a while, then I've tested higuys solution which is also working very good. Just wanted to know if you would recommend definitely switching to higuys app while we wait for an official OSX release.

Hi Rampion,

I can't confirm that.  The only way I'll confirm it is if I made it myself, but I haven't done that yet.  Luckily, I'm just about done with what I was doing, and have some time now to try the OSX building as higuys laid out for me.

Let's see how far I get...

Well, to be honest now I'm kinda worried of having used extensively higuy's solution. Not your fault of course.

What I said shouldn't make you any more concerned than you were before.  There's plenty of trustworthy people around here, I just don't trust anyone but myself to release my software. 


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: keewee on April 07, 2013, 06:58:19 AM
Hi. I tested higuys' build on an iMac running 10.8.3 and it runs fine. The only real problem I have is that the memory usage is very high, about 1.7G, so it takes a big bite out of the maximum of 4G I can install on this iMac. I remember reading somewhere in this forum that optimisation is something that is being worked on. Is the memory usage likely to drop significantly?


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on April 08, 2013, 01:53:18 AM
Hi. I tested higuys' build on an iMac running 10.8.3 and it runs fine. The only real problem I have is that the memory usage is very high, about 1.7G, so it takes a big bite out of the maximum of 4G I can install on this iMac. I remember reading somewhere in this forum that optimisation is something that is being worked on. Is the memory usage likely to drop significantly?

Yes, RAM usage and startup time will both drop significantly, at the expense of using more hard-disk.  However, after I complete that transition, I will likely be able to reduce the disk usage, too -- I don't need to store/index all tx in Armory... it's just how it was originally built.   I want to scale that back and try not to duplicate everything on disk...eventually...

Timeframe for the first round (with duplicate blockchain data) is probably a couple weeks.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on April 08, 2013, 06:08:00 PM
I'm finally doing this!  I've just spent some time getting an OSX environment setup, and make sure that I can compile and run the latest Armory.

I just hit a snag while trying to execute the Makefile.  I think I understand what's going on, I just want to make sure:

-- I did a "sudo pip install virtualenv" and it completed successfully
-- I type "virtualenv" and I get "unknown command" error
-- I have looked around and found "/usr/local/lib/python2.7/site-packages/virtualenv.py"
-- When I directly run that script in python (bare), it appears to do what I want
-- I found some other references to installing "virtualenv" and running it as it's described in higuys' email and in the Makefile/deploy.sh script

So what's different?  Why is it that I don't get a symlink/executable like everyone else does?  Is there any reason not to just modify the Make file to replace "virtualenv" with "python /usr/local/lib/python2.7/site-packages/virtualenv.py"?





Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on April 08, 2013, 07:18:58 PM
I went ahead and did what I said I was going to try, above.  It appears to have worked.  I'm still curious why my system is different... but I'll live if I don't find out.

My next problem has to do with a new python dependency that has been added for version 0.88:  python-psutil.  It looks like the Armory.app is failing because that is missing that dependency.

Here is the deploy.sh script that higuys sent me (https://github.com/bsmt/BitcoinArmory/blob/46f86a86a571ebfca085d60e002083d05f79cc2d/osxbuild/deploy.sh).  I tried modifying it by adding the line in blue:

Quote
function make_env()
{
    echo "Making python environment..."
    virtualenv -q env
    cd env
    bin/pip install twisted >/dev/null
    bin/pip install psutil >/dev/null
    ...
}

I assumed that is the point at which you are installing the dependencies in the virtual environment.  I also added it the get_dependencies() function as well.  Either way, it still fails find it when run from osxbuild/Armory.app/Contents/MacOS/Armory.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: picobit on April 08, 2013, 07:47:48 PM
If you don't redirect output to /dev/null then perhaps you will see an error message.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on April 08, 2013, 07:53:08 PM
If you don't redirect output to /dev/null then perhaps you will see an error message.


I did that actually, and didn't see any errors.  It tells me it's installed successfully.  But I wonder if it is installing it in the external system, not the virtual environment.  I can't tell.  Or maybe I need to copy the psutil folder into the Armory.app explicitly, like pyqt is....?


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: picobit on April 08, 2013, 09:00:11 PM
If it is needed at runtime, then I would think it needs to be copied.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on April 08, 2013, 09:01:20 PM
If it is needed at runtime, then I would think it needs to be copied.

Well there's a lot of packages that are needed at runtime.  Twisted is one of them, yet that seems to be covered through the pip-install line. 

I'll try the copy operation...


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on April 08, 2013, 10:34:03 PM
If it is needed at runtime, then I would think it needs to be copied.

Well there's a lot of packages that are needed at runtime.  Twisted is one of them, yet that seems to be covered through the pip-install line. 

I'll try the copy operation...

Gah!  I figured it out -- higuys made the deploy.sh script skip those function calls if the env and Armory.app directories already exist.   And "make clean" doesn't remove them.  So this whole time, all those things I was trying were not executing!

I added removal of those directories to "make clean", and re-ran with just the extra "bin/pip install psutil" call, and it appears to have worked!  I can't believe I spent so much time chasing that down!

P.S. - Actually it doesn't totally work yet, but I'm getting closer...  Just got a "PyThreadState_Get: no current thread" error.  Have we seen that before?


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: picobit on April 09, 2013, 08:30:31 AM
I think I saw that error when testing one of higuys builds - i don't know what he did to fix it.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on April 09, 2013, 12:12:19 PM
Okay, I've been battling this for a while now.  I think the virtualenv is screwing me up.  Using Red Emerald's brew formula, I can use run Armory no problem.  Then I use higuys' Makefile and deploy script, and everything breaks.  It doesn't break the system, just the directory.

i.e. It looks like this:

(1) Red Emerald brew formula
(2) python ArmoryQt.py  # works!
(3) higuys' "make osx"
(4) cd osxbuild;  open Armory.app;  #fails!
(5) cd Armory.app/Contents/MacOS/Armory; #fails!
(6) cd ~/src/BitcoinArmory;  python ArmoryQt.py;  #fails!
(7) "PYTHONPATH=... /usr/bin/python Armory.Qt" #works!

So I guess that the virtualenv is linking to the wrong libraries, or bad libraries or something.  

Specifically:  Red Emerald's call (the one that works):

Code:
$ PYTHONPATH=`brew --prefix`/lib/python2.7/site-packages /usr/bin/python ~/src/BitcoinArmory/ArmoryQt.py

higuys' script executes the following to start Armory (doesn't work):

Code:
$ export DYLD_LIBRARY_PATH=../Dependencies/QtCore.framework/Versions/Current:../Dependencies/QtGui.framework/Versions/Current:../Dependencies:$DYLD_LIBRARY_PATH
$ bin/python armorybuild/ArmoryQt.pyc &



Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: ErebusBat on April 09, 2013, 04:38:19 PM
Maybe change the paths to absolute paths?


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on April 09, 2013, 04:47:53 PM
Maybe change the paths to absolute paths?

I don't think that works.  It needs to reference relative paths to the virtualenv-included python dependencies. 

I have no idea where to go from here.  I was hoping higuys would respond and help... more.  Maybe someone with a fresh OSX install can follow the higuys directions and figure out how to modify it.  I suspect that somehow he was able to create .app with extra stuff installed on his system than comes with OSX. 

To anyone willing to try, I guess I'll offer an extra 0.5 BTC bounty.

(1) Create a fresh OSX VM or installation so that there are no pre-installed dependencies.
(2) Follow Red Emerald's brew instructions (use Method 2) (https://gist.github.com/WyseNynja/4200620).  It will involve installing Xcode and the command-line utilities.  And running python with the PYTHONPATH=... prefix.
(2a) Before you make the project, do a "git checkout osx_managesat", which has the updated Makefile and deploy.sh from higuys. 
(3) You should be able to just "make osx" from there.  But you can also look at what he changed/added in his pull request (https://github.com/bsmt/BitcoinArmory/commit/46f86a86a571ebfca085d60e002083d05f79cc2d).

I'm very frustrated.  I've been tinkering for a while.  Not sure what's wrong.  By they way, I'm using OSX 10.8.2



Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: marcus905 on April 11, 2013, 09:43:16 PM
I have a clean OS X 10.7.5 partition in this mac mini I'm using.

If it's OK with you not being 10.8 I can try what you said.


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on April 11, 2013, 10:20:04 PM
I have a clean OS X 10.7.5 partition in this mac mini I'm using.

If it's OK with you not being 10.8 I can try what you said.

By all means take a shot at it.   


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: marcus905 on April 11, 2013, 11:31:45 PM
I'll try and report back :)

(it might take a couple hours to half a day for the download of Xcode though... I'll update you asap)


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on April 12, 2013, 04:09:44 PM
So I feel a little silly.  After talking with higuys, and sending him my .bash_history of my failed attempts, we figured out that Red Emerald's instructions are actually conflicting somehow with his build.  I thought I had to follow RedEmerald's instructions first, then do his, not realizing that he made his script pretty much full-service.

  • (1) Install XCode from the App store
  • (2) Open XCode, go to Edit->Preferences->Downloads(Tab)->Command Line Utilities->Install
  • (3) Install brew:  ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
  • (4) Install pip:  sudo easy_install pip
  • (5) Clone the repo: git clone git://github.com/etotheipi/BitcoinArmory.git; cd BitcoinArmory
  • (6) Make it:  make osx
  • (6a) You'll have to type in your password, since the "make osx" script installs everything for you
  • (7) Run it:  ./osxbuild/Armory.app/Contents/MacOS/Armory

That's it!  And it appears to work.  The only problem I see so far is that the icon doesn't work, and notifications crash it.  I am in the process of disabling notifications (and 0.5 BTC to someone who figures out how to run them without causing growl to segfault, or whatever is happening), and then I'm going sign the .app and add it to my testing release notification (https://bitcointalk.org/index.php?topic=156250.msg1655941#msg1655941).

Because there is no bitcoind for OSX, it's going to take me quite a bit of work to even get Bitcoin-Qt automated.  I think for 0.88, I will be skipping that (disabled the option for auto-bitcoind), and OSX will run just like the previous versions.  It's still better than nothing.  Perhaps others can experiment with how to best find Bitcoin-Qt, run it, and then hide it.

I'll have something posted soon!


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: c0inbuster on April 13, 2013, 12:19:00 PM
Hello,

I send you 0.2 BTC so
Total Bounty Accumulated is 25.005 BTC (need to wait confirmation)
I hope it will help to have a public OS X Armory client.

I'm also looking for user friendly Linux live USB key with all necessary tools
to backup securely crypto coins (BTC but also LTC, NMC, DVC...).

Kind regards


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: etotheipi on April 13, 2013, 04:36:37 PM
Done!  I have a testing release, posted here (https://bitcointalk.org/index.php?topic=175777.0).


Title: Re: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC]
Post by: c0inbuster on April 14, 2013, 08:47:49 AM
Thanks.

Please have a look at my post about segfault problem.
https://bitcointalk.org/index.php?topic=175777.msg1835452#msg1835452 (https://bitcointalk.org/index.php?topic=175777.msg1835452#msg1835452)

Kind regards