Pages:
Author

Topic: Compiling Mac Clients for ANY Alt Coin, Your Choice! - page 6. (Read 14367 times)

member
Activity: 66
Merit: 10
Please do share the details of the process! I've tried to get several of the Qt wallets working on the Mac, and been fairly close with a few of them, but never quite succeeded. I promise I won't find it boring. Smiley

I will post the entire process here soon but here's a quick rundown... and Coinbuck you're right, I realize that if I were able I could insert whatever I want into the code prior to compiling. As I said, you'll just have to trust me to some extent - if you can suggest a way that I can prove that there's nothing malicious in the Mac binaries please let me know and I'll be more than happy to comply. All I can do for now is give you my word that I'm not interested in doing something like that.

Ok, so brief rundown of how to do this:
 
Code:
[Note: Pro tip, when you're in Terminal on a Mac and you don't want to have to type a huge path in, remember you can drag folders or files into the terminal window and it'll automatically put the correct path.]

1) You need to install all of the dependencies on your computer; this includes:
- libminiupnpc
- openssl
- libboost
- libdb 4.8 (aka Berkeley DB) [Note: This is NOT the most current version.]

To install those, you'll want to install either MacPorts or HomeBrew (I prefer HomeBrew). These are essentially the Mac equivalent of "apt-get" from the Linux environment and make it easy to install packages. Then just google "homebrew libminiupnpc," etc., to get the correct syntax for installing each library (this is all done via Terminal).

2) You need to download and install the QT SDK version 4.8 and QT Creator 2.5.2. I tried doing this with the latest versions (5.0 and 2.7.3 respectively) and had a bad time.

3) Download the complete source code for the client you want to compile.

4) Open the "xxcoin-qt.pro" file (where "xx" is the name of your coin) in the root directory of the source code with QT Creator.

5) Choose "Build" and "Build xxcoin-qt." (I think I'm glossing over some steps here,... I'll edit with more info when I do the next client.)

6) Find the .app file generated by QT Creator. It should run correctly on *your* computer since you have all the dependencies installed, but it won't run on anyone else's who doesn't have them. If you don't care, then you're done at this point.

7) To make it run on other people's computers without the dependencies, you'll have to right-click the .app file you built, choose "Show Package Contents," and go into the Contents directory. Now take a look in the same directory of the Mac clients you already have (can be my mincoin one, or the official bitcoin or litecoin ones). Notice that your newly built .app is missing the "Frameworks" and "Plugins" directories under "Contents." Copy them straight over from one of the official apps. Also copy over /Contents/Resources/qt.conf to the same location in your app. Notice in /Contents/Resources the file bitcoin.icns which is the icon - you can change that to whatever icon you want.

8) Okay, now you have all the dependencies in your .app but the .app doesn't know to find them there - if you were to give this .app to someone else, it would look for them in the normal places they would be installed if that person was to use HomeBrew or MacPorts to download them. To fix this we need to use a combination of "otool" and "install_name_tool." For example, to check where the app is looking for dependencies, type in terminal:

otool -L /Applications/MinCoin-Qt.app/Contents/MacOS/MinCoin-Qt

This is assuming that you put your newly compiled app into the Applications folder. Change names and locations as needed. You should get a list of all the dependencies and their locations. Now repeat that for one of the already-built clients. Notice the difference? Instead of looking for libminiupnpc, libssl/libcrypto (part of the openssl package), and libboost in absolute paths in their installation directories, the already-built clients are pointing to "@executable_path/../Frameworks/[library file]". This tells the app to look for the library in the Frameworks directory. To make the change you execute the following:

install_name_tool -change [old path] [new path] [application location]

For example, if I were changing the libboost_thread-mt.dylib reference, and my application was in /Applications I would run:

install_name_tool -change /usr/local/lib/libboost_thread-mt.dylib @executable_path/../Frameworks/libboost_thread-mt.dylib /Applications/MinCoin-Qt.app/Contents/MacOS/MinCoin-Qt

(Obviously that example is for fixing the mincoin-qt client - you would change the name for whatever client you are fixing.)

Repeat that for each dylib that otool lists. In the end, otool -L should look identical between your freshly made app and one of the pre-built Mac ones.

That's all! Smiley I'm sure I left out some stuff, but that's the gist of it.
hero member
Activity: 540
Merit: 500
The future begins today
Remember that you have to trust OP. Binaries can have whatever he wants.
sr. member
Activity: 456
Merit: 250
Please do share the details of the process! I've tried to get several of the Qt wallets working on the Mac, and been fairly close with a few of them, but never quite succeeded. I promise I won't find it boring. Smiley
sr. member
Activity: 308
Merit: 250
It works great! Sent you a block of MNC Cheesy
sr. member
Activity: 308
Merit: 250
...details of the procedure would also be wonderful, can't ever learn enough about this and I am working on my own coin (not for profit, test-net only) and would love to eventually compile my own wallet as I'm a Mac too.
member
Activity: 66
Merit: 10
Oh PLEASE! I would LOVE an iXCoin and Devcoin QT for Mac!! Even better, tell me your secrets so I can make my own? The only other one I care about would be MinCoin, can you make one for MinCoin too?

OH PLEASE PLEASE PLEASE Cheesy Cheesy

Hey man Smiley Haha no worries and thank you for any donation. Make sure that the MinCoin one works for you before donating... I'm almost positive it will but would hate for you to be disappointed.

I will get to work on the other two for you tonight!
sr. member
Activity: 308
Merit: 250
Wow I can't read can I. You did a MinCoin one. Once my wallet synchs, I'll send you a couple. THANK YOU. Will offer more for iX and Dev if you can Cheesy
sr. member
Activity: 308
Merit: 250
Oh PLEASE! I would LOVE an iXCoin and Devcoin QT for Mac!! Even better, tell me your secrets so I can make my own? The only other one I care about would be MinCoin, can you make one for MinCoin too?

OH PLEASE PLEASE PLEASE Cheesy Cheesy
member
Activity: 66
Merit: 10
No Mac users interested in this service? Smiley

Maybe I should have posted this in a different sub-forum... seems like the Alt Currencies forum is flooded with new posts constantly...
member
Activity: 66
Merit: 10
Hey fellow Mac users, the past couple of days I went through the process of compiling the newest version of the MNC-qt client for Mac OS X. Lemme tell you, if you don't know what you're doing, it's a tremendous pain in the ass. Have to download a ton of dependencies, the QT SDK and QT Creator IDE, get the project file set up correctly for OS X, then screw around with packaging all of the library files into the .app so that other users don't have to have the dependencies installed.

It took me at least 4 hours to figure all this crap out and get a Mac version of mincoin-qt published (link below).

All of that being said... if you would like me to put my knowledge to good use and compile a Mac binary of any other alt coin client, either reply here or PM me and I will do so. Bounties/Donations would be VERY MUCH appreciated in whatever currency you have as this process is time intensive, at least for me. I'm including my BTC, LTC, and MNC addresses here since those are the coins I primarily trade in. If you'd rather donate a different coin let me know.

P.S. If you're worried about me inserting a trojan or anything like that, all I can tell you is that I'm not that smart, and I guess you'll have to take my word for it. I'm perfectly happy to share the exactly source I use (which will come straight from the coin's dev) and the details of the process, which is quite boring.

MinCoin-qt Version 0.6.3.0-g6e015e3-beta for Mac OS X:  https://dl.dropboxusercontent.com/u/7405118/MinCoin-Qt_v063.zip

Donations:
BTC - 1Eq5zJJTcQ9RywuKUjfsYxmEAiS7toQAoQ
LTC - LehmtWhrd3TNTgKfyVwSEWNg1ctkwmkWu9
MNC - MRMhVXatmuLxAieaiV4pntMbZrdQCHtUf6
Pages:
Jump to: