mirror of
https://github.com/AskDavis/Casinotest.git
synced 2026-01-01 05:05:57 -08:00
Initial commit.
This commit is contained in:
1752
doc/Doxyfile
Normal file
1752
doc/Doxyfile
Normal file
File diff suppressed because it is too large
Load Diff
35
doc/README
Normal file
35
doc/README
Normal file
@@ -0,0 +1,35 @@
|
||||
CasinoCoin 0.6 BETA
|
||||
|
||||
Copyright (c) 2009-2012 Bitcoin Developers
|
||||
Copyright (c) 2011-2012 Litecoin Developers
|
||||
Copyright (c) 2013 CasinoCoin 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 (eay@cryptsoft.com).
|
||||
|
||||
|
||||
Intro
|
||||
-----
|
||||
CasinoCoin is a free open source peer-to-peer electronic cash system that is
|
||||
completely decentralized, without the need for a central server or trusted
|
||||
parties. Users hold the crypto keys to their own money and transact directly
|
||||
with each other, with the help of a P2P network to check for double-spending.
|
||||
|
||||
|
||||
Setup
|
||||
-----
|
||||
You need the Qt4 run-time libraries to run CasinoCoin-Qt. On Debian or Ubuntu:
|
||||
sudo apt-get install libqtgui4
|
||||
|
||||
Unpack the files into a directory and run:
|
||||
bin/32/casinocoin-qt (GUI, 32-bit)
|
||||
bin/32/casinocoind (headless, 32-bit)
|
||||
bin/64/casinocoin-qt (GUI, 64-bit)
|
||||
bin/64/casinocoind (headless, 64-bit)
|
||||
|
||||
|
||||
See the documentation at the bitcoin wiki:
|
||||
https://en.bitcoin.it/wiki/Main_Page
|
||||
for help and more information.
|
||||
33
doc/README_ScryptMiner.txt
Normal file
33
doc/README_ScryptMiner.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
ScryptMiner-GUI
|
||||
===
|
||||
|
||||
A simple GUI for the scrypt-based cpuminer written in C++ using Qt.
|
||||
|
||||
To use, copy the minerd executable to the same directory as the GUI itself, alongside with any needed libraries.
|
||||
After that, just run the GUI executable.
|
||||
|
||||
===
|
||||
|
||||
LICENSING INFORMATION
|
||||
|
||||
===
|
||||
|
||||
Copyright (C) 2011 by Matoking
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
37
doc/README_windows.txt
Normal file
37
doc/README_windows.txt
Normal file
@@ -0,0 +1,37 @@
|
||||
CasinoCoin 0.6 BETA
|
||||
|
||||
Copyright (c) 2009-2012 Bitcoin Developers
|
||||
Copyright (c) 2011-2012 Litecoin Developers
|
||||
Copyright (c) 2013 CasinoCoin 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 (eay@cryptsoft.com).
|
||||
|
||||
|
||||
Intro
|
||||
-----
|
||||
CasinoCoin is a free open source peer-to-peer electronic cash system that is
|
||||
completely decentralized, without the need for a central server or trusted
|
||||
parties. Users hold the crypto keys to their own money and transact directly
|
||||
with each other, with the help of a P2P network to check for double-spending.
|
||||
|
||||
|
||||
Setup
|
||||
-----
|
||||
Unpack the files into a directory and run casinocoin-qt.exe.
|
||||
|
||||
If you have Microsoft Security Essentials, you need to add casinocoin-qt.exe to its
|
||||
"Excluded processes" list. Microsoft Security Essentials->Settings tab,
|
||||
select Excluded processes, press Add, select casinocoin-qt.exe, OK, Save changes.
|
||||
|
||||
The software automatically finds other nodes to connect to. You can
|
||||
enable Universal Plug and Play using a menu entry or set your firewall
|
||||
to forward port 9333 (TCP) to your computer so you can receive
|
||||
incoming connections. CasinoCoin works without incoming connections,
|
||||
but allowing incoming connections helps the CasinoCoin network.
|
||||
|
||||
See the bitcoin wiki at:
|
||||
https://en.bitcoin.it/wiki/Main_Page
|
||||
for more help and information.
|
||||
96
doc/Tor.txt
Normal file
96
doc/Tor.txt
Normal file
@@ -0,0 +1,96 @@
|
||||
TOR SUPPORT IN BITCOIN
|
||||
======================
|
||||
|
||||
It is possible to run Bitcoin as a Tor hidden service, and connect to such services.
|
||||
|
||||
The following assumes you have a Tor proxy running on port 9050. Many distributions
|
||||
default to having a SOCKS proxy listening on port 9050, but others may not.
|
||||
In particular, the Tor Browser Bundle defaults to listening on a random port. See
|
||||
https://www.torproject.org/docs/faq.html.en#TBBSocksPort for how to properly
|
||||
configure Tor.
|
||||
|
||||
|
||||
1. Run bitcoin behind a Tor proxy
|
||||
---------------------------------
|
||||
|
||||
The first step is running Bitcoin behind a Tor proxy. This will already make all
|
||||
outgoing connections be anonimized, but more is possible.
|
||||
|
||||
-socks=5 SOCKS5 supports connecting-to-hostname, which can be used instead
|
||||
of doing a (leaking) local DNS lookup. SOCKS5 is the default,
|
||||
but SOCKS4 does not support this. (SOCKS4a does, but isn't
|
||||
implemented).
|
||||
|
||||
-proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy
|
||||
server will be used to try to reach .onion addresses as well.
|
||||
|
||||
-tor=ip:port Set the proxy server to use for tor hidden services. You do not
|
||||
need to set this if it's the same as -proxy. You can use -notor
|
||||
to explicitly disable access to hidden service.
|
||||
|
||||
-dnsseed DNS seeds are not resolved directly when a SOCKS5 proxy server is
|
||||
set. Rather, a short-lived proxy connection to the dns seed
|
||||
hostname is attempted, and peer addresses are requested.
|
||||
|
||||
-listen When using -proxy, listening is disabled by default. If you want
|
||||
to run a hidden service (see next section), you'll need to enable
|
||||
it explicitly.
|
||||
|
||||
-connect=X When behind a Tor proxy, you can specify .onion addresses instead
|
||||
-addnode=X of IP addresses or hostnames in these parameters. It requires
|
||||
-seednode=X SOCKS5. In Tor mode, such addresses can also be exchanged with
|
||||
other P2P nodes.
|
||||
|
||||
In a typical situation, this suffices to run behind a Tor proxy:
|
||||
|
||||
./bitcoin -proxy=127.0.0.1:9050
|
||||
|
||||
|
||||
2. Run a bitcoin hidden server
|
||||
------------------------------
|
||||
|
||||
If you configure your Tor system accordingly, it is possible to make your node also
|
||||
reachable from the Tor network. Add these lines to your /etc/tor/torrc (or equivalent
|
||||
config file):
|
||||
|
||||
HiddenServiceDir /var/lib/tor/bitcoin-service/
|
||||
HiddenServicePort 9333 127.0.0.1:9333
|
||||
|
||||
The directory can be different of course, but (both) 9333's should be equal to your
|
||||
bitcoind's P2P listen port (9333 by default).
|
||||
|
||||
-externalip=X You can tell bitcoin about its publicly reachable address using
|
||||
this option, and this can be a .onion address. Given the above
|
||||
configuration, you can find your onion address in
|
||||
/var/lib/tor/bitcoin-service/hostname. Onion addresses are given
|
||||
preference for your node to advertize itself with, for connections
|
||||
coming from unroutable addresses (such as 127.0.0.1, where the
|
||||
Tor proxy typically runs).
|
||||
|
||||
-listen You'll need to enable listening for incoming connections, as this
|
||||
is off by default behind a proxy.
|
||||
|
||||
-discover When -externalip is specified, no attempt is made to discover local
|
||||
IPv4 or IPv6 addresses. If you want to run a dual stack, reachable
|
||||
from both Tor and IPv4 (or IPv6), you'll need to either pass your
|
||||
other addresses using -externalip, or explicitly enable -discover.
|
||||
Note that both addresses of a dual-stack system may be easily
|
||||
linkable using traffic analysis.
|
||||
|
||||
In a typical situation, where you're only reachable via Tor, this should suffice:
|
||||
|
||||
./bitcoind -proxy=127.0.0.1:9050 -externalip=57qr3yd1nyntf5k.onion -listen
|
||||
|
||||
(obviously replace the Onion address with your own). If you don't care too much
|
||||
about hiding your node, and want to be reachable on IPv4 as well, additionally
|
||||
specify:
|
||||
|
||||
./bitcoind ... -discover
|
||||
|
||||
and open port 9333 on your firewall (or use -upnp).
|
||||
|
||||
If you only want to use Tor to reach onion addresses, but not use it as a proxy
|
||||
for normal IPv4/IPv6 communication, use:
|
||||
|
||||
./bitcoin -tor=127.0.0.1:9050 -externalip=57qr3yd1nyntf5k.onion -discover
|
||||
|
||||
60
doc/assets-attribution.txt
Normal file
60
doc/assets-attribution.txt
Normal file
@@ -0,0 +1,60 @@
|
||||
Code: src/strlcpy.h
|
||||
Author: Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
License: ISC
|
||||
|
||||
Icon: src/qt/res/icons/clock*.png, src/qt/res/icons/tx*.png,
|
||||
src/qt/res/src/*.svg
|
||||
Designer: Wladimir van der Laan
|
||||
License: MIT
|
||||
|
||||
Icon: src/qt/res/icons/address-book.png, src/qt/res/icons/export.png,
|
||||
src/qt/res/icons/history.png, src/qt/res/icons/key.png,
|
||||
src/qt/res/icons/lock_*.png, src/qt/res/icons/overview.png,
|
||||
src/qt/res/icons/receive.png, src/qt/res/icons/send.png,
|
||||
src/qt/res/icons/synced.png, src/qt/res/icons/filesave.png
|
||||
Icon Pack: NUVOLA ICON THEME for KDE 3.x
|
||||
Designer: David Vignoni (david@icon-king.com)
|
||||
ICON KING - www.icon-king.com
|
||||
License: LGPL
|
||||
Site: http://www.icon-king.com/projects/nuvola/
|
||||
|
||||
Icon: src/qt/res/icons/connect*.png
|
||||
Icon Pack: Human-O2
|
||||
Designer: schollidesign
|
||||
License: GNU/GPL
|
||||
Site: http://findicons.com/icon/93743/blocks_gnome_netstatus_0
|
||||
|
||||
Icon: src/qt/res/icons/transaction*.png
|
||||
Designer: md2k7
|
||||
Site: https://bitcointalk.org/index.php?topic=15276.0
|
||||
License: You are free to do with these icons as you wish, including selling,
|
||||
copying, modifying etc.
|
||||
|
||||
Icon: src/qt/res/icons/configure.png, src/qt/res/icons/quit.png,
|
||||
src/qt/res/icons/editcopy.png, src/qt/res/icons/editpaste.png,
|
||||
src/qt/res/icons/add.png, src/qt/res/icons/edit.png,
|
||||
src/qt/res/icons/remove.png (edited)
|
||||
Designer: http://www.everaldo.com
|
||||
Icon Pack: Crystal SVG
|
||||
License: LGPL
|
||||
|
||||
Icon: src/qt/res/icons/bitcoin.png, src/qt/res/icons/toolbar.png
|
||||
Designer: BitcoinPorn (forum)
|
||||
License: Public Domain
|
||||
Site: https://bitcointalk.org/index.php?topic=47417.msg591988#msg591988
|
||||
|
||||
Icon: scripts/img/reload.xcf (modified),src/qt/res/movies/update_spinner.mng
|
||||
Icon Pack: Kids
|
||||
Designer: Everaldo (Everaldo Coelho)
|
||||
License: GNU/GPL
|
||||
Site: http://findicons.com/icon/17102/reload?id=17102
|
||||
|
||||
Image: src/qt/res/images/splash2.jpg (Wallet image)
|
||||
Designer: Crobbo (forum), adapted to CasinoCoin by BitcoinPorn (forum)
|
||||
Site: https://bitcointalk.org/index.php?topic=32273.0, https://bitcointalk.org/index.php?topic=47417.msg591988#msg591988
|
||||
License: Public domain
|
||||
|
||||
Icon: src/qt/res/icons/debugwindow.png
|
||||
Designer: Vignoni David
|
||||
Site: http://www.oxygen-icons.org/
|
||||
License: Oxygen icon theme is dual licensed. You may copy it under the Creative Common Attribution-ShareAlike 3.0 License or the GNU Library General Public License.
|
||||
BIN
doc/bitcoin_logo_doxygen.png
Normal file
BIN
doc/bitcoin_logo_doxygen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
86
doc/build-msw.txt
Normal file
86
doc/build-msw.txt
Normal file
@@ -0,0 +1,86 @@
|
||||
Copyright (c) 2009-2012 Bitcoin Developers
|
||||
Copyright (c) 2011-2012 Litecoin Developers
|
||||
Copyright (c) 2013 CasinoCoin 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 (eay@cryptsoft.com) and UPnP
|
||||
software written by Thomas Bernard.
|
||||
|
||||
|
||||
See readme-qt.rst for instructions on building CasinoCoin-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/
|
||||
|
||||
CasinoCoin
|
||||
-------
|
||||
DOS prompt:
|
||||
cd \casinocoin\src
|
||||
mingw32-make -f makefile.mingw
|
||||
strip casinocoind.exe
|
||||
56
doc/build-osx.txt
Normal file
56
doc/build-osx.txt
Normal file
@@ -0,0 +1,56 @@
|
||||
Copyright (c) 2009-2012 Bitcoin Developers
|
||||
Copyright (c) 2011-2012 Litecoin Developers
|
||||
Copyright (c) 2013 CasinoCoin 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 (eay@cryptsoft.com) and UPnP
|
||||
software written by Thomas Bernard.
|
||||
|
||||
|
||||
Mac OS X casinocoind build instructions
|
||||
Laszlo Hanyecz <solar@heliacal.net>
|
||||
Douglas Huff <dhuff@jrbobdobbs.org>
|
||||
|
||||
|
||||
See readme-qt.rst for instructions on building CasinoCoin-QT, the
|
||||
graphical user interface.
|
||||
|
||||
Tested on 10.5, 10.6 and 10.7 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. XCode should be available on your OS X
|
||||
install DVD, but if not, you can get the current version from https://developer.apple.com/xcode/
|
||||
|
||||
|
||||
1. Clone the github tree to get the source code:
|
||||
|
||||
git clone git@github.com:casinocoin-project/casinocoin.git casinocoin
|
||||
|
||||
2. Download and install MacPorts from http://www.macports.org/
|
||||
|
||||
2a. (for 10.7 Lion)
|
||||
Edit /opt/local/etc/macports/macports.conf and uncomment "build_arch i386"
|
||||
|
||||
3. Install dependencies from MacPorts
|
||||
|
||||
sudo port install boost db48 openssl miniupnpc
|
||||
|
||||
Optionally install qrencode (and set USE_QRCODE=1):
|
||||
sudo port install qrencode
|
||||
|
||||
4. Now you should be able to build casinocoind:
|
||||
|
||||
cd casinocoin/src
|
||||
make -f makefile.osx USE_IPV6=1
|
||||
|
||||
Run:
|
||||
./casinocoind --help # for a list of command-line options.
|
||||
Run
|
||||
./casinocoind -daemon # to start the casinocoin daemon.
|
||||
Run
|
||||
./casinocoind help # When the daemon is running, to get a list of RPC commands
|
||||
157
doc/build-unix.txt
Normal file
157
doc/build-unix.txt
Normal file
@@ -0,0 +1,157 @@
|
||||
Copyright (c) 2009-2012 Bitcoin Developers
|
||||
Copyright (c) 2011-2012 Litecoin Developers
|
||||
Copyright (c) 2013 CasinoCoin 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 (eay@cryptsoft.com) and UPnP
|
||||
software written by Thomas Bernard.
|
||||
|
||||
|
||||
UNIX BUILD NOTES
|
||||
================
|
||||
|
||||
To Build
|
||||
--------
|
||||
|
||||
cd src/
|
||||
make -f makefile.unix # Headless casinocoin
|
||||
|
||||
See readme-qt.rst for instructions on building CasinoCoin-Qt,
|
||||
the graphical user interface.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
Library Purpose Description
|
||||
------- ------- -----------
|
||||
libssl SSL Support Secure communications
|
||||
libdb4.8 Berkeley DB Blockchain & wallet storage
|
||||
libboost Boost C++ Library
|
||||
miniupnpc UPnP Support Optional firewall-jumping support
|
||||
libqrencode QRCode generation Optional QRCode generation
|
||||
|
||||
miniupnpc may be used for UPnP port mapping. It can be downloaded from
|
||||
http://miniupnp.tuxfamily.org/files/. UPnP support is compiled in and
|
||||
turned off by default. Set USE_UPNP to a different value to control this:
|
||||
USE_UPNP=- No UPnP support - miniupnp not required
|
||||
USE_UPNP=0 (the default) UPnP support turned off by default at runtime
|
||||
USE_UPNP=1 UPnP support turned on by default at runtime
|
||||
|
||||
libqrencode may be used for QRCode image generation. It can be downloaded
|
||||
from http://fukuchi.org/works/qrencode/index.html.en, or installed via
|
||||
your package manager. Set USE_QRCODE to control this:
|
||||
USE_QRCODE=0 (the default) No QRCode support - libqrcode not required
|
||||
USE_QRCODE=1 QRCode support enabled
|
||||
|
||||
IPv6 support may be enabled by setting
|
||||
USE_IPV6=1 Enable IPv6 support
|
||||
|
||||
Licenses of statically linked libraries:
|
||||
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:
|
||||
GCC 4.3.3
|
||||
OpenSSL 0.9.8g
|
||||
Berkeley DB 4.8.30.NC
|
||||
Boost 1.37
|
||||
miniupnpc 1.6
|
||||
|
||||
Dependency Build Instructions: Ubuntu & Debian
|
||||
----------------------------------------------
|
||||
sudo apt-get install build-essential
|
||||
sudo apt-get install libssl-dev
|
||||
sudo apt-get install libdb4.8-dev
|
||||
sudo apt-get install libdb4.8++-dev
|
||||
Boost 1.40+: sudo apt-get install libboost-all-dev
|
||||
or Boost 1.37: sudo apt-get install libboost1.37-dev
|
||||
sudo apt-get install libqrencode-dev
|
||||
|
||||
If using Boost 1.37, append -mt to the boost libraries in the makefile.
|
||||
|
||||
|
||||
Dependency Build Instructions: Gentoo
|
||||
-------------------------------------
|
||||
|
||||
emerge -av1 --noreplace boost glib openssl sys-libs/db:4.8
|
||||
|
||||
Take the following steps to build (no UPnP support):
|
||||
cd ${CASINOCOIN_DIR}/src
|
||||
make -f makefile.unix USE_UPNP= USE_IPV6=1 BDB_INCLUDE_PATH='/usr/include/db4.8'
|
||||
strip casinocoind
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
The release is built with GCC and then "strip casinocoind" to strip the debug
|
||||
symbols, which reduces the executable size by about 90%.
|
||||
|
||||
|
||||
miniupnpc
|
||||
---------
|
||||
tar -xzvf miniupnpc-1.6.tar.gz
|
||||
cd miniupnpc-1.6
|
||||
make
|
||||
sudo su
|
||||
make install
|
||||
|
||||
|
||||
Berkeley DB
|
||||
-----------
|
||||
You need Berkeley DB 4.8. If you have to build Berkeley DB yourself:
|
||||
../dist/configure --enable-cxx
|
||||
make
|
||||
|
||||
|
||||
Boost
|
||||
-----
|
||||
If you need to build Boost yourself:
|
||||
sudo su
|
||||
./bootstrap.sh
|
||||
./bjam install
|
||||
|
||||
|
||||
Security
|
||||
--------
|
||||
To help make your casinocoin installation more secure by making certain attacks impossible to
|
||||
exploit even if a vulnerability is found, you can take the following measures:
|
||||
|
||||
* Position Independent Executable
|
||||
Build position independent code to take advantage of Address Space Layout Randomization
|
||||
offered by some kernels. An attacker who is able to cause execution of code at an arbitrary
|
||||
memory location is thwarted if he doesn't know where anything useful is located.
|
||||
The stack and heap are randomly located by default but this allows the code section to be
|
||||
randomly located as well.
|
||||
|
||||
On an Amd64 processor where a library was not compiled with -fPIC, this will cause an error
|
||||
such as: "relocation R_X86_64_32 against `......' can not be used when making a shared object;"
|
||||
|
||||
To build with PIE, use:
|
||||
make -f makefile.unix ... -e PIE=1
|
||||
|
||||
To test that you have built PIE executable, install scanelf, part of paxutils, and use:
|
||||
scanelf -e ./casinocoin
|
||||
|
||||
The output should contain:
|
||||
TYPE
|
||||
ET_DYN
|
||||
|
||||
* Non-executable Stack
|
||||
If the stack is executable then trivial stack based buffer overflow exploits are possible if
|
||||
vulnerable buffers are found. By default, casinocoin should be built with a non-executable stack
|
||||
but if one of the libraries it uses asks for an executable stack or someone makes a mistake
|
||||
and uses a compiler extension which requires an executable stack, it will silently build an
|
||||
executable without the non-executable stack protection.
|
||||
|
||||
To verify that the stack is non-executable after compiling use:
|
||||
scanelf -e ./casinocoin
|
||||
|
||||
the output should contain:
|
||||
STK/REL/PTL
|
||||
RW- R-- RW-
|
||||
|
||||
The STK RW- means that the stack is readable and writeable but not executable.
|
||||
99
doc/coding.txt
Normal file
99
doc/coding.txt
Normal file
@@ -0,0 +1,99 @@
|
||||
Please be consistent with the existing coding style.
|
||||
|
||||
Block style:
|
||||
|
||||
bool Function(char* psz, int n)
|
||||
{
|
||||
// Comment summarising what this section of code does
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
// When something fails, return early
|
||||
if (!Something())
|
||||
return false;
|
||||
...
|
||||
}
|
||||
|
||||
// Success return is usually at the end
|
||||
return true;
|
||||
}
|
||||
|
||||
- ANSI/Allman block style
|
||||
- 4 space indenting, no tabs
|
||||
- No extra spaces inside parenthesis; please don't do ( this )
|
||||
- No space after function names, one space after if, for and while
|
||||
|
||||
Variable names begin with the type in lowercase, like nSomeVariable.
|
||||
Please don't put the first word of the variable name in lowercase like
|
||||
someVariable.
|
||||
|
||||
Common types:
|
||||
n integer number: short, unsigned short, int, unsigned int,
|
||||
int64, uint64, sometimes char if used as a number
|
||||
d double, float
|
||||
f flag
|
||||
hash uint256
|
||||
p pointer or array, one p for each level of indirection
|
||||
psz pointer to null terminated string
|
||||
str string object
|
||||
v vector or similar list objects
|
||||
map map or multimap
|
||||
set set or multiset
|
||||
bn CBigNum
|
||||
|
||||
-------------------------
|
||||
Locking/mutex usage notes
|
||||
|
||||
The code is multi-threaded, and uses mutexes and the
|
||||
CRITICAL_BLOCK/TRY_CRITICAL_BLOCK macros to protect data structures.
|
||||
|
||||
Deadlocks due to inconsistent lock ordering (thread 1 locks cs_main
|
||||
and then cs_wallet, while thread 2 locks them in the opposite order:
|
||||
result, deadlock as each waits for the other to release its lock) are
|
||||
a problem. Compile with -DDEBUG_LOCKORDER to get lock order
|
||||
inconsistencies reported in the debug.log file.
|
||||
|
||||
Re-architecting the core code so there are better-defined interfaces
|
||||
between the various components is a goal, with any necessary locking
|
||||
done by the components (e.g. see the self-contained CKeyStore class
|
||||
and its cs_KeyStore lock for example).
|
||||
|
||||
-------
|
||||
Threads
|
||||
|
||||
StartNode : Starts other threads.
|
||||
|
||||
ThreadGetMyExternalIP : Determines outside-the-firewall IP address,
|
||||
sends addr message to connected peers when it determines it.
|
||||
|
||||
ThreadIRCSeed : Joins IRC bootstrapping channel, watching for new
|
||||
peers and advertising this node's IP address.
|
||||
|
||||
ThreadSocketHandler : Sends/Receives data from peers on port 9333.
|
||||
|
||||
ThreadMessageHandler : Higher-level message handling (sending and
|
||||
receiving).
|
||||
|
||||
ThreadOpenConnections : Initiates new connections to peers.
|
||||
|
||||
ThreadTopUpKeyPool : replenishes the keystore's keypool.
|
||||
|
||||
ThreadCleanWalletPassphrase : re-locks an encrypted wallet after user
|
||||
has unlocked it for a period of time.
|
||||
|
||||
SendingDialogStartTransfer : used by pay-via-ip-address code (obsolete)
|
||||
|
||||
ThreadDelayedRepaint : repaint the gui
|
||||
|
||||
ThreadFlushWalletDB : Close the wallet.dat file if it hasn't been used
|
||||
in 500ms.
|
||||
|
||||
ThreadRPCServer : Remote procedure call handler, listens on port 9332
|
||||
for connections and services them.
|
||||
|
||||
ThreadBitcoinMiner : Generates casinocoins
|
||||
|
||||
ThreadMapPort : Universal plug-and-play startup/shutdown
|
||||
|
||||
Shutdown : Does an orderly shutdown of everything
|
||||
|
||||
ExitTimeout : Windows-only, sleeps 5 seconds then exits application
|
||||
152
doc/readme-qt.rst
Normal file
152
doc/readme-qt.rst
Normal file
@@ -0,0 +1,152 @@
|
||||
CasinoCoin-Qt: Qt4 GUI for CasinoCoin
|
||||
================================
|
||||
|
||||
Build instructions
|
||||
===================
|
||||
|
||||
Debian
|
||||
-------
|
||||
|
||||
First, make sure that the required packages for Qt4 development of your
|
||||
distribution are installed, for Debian and Ubuntu these are:
|
||||
|
||||
::
|
||||
|
||||
apt-get install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev \
|
||||
libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev \
|
||||
libssl-dev libdb4.8++-dev
|
||||
|
||||
then execute the following:
|
||||
|
||||
::
|
||||
|
||||
qmake
|
||||
make
|
||||
|
||||
Alternatively, install `Qt Creator`_ and open the `casinocoin-qt.pro` file.
|
||||
|
||||
An executable named `casinocoin-qt` will be built.
|
||||
|
||||
.. _`Qt Creator`: http://qt.nokia.com/downloads/
|
||||
|
||||
Windows
|
||||
--------
|
||||
|
||||
Windows build instructions:
|
||||
|
||||
- Download the `Qt Windows SDK`_ and install it. You don't need the Symbian stuff, just the desktop Qt.
|
||||
|
||||
- Download and extract the `dependencies archive`_ [#]_, or compile openssl, boost and dbcxx yourself.
|
||||
|
||||
- Copy the contents of the folder "deps" to "X:\\QtSDK\\mingw", replace X:\\ with the location where you installed the Qt SDK. Make sure that the contents of "deps\\include" end up in the current "include" directory.
|
||||
|
||||
- Open the bitcoin-qt.pro file in Qt Creator and build as normal (ctrl-B)
|
||||
|
||||
.. _`Qt Windows SDK`: http://qt.nokia.com/downloads/sdk-windows-cpp
|
||||
.. _`dependencies archive`: https://download.visucore.com/bitcoin/qtgui_deps_1.zip
|
||||
.. [#] PGP signature: https://download.visucore.com/bitcoin/qtgui_deps_1.zip.sig (signed with RSA key ID `610945D0`_)
|
||||
.. _`610945D0`: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x610945D0
|
||||
|
||||
|
||||
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 `MacPorts`_.
|
||||
|
||||
- Execute the following commands in a terminal to get the dependencies:
|
||||
|
||||
::
|
||||
|
||||
sudo port selfupdate
|
||||
sudo port install boost db48 miniupnpc
|
||||
|
||||
- Open the bitcoin-qt.pro file in Qt Creator and build as normal (cmd-B)
|
||||
|
||||
.. _`Qt Mac OS X SDK`: http://qt.nokia.com/downloads/sdk-mac-os-cpp
|
||||
.. _`MacPorts`: http://www.macports.org/install.php
|
||||
|
||||
|
||||
Build configuration options
|
||||
============================
|
||||
|
||||
UPnP port forwarding
|
||||
---------------------
|
||||
|
||||
To use UPnP for port forwarding behind a NAT router (recommended, as more connections overall allow for a faster and more stable casinocoin experience), pass the following argument to qmake:
|
||||
|
||||
::
|
||||
|
||||
qmake "USE_UPNP=1"
|
||||
|
||||
(in **Qt Creator**, you can find the setting for additional qmake arguments under "Projects" -> "Build Settings" -> "Build Steps", then click "Details" next to **qmake**)
|
||||
|
||||
This requires miniupnpc for UPnP port mapping. It can be downloaded from
|
||||
http://miniupnp.tuxfamily.org/files/. UPnP support is not compiled in by default.
|
||||
|
||||
Set USE_UPNP to a different value to control this:
|
||||
|
||||
+------------+--------------------------------------------------------------------------+
|
||||
| USE_UPNP=- | no UPnP support, miniupnpc not required; |
|
||||
+------------+--------------------------------------------------------------------------+
|
||||
| USE_UPNP=0 | (the default) built with UPnP, support turned off by default at runtime; |
|
||||
+------------+--------------------------------------------------------------------------+
|
||||
| USE_UPNP=1 | build with UPnP support turned on by default at runtime. |
|
||||
+------------+--------------------------------------------------------------------------+
|
||||
|
||||
Notification support for recent (k)ubuntu versions
|
||||
---------------------------------------------------
|
||||
|
||||
To see desktop notifications on (k)ubuntu versions starting from 10.04, enable usage of the
|
||||
FreeDesktop notification interface through DBUS using the following qmake option:
|
||||
|
||||
::
|
||||
|
||||
qmake "USE_DBUS=1"
|
||||
|
||||
Generation of QR codes
|
||||
-----------------------
|
||||
|
||||
libqrencode may be used to generate QRCode images for payment requests.
|
||||
It can be downloaded from http://fukuchi.org/works/qrencode/index.html.en, or installed via your package manager. Pass the USE_QRCODE
|
||||
flag to qmake to control this:
|
||||
|
||||
+--------------+--------------------------------------------------------------------------+
|
||||
| USE_QRCODE=0 | (the default) No QRCode support - libarcode not required |
|
||||
+--------------+--------------------------------------------------------------------------+
|
||||
| USE_QRCODE=1 | QRCode support enabled |
|
||||
+--------------+--------------------------------------------------------------------------+
|
||||
|
||||
|
||||
Berkely DB version warning
|
||||
==========================
|
||||
|
||||
A warning for people using the *static binary* version of CasinoCoin on a Linux/UNIX-ish system (tl;dr: **Berkely DB databases are not forward compatible**).
|
||||
|
||||
The static binary version of CasinoCoin is linked against libdb4.8 (see also `this Debian issue`_).
|
||||
|
||||
Now the nasty thing is that databases from 5.X are not compatible with 4.X.
|
||||
|
||||
If the globally installed development package of Berkely DB installed on your system is 5.X, any source you
|
||||
build yourself will be linked against that. The first time you run with a 5.X version the database will be upgraded,
|
||||
and 4.X cannot open the new format. This means that you cannot go back to the old statically linked version without
|
||||
significant hassle!
|
||||
|
||||
.. _`this Debian issue`: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=621425
|
||||
|
||||
Ubuntu 11.10 warning
|
||||
====================
|
||||
|
||||
Ubuntu 11.10 has a package called 'qt-at-spi' installed by default. At the time of writing, having that package
|
||||
installed causes casinocoin-qt to crash intermittently. The issue has been reported as `launchpad bug 857790`_, but
|
||||
isn't yet fixed.
|
||||
|
||||
Until the bug is fixed, you can remove the qt-at-spi package to work around the problem, though this will presumably
|
||||
disable screen reader functionality for Qt apps:
|
||||
|
||||
::
|
||||
|
||||
sudo apt-get remove qt-at-spi
|
||||
|
||||
.. _`launchpad bug 857790`: https://bugs.launchpad.net/ubuntu/+source/qt-at-spi/+bug/857790
|
||||
143
doc/release-process.txt
Normal file
143
doc/release-process.txt
Normal file
@@ -0,0 +1,143 @@
|
||||
* update translations (ping tcatm on IRC for now)
|
||||
|
||||
* update (commit) version in sources
|
||||
bitcoin-qt.pro
|
||||
src/version.h
|
||||
share/setup.nsi
|
||||
doc/README*
|
||||
|
||||
* tag version in git
|
||||
|
||||
git tag -a v0.5.1
|
||||
|
||||
* write release notes. git shortlog helps a lot:
|
||||
|
||||
git shortlog --no-merges v0.5.0..
|
||||
|
||||
* perform gitian builds
|
||||
|
||||
* From a directory containing the casinocoin source, gitian-builder and gitian.sigs
|
||||
export SIGNER=(your gitian key, ie bluematt, sipa, etc)
|
||||
export VERSION=0.5.1
|
||||
cd ./gitian-builder
|
||||
|
||||
* Fetch and build inputs:
|
||||
mkdir -p inputs; cd inputs/
|
||||
wget 'http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.6.tar.gz' -O miniupnpc-1.6.tar.gz
|
||||
wget 'http://www.openssl.org/source/openssl-1.0.1b.tar.gz'
|
||||
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
|
||||
wget 'http://zlib.net/zlib-1.2.7.tar.gz'
|
||||
wget 'ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.5.12.tar.gz'
|
||||
wget 'http://fukuchi.org/works/qrencode/qrencode-3.2.0.tar.bz2'
|
||||
wget 'http://downloads.sourceforge.net/project/boost/boost/1.47.0/boost_1_47_0.tar.bz2'
|
||||
wget 'http://download.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.4.tar.gz'
|
||||
cd ..
|
||||
./bin/gbuild ../casinocoin/contrib/gitian-descriptors/boost-win32.yml
|
||||
cp build/out/boost-win32-1.47.0-gitian.zip inputs/
|
||||
./bin/gbuild ../casinocoin/contrib/gitian-descriptors/qt-win32.yml
|
||||
cp build/out/qt-win32-4.7.4-gitian.zip inputs/
|
||||
./bin/gbuild ../casinocoin/contrib/gitian-descriptors/deps-win32.yml
|
||||
cp build/out/casinocoin-deps-0.0.3.zip inputs/
|
||||
|
||||
* Build casinocoind and casinocoin-qt on Linux32, Linux64, and Win32:
|
||||
./bin/gbuild --commit casinocoin=v${VERSION} ../casinocoin/contrib/gitian-descriptors/gitian.yml
|
||||
./bin/gsign --signer $SIGNER --release ${VERSION} --destination ../gitian.sigs/ ../casinocoin/contrib/gitian-descriptors/gitian.yml
|
||||
pushd build/out
|
||||
zip -r casinocoin-${VERSION}-linux-gitian.zip *
|
||||
mv casinocoin-${VERSION}-linux-gitian.zip ../../
|
||||
popd
|
||||
./bin/gbuild --commit casinocoin=v${VERSION} ../casinocoin/contrib/gitian-descriptors/gitian-win32.yml
|
||||
./bin/gsign --signer $SIGNER --release ${VERSION}-win32 --destination ../gitian.sigs/ ../casinocoin/contrib/gitian-descriptors/gitian-win32.yml
|
||||
pushd build/out
|
||||
zip -r casinocoin-${VERSION}-win32-gitian.zip *
|
||||
mv casinocoin-${VERSION}-win32-gitian.zip ../../
|
||||
popd
|
||||
|
||||
Build output expected:
|
||||
1. linux 32-bit and 64-bit binaries + source (casinocoin-${VERSION}-linux-gitian.zip)
|
||||
2. windows 32-bit binary, installer + source (casinocoin-${VERSION}-win32-gitian.zip)
|
||||
3. Gitian signatures (in gitian.sigs/${VERSION}[-win32]/(your gitian key)/
|
||||
|
||||
* repackage gitian builds for release as stand-alone zip/tar/installer exe
|
||||
|
||||
* Linux .tar.gz:
|
||||
unzip casinocoin-${VERSION}-linux-gitian.zip -d casinocoin-${VERSION}-linux
|
||||
tar czvf casinocoin-${VERSION}-linux.tar.gz casinocoin-${VERSION}-linux
|
||||
rm -rf casinocoin-${VERSION}-linux
|
||||
|
||||
* Windows .zip and setup.exe:
|
||||
unzip casinocoin-${VERSION}-win32-gitian.zip -d casinocoin-${VERSION}-win32
|
||||
mv casinocoin-${VERSION}-win32/casinocoin-*-setup.exe .
|
||||
zip -r casinocoin-${VERSION}-win32.zip casinocoin-${VERSION}-win32
|
||||
rm -rf casinocoin-${VERSION}-win32
|
||||
|
||||
* perform Mac build
|
||||
See this blog post for how Gavin set up his build environment to build the OSX
|
||||
release; note that a patched version of macdeployqt is not needed anymore, as
|
||||
the required functionality and fixes are implemented directly in macdeployqtplus:
|
||||
http://gavintech.blogspot.com/2011/11/deploying-bitcoin-qt-on-osx.html
|
||||
Gavin also had trouble with the macports py27-appscript package; he
|
||||
ended up installing a version that worked with: /usr/bin/easy_install-2.7 appscript
|
||||
|
||||
qmake RELEASE=1 USE_UPNP=1 USE_QRCODE=1 bitcoin-qt.pro
|
||||
make
|
||||
export QTDIR=/opt/local/share/qt4 # needed to find translations/qt_*.qm files
|
||||
T=$(contrib/qt_translations.py $QTDIR/translations src/qt/locale)
|
||||
python2.7 contrib/macdeploy/macdeployqtplus CasinoCoin-Qt.app -add-qt-tr $T -dmg -fancy contrib/macdeploy/fancy.plist
|
||||
|
||||
Build output expected:
|
||||
CasinoCoin-Qt.dmg
|
||||
|
||||
* upload builds to SourceForge
|
||||
|
||||
* create SHA256SUMS for builds, and PGP-sign it
|
||||
|
||||
* update bitcoin.org version
|
||||
make sure all OS download links go to the right versions
|
||||
|
||||
* update forum version
|
||||
|
||||
* update wiki download links
|
||||
|
||||
* update wiki changelog: https://en.bitcoin.it/wiki/Changelog
|
||||
|
||||
* Commit your signature to gitian.sigs:
|
||||
pushd gitian.sigs
|
||||
git add ${VERSION}/${SIGNER}
|
||||
git add ${VERSION}-win32/${SIGNER}
|
||||
git commit -a
|
||||
git push # Assuming you can push to the gitian.sigs tree
|
||||
popd
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
* After 3 or more people have gitian-built, repackage gitian-signed zips:
|
||||
|
||||
* From a directory containing bitcoin source, gitian.sigs and gitian zips
|
||||
export VERSION=0.5.1
|
||||
mkdir bitcoin-${VERSION}-linux-gitian
|
||||
pushd bitcoin-${VERSION}-linux-gitian
|
||||
unzip ../bitcoin-${VERSION}-linux-gitian.zip
|
||||
mkdir gitian
|
||||
cp ../bitcoin/contrib/gitian-downloader/*.pgp ./gitian/
|
||||
for signer in $(ls ../gitian.sigs/${VERSION}/); do
|
||||
cp ../gitian.sigs/${VERSION}/${signer}/bitcoin-build.assert ./gitian/${signer}-build.assert
|
||||
cp ../gitian.sigs/${VERSION}/${signer}/bitcoin-build.assert.sig ./gitian/${signer}-build.assert.sig
|
||||
done
|
||||
zip -r bitcoin-${VERSION}-linux-gitian.zip *
|
||||
cp bitcoin-${VERSION}-linux-gitian.zip ../
|
||||
popd
|
||||
mkdir bitcoin-${VERSION}-win32-gitian
|
||||
pushd bitcoin-${VERSION}-win32-gitian
|
||||
unzip ../bitcoin-${VERSION}-win32-gitian.zip
|
||||
mkdir gitian
|
||||
cp ../bitcoin/contrib/gitian-downloader/*.pgp ./gitian/
|
||||
for signer in $(ls ../gitian.sigs/${VERSION}-win32/); do
|
||||
cp ../gitian.sigs/${VERSION}-win32/${signer}/bitcoin-build.assert ./gitian/${signer}-build.assert
|
||||
cp ../gitian.sigs/${VERSION}-win32/${signer}/bitcoin-build.assert.sig ./gitian/${signer}-build.assert.sig
|
||||
done
|
||||
zip -r bitcoin-${VERSION}-win32-gitian.zip *
|
||||
cp bitcoin-${VERSION}-win32-gitian.zip ../
|
||||
popd
|
||||
|
||||
* Upload gitian zips to SourceForge
|
||||
103
doc/translation_process.md
Normal file
103
doc/translation_process.md
Normal file
@@ -0,0 +1,103 @@
|
||||
Translations
|
||||
============
|
||||
|
||||
The Qt GUI can be easily translated into other languages. Here's how we
|
||||
handle those translations.
|
||||
|
||||
Files and Folders
|
||||
-----------------
|
||||
|
||||
### bitcoin-qt.pro
|
||||
|
||||
This file takes care of generating `.qm` files from `.ts` files. It is mostly
|
||||
automated.
|
||||
|
||||
### src/qt/bitcoin.qrc
|
||||
|
||||
This file must be updated whenever a new translation is added. Please note that
|
||||
files must end with `.qm`, not `.ts`.
|
||||
|
||||
<qresource prefix="/translations">
|
||||
<file alias="en">locale/bitcoin_en.qm</file>
|
||||
...
|
||||
</qresource>
|
||||
|
||||
### src/qt/locale/
|
||||
|
||||
This directory contains all translations. Filenames must adhere to this format:
|
||||
|
||||
bitcoin_xx_YY.ts or bitcoin_xx.ts
|
||||
|
||||
#### bitcoin_en.ts (Source file)
|
||||
|
||||
`src/qt/locale/bitcoin_en.ts` is treated in a special way. It is used as the
|
||||
source for all other translations. Whenever a string in the code is changed
|
||||
this file must be updated to reflect those changes. This can be accomplished
|
||||
by running `lupdate` (included in the Qt SDK). Also, a custom script is used
|
||||
to extract strings from the non-Qt parts:
|
||||
|
||||
python share/qt/extract_strings_qt.py
|
||||
lupdate bitcoin-qt.pro -no-obsolete -locations none -ts src/qt/locale/bitcoin_en.ts
|
||||
|
||||
##### Handling of plurals in the source file
|
||||
|
||||
When new plurals are added to the source file, it's important to do the following steps:
|
||||
|
||||
1. Open bitcoin_en.ts in Qt Linguist (also included in the Qt SDK)
|
||||
2. Search for `%n`, which will take you to the parts in the translation that use plurals
|
||||
3. Look for empty `English Translation (Singular)` and `English Translation (Plural)` fields
|
||||
4. Add the appropriate strings for the singular and plural form of the base string
|
||||
5. Mark the item as done (via the green arrow symbol in the toolbar)
|
||||
6. Repeat from step 2. until all singular and plural forms are in the source file
|
||||
7. Save the source file
|
||||
|
||||
##### Creating the pull-request
|
||||
|
||||
An updated source file should be merged to github and Transifex will pick it
|
||||
up from there (can take some hours). Afterwards the new strings show up as "Remaining"
|
||||
in Transifex and can be translated.
|
||||
|
||||
To create the pull-request you have to do:
|
||||
|
||||
git add src/qt/bitcoinstrings.cpp src/qt/locale/bitcoin_en.ts
|
||||
git commit
|
||||
|
||||
Syncing with Transifex
|
||||
----------------------
|
||||
|
||||
We are using https://transifex.com as a frontend for translating the client.
|
||||
|
||||
https://www.transifex.com/projects/p/bitcoin/resource/tx/
|
||||
|
||||
The "Transifex client" (see: http://help.transifex.com/features/client/)
|
||||
will help with fetching new translations from Transifex. Use the following
|
||||
config to be able to connect with the client:
|
||||
|
||||
### .tx/config
|
||||
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[bitcoin.tx]
|
||||
file_filter = src/qt/locale/bitcoin_<lang>.ts
|
||||
source_file = src/qt/locale/bitcoin_en.ts
|
||||
source_lang = en
|
||||
|
||||
### .tx/config (for Windows)
|
||||
|
||||
[main]
|
||||
host = https://www.transifex.com
|
||||
|
||||
[bitcoin.tx]
|
||||
file_filter = src\qt\locale\bitcoin_<lang>.ts
|
||||
source_file = src\qt\locale\bitcoin_en.ts
|
||||
source_lang = en
|
||||
|
||||
It is also possible to directly download new translations one by one from the Transifex website.
|
||||
|
||||
### Fetching new translations
|
||||
|
||||
1. `tx pull -a`
|
||||
2. update `src/qt/bitcoin.qrc` manually or via
|
||||
`ls src/qt/locale/*ts|xargs -n1 basename|sed 's/\(bitcoin_\(.*\)\).ts/<file alias="\2">locale/\1.qm<\/file>/'`
|
||||
3. `git add` new translations from `src/qt/locale/`
|
||||
33
doc/unit-tests.txt
Normal file
33
doc/unit-tests.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
Compiling/running bitcoind unit tests
|
||||
------------------------------------
|
||||
|
||||
bitcoind unit tests are in the src/test/ directory; they
|
||||
use the Boost::Test unit-testing framework.
|
||||
|
||||
To compile and run the tests:
|
||||
cd src
|
||||
make -f makefile.unix test_bitcoin # Replace makefile.unix if you're not on unix
|
||||
./test_bitcoin # Runs the unit tests
|
||||
|
||||
If all tests succeed the last line of output will be:
|
||||
*** No errors detected
|
||||
|
||||
To add more tests, add BOOST_AUTO_TEST_CASE's to the existing
|
||||
.cpp files in the test/ directory or add new .cpp files that
|
||||
implement new BOOST_AUTO_TEST_SUITE's (the makefiles are
|
||||
set up to add test/*.cpp to test_bitcoin automatically).
|
||||
|
||||
|
||||
Compiling/running Bitcoin-Qt unit tests
|
||||
---------------------------------------
|
||||
|
||||
Bitcoin-Qt unit tests are in the src/qt/test/ directory; they
|
||||
use the Qt unit-testing framework.
|
||||
|
||||
To compile and run the tests:
|
||||
qmake bitcoin-qt.pro BITCOIN_QT_TEST=1
|
||||
make
|
||||
./bitcoin-qt_test
|
||||
|
||||
To add more tests, add them to the src/qt/test/ directory,
|
||||
the src/qt/test/test_main.cpp file, and bitcoin-qt.pro.
|
||||
Reference in New Issue
Block a user