BitShares Forum

Main => 中文 (Chinese) => Topic started by: bitatom on April 05, 2015, 06:05:02 am

Title: ubuntu 14.04编译轻钱包教程
Post by: bitatom on April 05, 2015, 06:05:02 am
在几位高人的指导下,终于成功编译了轻钱包,记录下来。方便有需要的看看。
轻钱包编译教程:

1、安装库文件
mkdir BitShares && cd BitShares

sudo apt-get install cmake git libreadline-dev uuid-dev g++ libdb++-dev libdb-dev zip libssl-dev openssl build-essential python-dev autotools-dev libicu-dev libbz2-dev libboost-dev libboost-all-dev npm nodejs-legacy

sudo npm install -g lineman

2、安装q4 5.4
wget http://download.qt-project.org/official_releases/qt/5.4/5.4.0/qt-opensource-linux-x64-5.4.0.run

chmod +x qt-opensource-linux-x64-5.4.0.run

sudo ./qt-opensource-linux-x64-5.4.0.run

安装路径到:/opt/Qt5.4.0

安装好后,可以将路径加入系统路径:

export QTDIR=/opt/Qt5.4.1/5.4/gcc_64
export PATH=$QTDIR/bin:$PATH   
export MANPATH=$QTDIR/man:$MANPATH   
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH


3、安装qml-extras到 Qt5.4.0 目录
git clone https://github.com/papyros/qml-extras.git

mkdir qml-extras-build && cd qml-extras-build

/opt/Qt5.4.0/5.4/gcc_64/bin/qmake ../qml-extras

make && make check

sudo make install


make check的时候有个测试google访问的会失败,没有关系。

4、安装qml-material 到 Qt5.4.0 目录
cd ..

git clone https://github.com/nathanhourt/qml-material.git

mkdir qml-material-build && cd qml-material-build

/opt/Qt5.4.0/5.4/gcc_64/bin/qmake ../qml-material

make && make check

sudo make install

cd ..


5、初始化代码

rm -rf bitshares

git clone https://github.com/BitShares/bitshares.git

cd bitshares

git submodule init && git submodule update

cd programs/web_wallet

sudo npm install

cd ../../../

注意:git submodule update可能会失败,进入programs/leveldb,执行git checkout,没有问题就不用这一步。

6、开始编译

cd bitshares

git pull

git checkout bts/0.8.1

git submodule update

cmake -DINCLUDE_QT_WALLET=ON -DINCLUDE_LIGHT_WALLET=ON -DCMAKE_PREFIX_PATH=/opt/Qt5.4.0/5.4/gcc_64/

make forcebuildweb

make

7、运行

Qt client:
BitShares/bitshares/programs/qt_wallet/bin

light wallet
BitShares/bitshares/programs/light_wallet

CLI client
BitShares/bitshares/programs/client

web_wallet
BitShares/bitshares/programs/web_wallet

The CLI client can be run with the "--server" flag to run the backend of the web wallet (make sure to first set up the RPC parameters in the config.json file appropriately)

进入BitShares/bitshares/programs/web_wallet
执行:
npm start

然后可以访问:
http://localhost:8000/

8、问题请教

怎么配置运行,像wallet.bitshares.org那样的在线钱包?
Title: Re: ubuntu 14.04编译轻钱包教程
Post by: cn-members on April 25, 2015, 05:13:50 am
8、问题请教

怎么配置运行,像wallet.bitshares.org那样的在线钱包?

请看这里:
http://www.bts.hk/how-to-deploy-a-web-wallet-service.html
Title: Re: ubuntu 14.04编译轻钱包教程
Post by: abit on April 27, 2015, 06:14:14 am
git submodule init && git submodule update
新版本里这句要改成
Code: [Select]
git submodule update --init --recursive
不然缺少websocket模块编译不了。