Add OSX App bundle and correct build instructions to reflect reality.

This commit is contained in:
Doug Huff 2011-06-27 15:11:35 -05:00
parent d0d80170a2
commit d8dda9de84
5 changed files with 89 additions and 34 deletions

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>Bitcoin</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>bitcoin</string>
<key>CFBundleIdentifier</key>
<string>org.bitcoin.bitcoin</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Bitcoin</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.3.23</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>323</string>
<key>LSMinimumSystemVersion</key>
<string>10.5</string>
<key>CFBundleIconFile</key>
<string>BitcoinAppIcon.icns</string>
<key>LSMultipleInstancesProhibited</key>
<true/>
</dict>
</plist>

View File

@ -1,14 +1,16 @@
Copyright (c) 2010 Laszlo Hanyecz
Distributed under the MIT/X11 software license, see the accompanying
file license.txt or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in
the OpenSSL Toolkit (http://www.openssl.org/). This product includes
cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP
software written by Thomas Bernard.
Portions Copyright (c) 2011 Douglas Huff
Distributed under the MIT/X11 software license, see the accompanying file
license.txt or http://www.opensource.org/licenses/mit-license.php. This
product includes software developed by the OpenSSL Project for use in the
OpenSSL Toolkit (http://www.openssl.org/). This product includes cryptographic
software written by Eric Young (eay@cryptsoft.com) and UPnP software written by
Thomas Bernard.
Mac OS X build instructions
Laszlo Hanyecz (solar@heliacal.net)
Laszlo Hanyecz <solar@heliacal.net>
Douglas Huff <dhuff@jrbobdobbs.org>
Tested on 10.5 and 10.6 intel. PPC is not supported because it's big-endian.
@ -16,18 +18,19 @@ Tested on 10.5 and 10.6 intel. PPC is not supported because it's big-endian.
All of the commands should be executed in Terminal.app.. it's in
/Applications/Utilities
You need to install XCode with all the options checked so that the compiler
and everything is available in /usr not just /Developer
I think it comes on the DVD but you can get the current version from
http://developer.apple.com
You need to install XCode with all the options checked so that the compiler and
everything is available in /usr not just /Developer I think it comes on the DVD
but you can get the current version from http://developer.apple.com
1. Pick a directory to work inside.. something like ~/bitcoin works. The
structure I use looks like this:
(~ is your home directory)
~/bitcoin
~/bitcoin/trunk # source code
~/bitcoin/bitcoin # Upstream source tree
~/bitcoin/src # source code (symlink to ~/bitcoin/bitcoin/src)
~/bitcoin/deps # dependencies.. like libraries and headers needed to compile
~/bitcoin/Bitcoin.app # the application bundle where you can run the app
@ -38,12 +41,15 @@ WARNING: do not use the ~ notation with the configure scripts.. use the full
name of the directory, for example /Users/james/bitcoin/deps for a user named
'james'. In my examples I am using 'macosuser' so make sure you change that.
2. Check out the trunk version of the bitcoin code from subversion:
2. Check out the bitcoin code from github:
cd ~/bitcoin
svn checkout https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk
git clone https://github.com/bitcoin/bitcoin.git
ln -s bitcoin/src src
This will make ~/bitcoin/trunk for you with all the files from subversion.
This will make ~/bitcoin/bitcoin for you with all the files from git. This puts
the actual sources in ~/bitcoin/bitcoin/src and create a symlink src in
~/bitcoin to this location.
3. Get and build the dependencies
@ -80,6 +86,8 @@ This is what my output looked like at the end:
OpenSSL
-------
(System or MacPorts openssl will work fine. Optional.)
Download from http://www.openssl.org/source/
We would like to build this as a 32 bit/64 bit library so we actually build it
@ -120,6 +128,8 @@ lib/libcrypto.a (for architecture x86_64): current ar archive random library
miniupnpc
---------
(MacPorts miniupnpc package works fine. You will need to modify makefile.)
The process for miniupnpc (optional) is similar to that of OpenSSL.
Download from http://miniupnp.tuxfamily.org/files/.
@ -160,6 +170,8 @@ lib/libminiupnpc.a (for architecture x86_64): current ar archive random library
Berkeley DB
-----------
(System or MacPorts version work fine.)
Download from http://freshmeat.net/projects/berkeleydb/
cd ~/bitcoin/deps
@ -171,6 +183,8 @@ cd db-4.8.26/build_unix
wxWidgets
---------
(The wxWidgets-devel MacPorts package will work but will throw annoying assertion dialogs.)
This is the big one..
Check it out from svn
@ -236,26 +250,29 @@ make install
Now you should be able to build bitcoin
cd ~/bitcoin/trunk
cd ~/bitcoin/src
make -f makefile.osx bitcoin
Before you can run it, you need to create an application bundle for Mac OS.
Create the directories in terminal using mkdir and copy the files into place.
They are available at http://heliacal.net/~solar/bitcoin/mac-build/
You need the Info.plist and the .ins file. The Contents/MacOS/bitcoin file is
the output of the build.
Your directory structure should look like this:
Bitcoin.app
Bitcoin.app/Contents
Bitcoin.app/Contents/Info.plist
Bitcoin.app/Contents/MacOS
Bitcoin.app/Contents/MacOS/bitcoin
Bitcoin.app/Contents/Resources
Bitcoin.app/Contents/Resources/BitcoinAppIcon.icns
A bundle is provided in contrib/Bitcoin.app.
Copy the bitcoin binary in to it like this:
cp -pR ~/bitcoin/bitcoin/contrib/Bitcoin.app ~/bitcoin/
cp ~/bitcoin/src/bitcoin ~/bitcoin/Bitcoin.app/Contents/MacOS/
To run it you can just click the Bitcoin.app in Finder, or just do:
open ~/bitcoin/Bitcoin.app
To run it you can just click the Bitcoin.app in Finder, or just do open
~/bitcoin/Bitcoin.app
If you want to run it with arguments you can just run it without backgrounding
by specifying the full name in terminal:
~/bitcoin/Bitcoin.app/Contents/MacOS/bitcoin -addnode=192.75.207.66
You can also run it with arguments in the background with output going to the
normal places for apps (Console) like this:
open ~/bitcoin/Bitcoin.app --args -connect=192.75.207.66
It is advisable to relocate Bitcoin.app to /Applications or $HOME/Applications.

View File

@ -1,3 +1,9 @@
* update (commit) version in sources
* update (commit) version in OSX app bundle
* CFBundleShortVersionString should have value like 0.3.23
* CFBundleVersion should have value like 323
* tag version in git