Pages:
Author

Topic: The official Armory-for-OSX Bounty Thread [CLAIMED -- 25 BTC] - page 4. (Read 10391 times)

newbie
Activity: 50
Merit: 0
It seems you need pyqt to make Armory,
Well, considering that the build instructions say so, this is hardly surprising Smiley

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.

newbie
Activity: 28
Merit: 0
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.
newbie
Activity: 50
Merit: 0
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.
hero member
Activity: 547
Merit: 500
Decor in numeris
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. Smiley
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!

newbie
Activity: 43
Merit: 0
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://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 list. There's only a few changes.
newbie
Activity: 28
Merit: 0
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!
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
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!
newbie
Activity: 28
Merit: 0
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://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.
newbie
Activity: 43
Merit: 0
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://gist.github.com/colindean/5131539
newbie
Activity: 28
Merit: 0
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
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
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...
newbie
Activity: 28
Merit: 0
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.
newbie
Activity: 28
Merit: 0
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.
newbie
Activity: 50
Merit: 0
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"
newbie
Activity: 50
Merit: 0
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.
newbie
Activity: 28
Merit: 0
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...
newbie
Activity: 50
Merit: 0
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'
legendary
Activity: 1610
Merit: 1004
seems to be working fine for me, running on 10.8.2.  excited to finally use this!
newbie
Activity: 28
Merit: 0
Anyways, revision 3: http://goo.gl/73v3b
Now it works on my mac. (the previous one had the same problem as listed above by picobit)

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

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.
newbie
Activity: 50
Merit: 0
Anyways, revision 3: http://goo.gl/73v3b
Now it works on my mac. (the previous one had the same problem as listed above by picobit)

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