Part 2
LINE 2017 block.nTime = 1300000000; //epochtime
You can get the current epoch time from:
http://www.epochconverter.com/ or you can generate it from the command line of most *nix systems with this code:
$ date +%s
$ 1369590088
It is customary to also change this line of code to a headline from the day of coin creation in order to relate it to the block.nTime with some human-readable bit:
src/main.cpp:
LINE 2005 const char* pszTimestamp = "Traditionally one puts something timely here coinciding with the epoch";
Now, notice the other lines near the block.nTime, they are called block.nNonce. A 'nonce' is a unit of measurement that is unique and occurs after the nTime is set. The code uses nTime+nNonce to formulate and validate timestamps for blocks and transactions. This is a VERY rough overview of how this really works, but I hope it gives you an idea. We will come back to the nNonce in a moment when we mine a genesis block.
Generate a Merkel Hash
Thankfully, this forum post:
https://bitcointalksearch.org/topic/m.2035449 gives us a method to generate the Merkel Hash via the coin's test net feature. Right now would be a good time to do the following and copy your files out to your Github repository:
barcoin% git add -A *
barcoin% git commit -m "changes"
barcoin% git push origin master
Doesn't it feel good to know you're using Github like a pro?
First Build
Now that you have a fresh copy with all of your cut and pasting uploaded to Github, we're ready to build a copy of our command line only version of the coin:
barcoin% cd src/
barcoin/src% make -f makefile.osx USE_UPNP=- (or makefile.unix if you're on Linux/BSD/etc)
The code should build cleanly if you've only changed what you're supposed to and you ahve the right dependencies installed. You'll end up with a single executable called the name of your coin with a d on the end if you're on Linux (i.e. barcoin (osx/windows) barcoind (Linux). "Stripping" the extra code will create a smaller file if you so desire:
barcoin/src% strip barcoin (add the d on Linux, barcoind)
Now, we want to run barcoin from the command line using the -testnet switch like so:
barcoin/src% ./barcoin -testnet (add the d on Linux, ./barcoind)
It will immediately fail on first run, throwing out an error like so:
Assertion failed: (block.hashMerkleRoot == uint256("0x")), function LoadBlockIndex, file main.cpp, line 2031.
zsh: abort ./barcoin
We now have a Merkel hash wait, but where? Its is in your coin's "Application Data" directory. On Linux, that's in your home folder, then a .coinname like:
~./barcoin.
On OSX, it's going to be in your Library folder:
/Users/username/Library/Application Support/barcoin
If you want to see it graphically, hold the option button and click the Finder's Go menu, then choose Application Support and the barcoin folder. On Windows it will be in the Application Data Roaming folder:
c:\Users\username\AppData\Roaming\barcoin
In this folder you'll find a few files this is also the folder you'll put your coin's .conf file when we're ready to mine it so remember how you got here. Now, open debug log and it will look like this:
Thanks to tyrion's amazingly helpful post, we can decipher this debug out put as so:
b1753ec3845a48ddc4618bc595af6dc89dac328cd48f9f8db178df5dd3b302fc Block hashed using the non-existent Merkel, based on the pzTimestamp from main.cpp
0000000000000000000000000000000000000000000000000000000000000000 Genesis block, no good because all the nNonces are set to 0 in main.cpp
2fc1b7ef46270c053711fbae934cf7f83378efd4b3e158079451d9c6c90e4700 Valid Merkel Hash, generated using the epoch time in main.cpp
Now, take the valid Merkel Hash and insert it in to main.cpp:
src/main.cpp
LINE 2031 assert(block.hashMerkleRoot == uint256("0x2fc1b7ef46270c053711fbae934cf7f83378efd4b3e158079451d9c6c90e4700"));
`
Genesis Blocks
Dang, we're cooking with gas now eh? How does one mine a genesis block? Luckily the code is already in the source to do just that so don't fret. Who gets the initial coins? Well, no one really there is a way to do it:
https://bitcointalksearch.org/topic/m.2038801 but personally I leave them to cyber space as a token of good karma to the bit gods at the church of development (FinShaggy, this means you, mate.)
Testnet Genesis Block
Ok, now you don't need to re-upload to Github just yet, because we need to generate genesis blocks for our network first. With the Merkel hash in place, this line:
src/main.cpp
LINE 2034 if (true && block.GetHash() != hashGenesisBlock)
if set to true (as above) will mine a genesis block upon the next time the program is run beginning with the nNonce in the code (0). Let's recompile the code with the new Merkel Hash:
barcoin/src$ make -f makefile.osx USE_UPNP=- (or .unix, whatever)
Recompilation should be pretty quick as most of the files have already been built. Once its done, start it again using this command:
barcoin/src$ ./barcoin -testnet
You will hear your hard drive start to churn and it will seem like the coin has frozen in the window but its not frozen, its mining a genesis block for the testnet based on your freshly working generated Merkel Hash. If you open the debug.log you'll see this in action:
Isn't that nifty? Its hashing a block happily, each nonce is ticking by. How long will this take? On an i7-2600 it can take 5-10 minutes. On a Core2Duo (like my iMac) it can take 20-30 minutes, maybe longer. Just let it do its thing, and go get some runts eventually it will find one that it likes. This time it will write it in to the testnet3 folder under your coin's conf folder in a file called debug.log:
Assertion failed: (block.GetHash() == hashGenesisBlock), function LoadBlockIndex, file main.cpp, line 2065.
zsh: abort ./barcoin -testnet
Ah ha! See it there? There's a noonce and a genesis block hash, ripe for the plucking!
block.nNonce = 440824
block.GetHash = 5813d4cfab0eeda94a15d11c5e7d6895e667fbbe67c59ef9a1b3bc232c9a0b7f
Now, put these in to the main.cpp file:
src/main.cpp:
LINE 1984 hashGenesisBlock = uint256("0x5813d4cfab0eeda94a15d11c5e7d6895e667fbbe67c59ef9a1b3bc232c9a0b7f");
Yes, you need to leave the 0x in front of the hashes. You also need to enter the nNonce:
src/main.cpp:
LINE 2024 block.nNonce = 440824;
Note that the sections of the main.cpp file we just edited correspond to the testnet and we haven't done the main net quite yet. This is because at this point, I usually get two systems up and running on the testnet to make sure they can mine coins and then I move on to the main net. Lets save our changes, and upload them to Github and then we'll move on to mining on the testnet:
barcoin% git add -A *
barcoin% git commit -m "changes"
barcoin% git push origin master
Mining Testnet Coins
First things first, rebuild your coin's executable on your local PC:
barcoin/src% make -f makefile.osx USE_UPNP=- (or .unix, whatever)
Now comes the part where you need two computers with distinct IP addresses. I find this easy to do with a Linux VPS and my home PC, so that's my example. Two machines on a LAN should work, and I believe 2 or more virtual machines should work too, as long as you're able to keep up with the IP addresses. Connect to your second machine and build the coin's file just as we did before since you sent the code to Github, may as well use your new elite github skillz:
$ git clone
https://github.com/barcoin/barcoin.git cloning in to barcoin
$ cd barcoin/src
barcoin/src$ make -f makefile.unix (I'm on Linux here).
barcoin/src$ strip barcoind
Now I'm ready to run it in testnet mode and with a connection to my "other" computer. This is kind of tricky, because you need to start the coin on both computers with the -connect=x.x.x.x variable, each with the IP of the other PC:
Home PC - iMac:
barcoin/src% ./barcoin -testnet -connect=9.5.6.5 &
VPS - Linux:
barcoin/src$ ./barcoin -testnet -connect=66.77.32.56 &
Add the & to the command will allow it to process in the background and allow you to continue to feed the coin commands without opening a second console window.
On the first run, it will complain about not having a .conf file:
error: You must set rpcpassword= in the configuration file:
/Users/username/Library/Application Support/barcoin/barcoin.conf
If the file does not exist, create it with owner-readable-only file permissions.
It is recommended you use the following random password:
rpcuser=barcoinrpc
rpcpassword=6WgBVzyEBaFJodzyKt69y8VaQBagPSGD5kHptnYGwjt5
(you do not need to remember this password)
If the file does not exist, create it with owner-readable-only file permissions.
Create this file, in whatever format you prefer, nano works great for this and assign an RPC user/password. If you want to use CGMiner/CPUMiner to mine solo later, make this something you'll remember. If you plan to only use the client's built in miner for solo mining, just cut and paste the auto generated info. This is the same file you may want to set up some of the bitcoin.conf commands in, here's a good reference:
https://en.bitcoin.it/wiki/Running_Bitcoin#Bitcoin.conf_Configuration_FileOn OSX this file is: /Users/username/Library/Application Support/barcoin/barcoin.conf
On Linux this file is ~/.barcoin/barcoin.conf
On Windows, this file is c:\users\username\appdata\roaming\barcoin\barcoin.conf
Side note: because I use a VPS for this, I don't really need to worry about port forwarding at that end. On the home PC, you will want to forward the port you chose for P2Pport in the cut and paste section to the PC you're using. For this example, that is port 55884.
Now start the coin again:
Home PC - iMac:
barcoin/src% ./barcoin -testnet -connect=9.5.6.5 &
VPS - Linux:
barcoin/src$ ./barcoin -testnet -connect=66.77.32.56 &
Now's a good time to brush up on the command line API calls syntax for interacting with the bitcoin client from this wiki page:
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_listFirst you'll want to send:
barcoin/src% ./barcoin getinfo
It should return something like this:
Home PC - iMac:
barcoin/src%./barcoin getinfo
{
"version" : 1000000,
"protocolversion" : 60001,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 0,
"connections" : 1,
"proxy" : "",
"difficulty" : 0.00024414,
"testnet" : true,
"keypoololdest" : 1369621665,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"mininput" : 0.00010000,
"errors" : ""
}
The other side should look the same and the numbers should match. Note that testnet doesn't verify checkpoints, so they should connect pretty easily (oooh, that's the 1BTC question, but more on that in a bit the other side:
VPS - Linux
/barcoin/src$./barcoind getinfo
{
"version" : 1000000,
"protocolversion" : 60001,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 0,
"connections" : 1,
"proxy" : "",
"difficulty" : 0.00024414,
"testnet" : true,
"keypoololdest" : 1369622277,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"mininput" : 0.00010000,
"errors" : ""
}
Lovely, they line up and each have a single connection. Now we can make one of them (or both) begin generating coins by using the following command:
barcoin/src% ./barcoin setgenerate true 16
The number is how many threads of your processor you want to devote, at the insanely low difficulty we're starting out with, this should be plenty to generate a few blocks. You won't see the results in real time, rather you'll need to issue the following command and evaluate the info:
barcoin/src% ./barcoin getmininginfo
{
"blocks" : 0,
"currentblocksize" : 1000,
"currentblocktx" : 0,
"difficulty" : 0.00024414,
"errors" : "",
"generate" : true,
"genproclimit" : 16,
"hashespersec" : 1432,
"networkhashps" : -9223372036854775808,
"pooledtx" : 0,
"testnet" : true
}
Success! See that hashespersec? The internal scrypt miner is now doing its thing and making you some blocks. You'll have to issue the getmininginfo command a few times before it starts to count up in the block count. In just a few minutes you should be able to see:
barcoin/src$./barcoind getmininginfo
{
"blocks" : 1,
"currentblocksize" : 1000,
"currentblocktx" : 0,
"difficulty" : 0.00024414,
"errors" : "",
"generate" : true,
"genproclimit" : 16,
"hashespersec" : 1376,
"networkhashps" : 32,
"pooledtx" : 0,
"testnet" : true
}
Woah doggie, we have blocks. Now verify that your other sees the blocks by doing a getinfo on your other computer:
barcoin/src%./barcoin getinfo
{
"version" : 1000000,
"protocolversion" : 60001,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 1,
"connections" : 1,
"proxy" : "",
"difficulty" : 0.00024414,
"testnet" : true,
"keypoololdest" : 1369621665,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"mininput" : 0.00010000,
"errors" : ""
}
Well, whatta ya know? Whatta ya say we mine some mainnet coins?
Main Net Genesis Block
So really all we need to do now is update main.cpp with a new epoch time, in the main net section this time and mine a genesis block the similarly to the way we did it on testnet. First, stop the coind from running on both your local and remote computers by issuing the command:
barcoin/src% ./barcoind stop
Barcoin is stopping
Next, go back to your development PC and edit main.cpp with a new block.nTime:
src/main.cpp:
LINE 2017 block.nTime = 1369623856; //epochtime
Now, recompile the coin again from the command line:
barcoin/src% make -f makefile.osx USE_UPNP=- (or .unix, whatever, ha!)
Now run the coin again, but this time don't include the -testnet switch:
barcoin/src% ./barcoin &
It will again seem to be frozen while it mines the genesis block and your processor will likely go to 100% utilization. Be patient, this took Satoshi 6 days or some shit, right? Again, if you have a Mac, watching it mine with the system log viewer is pretty fun and then Success:
Now, we just do the same as we did on the testnet, and make these changes to main.cpp:
src/main.cpp:
LINE 32 uint256 hashGenesisBlock("0xbf9385c680c3a7aec778b6dcf87dbfb105369d55143fc99ebe86f469cd53ddca");
LINE 2019 block.nNonce = 1345972;
LINE 2034 if (false && block.GetHash() != hashGenesisBlock)
Checkpoints
Changing line 2034 to false will keep clients from trying to hash their own genesis block should something be awry. One more file to change:
src/checkpoints.cpp
LINE 27 ( 0, uint256("0xbf9385c680c3a7aec778b6dcf87dbfb105369d55143fc99ebe86f469cd53ddca"))
This is the "trick." Remember I said, there was a trick? This is it. Hash 0 in this file needs to be set to the genesis block hash, so do it and rejoice as you've now nearly finished creating your clone! Should you want to make your coin "legit" you'll want to revisit this file in the future and add other checkpoints in to it but that's a bit we'll save for the end of the guide. Lets send our changes to Github before we build:
barcoin% git add -A *
barcoin% git commit -m "changes"
barcoin% git push origin master
Ok, we're ready to rebuild on the first pc:
barcoin% cd src/
barcoin/src% make -f makefile.osx USE_UPNP=- (or .unix, blah...)
strip barcoin
Now on the second pc (assuming its Linux here):
~$ cd barcoin
barcoin$ git pull
updating git...wait wait...done!
barcoin$ cd src/
barcoin/src$ make -f makefile.unix USE_UPNP=-
strip barcoind
Ooo laa laa, we're done here. Now we can mine us some coinz!
Mining Main Net Coins
The process here is the same as the testnet, but without the -testnet switch. Start'er up:
Home PC - iMac:
barcoin/src% ./barcoin -connect=9.5.6.5 &
VPS - Linux:
barcoin/src$ ./barcoin -connect=66.77.32.56 &
Verify with getinfo:
barcoin/src%./barcoind getinfo
{
"version" : 1000000,
"protocolversion" : 60001,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 0,
"connections" : 1,
"proxy" : "",
"difficulty" : 0.00024414,
"testnet" : false,
"keypoololdest" : 1369627515,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"mininput" : 0.00010000,
"errors" : ""
}
Get a new address:
barcoin getnewaddress
GeeNLCk9KfQQ35wPpf2faYdqHEU5KW4Khn
Start one of them (or both of them mining) and verify it:
barcoin/src%./barcoind setgenerate true 16
barcoin/src%./barcoind getmininginfo
{
"blocks" : 0,
"currentblocksize" : 1000,
"currentblocktx" : 0,
"difficulty" : 0.00024414,
"errors" : "",
"generate" : true,
"genproclimit" : 16,
"hashespersec" : 1417,
"networkhashps" : -9223372036854775808,
"pooledtx" : 0,
"testnet" : false
}
Ooooooh myyyyyy gooooooooood, right? Its making blocks of our new Barcoin (or is it a BAR to consolidate your digital wealth? I mean, shoot, there's only a weeks worth at pump and dump mining rates right?) Soon you will see: "blocks" : 1, and then that number will start to climb. Now's the time you could set up the barcoin.conf client to accept connections from your LAN and point your dualie-7970 boxen at it or perhaps a minerd. Its ready to rock and roll at this point.
Things to remember:
You're basically done here. The command line version can do everything the -Qt can.
Blocks take 120 confirms, so you'll need to leave a system mining even at just a few hashses to keep your network going. I like to leave my VPS mining at just a few Kh/s and use it as the seed node so that the network is always confirming even if its very slow.
You're basically done here. But no, you're not lets make some GUI wallets.
`
Compiling the -Qt Wallets
Ok, so this will make or break your coin if you plan to distribute it. Before I go deep in to this, know that the source code for foocoin is customized to make building as easy as possible on Windows (the hardest system to build for). It is also fairly easy to build a Mac version, but at this point I'm having trouble redistributing the Mac versions with the other PC having the same dependencies installed. As for Linux, surprisingly enough, its the easiest to build for and if you installed all the dependencies from the top section of the guide you'll be able to knock it out with two commands.
Mac OSX -Qt
I'm starting with this one simply to go inline with dependencies order above. In order to keep things tidy on my iMac I created a virtual machine loaded with OSX 10.6.8, Snow Leopard. This was pretty straight forward using VMWare Fusion. After install and software updating, I installed XCode 3.2.6, which contains a working non-llvm version of gcc and its free from Apple here:
http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20792 A simple install, no frills, make sure all the objects are checked for installation.
Next, I installed MacPorts this version:
https://distfiles.macports.org/MacPorts/MacPorts-2.1.3-10.6-SnowLeopard.pkg and then the dependencies listed in the first section ala:
xcode%sudo port install boost db48 qt4-mac openssl miniupnpc git
After a bit of time, all goodies are installed so we'll clone the coin's software in the regular fashion:
xcode% git clone
https://github.com/barcoin/barcoin.conf xcode% cd barcoin
Now, something a tad different this time, we need to run qmake instead of make. Do that like so:
barcoin% qmake "USE_UPNP=-" barcoin-qt.pro
Yes, you need the " " around USE_UPNP=- and yes, this may produce some strange looking results, something like this:
Project MESSAGE: Building without UPNP support
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
Now, lets build it:
barcoin% make -f Makefile
Go, go, go, do not look back. After a bit you'll see it finish and an icon should appear in the barcoin folder:
Now launch that and voila! A Mac barcoin wallet:
Just like the Windows and Linux wallets, you may want to add addnode=x.x.x.x where the x.x.x.x is the IP of your seed node. This won't be needed after a few clients begin connecting to the network, eventually they will begin talking to each other via IRC.
Linux -Qt
This is by a long shot the easiest wallet to compile, but its hindered by two things for distribution: Linux has very small market share, though for a personal or club coin, what the hell right? and Most Linux users will compile their own software so you'll not likely get far distributing a Linux executable (as well you shouldn't). My example here is based on Debian and should equate to most Debian/Ubuntu flavors.
Now, since we already built a system and installed the dependencies in the first bit wait, you didn't? You did it all on Windows? Nice. You should write a guide next time! Now, where were we oh yes, you already have a working coin building system, so lets just stick with it. First things first:
cd ~/barcoin
barcoin% qmake "USE_UPNP=-"
Thinking, thinking, output:
Project MESSAGE: Building without UPNP support
Removed plural forms as the target language has less forms.
If this sounds wrong, possibly the target language is not set or recognized.
Now, build it:
barcoin$ make
Yeah, seriously, that's it. Just 'make.' Ha Debian is so beautiful, is it not? Ok now after a bit of churning and burning it will finish.
Windows -Qt
This is the trickiest one to crack of the GUI wallets. I am going to detail how I got this to work and offer you an easy way to get the dependencies in an attempt to make this work for you too. That said, it may not and I've already said I won't do tech support. So here's the deal. I got this to work and then duplicated it on a second machine to ensure it wasn't a fluke! Most of the information needed to compile the basic coind.exe or GUI wallet is in this thread:
https://bitcointalksearch.org/topic/building-headless-bitcoin-and-bitcoin-qt-on-windows-149479 Unfortunately nothing is as easy as it seems, and although the MinGW and QT installs went fine, I couldn't compile it without a few tweaks to the .pro file.
If you don't want to install these dependencies by hand, clone
https://github.com/foocoin/deps.git in to C:\ If not, here's how to do it manually:
Begin by installing MinGW32 from here:
https://sourceforge.net/downloads/mingw Go ahead and install the whole bloody thing if you like, but at least the "C Compiler", "C++ Compiler" and "MSYS Basic System" components. Everything else leave stock, next, next, next kind of thing.
Next, install ActivePerl 32 or 64 bit from here:
http://www.activestate.com/activeperl/downloads Again, standard install, next, next, next and so forth.
Now open the "MinGW System Shell" from Start - Programs and you'll basically have a Linux prompt:
Now make a /c/deps folder to keep our files in:
$mkdir /c/deps
$cd /c/deps
Now download the following files and put them in C:\Deps:
OpenSSL:
http://www.openssl.org/source/openssl-1.0.1e.tar.gzInstall it like so:
/c/deps$ tar xvfz openssl-1.0.1e.tar.gz
/c/deps$ cd openssl-1.0.1e
/c/deps$ ./config
/c/deps$ make
Berkeley DB 4.8:
http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gzInstall it like so:
/c/deps$ tar xvfz db-4.8.30.NC.tar.gz
/c/deps$ cd db-4.8.30.NC/build_unix
/c/deps$ ../dist/configure --disable-replication --enable-mingw --enable-cxx
Boost:
http://sourceforge.net/projects/boost/files/boost/1.53.0/For this one, open a regular command (CMD) window and do the following:
cd \deps\boost-1.53.0\
bootstrap.bat mingw
b2 --build-type=complete --with-chrono --with-filesystem --with-program_options --with-system --with-thread toolset=gcc stage
For simplicity's sake, my versions are simply named deps\boost; deps\ssl; etc. If you build your own, either rename the folders in \deps OR change the paths to suit your changes in the coin-qt.pro file. Remember to change the Boost suffix too to match the version you compile with!
At this point you're ready to build normal non-Qt coin wallets on windows. Go ahead and check the thread at the beginning of this section if you'd like to know how. We're making a GUI though:
Next, install the Qt-MiniGW32 4.8.4 Build from here:
http://download.qt-project.org/official_releases/qt/4.8/4.8.4/qt-win-opensource-4.8.4-mingw.exe Again, all normal installation options, next next next you know the drill. Once QT is installed, you will find a program in Start - All Programs - Qt by Digia - Qt Command Prompt:
Fire it up and it will look pretty much like a DOS box:
Now since we don't have git on this our Windows computer (you can install it if you want, Cygwin is a good way to do that) you must download the barcoin-master.zip file from
http://github.com/barcoin and extract it to the PC. For this example, we'll put it in c:\. One last thing we need to do before we compile for Windows. We need to edit the "barcoin-qt.pro" file to enable the Windows libs, includes, and correct ordering for some of the syntax:
barcoin/barcoin-qt.pro:
LINES 11-22, UNCOMMENT ALL OF THESE TO ENABLE WINDOWS BUILDS:
#windows:LIBS += -lshlwapi
#LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
#LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
#windows:LIBS += -lws2_32 -lole32 -loleaut32 -luuid -lgdi32
#LIBS += -lboost_system-mgw46-mt-sd-1_53 -lboost_filesystem-mgw46-mt-sd-1_53 -lboost_program_options-mgw46-mt-sd-1_53 -lboost_thread-mgw46-mt-sd-1_53
#BOOST_LIB_SUFFIX=-mgw46-mt-sd-1_53
#BOOST_INCLUDE_PATH=C:/deps/boost
#BOOST_LIB_PATH=C:/deps/boost/stage/lib
#BDB_INCLUDE_PATH=c:/deps/db/build_unix
#BDB_LIB_PATH=c:/deps/db/build_unix
#OPENSSL_INCLUDE_PATH=c:/deps/ssl/include
#OPENSSL_LIB_PATH=c:/deps/ssl
IF YOU BUILT YOUR OWN dependencies, then also change the paths in the file above to suit their locations, use / instead of \, yea its odd. Now go back to your Qt Command Shell window and build the same way we built on the other platforms:
c:\Qt-Builder> cd \barcoin-master\src
c:\barcoin-master\src> qmake "USE_UPNP=- barcoin-qt.pro
c:\barcoin-master\src> make -f Makefile.Release
Wait for a bit and once its done, you'll find a folder called "release" under the main barcoin-master folder containing the .exe and a .cpp file:
This isn't enough to redistribute though, to make the file run you'll need to include the QT and gcc libs along with the file. I've put them on a git repository here:
https://github.com/foocoin/windows-qt-addins.git Just download the 6 files and insert them in to the "release" folder along with the .exe and .cpp:
To redistribute, simply rename the "release" folder and zip it up! You can now run the .exe file on Windows:
Woah, hey look at that, we already have a balance! Actually, I'd sent the 10 BAR to this computer from the one I left mining all night. If you don't have many connections to the network, you may need to add a line like so to your %appdata%\barcoin\barcoin.conf:
addnode=IP ADDRESS OF YOUR SEED NODE
If you created a seed node, it should connect but if not, simply add a node. Once a few clients begin connecting they will use IRC to connect to each other, so the addnode should only be needed for the initial wallet connections.
Source:
http://dogecoin.ga/how_to_create_scrypt_based_altcoins.html