forked from super3/coingen
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
20,878 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Submodule bitcoin
added at
b34675
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/bin/sh | ||
#args testcoin Testcoin website github(coingen/testcoin) TST | ||
set -e | ||
mv .git ../bitcoingit | ||
|
||
# General replaces | ||
find . -type f -print0 | xargs -0 sed -b "s/BTC/$5/g" -i | ||
mv README.md ../ | ||
find . -type f -print0 | xargs -0 sed -b "s|github.com/bitcoin/bitcoin|github.com/$4|g" -i | ||
mv ../README.md ./ | ||
|
||
find . -type f -print0 | xargs -0 sed -b "s/bitcoin.org/$3/g" -i | ||
find . -type f -print0 | xargs -0 sed -b "s/bitcoin.conf/"$1".conf/g" -i | ||
|
||
mv README.md README-btc.md | ||
cat README-btc.md | grep -B1000 "Development process" > README2.md | ||
cat README2.md | head -n $(expr `wc -l README2.md | awk '{ print $1 }'` - 1) > README.md | ||
rm README2.md | ||
|
||
for FILE in .gitignore README.md INSTALL share/setup.nsi share/qt/make_windows_icon.sh src/qt/res/bitcoin-qt.rc src/qt/locale/* `find ./contrib/gitian-descriptors -type f` `find ./contrib/gitian-downloader -type f`; do | ||
sed -b "s/bitcoin/$1/g" -i $FILE | ||
sed -b "s/Bitcoin/$2/g" -i $FILE | ||
done | ||
|
||
sed -b "s/(c) 2009-2013 $2/(c) 2009-2013 Bitcoin/g" -i README.md | ||
echo "$2 is based on Bitcoin." >> README.md | ||
echo "Its development tracks Bitcoin's, the following information applies to Bitcoin's developemnt." >> README.md | ||
cat README-btc.md | grep -A1000 "Development process" >> README.md | ||
rm README-btc.md | ||
|
||
sed -b "s/TARGET = bitcoin/TARGET = $1/g" -i bitcoin-qt.pro | ||
|
||
find . -type f -print0 | xargs -0 sed -b "s/Bitcoin-Qt/$2-Qt/g" -i | ||
|
||
for FILE in ./src/makefile.*; do | ||
find . -type f -print0 | xargs -0 sed -b "s/bitcoind.exe/"$1"d.exe/g" -i $FILE | ||
find . -type f -print0 | xargs -0 sed -b "s/test_bitcoin.exe/test_"$1".exe/g" -i $FILE | ||
find . -type f -print0 | xargs -0 sed -b "s/bitcoin-qt.exe/"$1"-qt.exe/g" -i $FILE | ||
find . -type f -print0 | xargs -0 sed -b "s/test_bitcoin/test_"$1"/g" -i $FILE | ||
find . -type f -print0 | xargs -0 sed -b "s/bitcoind/"$1"d/g" -i $FILE | ||
done | ||
|
||
sed "s/bitcoin.png/$1.png/g" -i src/qt/bitcoin.qrc | ||
sed "s/bitcoin_testnet.png/$1_testnet.png/g" -i src/qt/bitcoin.qrc | ||
|
||
for FILE in src/*.cpp src/*.h src/*/*.cpp src/*/*.h; do | ||
if [ "$FILE" = "src/qt/transactiondesc.cpp" ]; then | ||
continue | ||
fi | ||
sed -b '/^[^#include]/ s/"\(.*\)bitcoin\(.*\)"/"\1'$1'\2"/g' -i $FILE | ||
sed -b '/^[^#include]/ s/"\(.*\)Bitcoin\(.*\)"/"\1'$2'\2"/g' -i $FILE | ||
ALLCAPS=`echo $2 | tr '[:lower:]' '[:upper:]'` | ||
sed -b '/^[^#include]/ s/"\(.*\)BITCOIN\(.*\)"/"\1'$ALLCAPS'\2"/g' -i $FILE | ||
done | ||
|
||
rm doc/release-process.md | ||
echo "To get an updated client, go to http://coingen.io" > doc/release-process.md | ||
|
||
mv ../bitcoingit ./.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<div class="row"> | ||
<h2>$NAME</h2> | ||
<div class="progress progress-striped active progress-info"> | ||
<div class="progress-bar" role="progressbar" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100" style="width: 50%;"> | ||
<span class="sr-only">50% Complete</span> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="row"> | ||
<h2>$NAME</h2> | ||
<div class="row"> | ||
<div class="col-md-10"> | ||
<div class="progress progress-success"> | ||
<div class="progress-bar" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;"> | ||
<span class="sr-only">Build Complete</span> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-2"> | ||
<a class="span2 btn btn-primary" href="$URL">Download Result</a> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="row"> | ||
<h2>$NAME</h2> | ||
<h4>Waiting for 6 confirmations of $VALUE BTC sent to $ADDRESS</h4> | ||
<div class="progress progress-striped active progress-info"> | ||
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"> | ||
<span class="sr-only">Not Started</span> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
#!/bin/bash | ||
# ARGS: name pow source(1/0) port branding256.png BTC magic customload rate initValue halfRate premine | ||
set -e | ||
cd /scratch/ | ||
rm -rf bitcoin binaries | ||
git clone /scratch/git/bitcoin-cp bitcoin | ||
cd bitcoin | ||
git reset --hard origin/coingen_$2 | ||
if [ $3 = "0" ]; then | ||
git cherry-pick 1001e5a # NOSOURCE: setup.nsi | ||
fi | ||
git remote rm origin | ||
git config gc.reflogexpire 0 | ||
git config gc.reflogexpireUnreachable 0 | ||
git gc --aggressive --prune=all | ||
git config --unset gc.reflogexpire | ||
git config --unset gc.reflogexpireUnreachable | ||
|
||
cd share/pixmaps/ | ||
cp $5 ./bitcoin256.png | ||
convert -resize 128x128 bitcoin256.png "$1"128.png | ||
convert -resize 64x64 bitcoin256.png "$1"64.png | ||
convert -resize 32x32 bitcoin256.png "$1"32.png | ||
convert -resize 16x16 bitcoin256.png "$1"16.png | ||
convert -resize 55x55 bitcoin256.png ../../doc/$1_logo_doxygen.png | ||
rm ../../doc/bitcoin_logo_doxygen.png | ||
convert -resize 300x300 -gravity Center -extent 164x314 bitcoin256.png nsis-wizard.bmp | ||
convert -resize 57x57 -gravity Center -extent 150x57 ./bitcoin256.png nsis-header.bmp | ||
cp bitcoin256.png ../../src/qt/res/icons/bitcoin.png | ||
cp "$1"16.png ../../src/qt/res/icons/toolbar.png | ||
mv bitcoin256.png "$1"256.png | ||
cd ../qt | ||
./make_windows_icon.sh | ||
rm bitcoin-48.png bitcoin-32.png bitcoin-16.png | ||
cd ../../src/qt/res/icons | ||
rm bitcoin_testnet.png bitcoin_testnet.ico | ||
cp bitcoin.png "$1"_testnet.png | ||
cp bitcoin.ico "$1"_testnet.ico | ||
mv bitcoin.png "$1".png | ||
cp bitcoin.ico /scratch/bitcoin/share/pixmaps/"$1".ico | ||
rm /scratch/bitcoin/share/pixmaps/bitcoin.ico | ||
mv bitcoin.ico "$1".ico | ||
cp toolbar.png toolbar_testnet.png | ||
cd ../images | ||
if [ "$8" = "1" ]; then | ||
convert -resize 400x400 -roll -130-110 -gravity SouthEast -chop 130x110 -gravity NorthWest -extent 480x320 ../../../../share/pixmaps/"$1"256.png splash_testnet.png | ||
cp splash_testnet.png splash.png | ||
else | ||
cp /scratch/git/splash.png ./ | ||
cp ./splash.png ./splash_testnet.png | ||
fi | ||
cd /scratch/bitcoin | ||
|
||
git add share/pixmaps/*.png | ||
git add share/pixmaps/*.ico | ||
git add doc/*.png | ||
git add src/qt/res/icons/* | ||
git commit -a -m "Add $1 branding" | ||
|
||
mv .git ../bitcoingit | ||
find . -type f -print0 | xargs -0 sed -b "s/8333/$4/g" -i | ||
find . -type f -print0 | xargs -0 sed -b "s/8332/`expr $4 - 1`/g" -i | ||
mv ../bitcoingit .git | ||
git commit -a -m "Change port numbers to $4/1$4/`expr $4 - 1`/1`expr $4 - 1`" | ||
|
||
/scratch/git/brandname.sh $1 "${1^}" "coingen.io" "coingen/$1" $6 | ||
git commit -a -m "Change names" | ||
|
||
MAGIC="0x${7:0:2}, 0x${7:2:2}, 0x${7:4:2}, 0x${7:6:2}" | ||
sed "s/0xf9, 0xbe, 0xb4, 0xd9/$MAGIC/g" -i src/main.cpp | ||
sed "s/486604799/0x$7/g" -i src/main.cpp | ||
sed "s/1231006505/"`date +%s`"/g" -i src/main.cpp | ||
git commit -a -m "Change network magic and genesis block" | ||
|
||
if [ "${11}" != "210000" -o "${10}" != "50" -o "${9}" != "600"]; then | ||
sed "s/210000/${11}/g" -i src/main.cpp | ||
sed "s/nSubsidy = 50/nSubsidy = ${10}/g" -i src/main.cpp | ||
sed "s/600.0/$9.0/g" -i src/main.cpp | ||
MAXMONEY=`expr ${11} \* ${10} \* 2` | ||
sed "s/21000000/$MAXMONEY/g" -i src/main.h | ||
git commit -a -m "Change block rate/subsidy/block value" | ||
fi | ||
|
||
export PATH=$PATH:/scratch/bin/ | ||
|
||
/scratch/mingw/qt/bin/qmake -spec unsupported/win32-g++-cross MINIUPNPC_LIB_PATH=/scratch/mingw/miniupnpc/ MINIUPNPC_INCLUDE_PATH=/scratch/mingw/ BDB_LIB_PATH=/scratch/mingw/db-4.8.30.NC/build_unix/ BDB_INCLUDE_PATH=/scratch/mingw/db-4.8.30.NC/build_unix/ BOOST_LIB_PATH=/scratch/mingw/boost_1_51_0/stage/lib/ BOOST_INCLUDE_PATH=/scratch/mingw/boost_1_51_0/ BOOST_LIB_SUFFIX=-mt-s BOOST_THREAD_LIB_SUFFIX=_win32-mt-s OPENSSL_LIB_PATH=/scratch/mingw/openssl-1.0.1e OPENSSL_INCLUDE_PATH=/scratch/mingw/openssl-1.0.1e/include/ QRENCODE_LIB_PATH=/scratch/mingw/qrencode-3.4.3/.libs/ QRENCODE_INCLUDE_PATH=/scratch/mingw/qrencode-3.4.3/ USE_QRCODE=1 INCLUDEPATH=/scratch/mingw/ DEFINES=BOOST_THREAD_USE_LIB BITCOIN_NEED_QT_PLUGINS=1 QMAKE_LRELEASE=lrelease USE_BUILD_INFO=1 QMAKE_UIC=uic QMAKE_RCC=rcc QMAKE_MOC=moc | ||
make -j2 | ||
mkdir -p /scratch/binaries/win32 | ||
i686-w64-mingw32-strip release/"$1"-qt.exe | ||
cp release/"$1"-qt.exe /scratch/binaries/win32/ | ||
|
||
cd src | ||
make -f makefile.linux-mingw DEPSDIR=/scratch/mingw/ "$1"d.exe USE_UPNP=0 -j2 "xLDFLAGS=-static-libgcc -static-libstdc++" | ||
i686-w64-mingw32-strip "$1"d.exe | ||
cp "$1"d.exe /scratch/binaries/win32/ | ||
cd .. | ||
|
||
make clean | ||
qmake RELEASE=1 | ||
sed 's/-march=x86-64/-m32/g' -i Makefile | ||
sed 's/-m64/-m32/g' -i Makefile | ||
make -j2 | ||
mkdir -p /scratch/binaries/linux | ||
strip "$1"-qt | ||
cp "$1"-qt /scratch/binaries/linux/ | ||
|
||
cd src | ||
make -f makefile.unix clean | ||
make -f makefile.unix STATIC=1 USE_UPNP=0 DEBUGFLAGS=-m32 -j2 CXXFLAGS=-m32 | ||
strip "$1"d | ||
cp "$1"d /scratch/binaries/linux/ | ||
|
||
cd .. | ||
git clean -f -x -d | ||
|
||
mkdir -p nsis/src | ||
if [ $3 = "1" ]; then | ||
git archive HEAD | tar -x -C nsis | ||
cd nsis | ||
else | ||
cd nsis | ||
mkdir share | ||
cp ../share/setup.nsi ./share/ | ||
mkdir share/pixmaps | ||
cp ../share/pixmaps/"$1".ico ./share/pixmaps/ | ||
cp ../share/pixmaps/nsis-header.bmp ./share/pixmaps/ | ||
cp ../share/pixmaps/nsis-wizard.bmp ./share/pixmaps/ | ||
fi | ||
mkdir release | ||
cp /scratch/binaries/win32/"$1"-qt.exe release/ | ||
cp /scratch/binaries/win32/"$1"d.exe src/ | ||
cd src | ||
makensis ../share/setup.nsi | ||
|
||
cd /scratch | ||
mkdir $1 | ||
cd $1 | ||
cp /scratch/bitcoin/nsis/share/*.exe ./ | ||
if [ $3 = "1" ]; then | ||
mv ../bitcoin $1 | ||
cd $1 | ||
git reset --hard | ||
git clean -f -x -d | ||
cd .. | ||
tar -czf $1-src.tar.gz $1 | ||
rm -rf $1 | ||
fi | ||
mv /scratch/binaries ./ | ||
cd /scratch | ||
zip --recurse-paths $1 $1 | ||
rm -r $1/ | ||
mv $1.zip /scratch/output/$7/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
rm bitcoin.tar.gz | ||
pushd bitcoin | ||
git checkout coingen_scrypt | ||
git rebase -i coingen_base | ||
git checkout coingen_sha256 | ||
git rebase -i coingen_base | ||
git checkout master | ||
cd .. | ||
tar -czf bitcoin.tar.gz bitcoin | ||
cd bitcoin | ||
git checkout coingen_base | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import time | ||
|
||
status_done_text = "" | ||
with open("/scratch/git/coin_replace_done.html", "r") as f: | ||
status_done_text = f.read() | ||
|
||
status_building_text = "" | ||
with open("/scratch/git/coin_replace_building.html", "r") as f: | ||
status_building_text = f.read() | ||
|
||
status_waiting_text = "" | ||
with open("/scratch/git/coin_replace_waiting.html", "r") as f: | ||
status_waiting_text = f.read() | ||
|
||
while True: | ||
status_list_first = "" | ||
status_list_second = "" | ||
status_list_third = "" | ||
for magic in os.listdir('/scratch/output/'): | ||
try: | ||
btcfile = open('/scratch/output/' + magic + '/btc_info.txt') | ||
cost = float(btcfile.readline().rstrip()) | ||
recv_address = btcfile.readline().rstrip() | ||
current_val = float(btcfile.readline().rstrip()) | ||
infofile = open('/scratch/output/' + magic + '/info.txt') | ||
infofile.readline() | ||
name = infofile.readline().rstrip() | ||
abrev = infofile.readline().rstrip() | ||
proofOW = infofile.readline().rstrip() | ||
port = infofile.readline().rstrip() | ||
customload = 1 if infofile.readline().rstrip() == "true" else 0 | ||
source = 1 if infofile.readline().rstrip() == "true" else 0 | ||
blockRate = infofile.readline().rstrip() | ||
initValue = infofile.readline().rstrip() | ||
halfRate = infofile.readline().rstrip() | ||
hidden = 1 if infofile.readline().rstrip() == "true" else 0 | ||
|
||
if (current_val < cost): | ||
print(magic + ' hasnt paid yet (' + str(current_val) + '/' + str(cost) + ')') | ||
if hidden is 0: | ||
local_status = status_waiting_text | ||
local_status = local_status.replace("$NAME", name) | ||
local_status = local_status.replace("$VALUE", str(cost - current_val)) | ||
local_status = local_status.replace("$ADDRESS", recv_address) | ||
status_list_third += local_status | ||
continue | ||
if os.path.isfile('/scratch/output/' + magic + '/done'): | ||
if hidden is 0: | ||
local_status = status_done_text | ||
local_status = local_status.replace("$NAME", name) | ||
local_status = local_status.replace("$URL", "http://coingen.bluematt.me/build/" + magic + ".zip") | ||
status_list_first += local_status | ||
continue | ||
|
||
print('Building ' + name) | ||
retVal = os.system('/scratch/git/makecoin.sh ' + name + ' ' + proofOW + ' ' + str(source) + ' ' + port + ' /scratch/output/' + magic + '/logo.png ' + abrev + ' ' + magic + ' ' + str(customload) + ' ' + blockRate + ' ' + initValue + ' ' + halfRate) | ||
if retVal == 0: | ||
os.system('mv /scratch/output/' + magic + '/' + name + '.zip /var/www/build/' + magic + '.zip') | ||
os.system('touch /scratch/output/' + magic + '/done') | ||
except: | ||
print('Got an exception') | ||
|
||
with open("/scratch/git/status.html", 'r') as status_file: | ||
status_contents = status_file.read() | ||
status_list = status_list_first + status_list_second + status_list_third | ||
status_contents = status_contents.replace("REPLACE", status_list) | ||
output = open("/var/www/status.html", "w") | ||
output.write(status_contents) | ||
|
||
time.sleep(10) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.