Haplo
|
|
May 17, 2012, 01:58:12 AM |
|
Well, I tried exporting CFLAGS and ARCHFLAGS, but the result was the same o.0. Oh well.
|
I'm So Meta, Even This Acronym
|
|
|
Red Emerald
|
|
June 20, 2012, 12:17:06 AM Last edit: June 20, 2012, 05:24:50 AM by Red Emerald |
|
I was able to compile in Lion. It's a weird mix of system and brew though and I'm not sure I like it. I don't understand what exactly is going on, but it compiles. I'll have updated instructions up sometime soon. EDIT: It seems like this would be a breeze if you didn't use bsddb. It's been depreciated in python 2.6 and completely removed in 3.0. I'm not sure if pybsddb even supports the newest version of berkeley-db4 (and berkeley-db5 has been out a while).Looks like I had an older version in my pip cache. I downloaded http://pypi.python.org/packages/source/b/bsddb3/bsddb3-5.3.0.tar.gz#md5=d5aa4f293c4ea755e84383537f74be82 and installed that easily. Install homebrew packages: $ brew install python cryptopp swig sip qt pyqt berkeley-db
$ export PATH=`brew --prefix`/share/python:$PATH $ export CFLAGS="-arch x86_64" $ export ARCHFLAGS="-arch x86_64" $ export BERKELEYDB_INCDIR=`brew --prefix berkeley-db`/include $ export BERKELEYDB_LIBDIR=`brew --prefix berkeley-db`/lib $ export PYTHONPATH=`brew –prefix`/lib/python2.7/site-packages:$PYTHONPATH
$ pip install twisted bsddb3
$ mkdir ~/src $ cd ~/src $ git clone git://github.com/etotheipi/BitcoinArmory.git
$ cd BitcoinArmory/cppForSwig
This is where it gets weird. I want this to work: $ ln -s `brew --prefix`/lib/python2.7/config/libpython2.7.a .
But that fails with: g++ -shared -lpthread UniversalTimer.o BinaryData.o FileDataPtr.o BtcUtils.o BlockObj.o BlockUtils.o EncryptionUtils.o libcryptopp.a libpython2.7.a CppBlockUtils_wrap.o -o ../_CppBlockUtils.so Undefined symbols for architecture x86_64: "_environ", referenced from: _initposix in libpython2.7.a(posixmodule.o) ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make: *** [swig] Error 1
So instead I'm building against the system python v2.7.1 (even though all the modules and such are brew's v2.7.3) $ ln -s /usr/lib/python2.7/config/libpython2.7.a .
I also had to edit the makefile vim Makefile ================================================================================ diff --git a/cppForSwig/Makefile b/cppForSwig/Makefile index de3bb1d..716a039 100755 --- a/cppForSwig/Makefile +++ b/cppForSwig/Makefile @@ -8,10 +8,10 @@ OBJS = UniversalTimer.o BinaryData.o FileDataPtr.o BtcUtils.o BlockObj.o BlockUt INCLUDE_OPTS += -Icryptopp -DUSE_CRYPTOPP -D__STDC_LIMIT_MACROS LIBRARY_OPTS += -lpthread -SWIG_INC += -I/usr/include/python2.7 +SWIG_INC += -I/usr/local/include/python2.7 SWIG_OPTS += -c++ -python -classic -ifneq (exists, $(shell [ -d /usr/include/python2.7 ] && echo exists )) +ifneq (exists, $(shell [ -d /usr/local/include/python2.7 ] && echo exists )) SWIG_INC = -I/usr/include/python2.6 LIBRARY_OPTS = -lpthread ifneq (exists, $(shell [ -d /usr/include/python2.6 ] && echo exists )) @@ -26,7 +26,7 @@ all : make BlockUtilsTest.out swig : $(OBJS) CppBlockUtils_wrap.o - g++ -shared $(LIBRARY_OPTS) $(OBJS) libpython2.6.a CppBlockUtils_wrap.o -o ../_CppBlockUtils.so + g++ -shared $(LIBRARY_OPTS) $(OBJS) libpython2.7.a CppBlockUtils_wrap.o -o ../_CppBlockUtils.so pyrcc4 -o ../qrc_img_resources.py ../imgList.xml BlockUtilsTest.out : $(OBJS) BlockUtilsTest.cpp ================================================================================
And then its just a little bit of waiting make clean make swig
cd .. /usr/bin/python ArmoryQt.py
Note that is "/usr/bin/python" not brew's python. I don't get it, but it works because of PYTHONPATH (I think) Loading blockchain took 83.3 seconds
EDIT: I just clicked "Filter:" and everything locked up
|
|
|
|
Red Emerald
|
|
July 06, 2012, 06:15:09 AM |
|
I'm compiling .82 in Lion now. The Makefile changes made my tweaks even easier. I just changed 2 lines and no more need for symlinks. I use brew to install all of the dependencies (including python) and then this. I can't get it to compile against brew's libpython2.7.a, but if you export PYTHONPATH, it can use brew's pyqt and such. $ git diff HEAD diff --git a/cppForSwig/Makefile b/cppForSwig/Makefile index d5b4340..ad646bf 100755 --- a/cppForSwig/Makefile +++ b/cppForSwig/Makefile @@ -7,14 +7,14 @@ LINKER = g++ OBJS = UniversalTimer.o BinaryData.o FileDataPtr.o BtcUtils.o BlockObj.o BlockUtils.o EncryptionUtils.o libcryptopp.a -DEPSDIR ?= /usr +DEPSDIR ?= /usr/local INCLUDE_OPTS += -Icryptopp -DUSE_CRYPTOPP -D__STDC_LIMIT_MACROS LIBRARY_OPTS += -lpthread SWIG_OPTS += -c++ -python -classic PYVER += `python -c 'import sys; print str(sys.version_info[0]) + "." + str(sys.version_info[1])'` SWIG_INC += -I"$(DEPSDIR)/include/python$(PYVER)" -STATICPYTHON += "$(DEPSDIR)/lib/libpython$(PYVER).a" +STATICPYTHON += "/usr/lib/python2.7/config/libpython2.7.a" #**************************************************************************
|
|
|
|
etotheipi (OP)
Legendary
Offline
Activity: 1428
Merit: 1093
Core Armory Developer
|
|
July 09, 2012, 11:49:49 PM |
|
Sorry to be a n00b, but I will use this thread for my own education. I have never touched Mac/OSX machine in my life. Just now, I finally got a VM setup that looks like it will work. But I have no idea where to go...
I got git installed, from what looks like a .dmg file, which opened up in to a .pkg file which actually installed it. Is this how OSX programs are typically packaged? If I were to eventually create an installer/uninstaller, what would be the best target format for it?
How am I typically going to install programs and packages in OSX? Go to website, download some file, double click? Is there any command-line utility like apt-get for retrieving dependencies?
What is the difference between xcode and brew? To me, it sounds like to two different flavors of build systems. I was surprised to find see a lack of google hits for "xcode vs brew", so I suspect they are not simply flavors of the same thing.
Btw, I am running Lion, and plan to compile 64-bit binaries. I was told that 32-bit OSX is not common at all, is that true? Can I avoid dealing with 32-bit? It sounds like what code I compile may not work on 10.4 (Tiger) because of Qt libraries...
Do you think it's possible that Armory could be distributed as a python script like it is in Linux? It is "installed" by simply copying all the necessary code and binaries into /usr/share/armory, and then the shortcut is just "python /usr/share/armory/ArmoryQt.py". I say this because I expect issues with creating a real executable out of it (like with the Mac-equiv of py2exe).
I haven't even tried the existing compilation instructions yet. I'm currently exploring the filesystem structure and how programs work. I just want to get some base information down about how I'm going to operating in OSX and compiling stuff.
|
|
|
|
Red Emerald
|
|
July 10, 2012, 05:49:26 PM |
|
Sorry to be a n00b, but I will use this thread for my own education. I have never touched Mac/OSX machine in my life. Just now, I finally got a VM setup that looks like it will work. But I have no idea where to go...
I got git installed, from what looks like a .dmg file, which opened up in to a .pkg file which actually installed it. Is this how OSX programs are typically packaged? If I were to eventually create an installer/uninstaller, what would be the best target format for it?
Usually all files are distributed in a .dmg. Programs that install binaries and such around the system usually come as pkgs. Standalone applications usually come as .app http://www.tuaw.com/2007/05/02/mac-101-dmg-files-are-disk-images/http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.htmlHow am I typically going to install programs and packages in OSX? Go to website, download some file, double click?
Most mac applications (that aren't in the App Store) use this workflow: go to website, download some file, double click, drag application into application folder. Is there any command-line utility like apt-get for retrieving dependencies?
What is the difference between xcode and brew? To me, it sounds like to two different flavors of build systems. I was surprised to find see a lack of google hits for "xcode vs brew", so I suspect they are not simply flavors of the same thing.
brew is kind of like apt or yum. Xcode is an editor and some command line tools. Brew uses Xcode's command line tools for compiling. It isn't a one vs the other kind of thing. Btw, I am running Lion, and plan to compile 64-bit binaries. I was told that 32-bit OSX is not common at all, is that true? Can I avoid dealing with 32-bit? It sounds like what code I compile may not work on 10.4 (Tiger) because of Qt libraries...
I don't have too much experience compiling distributable binaries. 10.6 and later include a 64-bit kernel. 10.7 comes with Python 2.7. I'd be fine with just 64 bit, but I recall someone else having PPC. Although that is probably too old to deal with binaries for. Older systems can compile themselves (once those instructions get figured out). I'd recommend starting with just one binary. Then you can worry about building for multiple systems. Do you think it's possible that Armory could be distributed as a python script like it is in Linux? It is "installed" by simply copying all the necessary code and binaries into /usr/share/armory, and then the shortcut is just "python /usr/share/armory/ArmoryQt.py". I say this because I expect issues with creating a real executable out of it (like with the Mac-equiv of py2exe).
I haven't even tried the existing compilation instructions yet. I'm currently exploring the filesystem structure and how programs work. I just want to get some base information down about how I'm going to operating in OSX and compiling stuff.
I'm sure you could get a script to work, but you should look into py2app. Pretty much all it does is compile everything into one folder and then make a shortcut. I got it half working a couple versions ago. I'll try again now that you compile against python differently. You should also look at platypus. It's not very common for apps to stick files in /usr on a Mac. Applications usually go into /Applications. http://sveinbjorn.org/platypus
|
|
|
|
Red Emerald
|
|
July 14, 2012, 05:19:07 AM |
|
New and improved instructions for 64-bit Lion! Install homebrew packages: $ brew install python cryptopp swig sip qt pyqt berkeley-db
$ export PATH=`brew --prefix`/share/python:$PATH $ export CFLAGS="-arch x86_64" $ export ARCHFLAGS="-arch x86_64" $ export BERKELEYDB_INCDIR=`brew --prefix berkeley-db`/include $ export BERKELEYDB_LIBDIR=`brew --prefix berkeley-db`/lib
$ pip install twisted bsddb3
$ mkdir ~/src $ cd ~/src $ git clone git://github.com/etotheipi/BitcoinArmory.git $ cd BitcoinArmory
Now edit the DEPSDIR and STATICPYTHON in cppForSwig/Makefile $ git diff HEAD cppForSwig/Makefile diff --git a/cppForSwig/Makefile b/cppForSwig/Makefile index d5b4340..c20b9a1 100755 --- a/cppForSwig/Makefile +++ b/cppForSwig/Makefile @@ -7,14 +7,14 @@ LINKER = g++ OBJS = UniversalTimer.o BinaryData.o FileDataPtr.o BtcUtils.o BlockObj.o BlockUtils.o EncryptionUtils.o libcryptopp.a -DEPSDIR ?= /usr +DEPSDIR ?= /usr/local INCLUDE_OPTS += -Icryptopp -DUSE_CRYPTOPP -D__STDC_LIMIT_MACROS LIBRARY_OPTS += -lpthread SWIG_OPTS += -c++ -python -classic PYVER += `python -c 'import sys; print str(sys.version_info[0]) + "." + str(sys.version_info[1])'` SWIG_INC += -I"$(DEPSDIR)/include/python$(PYVER)" -STATICPYTHON += "$(DEPSDIR)/lib/libpython$(PYVER).a" +STATICPYTHON += "$(DEPSDIR)/lib/libpython$(PYVER).dylib" #**************************************************************************
Almost there! $ make clean $ make
$ python ArmoryQt.py ******************************************************************************** Loading Armory Engine: Armory Version: 0.82 PyBtcAddress Version: 1.00 PyBtcWallet Version: 1.35 Detected Operating system: Mac/OSX User home-directory : /Users/bwstitt/Library/Application Support Satoshi BTC directory : /Users/bwstitt/Library/Application Support/Bitcoin/ Armory home dir : /Users/bwstitt/Library/Application Support/Armory/ Using settings file: /Users/bwstitt/Library/Application Support/Armory/ArmorySettings.txt Loading wallets... Number of wallets read in: 4 Wallet (---------): "Primary Cold Wallet (Watch) " (No Encryption) Wallet (---------): "Foobar " (No Encryption) Wallet (---------): "Satoshi Wallet " (Encrypted) Wallet (---------): "Primary Hot Wallet " (Encrypted) Internet connection is Available: True Bitcoin-Qt/bitcoind is Available: True Loading blockchain Opening file 1: /Users/bwstitt/Library/Application Support/Bitcoin//blk0001.dat Opening file 2: /Users/bwstitt/Library/Application Support/Bitcoin//blk0002.dat Highest blkXXXX.dat file: 2 Attempting to read blockchain from file: /Users/bwstitt/Library/Application Support/Bitcoin//blk0001.dat /Users/bwstitt/Library/Application Support/Bitcoin//blk0001.dat is 2000.04 MB Attempting to read blockchain from file: /Users/bwstitt/Library/Application Support/Bitcoin//blk0002.dat /Users/bwstitt/Library/Application Support/Bitcoin//blk0002.dat is 4.13251 MB Syncing wallets with blockchain... Syncing wallet: --------- Syncing wallet: --------- Syncing wallet: --------- Syncing wallet: --------- Loading blockchain took 123.4 seconds
Since I am using brew's libpython2.7.dylib, we don't need to set PYTHONPATH Clicking "Filter:" still locks everything up If you copy these instructions to your site, be careful that the backticks and quotes transfer properly.
|
|
|
|
torusJKL
|
|
August 04, 2012, 06:25:36 PM Last edit: August 04, 2012, 07:16:49 PM by torusJKL |
|
New and improved instructions for 64-bit Lion!
Thanks Red Emerald. The changes in the Makefile work also on Snow Leopard with Armory 0.81-alpha. For those who get this error $ python ArmoryQt.py Traceback (most recent call last): File "ArmoryQt.py", line 37, in <module> from PyQt4.QtCore import * ImportError: dlopen(/usr/local/lib/python/PyQt4/QtCore.so, 2): Symbol not found: __cg_TIFFClientOpen Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO Expected in: /usr/local/lib/libTIFF.dylib in /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO Don't use the homebrew version but the one from the system sudo rm /usr/local/lib/libtiff.dylib sudo cp /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Resources/libTIFF.dylib /usr/local/lib/
|
|
|
|
gweedo
Legendary
Offline
Activity: 1498
Merit: 1000
|
|
August 04, 2012, 06:27:07 PM |
|
anyone know if the lion instructions work on mountain lion?
|
|
|
|
Red Emerald
|
|
August 09, 2012, 09:01:11 PM |
|
anyone know if the lion instructions work on mountain lion?
They worked for me on both.
|
|
|
|
gweedo
Legendary
Offline
Activity: 1498
Merit: 1000
|
|
August 09, 2012, 10:52:07 PM Last edit: August 09, 2012, 11:31:37 PM by gweedo |
|
anyone know if the lion instructions work on mountain lion?
They worked for me on both. how did you get sip to work? I can't get it to work on mountain lion Error: Failed executing: make install (sip.rb:41)
EDIT: Nevermind I had to update my GCC
|
|
|
|
gweedo
Legendary
Offline
Activity: 1498
Merit: 1000
|
|
August 10, 2012, 12:34:54 AM |
|
make[1]: *** [CppBlockUtils_wrap.o] Error 1 make: *** [all] Error 2
I am getting tis error on mountain lion any help?
|
|
|
|
etotheipi (OP)
Legendary
Offline
Activity: 1428
Merit: 1093
Core Armory Developer
|
|
August 12, 2012, 05:05:04 AM |
|
Is this still an issue? Now that I have removed the functionality for reading Satoshi wallets (because it only worked with older wallets that no one uses anymore), I can remove the bsddb depedency completely. Would that be worth it? I never had any interest in using bsddb myself, but obviously I have no choice if I want to read Bitcoin-Qt wallets. However, leaving it in there would be slightly preferable in case I want to support those old wallets in the future (the new deterministic wallet formats coming at some point, will not use BSDDB). On the topic of OSX compiling... I have still been swamped with... life. So I haven't had much time for development, but dabbling in OSX is a good exercise while I'm not doing other things. So I have started learning how to compile things... why are there not packages for anything? Is that what homebrew is for? I got swig compiled and running without brew. It was a good exercise. Unnecessary complex though (downloaded pcre separately, and used the Tools/pcre-build.sh script with swig). But from looking at instructions, it looks like I can avoid a lot of pain by just going with brew...?
|
|
|
|
Red Emerald
|
|
August 16, 2012, 02:51:38 AM |
|
Is this still an issue? Now that I have removed the functionality for reading Satoshi wallets (because it only worked with older wallets that no one uses anymore), I can remove the bsddb depedency completely. Would that be worth it? I never had any interest in using bsddb myself, but obviously I have no choice if I want to read Bitcoin-Qt wallets. However, leaving it in there would be slightly preferable in case I want to support those old wallets in the future (the new deterministic wallet formats coming at some point, will not use BSDDB). Please get rid of bsddb. On the topic of OSX compiling... I have still been swamped with... life. So I haven't had much time for development, but dabbling in OSX is a good exercise while I'm not doing other things. So I have started learning how to compile things... why are there not packages for anything? Is that what homebrew is for?
Yes. I got swig compiled and running without brew. It was a good exercise. Unnecessary complex though (downloaded pcre separately, and used the Tools/pcre-build.sh script with swig). But from looking at instructions, it looks like I can avoid a lot of pain by just going with brew...?
Oh god. Don't torture yourself, dude. Manual dependency tracking is not something worth wasting your time on. Use homebrew. It takes all of 10 seconds to install and makes everything way easier.
|
|
|
|
etotheipi (OP)
Legendary
Offline
Activity: 1428
Merit: 1093
Core Armory Developer
|
|
August 16, 2012, 08:54:46 PM |
|
Please get rid of bsddb.
Done! Will commit it in the next release. I haven't really tested it, but I just commented out all the code that relies on bsddb, and it shouldn't make a difference because the only module that calls any of that code is the Satoshi-wallet import code that is disabled anyway. I have been doing one command line call per day, between random other things. So far, brew has been good to me. I will try to finish the instructions you posted and maybe I'll finally have Armory working on OSX! Anyone have advice for how I can distribute it? The OSX equivalent of py2exe does not look... reliable. I'll try it, but I would prefer to avoid the complexities and run it as a native python script, if possible. Perhaps bundle up all the site-packages into the install directory so that it can be standalone without having to install extra dependencies...? I'm guessing that packaging and distribution will be the biggest hurdle to getting Armory released on OSX. Perhaps someone with more OSX experience can provide guidance...
|
|
|
|
jim618
Legendary
Offline
Activity: 1708
Merit: 1066
|
|
August 17, 2012, 08:29:07 AM |
|
Hello Alan, For the Mac OSX packaging you might want to liaise with Tachikoma, as he is working on the same thing for Electrum. I posted on the old Electrum thread how I do it for MultiBit - some of that might be useful to you (but of course it is Java rather than python). The post is here: https://bitcointalk.org/index.php?topic=50936.msg1075679#msg1075679Jim
|
|
|
|
etotheipi (OP)
Legendary
Offline
Activity: 1428
Merit: 1093
Core Armory Developer
|
|
August 18, 2012, 05:13:42 AM |
|
Well, I got Armory working on OSX! I need to play around with it a little bit, but it looks like it mostly works (except for some of the text labels being cut off on the bottom... might consider some OSX-specific settings for the GUI). I haven't actually moved any coins around with it yet, but creating wallets worked, and I was even able to change the filter (didn't freeze... though I didn't have any tx in it...) Red Emerald: thanks so much for the great instructions! I did some digging around and found about 30 different copies of python and various subdirs that were all candidates for linking/include options and environment variables. I even tried some of the others thinking I knew better than you (I wanted to try to get everything running from the same python directory tree), but nothing worked except exactly what you posted. Thanks! Hello Alan, For the Mac OSX packaging you might want to liaise with Tachikoma, as he is working on the same thing for Electrum. I posted on the old Electrum thread how I do it for MultiBit - some of that might be useful to you (but of course it is Java rather than python). The post is here: https://bitcointalk.org/index.php?topic=50936.msg1075679#msg1075679I'm a little bothered by the over-protectiveness of Apple (signing keys, app store reviews, etc), but I guess that's one reason many end users like them, but it really makes me not want to develop for them. I found a couple links for creating dmg files. Perhaps I can copy in all the necessary site-packages directories and try to override the PYTHONPATH variable is part of running when OSX is detected. Then it looks like I just create the .dmg and the user can expand it and drag it into the applications folder...? http://stackoverflow.com/questions/116657/how-do-you-create-an-osx-application-dmg-from-a-python-packagehttp://stackoverflow.com/questions/96882/how-do-i-create-a-nice-looking-dmg-for-mac-os-x-using-command-line-toolsIt looks like those two links together might give me what I need to create an automatic-dmg-creator for Armory. I just have to experiment a bit...
|
|
|
|
Haplo
|
|
August 18, 2012, 07:08:20 AM |
|
Anyone have advice for how I can distribute it? The OSX equivalent of py2exe does not look... reliable. I'll try it, but I would prefer to avoid the complexities and run it as a native python script, if possible. Perhaps bundle up all the site-packages into the install directory so that it can be standalone without having to install extra dependencies...?
I'm guessing that packaging and distribution will be the biggest hurdle to getting Armory released on OSX. Perhaps someone with more OSX experience can provide guidance...
Well, you have to install brew manually on OSX, but if it's already installed it might be possible to make up a .pkg for it with a script that will install everything else required and compile/copy all the necessary parts. Not really certain how well that would work, but failing that you could just use a zip or tarball as you would in a manual installation on linux. App file bundles on OSX might also theoretically be used to contain a python script, but I don't know that the functionality is quite flexible enough for that. If you want to dissect some .app files to see how they work, right click->show contents is what you'll want to look at. One thing that sucks on OSX though, and I'm not sure if this applies to newer versions, but filepaths which contain spaces tend to seriously mess with makefile type scripts, which cause all kinds of corruption and errors. I don't think the same applies for pkgs, but usually those are installed from a dmg which allows you to control the path name.
|
I'm So Meta, Even This Acronym
|
|
|
etotheipi (OP)
Legendary
Offline
Activity: 1428
Merit: 1093
Core Armory Developer
|
|
August 18, 2012, 09:32:17 PM |
|
Anyone have advice for how I can distribute it? The OSX equivalent of py2exe does not look... reliable. I'll try it, but I would prefer to avoid the complexities and run it as a native python script, if possible. Perhaps bundle up all the site-packages into the install directory so that it can be standalone without having to install extra dependencies...?
I'm guessing that packaging and distribution will be the biggest hurdle to getting Armory released on OSX. Perhaps someone with more OSX experience can provide guidance...
Well, you have to install brew manually on OSX, but if it's already installed it might be possible to make up a .pkg for it with a script that will install everything else required and compile/copy all the necessary parts. Not really certain how well that would work, but failing that you could just use a zip or tarball as you would in a manual installation on linux. App file bundles on OSX might also theoretically be used to contain a python script, but I don't know that the functionality is quite flexible enough for that. If you want to dissect some .app files to see how they work, right click->show contents is what you'll want to look at. One thing that sucks on OSX though, and I'm not sure if this applies to newer versions, but filepaths which contain spaces tend to seriously mess with makefile type scripts, which cause all kinds of corruption and errors. I don't think the same applies for pkgs, but usually those are installed from a dmg which allows you to control the path name. I definitely can't bank on the user having the stuff installed already. It seems like it would be... "irresponsible"... to have the install script actually install brew and all the brew packages. Perhaps there's a way to make a completely self-contained directory tree (that has python and all dependencies pre-compiled and included). I don't see why not, it just seems like a mess. Maybe I should try py2app... but so far I've only heard gripes about things not working right, so I imagine I won't be figuring it out, either (I'd need some serious tinkering time available). So, perhaps someone here could donate some time to try this. I bet it would be even easier with: Portable Python.
|
|
|
|
Red Emerald
|
|
August 18, 2012, 11:06:03 PM |
|
Anyone have advice for how I can distribute it? The OSX equivalent of py2exe does not look... reliable. I'll try it, but I would prefer to avoid the complexities and run it as a native python script, if possible. Perhaps bundle up all the site-packages into the install directory so that it can be standalone without having to install extra dependencies...?
I'm guessing that packaging and distribution will be the biggest hurdle to getting Armory released on OSX. Perhaps someone with more OSX experience can provide guidance...
Well, you have to install brew manually on OSX, but if it's already installed it might be possible to make up a .pkg for it with a script that will install everything else required and compile/copy all the necessary parts. Not really certain how well that would work, but failing that you could just use a zip or tarball as you would in a manual installation on linux. App file bundles on OSX might also theoretically be used to contain a python script, but I don't know that the functionality is quite flexible enough for that. If you want to dissect some .app files to see how they work, right click->show contents is what you'll want to look at. One thing that sucks on OSX though, and I'm not sure if this applies to newer versions, but filepaths which contain spaces tend to seriously mess with makefile type scripts, which cause all kinds of corruption and errors. I don't think the same applies for pkgs, but usually those are installed from a dmg which allows you to control the path name. I definitely can't bank on the user having the stuff installed already. It seems like it would be... "irresponsible"... to have the install script actually install brew and all the brew packages. Perhaps there's a way to make a completely self-contained directory tree (that has python and all dependencies pre-compiled and included). I don't see why not, it just seems like a mess. Maybe I should try py2app... but so far I've only heard gripes about things not working right, so I imagine I won't be figuring it out, either (I'd need some serious tinkering time available). So, perhaps someone here could donate some time to try this. I bet it would be even easier with: Portable Python. I think py2app is what you should be doing. I'll play around with it if I can get some time.
|
|
|
|
etotheipi (OP)
Legendary
Offline
Activity: 1428
Merit: 1093
Core Armory Developer
|
|
August 19, 2012, 02:54:51 AM |
|
Red Emerald, I just committed a Makefile modification to the dev branch. It's basically just the current master with a bug fix and the updated Makefile. Can you do a fresh checkout and confirm it works on your system, too? Just want to make sure I did it right. It works on the OSX VM I have. I think py2app is what you should be doing. I'll play around with it if I can get some time.
I will try it, too. I just don't have high expectations. I also had to reinstall my Win64 VM and can't get py2 exe working. I've spent hours on it and even my existing config that works on another machine isn't helping me figure it out. Not looking forward to doing it again on OSX...
|
|
|
|
|