Skip to content

Commit

Permalink
Merge pull request #20 from PirateNetwork/fixes
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
CryptoForge authored Dec 29, 2020
2 parents dce2b66 + 5217e99 commit 7b528e1
Show file tree
Hide file tree
Showing 39 changed files with 1,030 additions and 755 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,13 @@ contrib/debian/substvars

src/rpcmisc~.cpp
src/komodo-cli
src/pirate-cli
src/komodod
src/pirated
src/komodo-tx
src/pirate-tx
src/komodo-test
src/pirate-test
src/wallet-utility
src/komodo-cli.exe
src/komodod.exe
Expand Down
56 changes: 45 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,33 +44,48 @@ sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool libncurses-dev unzip git python zlib1g-dev wget bsdmainutils automake libboost-all-dev libssl-dev libprotobuf-dev protobuf-compiler libqrencode-dev libdb++-dev ntp ntpdate nano software-properties-common curl libevent-dev libcurl4-gnutls-dev cmake clang libsodium-dev -y
```

### Build Komodo
### Build Pirate

This software is based on zcash and considered experimental and is continously undergoing heavy development.
This software is based on zcash and considered experimental and is continuously undergoing heavy development.

The dev branch is considered the bleeding edge codebase while the master-branch is considered tested (unit tests, runtime tests, functionality). At no point of time do the Komodo Platform developers take any responsbility for any damage out of the usage of this software.
Komodo builds for all operating systems out of the same codebase. Follow the OS specific instructions from below.
The dev branch is considered the bleeding edge codebase while the master-branch is considered tested (unit tests, runtime tests, functionality). At no point of time do the Pirate developers take any responsibility for any damage out of the usage of this software.
Pirate builds for all operating systems out of the same codebase. Follow the OS specific instructions from below.

#### Linux
```shell
git clone https://github.com/PirateNetwork/pirate --branch master
cd pirate
# This step is not required for when using the Qt GUI
./zcutil/fetch-params.sh

# -j8 = using 8 threads for the compilation - replace 8 with number of threads you want to use; -j$(nproc) for all threads available

#For CLI binaries
./zcutil/build.sh -j8
# This can take some time.

#For qt GUI binaries
./zcutil/build-qt-linux.sh -j8.
```

#### OSX
Ensure you have [brew](https://brew.sh) and the command line tools installed (comes automatically with XCode) and run:
```shell
brew update && brew install gcc@6
brew update
brew upgrade
brew tap discoteq/discoteq; brew install flock
brew install autoconf autogen automake gcc@8 binutilsprotobuf coreutils wget python3
git clone https://github.com/PirateNetwork/pirate --branch master
cd pirate
# This step is not required for when using the Qt GUI
./zcutil/fetch-params.sh

# -j8 = using 8 threads for the compilation - replace 8 with number of threads you want to use; -j$(nproc) for all threads available

#For CLI binaries
./zcutil/build-mac.sh -j8
#This can take some time.

#For qt GUI binaries
./zcutil/build-qt-mac.sh -j8
```

#### Windows
Expand All @@ -88,19 +103,38 @@ sudo update-alternatives --config x86_64-w64-mingw32-g++

git clone https://github.com/PirateNetwork/pirate --branch master
cd pirate
# This step is not required for when using the Qt GUI
./zcutil/fetch-params.sh

# -j8 = using 8 threads for the compilation - replace 8 with number of threads you want to use; -j$(nproc) for all threads available

#For CLI binaries
./zcutil/build-win.sh -j8
#This can take some time.

#For qt GUI binaries
./zcutil/build-qt-win.sh -j8
```
**pirate is experimental and a work-in-progress.** Use at your own risk.
**Pirate is experimental and a work-in-progress.** Use at your own risk.

To run the Pirate GUI wallet:

**Linux**
`pirate-qt-linux`

**OSX**
`pirate-qt-mac`

**Windows**
`pirate-qt-win.exe`


To run the daemon for PirateChain:
`komodod -ac_name=PIRATE -ac_supply=0 -ac_reward=25600000000 -ac_halving=77777 -ac_private=1`
both komodod and komodo-cl are located in the src directory after successfully building
`pirated`
both pirated and pirate-cli are located in the src directory after successfully building

To reset the PirateChain blockchain change into the *~/.komodo/PIRATE* data directory and delete the corresponding files by running `rm -rf blocks chainstate debug.log komodostate db.log` and restart daemon

To initiate a bootstrap download on the GUI wallet add bootstrap=1 to the PIRATE.conf file.


**Pirate is based on Komodo which is unfinished and highly experimental.** Use at your own risk.
Expand Down
12 changes: 6 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 3)
define(_CLIENT_VERSION_MINOR, 1)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 50)
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
Expand All @@ -15,10 +15,10 @@ AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([build-aux/m4])

BITCOIN_DAEMON_NAME=komodod
BITCOIN_DAEMON_NAME=pirated
BITCOIN_GUI_NAME=pirate-qt
BITCOIN_CLI_NAME=komodo-cli
BITCOIN_TX_NAME=komodo-tx
BITCOIN_CLI_NAME=pirate-cli
BITCOIN_TX_NAME=pirate-tx

dnl Unless the user specified ARFLAGS, force it to be cr
AC_ARG_VAR(ARFLAGS, [Flags for the archiver, defaults to <cr> if not set])
Expand Down Expand Up @@ -244,7 +244,7 @@ CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"

AC_ARG_WITH([utils],
[AS_HELP_STRING([--with-utils],
[build komodo-cli komodo-tx wallet-utility (default=yes)])],
[build pirate-cli pirate-tx wallet-utility (default=yes)])],
[build_bitcoin_utils=$withval],
[build_bitcoin_utils=yes])

Expand Down Expand Up @@ -845,7 +845,7 @@ AC_MSG_CHECKING([whether to build bitcoind])
AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
AC_MSG_RESULT($build_bitcoind)

AC_MSG_CHECKING([whether to build utils (komodo-cli komodo-tx wallet-utility)])
AC_MSG_CHECKING([whether to build utils (pirate-cli pirate-tx wallet-utility)])
AM_CONDITIONAL([BUILD_BITCOIN_UTILS], [test x$build_bitcoin_utils = xyes])
AC_MSG_RESULT($build_bitcoin_utils)

Expand Down
49 changes: 49 additions & 0 deletions depends/packages/libarchive.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package=libarchive
$(package)_version=3.4.1
$(package)_download_path=https://github.com/libarchive/libarchive/releases/download/v$($(package)_version)
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_download_file=$(package)-$($(package)_version).tar.gz
$(package)_config_opts=--with-sysroot=$(host_prefix)/lib
$(package)_config_opts_linux=--disable-bsdtar --disable-bsdcpio --disable-shared --enable-static --prefix=$(host_prefix) --host=x86_64-unknown-linux-gnu
$(package)_config_opts_mingw32=--disable-bsdtar --disable-bsdcpio --disable-shared --enable-static --prefix=$(host_prefix) --host=x86_64-w64-mingw32
$(package)_config_opts_darwin=--disable-bsdtar --disable-bsdcpio --disable-shared --enable-static --prefix=$(host_prefix)
$(package)_sha256_hash=fcf87f3ad8db2e4f74f32526dee62dd1fb9894782b0a503a89c9d7a70a235191
$(package)_cflags_darwin=-mmacosx-version-min=10.9
$(package)_conf_tool=./configure

$(package)_dependencies=zlib

ifeq ($(build_os),darwin)
define $(package)_set_vars
$(package)_build_env=MACOSX_DEPLOYMENT_TARGET="10.9"
endef
endif

ifeq ($(build_os),linux)
define $(package)_set_vars
$(package)_config_env=LD_LIBRARY_PATH="$(host_prefix)/lib" PKG_CONFIG_LIBDIR="$(host_prefix)/lib/pkgconfig" CPPFLAGS="-I$(host_prefix)/include" LDFLAGS="-L$(host_prefix)/lib"
endef
endif


define $(package)_config_cmds
echo '=== config for $(package):' && \
echo '$($(package)_config_env) $($(package)_conf_tool) $($(package)_config_opts)' && \
echo '=== ' && \
$($(package)_config_env) $($(package)_conf_tool) $($(package)_config_opts)
endef

ifeq ($(build_os),darwin)
define $(package)_build_cmds
$(MAKE) CPPFLAGS="-I$(host_prefix)/include -fPIC" CFLAGS='-mmacosx-version-min=10.9'
endef
else
define $(package)_build_cmds
$(MAKE) CPPFLAGS="-I$(host_prefix)/include -fPIC"
endef
endif

define $(package)_stage_cmds
echo 'Staging dir: $($(package)_staging_dir)$(host_prefix)/' && \
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef
6 changes: 3 additions & 3 deletions depends/packages/libcurl.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package=libcurl
$(package)_version=7.67.0
$(package)_version=7.74.0
$(package)_dependencies=openssl
$(package)_download_path=https://curl.haxx.se/download
$(package)_file_name=curl-$($(package)_version).tar.gz
$(package)_sha256_hash=52af3361cf806330b88b4fe6f483b6844209d47ae196ac46da4de59bb361ab02
$(package)_sha256_hash=e56b3921eeb7a2951959c02db0912b5fcd5fdba5aca071da819e1accf338bbd7
$(package)_config_opts_linux=--disable-shared --enable-static --prefix=$(host_prefix) --host=x86_64-unknown-linux-gnu
$(package)_config_opts_mingw32=--enable-mingw --disable-shared --enable-static --prefix=$(host_prefix) --host=x86_64-w64-mingw32
$(package)_config_opts_darwin=--disable-shared --enable-static --prefix=$(host_prefix)
Expand All @@ -27,7 +27,7 @@ define $(package)_config_cmds
echo '=== config for $(package):' && \
echo '$($(package)_config_env) $($(package)_conf_tool) $($(package)_config_opts)' && \
echo '=== ' && \
$($(package)_config_env) $($(package)_conf_tool) $($(package)_config_opts)
$($(package)_config_env) $($(package)_conf_tool) $($(package)_config_opts)
endef

ifeq ($(build_os),darwin)
Expand Down
6 changes: 3 additions & 3 deletions depends/packages/packages.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ else
endif

qt_native_packages = native_protobuf
qt_packages = qrencode protobuf zlib
qt_packages = qrencode protobuf

qt_linux_packages:=qt expat libxcb xcb_proto libXau xproto freetype fontconfig
qt_android_packages=qt
Expand Down Expand Up @@ -56,7 +56,7 @@ native_packages := native_ccache
wallet_packages=bdb

ifeq ($(host_os),linux)
packages := boost openssl libevent zeromq $(zcash_packages) googletest libcurl #googlemock
packages := boost openssl libevent zeromq $(zcash_packages) zlib libarchive googletest libcurl #googlemock
else
packages := boost openssl libevent zeromq $(zcash_packages) libcurl googletest #googlemock
packages := boost openssl libevent zeromq $(zcash_packages) zlib libarchive libcurl googletest #googlemock
endif
6 changes: 2 additions & 4 deletions makeReleaseMac.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

PACKAGE_DIR="PirateWallet.app"
PACKAGE_DIR="PirateOcean.app"
mkdir ${PACKAGE_DIR}
mkdir ${PACKAGE_DIR}/Contents
mkdir ${PACKAGE_DIR}/Contents/MacOS
Expand All @@ -13,8 +13,6 @@ for binary in "${binaries[@]}";
do
# do the work in the destination directory
cp ${binary} ${PACKAGE_DIR}/Contents/MacOS/
cp zcutil/res/mac-init.sh ${PACKAGE_DIR}/Contents/MacOS/
cp zcutil/res/start.sh ${PACKAGE_DIR}/Contents/MacOS/
cp zcutil/res/Info.plist ${PACKAGE_DIR}/Contents/
cp zcutil/res/PkgInfo ${PACKAGE_DIR}/Contents/
cp src/qt/res/icons/pirate.icns ${PACKAGE_DIR}/Contents/Resources/logo.icns
Expand Down Expand Up @@ -73,4 +71,4 @@ do
done


create-dmg --volname "PirateWallet-v3.0.0" --volicon "zcutil/res/logo.icns" --window-pos 200 120 --icon "PirateWallet.app" 200 190 --app-drop-link 600 185 --hide-extension "PirateWallet.app" --window-size 800 400 --hdiutil-quiet --background zcutil/res/dmgbg.png PirateWallet-v3.0.0.dmg PirateWallet.app
create-dmg --volname "pirate-qt-mac" --volicon "zcutil/res/logo.icns" --window-pos 200 120 --icon "PirateOcean.app" 200 190 --app-drop-link 600 185 --hide-extension "PirateOcean.app" --window-size 800 400 --hdiutil-quiet --background zcutil/res/dmgbg.png pirate-qt-mac.dmg PirateOcean.app
Loading

0 comments on commit 7b528e1

Please sign in to comment.