Skip to content

Commit

Permalink
Merge pull request #44 from aizensou/master
Browse files Browse the repository at this point in the history
Merging for version 0.1.8
  • Loading branch information
nopslide authored Jan 8, 2017
2 parents 6452e96 + d9a2f81 commit 2d5ccff
Show file tree
Hide file tree
Showing 39 changed files with 285 additions and 477 deletions.
2 changes: 1 addition & 1 deletion COPYING
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Copyright (c) 2009-2013 Bitcoin Developers
Copyright (c) 2011-2013 zcoin Developers
Copyright (c) 2015-2017 zcoin Developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ https://zcoin.finance/

Copyright (c) 2009 - 2016 Bitcoin Developers

Copyright (c) 2015 - 2016 ZCoin Developers
Copyright (c) 2015 - 2017 ZCoin Developers

What is ZCoin?
----------------
Expand Down
3 changes: 2 additions & 1 deletion contrib/homebrew/makefile.osx.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ index bef0ef3..07ef8d3 100644

LIBPATHS= \
-L"$(DEPSDIR)/lib" \
- -L"$(DEPSDIR)/lib/db48"
- -L"$(DEPSDIR)/opt/berkeley-db4/lib"
+ -L"$(DB4DIR)/lib" \
+ -L"$(OPENSSLDIR)/lib"

Expand All @@ -46,3 +46,4 @@ index bef0ef3..07ef8d3 100644
-lz
else
TESTLIBS += \

Binary file modified contrib/macdeploy/background.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 18 additions & 93 deletions doc/build-osx.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,15 @@
Mac OS X zcoind build instructions
Mac OS X Daemon Build Instructions and Notes
====================================

Authors
-------

* Laszlo Hanyecz <[email protected]>
* Douglas Huff <[email protected]>
* Colin Dean <[email protected]>
* Gavin Andresen <[email protected]>

License
-------

Copyright (c) 2009-2012 Bitcoin Developers

Distributed under the MIT/X11 software license, see the accompanying
file COPYING 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.
* Modified by Aizen Sou ([email protected]) @ 2017

Notes
-----

See `doc/readme-qt.rst` for instructions on building zcoin, the
See `doc/readme-qt.rst` for instructions on building zcoin-qt, the
graphical user interface.

Tested on OS X 10.5 through 10.8 on Intel processors only. PPC is not
Tested on OS X 10.7 through 10.12 on Intel processors only. PPC is not
supported because it is big-endian.

All of the commands should be executed in a Terminal application. The
Expand All @@ -38,96 +18,41 @@ built-in one is located in `/Applications/Utilities`.
Preparation
-----------

You need to install XCode with all the options checked so that the compiler
and everything is available in /usr not just /Developer. XCode should be
available on your OS X installation media, but if not, you can get the
current version from https://developer.apple.com/xcode/. If you install
Xcode 4.3 or later, you'll need to install its command line tools. This can
be done in `Xcode > Preferences > Downloads > Components` and generally must
be re-done or updated every time Xcode is updated.

There's an assumption that you already have `git` installed, as well. If
not, it's the path of least resistance to install [Github for Mac](https://mac.github.com/)
(OS X 10.7+) or
[Git for OS X](https://code.google.com/p/git-osx-installer/). It is also
available via Homebrew or MacPorts.

You will also need to install [Homebrew](http://mxcl.github.io/homebrew/)
or [MacPorts](https://www.macports.org/) in order to install library
dependencies. It's largely a religious decision which to choose, but, as of
December 2012, MacPorts is a little easier because you can just install the
dependencies immediately - no other work required. If you're unsure, read
the instructions through first in order to assess what you want to do.
Homebrew is a little more popular among those newer to OS X.

The installation of the actual dependencies is covered in the Instructions
sections below.

Instructions: MacPorts
----------------------

### Install dependencies
Install the OS X command line tools:

Installing the dependencies using MacPorts is very straightforward.
xcode-select --install

sudo port install boost db48@+no_java openssl miniupnpc
When the popup appears, click Install.

### Building `zcoind`

1. Clone the github tree to get the source code and go into the directory.

git clone [email protected]:zcoin/zcoin.git zcoin
cd zcoin

2. Build zcoind:

cd src
make -f makefile.osx

3. It is a good idea to build and run the unit tests, too:

make -f makefile.osx test
You will also need to install [Homebrew](http://mxcl.github.io/homebrew/)

Instructions: HomeBrew
Dependencies
----------------------

#### Install dependencies using Homebrew
brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config --c++11 qt5

brew install boost miniupnpc openssl berkeley-db4

Note: After you have installed the dependencies, you should check that the Brew installed version of OpenSSL is the one available for compilation. You can check this by typing

openssl version

into Terminal. You should see OpenSSL 1.0.1e 11 Feb 2013.

If not, you can ensure that the Brew OpenSSL is correctly linked by running
If you have trouble with linking openssl you can ensure that the Brew OpenSSL is correctly linked by running

brew link openssl --force

Rerunning "openssl version" should now return the correct version.
Or manually by

cd /usr/local/include
ln -s ../opt/openssl/include/openssl .
### Building `zcoind`

1. Clone the github tree to get the source code and go into the directory.

git clone git@github.com:zcoin/zcoin.git zcoin
git clone https://github.com/zcoinofficial/zcoin
cd zcoin

2. Modify source in order to pick up the `openssl` library.

Edit `makefile.osx` to account for library location differences. There's a
diff in `contrib/homebrew/makefile.osx.patch` that shows what you need to
change, or you can just patch by doing

patch -p1 < contrib/homebrew/makefile.osx.patch

3. Build zcoind:
2. Build zcoind:

cd src
make -f makefile.osx

4. It is a good idea to build and run the unit tests, too:
3. It is a good idea to build and run the unit tests, too:

make -f makefile.osx test

Expand Down
67 changes: 55 additions & 12 deletions doc/readme-qt.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
zcoin: Qt4 GUI for zcoin
zcoin: Qt GUI for zcoin
===============================

Modified by Aizen Sou ([email protected]) @ 2017

Build instructions
===================

Expand Down Expand Up @@ -47,37 +49,78 @@ An executable named `zcoin-qt` will be built.

.. _`Qt Creator`: http://qt-project.org/downloads/

Mac OS X
--------

- Download and install the `Qt Mac OS X SDK`_. It is recommended to also install Apple's Xcode with UNIX tools.
Ubuntu => 14.04
-------

First you have to install the dependencies
Qt4 dependencies :

::

sudo apt-get install -y build-essential libssl-dev libboost-all-dev libqt4-dev libprotobuf-dev protobuf-compiler libqrencode-dev software-properties-common


- Download and install either `MacPorts`_ or `HomeBrew`_.
Qt5 dependencies:

- Execute the following commands in a terminal to get the dependencies using MacPorts:
::

sudo apt-get install -y libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools


then execute the following:

::

sudo port selfupdate
sudo port install boost db48 miniupnpc
qmake "RELEASE=1"
make


If you have trouble with the taskbar doesn't show up in Ubuntu (It's an Unity's specific bug), you could try to fix it with giving this below command in the terminal to restart Unity
-------
::

initctl restart unity-panel-service


Mac OS X
--------

- Download and install the `Qt Mac OS X SDK`_. It is recommended to also install Apple's Xcode with UNIX tools.

- Download and install `HomeBrew`_.

- Execute the following commands in a terminal to get the dependencies using HomeBrew:

::

brew update
brew install boost miniupnpc openssl berkeley-db4
brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config --c++11 qt5

- If using HomeBrew, edit `zcoin-qt.pro` to account for library location differences. There's a diff in `contrib/homebrew/bitcoin-qt-pro.patch` that shows what you need to change, or you can just patch by doing
- Make sure to enfore linking qmake in the Terminal.app

::

patch -p1 < contrib/homebrew/bitcoin.qt.pro.patch
brew link qt5 --force

- Open the zcoin-qt.pro file in Qt Creator and build as normal (cmd-B)

.. _`Qt Mac OS X SDK`: http://qt-project.org/downloads/
.. _`MacPorts`: http://www.macports.org/install.php
.. _`HomeBrew`: http://mxcl.github.io/homebrew/

- Or using Terminal with:

::

qmake "RELEASE=1" zcoin.pro
make

- After that you could deploy the app with

::

contrib/macdeploy/macdeployqtplus zcoin-qt.app -dmg -fancy contrib/macdeploy/fancy.plist -verbose 2


Build configuration options
============================
Expand Down
4 changes: 2 additions & 2 deletions src/alert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ std::string CUnsignedAlert::ToString() const
return strprintf(
"CAlert(\n"
" nVersion = %d\n"
" nRelayUntil = %"PRI64d"\n"
" nExpiration = %"PRI64d"\n"
" nRelayUntil = %" PRI64d"\n"
" nExpiration = %" PRI64d"\n"
" nID = %d\n"
" nCancel = %d\n"
" setCancel = %s\n"
Expand Down
2 changes: 1 addition & 1 deletion src/bitcoinrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ static string HTTPReply(int nStatus, const string& strMsg, bool keepalive)
"HTTP/1.1 %d %s\r\n"
"Date: %s\r\n"
"Connection: %s\r\n"
"Content-Length: %"PRIszu"\r\n"
"Content-Length: %" PRIszu"\r\n"
"Content-Type: application/json\r\n"
"Server: ZCoin-json-rpc/%s\r\n"
"\r\n"
Expand Down
11 changes: 8 additions & 3 deletions src/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,17 @@ namespace Checkpoints
// + Contains no strange transactions
static MapCheckpoints mapCheckpoints =
boost::assign::map_list_of
( 0, uint256("0xf11046292ff76af48b66de6f1a210c09825d2ab4f56975ec507766ebf9c9f443"))
(0, uint256("0xf11046292ff76af48b66de6f1a210c09825d2ab4f56975ec507766ebf9c9f443"))
(14000, uint256("0xeab9b7e451284cb75ada7609e0220bee2b4f289fed9d9cf2a9e3aa548b2d38eb"))
(14001, uint256("0x98641539b9b8ff4e6a8053ec904a14a99f95cf7655c71625104419b22016c9a0"))
(14002, uint256("0x8c8c67106b0b612b08edd13e846c97c24ad0b59066efdb3ad6666e20f90d4bfa"))
(14003, uint256("0xaccfa7c7bb153135def08bb54dadb1835744d9521afb36661a91aa2f70df9abd"))
(14271, uint256("0xf15088099a30f98e85a09789880f74cadca42f725c0cc1666484865539d2f335"))
;
static const CCheckpointData data = {
&mapCheckpoints,
1402460085, // * UNIX timestamp of last checkpoint block
1, // * total number of transactions between genesis and last checkpoint
1483237488, // * UNIX timestamp of last checkpoint block
74456, // * total number of transactions between genesis and last checkpoint
// (the tx=... number in the SetBestChain debug.log lines)
1200.0 // * estimated number of transactions per day after checkpoint
};
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

// Copyright year (2009-this)
// Todo: update this when changing our copyright comments in the source
#define COPYRIGHT_YEAR 2014
#define COPYRIGHT_YEAR 2017

// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
Expand Down
2 changes: 1 addition & 1 deletion src/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ void CDBEnv::Flush(bool fShutdown)
else
mi++;
}
printf("DBFlush(%s)%s ended %15"PRI64d"ms\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started", GetTimeMillis() - nStart);
printf("DBFlush(%s)%s ended %15" PRI64d"ms\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started", GetTimeMillis() - nStart);
if (fShutdown)
{
char** listp;
Expand Down
2 changes: 2 additions & 0 deletions src/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ class CDB
}

bool static Rewrite(const std::string& strFile, const char* pszSkip = NULL);


};


Expand Down
Loading

0 comments on commit 2d5ccff

Please sign in to comment.