Author

Topic: 从零开始丨新手制作完全属于自己的虚拟币 (Read 2349 times)

member
Activity: 86
Merit: 10
跌跌不休,何时是个头
member
Activity: 101
Merit: 10
有点不可能啊
sr. member
Activity: 252
Merit: 250
I am looking for a dev!
山寨必死啊,说的很好,创新才是硬道理!
newbie
Activity: 43
Merit: 0
有中文教程没? Grin
member
Activity: 98
Merit: 10
楼主玩笑开大了吧
newbie
Activity: 8
Merit: 0
大家都去造币去
sr. member
Activity: 306
Merit: 250
一点都看不懂,,,不是程序员
member
Activity: 83
Merit: 100
full member
Activity: 176
Merit: 100
垃圾币没意思的
full member
Activity: 152
Merit: 100
这个没意思,学不一定能会的,对于从未接触过源码的
member
Activity: 81
Merit: 10
我建议楼主不要学习山寨币,直接学习创新币吧,以后山寨币必死
hero member
Activity: 1008
Merit: 501
一点都看不懂,,,不是程序员
full member
Activity: 484
Merit: 101
Quote
山寨币任重道远
btc不会输的,但是山寨币到最后必然灭亡
member
Activity: 98
Merit: 10
好基友啊,但是制作出来的都是垃圾币 Grin Grin
member
Activity: 76
Merit: 10
我也做一个 然后大家都来买哈
member
Activity: 83
Merit: 10
member
Activity: 88
Merit: 10
我日,这样也行啊,可是我看不懂啊
full member
Activity: 140
Merit: 100
Copyright (c) 2009-2012 Bitcoin Developers
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 ([email protected]) and UPnP
software written by Thomas Bernard.


See readme-qt.rst for instructions on building BlackCoin QT, the
graphical user interface.

WINDOWS BUILD NOTES
===================

Compilers Supported
-------------------
TODO: What works?
Note: releases are cross-compiled using mingw running on Linux.


Dependencies
------------
Libraries you need to download separately and build:

                default path               download
OpenSSL         \openssl-1.0.1b-mgw        http://www.openssl.org/source/
Berkeley DB     \db-4.8.30.NC-mgw          http://www.oracle.com/technology/software/products/berkeley-db/index.html
Boost           \boost-1.47.0-mgw          http://www.boost.org/users/download/
miniupnpc       \miniupnpc-1.6-mgw         http://miniupnp.tuxfamily.org/files/

Their licenses:
OpenSSL        Old BSD license with the problematic advertising requirement
Berkeley DB    New BSD license with additional requirement that linked software must be free open source
Boost          MIT-like license
miniupnpc      New (3-clause) BSD license

Versions used in this release:
OpenSSL      1.0.1b
Berkeley DB  4.8.30.NC
Boost        1.47.0
miniupnpc    1.6


OpenSSL
-------
MSYS shell:
un-tar sources with MSYS 'tar xfz' to avoid issue with symlinks (OpenSSL ticket 2377)
change 'MAKE' env. variable from 'C:\MinGW32\bin\mingw32-make.exe' to '/c/MinGW32/bin/mingw32-make.exe'

cd /c/openssl-1.0.1b-mgw
./config
make

Berkeley DB
-----------
MSYS shell:
cd /c/db-4.8.30.NC-mgw/build_unix
sh ../dist/configure --enable-mingw --enable-cxx
make

Boost
-----
DOS prompt:
downloaded boost jam 3.1.18
cd \boost-1.47.0-mgw
bjam toolset=gcc --build-type=complete stage

MiniUPnPc
---------
UPnP support is optional, make with USE_UPNP= to disable it.

MSYS shell:
cd /c/miniupnpc-1.6-mgw
make -f Makefile.mingw
mkdir miniupnpc
cp *.h miniupnpc/

BlackCoin
-------
DOS prompt:
cd \blackcoin\src
mingw32-make -f makefile.mingw
strip blackcoind.exe
full member
Activity: 140
Merit: 100
*******************
** 安装 MinGW **
*******************

1.  打开网站: https://sourceforge.net/downloads/mingw
2.  下载安装 mingw-get-setup.exe
3.  Complete the installation wizard leaving default values

*********************
** Configure MinGW **
*********************

1.  Launch the MinGW Installation Manager
2.  Select Basic Setup on the left
3.  Mark the following packages for installation: mingw-developer-toolkit, mingw32-base, mingw-gcc-g++, and msys-base
4.  Select All Packages on the left
5.  Mark the following packages for installation: mingw32-pthreads-w32 (dev), mingw32-libpdcurses (dev), mingw32-pdcurses (bin), msys-libopenssl (dev)
6.  Click Installation > Apply Changes
7.  Click Apply
8.  Wait...
9.  Click Close
10. Close MinGW Installation Manager

************************
** MinGW Post-Install **
************************

1.  Check your Start menu for “MinGW Shell”
2.  If the shortcut exists, continue to the next section, otherwise:
3.  Navigate to C:\MinGW\msys\1.0\postinstall
4.  Run pi.bat & answer the questions
5.  Navigate to C:\MinGW\msys\1.0
6.  Right-click msys.bat and click Copy
7.  Click the Start button
8.  Right-click All Programs and click Open
9.  Right-click on the opened folder and click “Paste shortcut”
10. Right-click the new shortcut and click Properties
11. On the General tab, rename the shortcut to “MinGW Shell”
12. On the Shortcut tab, change Start in to C:\MinGW\msys\1.0\bin
13. Click OK

******************************************
** Install YASM (optional - CPU mining) **
******************************************

1.  Visit http://yasm.tortall.net/Download.html
2.  Download the Win32 or Win64 .exe, depending on your version of Windows
3.  Rename the downloaded executable to yasm.exe
4.  Copy the executable to C:\MinGW\bin

********************
** Install uthash **
********************

1.  Visit http://troydhanson.github.io/uthash/
2.  Download the uthash-master.zip file
3.  Extract the contents of the uthash-master/src folder into C:\MinGW\include

******************************
** Install GTK+ for Windows **
******************************

1.  Visit http://sourceforge.net/projects/gtk-win/
2.  Download and execute the gtk2-runtime installer
3.  Complete the installation wizard leaving default values
4.  Copy libglib-2.0-0.dll from C:\Program Files\GTK2-Runtime\bin to C:\MinGW\bin

************************
** Install pkg-config **
************************

1.  Visit http://www.gtk.org/download/win32.php
2.  Search for a version of pkg-config that includes both the Tool and Dev downloads
3.  Click and download both the Tool link and the Dev link
4.  Open the pkg-config zip file and extract the bin folder to C:\MinGW
5.  Open the pkg-config-dev zip file and extract the share folder to C:\MinGW

*********************
** Install libcurl **
*********************

1.  Visit http://curl.haxx.se/download.html#Win32
2.  Look for the Win32 - Generic heading
3.  Download the link that indicates both *libcurl* (not just binary) and *SSL*
4.  Open the zip file and extract the lib, include, and bin folders to C:\MinGW
5.  Edit C:\MinGW\lib\pkgconfig\libcurl.pc
6.  Change "-lcurl" to "-lcurl -lcurldll"

************************
** Install libjansson **
************************

1.  Visit http://www.digip.org/jansson/releases/
2.  Download the latest .tar.gz file (not doc.tar.gz)
3.  Open the .tar.gz file and extract the jansson folder to C:\MinGW\msys\1.0\home\USER (where USER is your user name)
4.  Click Start and launch MinGW Shell
5.  Type the following (replace X.X with actual version):

   cd ~/jansson-X.X
   ./configure --prefix=/MinGW
   make
   make check
   make install

********************
** Install libusb **
********************

1.  Visit http://git.libusb.org/?p=libusb.git;a=snapshot;h=master;sf=zip
2.  Download and open the resulting zip file
3.  Extract the libusb-master folder to C:\MinGW\msys\1.0\home\USER
4.  Return to the MinGW Shell
5.  Type the following (replace XYZ with actual identifier):

   cd ~/libusb-master-XYZ
   ./autogen.sh --disable-debug-log --prefix=/MinGW
   make
   make install

******************************************************
** Install libmicrohttpd (optional - Stratum Proxy) **
******************************************************

1.  Visit http://ftp.gnu.org/gnu/libmicrohttpd/
2.  Download the latest w32.zip file
3.  Open the zip file and extract the share, lib, include, and bin folders to C:\MinGW

*************************************************
** Install libevent (optional - Stratum Proxy) **
*************************************************

1.  Visit http://libevent.org/
2.  Download the latest stable.tar.gz file
3.  Open the .tar.gz file and extract the libevent-X.Y.Z-stable folder to C:\MinGW\msys\1.0\home\USER
4.  Return to the MinGW Shell
5.  Type the following (replace X.Y.Z with actual version):

   cd ~/libevent-X.Y.Z-stable
   ./configure --disable-openssl --prefix=/MinGW
   make
   make install

*******************************************************
** Install HIDAPI (optional - Hashbuster & Nanofury) **
*******************************************************

1.  Visit https://github.com/signal11/hidapi
2.  Click Releases and download the latest zip file
3.  Open the zip file and extract the hidapi-hidapi folder to C:\MinGW\msys\1.0\home\USER
4.  Return to the MinGW Shell
5.  Type the following (replace X.Y.Z with actual version):

   cd ~/hidapi-hidapi-X.Y.Z
   ./bootstrap
   ./configure --prefix=/MinGW
   make
   make install

*****************
** Install Git **
*****************

1.  Visit http://git-scm.com/downloads
2.  Click the Download for Windows
3.  Run the resulting installer once downloaded
4.  Complete the installation wizard leaving default values

****************************
** Configure Git in MinGW **
****************************

1.  Navigate to C:\MinGW\msys\1.0\home\USER
2.  Create a new text file with Notepad called profile.txt with the contents:

PATH=$PATH:/c/Program\ Files/Git/bin

3.  Return to the MinGW Shell
4.  Type the following:

   mv ~/profile.txt ~/.profile

5.  Restart the MinGW Shell

******************
** OS Header(s) **
******************

1.  Navigate to C:\MinGW\include
2.  Use Notepad to create a new file called mstcpip.h (not .txt) with the contents:

struct tcp_keepalive
{
    u_long onoff;
    u_long keepalivetime;
    u_long keepaliveinterval;
};

#ifndef USE_WS_PREFIX

#define SIO_KEEPALIVE_VALS    _WSAIOW(IOC_VENDOR, 4)

#else

#define WS_SIO_KEEPALIVE_VALS    _WSAIOW(WS_IOC_VENDOR, 4)

#endif

**********************
** Compile bfgminer **
**********************

1.  Return to the MinGW Shell
2.  Type the following:

   cd ~/
   git clone git://github.com/luke-jr/bfgminer.git
   cd bfgminer/
   ./autogen.sh
   ./configure
   make

* Note: see the README for bfgminer ./configure options

**********************
** Package Binaries **
**********************

Create a new folder anywhere and copy the following items there:

C:\MinGW\msys\1.0\home\USER\bfgminer

   bfgminer.exe
   bfgminer-rpc.exe
   *.cl
   COPYING
   LICENSE
   README*

C:\MinGW\msys\1.0\home\USER\bfgminer\libblkmaker\.libs 

   libblkmaker-0.1-0.dll
   libblkmaker_jansson-0.1-0.dll

C:\MinGW\bin

   libcurl.dll
   libjansson-4.dll
   libmicrohttpd-10.dll
   libpdcursesw.dll
   pthreadGC2.dll
   libusb-1.0.dll
   libidn-11.dll
   libeay32.dll
   ssleay32.dll
   libgcc_s_dw2-1.dll
   libgnutls-28.dll
   libgcrypt-11.dll
   libplibc-1.dll
   libgmp.dll
   libintl-8.dll
   libgpg-error-0.dll
   libiconv-2.dll
   libevent-2-0-5.dll
Jump to: