Compare commits
157 Commits
python3and
...
v0.6
Author | SHA1 | Date | |
---|---|---|---|
|
5f955ba52f | ||
7fd6200fb1 | |||
31fc899060 | |||
ff1f451691 | |||
213519bd93 | |||
32bb2a6e44 | |||
ac2df26e96 | |||
73ecf07dec | |||
3fb34370a7 | |||
11bec55be5 | |||
|
6f35da4096 | ||
|
6139efc377 | ||
|
3211fca953 | ||
|
b6a81f1252 | ||
|
22e22633c2 | ||
|
f0bc74e658 | ||
|
e37d52d950 | ||
|
108b231c1c | ||
|
6fad4f5665 | ||
|
81872c7f2f | ||
|
a31d6c8422 | ||
|
8338a9ee74 | ||
|
208090ce5d | ||
|
e24f4de40e | ||
|
ea50485de2 | ||
|
7b0bf84585 | ||
|
624d96fbb9 | ||
|
8659c5313d | ||
|
814aae5166 | ||
|
36c24cc09a | ||
|
b16515dc09 | ||
|
4a369f70c1 | ||
|
21ae6cb9b0 | ||
|
d9ef4a8e8d | ||
61f64f72c3 | |||
1c4d7655c3 | |||
52d5c1ff03 | |||
2bddae511a | |||
e3ccc3c7c8 | |||
5160a68c28 | |||
44cb975a61 | |||
c35f48bd0b | |||
168c4a5696 | |||
|
9119507b03 | ||
03316496b7 | |||
5a35de6bca | |||
c79636863d | |||
a69732f060 | |||
|
e47b573b3e | ||
|
ece3005f42 | ||
|
d271996ac1 | ||
|
d5f541a2ab | ||
|
9041b8f644 | ||
|
28cfe78e67 | ||
|
05cda087d6 | ||
|
f4c7ac5604 | ||
|
27c58b05f3 | ||
|
31e3d60fb0 | ||
|
e97d02ed78 | ||
|
21faf52f2f | ||
|
a9991a7a5a | ||
|
dbbf454c15 | ||
|
4a54c200d4 | ||
|
9923e97279 | ||
|
80b2bc1c9a | ||
|
059e82e2a2 | ||
|
e534994ee3 | ||
|
77b8b5aa42 | ||
|
af52d95503 | ||
49d731c478 | |||
d9fa6a94f4 | |||
a7da0c0eff | |||
aa7e7dd658 | |||
f18f534c48 | |||
2a165380bb | |||
|
7e1f1d2604 | ||
35a2962552 | |||
c40c70f807 | |||
d6c1845b71 | |||
388de96495 | |||
0967f03b40 | |||
7a1f803c92 | |||
4d8d9b169f | |||
341651973a | |||
|
061a9ef973 | ||
|
58e5fac6d7 | ||
|
fda5d23c2d | ||
|
b9ad6a3bac | ||
|
503d0b33d0 | ||
|
6f91ba1b33 | ||
|
27be035e51 | ||
|
cacac00e21 | ||
|
1181db66e0 | ||
|
afce500085 | ||
|
ee5be28179 | ||
1a7ef791e5 | |||
|
f871cd450c | ||
|
b42f536d23 | ||
f0b4e4ded4 | |||
a48b51721d | |||
bbdbca253b | |||
d2a896697d | |||
7a89109fc9 | |||
c63ed02153 | |||
86f0860cb2 | |||
5cf4d8a946 | |||
86932617bd | |||
7ba296a6fe | |||
9e72e3b2af | |||
53cc08edec | |||
4d15c8e590 | |||
b5df242141 | |||
d412e8341b | |||
9a3a5ec9e8 | |||
c99997dbb9 | |||
5cf8ef06cc | |||
69a7dc594a | |||
9a438c1a1a | |||
|
e5b92e29a2 | ||
|
9aa7dd9d78 | ||
|
40e15579fd | ||
|
fba2d6d837 | ||
|
e924e9208f | ||
|
da5d085a39 | ||
|
54ebbcb7db | ||
|
ac341482d4 | ||
|
6f910f67c0 | ||
|
433cb9818b | ||
|
a86e43c108 | ||
|
a86c5188c4 | ||
|
df1994d6f3 | ||
|
e50f99419f | ||
|
7aa9b94c11 | ||
|
4c1568a3eb | ||
|
36775ae88b | ||
|
a6f951d37f | ||
|
4448e6ee7b | ||
|
e0d81bb7e8 | ||
|
fa65b17fc9 | ||
|
944c30f9b4 | ||
|
7839f83f20 | ||
|
8ed1d48799 | ||
88f2c51595 | |||
a7cfe5ba32 | |||
6a0c3ae075 | |||
bcb29facaa | |||
bdb09c2d00 | |||
7215003c6f | |||
4825c5a136 | |||
0a06567071 | |||
42a89ad367 | |||
7d0e23e31a | |||
|
4c7f9487e2 | ||
24ae91ad0a | |||
df66277e2d | |||
18392017c6 | |||
8a3074f3ff |
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -17,4 +17,5 @@ dist
|
|||
*.egg-info
|
||||
docs/_*/*
|
||||
docs/autodoc/
|
||||
build
|
||||
pyan/
|
||||
|
|
9
.readthedocs.yml
Normal file
9
.readthedocs.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
version: 2
|
||||
|
||||
python:
|
||||
version: 2.7
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
- method: setuptools
|
||||
path: .
|
||||
system_packages: true
|
|
@ -6,6 +6,7 @@ addons:
|
|||
packages:
|
||||
- build-essential
|
||||
- libcap-dev
|
||||
- tor
|
||||
install:
|
||||
- pip install -r requirements.txt
|
||||
- ln -s src pybitmessage # tests environment
|
||||
|
|
2
COPYING
2
COPYING
|
@ -1,5 +1,5 @@
|
|||
Copyright (c) 2012-2016 Jonathan Warren
|
||||
Copyright (c) 2012-2019 The Bitmessage Developers
|
||||
Copyright (c) 2012-2020 The Bitmessage 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
|
||||
|
|
51
LICENSE
51
LICENSE
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
Copyright (c) 2012-2016 Jonathan Warren
|
||||
Copyright (c) 2012-2019 The Bitmessage Developers
|
||||
Copyright (c) 2012-2020 The Bitmessage 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 in
|
||||
|
@ -22,7 +22,7 @@ SOFTWARE.
|
|||
|
||||
===== qidenticon.py identicon python implementation with QPixmap output by sendiulo <sendiulo@gmx.net>
|
||||
|
||||
qidenticon.py is Licesensed under FreeBSD License.
|
||||
qidenticon.py is Licensed under FreeBSD License.
|
||||
(http://www.freebsd.org/copyright/freebsd-license.html)
|
||||
|
||||
Copyright 2013 "Sendiulo". All rights reserved.
|
||||
|
@ -36,7 +36,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR I
|
|||
|
||||
===== based on identicon.py identicon python implementation. by Shin Adachi <shn@glucose.jp>
|
||||
|
||||
identicon.py is Licesensed under FreeBSD License.
|
||||
identicon.py is Licensed under FreeBSD License.
|
||||
(http://www.freebsd.org/copyright/freebsd-license.html)
|
||||
|
||||
Copyright 1994-2009 Shin Adachi. All rights reserved.
|
||||
|
@ -47,3 +47,48 @@ Redistribution and use in source and binary forms, with or without modification,
|
|||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
===== based on asyncore_pollchoose.py asyncore_pollchoose python implementation. by Sam Rushing <rushing@nightmare.com>
|
||||
|
||||
Copyright 1996 by Sam Rushing. All Rights Reserved
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and
|
||||
its documentation for any purpose and without fee is hereby
|
||||
granted, provided that the above copyright notice appear in all
|
||||
copies and that both that copyright notice and this permission
|
||||
notice appear in supporting documentation, and that the name of Sam
|
||||
Rushing not be used in advertising or publicity pertaining to
|
||||
distribution of the software without specific, written prior
|
||||
permission.
|
||||
|
||||
SAM RUSHING DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
|
||||
NO EVENT SHALL SAM RUSHING BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
===== based on namecoin.py namecoin.py python implementation by Daniel Kraft <d@domob.eu>
|
||||
|
||||
Copyright (C) 2013 by Daniel Kraft <d@domob.eu>
|
||||
|
||||
This file is part of the Bitmessage project.
|
||||
|
||||
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.
|
|
@ -14,12 +14,10 @@ Development
|
|||
----------
|
||||
Bitmessage is a collaborative project. You are welcome to submit pull requests
|
||||
although if you plan to put a non-trivial amount of work into coding new
|
||||
features, it is recommended that you first solicit feedback on the DevTalk
|
||||
pseudo-mailing list:
|
||||
BM-2D9QKN4teYRvoq2fyzpiftPh9WP9qggtzh
|
||||
features, it is recommended that you first describe your ideas in the
|
||||
separate issue.
|
||||
|
||||
Feel welcome to join chan "bitmessage", BM-2cWy7cvHoq3f1rYMerRJp8PT653jjSuEdY
|
||||
which is on preview here: https://beamstat.com/chan/bitmessage
|
||||
Feel welcome to join chan "bitmessage", BM-2cWy7cvHoq3f1rYMerRJp8PT653jjSuEdY
|
||||
|
||||
References
|
||||
----------
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
PyBitmessage(Android)
|
||||
|
||||
This sample aims to be as close to a real world example of a mobile. It has a more refined design and also provides a practical example of how a mobile app would interact and communicate with its adresses.
|
||||
This sample aims to be as close to a real world example of a mobile. It has a more refined design and also provides a practical example of how a mobile app would interact and communicate with its addresses.
|
||||
|
||||
Steps for trying out this sample:
|
||||
|
||||
|
@ -13,7 +13,7 @@ This sample uses the kivy as Kivy is an open source, cross-platform Python frame
|
|||
|
||||
Kivy is written in Python and Cython, supports various input devices and has an extensive widget library. With the same codebase, you can target Windows, OS X, Linux, Android and iOS. All Kivy widgets are built with multitouch support.
|
||||
|
||||
Kivy in support take Buildozer which is a tool that automates the entire build process. It downloads and sets up all the prequisites for python-for-android, including the android SDK and NDK, then builds an apk that can be automatically pushed to the device.
|
||||
Kivy in support take Buildozer which is a tool that automates the entire build process. It downloads and sets up all the prerequisite for python-for-android, including the android SDK and NDK, then builds an apk that can be automatically pushed to the device.
|
||||
|
||||
Buildozer currently works only in Linux, and is an alpha release, but it already works well and can significantly simplify the apk build.
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
export LANG=de_DE.UTF-8
|
||||
export LANGUAGE=de_DE
|
||||
export LC_CTYPE="de_DE.UTF-8"
|
||||
export LC_NUMERIC=de_DE.UTF-8
|
||||
export LC_TIME=de_DE.UTF-8
|
||||
export LC_COLLATE="de_DE.UTF-8"
|
||||
export LC_MONETARY=de_DE.UTF-8
|
||||
export LC_MESSAGES="de_DE.UTF-8"
|
||||
export LC_PAPER=de_DE.UTF-8
|
||||
export LC_NAME=de_DE.UTF-8
|
||||
export LC_ADDRESS=de_DE.UTF-8
|
||||
export LC_TELEPHONE=de_DE.UTF-8
|
||||
export LC_MEASUREMENT=de_DE.UTF-8
|
||||
export LC_IDENTIFICATION=de_DE.UTF-8
|
||||
export LC_ALL=
|
||||
python2.7 src/bitmessagemain.py
|
|
@ -1,23 +0,0 @@
|
|||
#!/usr/bin/python2.7
|
||||
|
||||
import ctypes
|
||||
import fnmatch
|
||||
import os
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
matches = []
|
||||
for root, dirnames, filenames in os.walk('src'):
|
||||
for filename in fnmatch.filter(filenames, '*.py'):
|
||||
matches.append(os.path.join(root, filename))
|
||||
|
||||
for filename in matches:
|
||||
source = open(filename, 'r').read() + '\n'
|
||||
try:
|
||||
compile(source, filename, 'exec')
|
||||
except Exception as e:
|
||||
if 'win' in sys.platform:
|
||||
ctypes.windll.user32.MessageBoxA(0, traceback.format_exc(), "Exception in " + filename, 1)
|
||||
else:
|
||||
print "Exception in %s: %s" % (filename, traceback.format_exc())
|
||||
sys.exit(1)
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "You must specify pull request number"
|
||||
exit
|
||||
fi
|
||||
|
||||
git pull
|
||||
git checkout v0.6
|
||||
git fetch origin pull/"$1"/head:"$1"
|
||||
git merge --ff-only "$1"
|
|
@ -1,173 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# INIT
|
||||
MACHINE_TYPE=`uname -m`
|
||||
BASE_DIR=$(pwd)
|
||||
PYTHON_VERSION=2.7.15
|
||||
PYQT_VERSION=4-4.11.4-gpl-Py2.7-Qt4.8.7
|
||||
OPENSSL_VERSION=1_0_2t
|
||||
DIRECTORY32BIT=SoftwareDownloads32bit
|
||||
DIRECTORY64BIT=SoftwareDownloads64bit
|
||||
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
if [ ! -d "$DIRECTORY64BIT" ]; then
|
||||
mkdir SoftwareDownloads64bit
|
||||
cd SoftwareDownloads64bit
|
||||
else
|
||||
echo "Directory already exists"
|
||||
cd SoftwareDownloads64bit
|
||||
fi
|
||||
else
|
||||
if [ ! -d "$DIRECTORY32BIT" ]; then
|
||||
mkdir SoftwareDownloads32bit
|
||||
cd SoftwareDownloads32bit
|
||||
else
|
||||
echo "Directory 32 bit alrready exists"
|
||||
cd SoftwareDownloads32bit
|
||||
fi
|
||||
fi
|
||||
#Functions
|
||||
function install_wine {
|
||||
|
||||
|
||||
wget -nc https://dl.winehq.org/wine-builds/Release.key --no-check-certificate
|
||||
sudo apt-key add Release.key
|
||||
sudo apt-add-repository 'https://dl.winehq.org/wine-builds/ubuntu/'
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install wine1.8 winetricks
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
sudo apt-get -y install wine64-development
|
||||
env WINEPREFIX=$HOME/.wine64 WINEARCH=win64 winecfg
|
||||
WINE="env WINEPREFIX=$HOME/.wine64 wine"
|
||||
export WINEPREFIX
|
||||
|
||||
else
|
||||
sudo apt-get -y install wine32-development
|
||||
env WINEPREFIX=$HOME/.wine32 WINEARCH=win32 winecfg
|
||||
WINE="env WINEPREFIX=$HOME/.wine32 wine"
|
||||
export WINEPREFIX
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
function install_python(){
|
||||
echo "Download Python2.7"
|
||||
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
# For 64 bit machine
|
||||
wget -nc wget http://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}.amd64.msi --no-check-certificate
|
||||
echo "Install Python2.7 for 64 bit"
|
||||
$WINE msiexec -i python-${PYTHON_VERSION}.amd64.msi /q /norestart
|
||||
|
||||
wget -nc https://download.microsoft.com/download/d/2/4/d242c3fb-da5a-4542-ad66-f9661d0a8d19/vcredist_x64.exe --no-check-certificate
|
||||
$WINE vcredist_x64.exe /q /norestart
|
||||
echo "Installed vcredist for 64 bit"
|
||||
$WINE pip install --upgrade pip
|
||||
|
||||
else
|
||||
# For 32 bit machine
|
||||
wget -nc https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}.msi --no-check-certificate
|
||||
echo "Install Python2.7 for 32 bit"
|
||||
$WINE msiexec -i python-${PYTHON_VERSION}.msi /q /norestart
|
||||
|
||||
echo "Installing vc_redist for 32 bit "
|
||||
wget -nc https://download.microsoft.com/download/1/1/1/1116b75a-9ec3-481a-a3c8-1777b5381140/vcredist_x86.exe --no-check-certificate
|
||||
$WINE vcredist_x86.exe /q /norestart
|
||||
#insatlled msvcr120.dll for 32 bit system
|
||||
wget -nc http://www.dll-found.com/zip/m/msvcr120.dll.zip --no-check-certificate
|
||||
unzip msvcr120.dll.zip
|
||||
sudo cp msvcr120.dll $HOME/.wine32/drive_c/windows/system32/
|
||||
$WINE pip install --upgrade pip
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
function install_pyqt(){
|
||||
|
||||
echo "Download PyQT"
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
# For 64 bit machine
|
||||
wget -nc --content-disposition https://github.com/Bitmessage/ThirdPartyLibraries/blob/master/PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x64.exe?raw=true --no-check-certificate
|
||||
$WINE PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x64.exe /q /norestart /silent /verysiling /sp- /suppressmsgboxes
|
||||
else
|
||||
# For 32 bit machine
|
||||
wget -nc --content-disposition https://github.com/Bitmessage/ThirdPartyLibraries/blob/master/PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe?raw=true --no-check-certificate
|
||||
$WINE PyQt4-4.11.4-gpl-Py2.7-Qt4.8.7-x32.exe /q /norestart /silent /verysiling /sp- /suppressmsgboxes
|
||||
fi
|
||||
}
|
||||
|
||||
function install_openssl(){
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
wget -nc --content-disposition https://github.com/Bitmessage/ThirdPartyLibraries/blob/master/Win64OpenSSL-${OPENSSL_VERSION}.exe?raw=true --no-check-certificate
|
||||
$WINE Win64OpenSSL-${OPENSSL_VERSION}.exe /q /norestart /silent /verysiling /sp- /suppressmsgboxes
|
||||
|
||||
else
|
||||
wget -nc --content-disposition https://github.com/Bitmessage/ThirdPartyLibraries/blob/master/Win32OpenSSL-${OPENSSL_VERSION}.exe?raw=true --no-check-certificate
|
||||
$WINE Win32OpenSSL-${OPENSSL_VERSION}.exe /q /norestart /silent /verysiling /sp- /suppressmsgboxes
|
||||
echo "Install PyInstaller 32 bit"
|
||||
fi
|
||||
}
|
||||
|
||||
function install_pyinstaller()
|
||||
{
|
||||
$WINE pip install pyinstaller
|
||||
echo "Install PyInstaller"
|
||||
echo "Install Pyopencl"
|
||||
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
wget -nc https://github.com/Bitmessage/ThirdPartyLibraries/blob/master/pyopencl-2015.1-cp27-none-win_amd64.whl --no-check-certificate
|
||||
$WINE pip install pyopencl-2015.1-cp27-none-win_amd64.whl
|
||||
$WINE pip install msgpack-python
|
||||
|
||||
else
|
||||
wget -nc --content-disposition https://github.com/Bitmessage/ThirdPartyLibraries/blob/master/pyopencl-2015.1-cp27-none-win_amd64one-win32.whl?raw=true --no-check-certificate
|
||||
$WINE pip install msgpack-python
|
||||
$WINE pip install pyopencl-2015.1-cp27-none-win32.whl
|
||||
fi
|
||||
echo "Install Message Pack"
|
||||
|
||||
}
|
||||
|
||||
|
||||
function build_dll(){
|
||||
cd $BASE_DIR
|
||||
rm -rf master.zip
|
||||
rm -rf PyBitmessage
|
||||
git clone https://github.com/Bitmessage/PyBitmessage.git
|
||||
cd PyBitmessage/src/bitmsghash
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
# Do stuff for 64 bit machine
|
||||
echo "Install MinGW"
|
||||
sudo apt-get -y install mingw-w64
|
||||
echo "Create dll"
|
||||
x86_64-w64-mingw32-g++ -D_WIN32 -Wall -O3 -march=native -I$HOME/.wine64/drive_c/OpenSSL-Win64/include -I/usr/x86_64-w64-mingw32/include -L$HOME/.wine64/drive_c/OpenSSL-Win64/lib -c bitmsghash.cpp
|
||||
x86_64-w64-mingw32-g++ -static-libgcc -shared bitmsghash.o -D_WIN32 -O3 -march=native -I$HOME/.wine64/drive_c/OpenSSL-Win64/include -L$HOME/.wine64/drive_c/OpenSSL-Win64 -L/usr/lib/x86_64-linux-gnu/wine -fPIC -shared -lcrypt32 -leay32 -lwsock32 -o bitmsghash64.dll -Wl,--out-implib,bitmsghash.a
|
||||
echo "DLL generated successfully "
|
||||
cd ..
|
||||
cp -R bitmsghash ../../../src/
|
||||
cd ../../../
|
||||
cd packages/pyinstaller/
|
||||
env WINEPREFIX=$HOME/.wine64 wine pyinstaller bitmessagemain.spec
|
||||
else
|
||||
echo "Install MinGW for 32 bit"
|
||||
sudo apt-get install mingw-w64
|
||||
echo "Create dll"
|
||||
|
||||
|
||||
i686-w64-mingw32-g++ -D_WIN32 -Wall -m32 -O3 -march=native -I$HOME/.wine32/drive_c/OpenSSL-Win32/include -I/usr/i686-w64-mingw32/include -L$HOME/.wine32/drive_c/OpenSSL-Win32/lib -c bitmsghash.cpp
|
||||
i686-w64-mingw32-g++ -static-libgcc -shared bitmsghash.o -D_WIN32 -O3 -march=native -I$HOME/.wine32/drive_c/OpenSSL-Win32/include -L$HOME/.wine32/drive_c/OpenSSL-Win32/lib/MinGW -fPIC -shared -lcrypt32 -leay32 -lwsock32 -o bitmsghash32.dll -Wl,--out-implib,bitmsghash.a
|
||||
cd ..
|
||||
cp -R bitmsghash ../../../src/
|
||||
cd ../../../
|
||||
cd packages/pyinstaller/
|
||||
env WINEPREFIX=$HOME/.wine32 wine pyinstaller bitmessagemain.spec
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
install_wine
|
||||
install_python
|
||||
install_pyqt
|
||||
install_openssl
|
||||
install_pyinstaller
|
||||
build_dll
|
169
buildscripts/winbuild.sh
Executable file
169
buildscripts/winbuild.sh
Executable file
|
@ -0,0 +1,169 @@
|
|||
#!/bin/bash
|
||||
|
||||
# INIT
|
||||
MACHINE_TYPE=`uname -m`
|
||||
BASE_DIR=$(pwd)
|
||||
PYTHON_VERSION=2.7.17
|
||||
PYQT_VERSION=4-4.11.4-gpl-Py2.7-Qt4.8.7
|
||||
OPENSSL_VERSION=1_0_2t
|
||||
SRCPATH=~/Downloads
|
||||
|
||||
#Functions
|
||||
function download_sources_32 {
|
||||
if [ ! -d ${SRCPATH} ]; then
|
||||
mkdir -p ${SRCPATH}
|
||||
fi
|
||||
wget -P ${SRCPATH} -c -nc --content-disposition \
|
||||
https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}.msi \
|
||||
https://download.microsoft.com/download/1/1/1/1116b75a-9ec3-481a-a3c8-1777b5381140/vcredist_x86.exe \
|
||||
https://github.com/Bitmessage/ThirdPartyLibraries/blob/master/PyQt${PYQT_VERSION}-x32.exe?raw=true \
|
||||
https://github.com/Bitmessage/ThirdPartyLibraries/blob/master/Win32OpenSSL-${OPENSSL_VERSION}.exe?raw=true \
|
||||
https://github.com/Bitmessage/ThirdPartyLibraries/blob/master/pyopencl-2015.1-cp27-none-win32.whl?raw=true
|
||||
}
|
||||
|
||||
function download_sources_64 {
|
||||
if [ ! -d ${SRCPATH} ]; then
|
||||
mkdir -p ${SRCPATH}
|
||||
fi
|
||||
wget -P ${SRCPATH} -c -nc --content-disposition \
|
||||
http://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}.amd64.msi \
|
||||
https://download.microsoft.com/download/d/2/4/d242c3fb-da5a-4542-ad66-f9661d0a8d19/vcredist_x64.exe \
|
||||
https://github.com/Bitmessage/ThirdPartyLibraries/blob/master/PyQt${PYQT_VERSION}-x64.exe?raw=true \
|
||||
https://github.com/Bitmessage/ThirdPartyLibraries/blob/master/Win64OpenSSL-${OPENSSL_VERSION}.exe?raw=true \
|
||||
https://github.com/Bitmessage/ThirdPartyLibraries/blob/master/pyopencl-2015.1-cp27-none-win_amd64.whl?raw=true
|
||||
}
|
||||
|
||||
function download_sources {
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
download_sources_64
|
||||
else
|
||||
download_sources_32
|
||||
fi
|
||||
}
|
||||
|
||||
function install_wine {
|
||||
echo "Setting up wine"
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
export WINEPREFIX=${HOME}/.wine64 WINEARCH=win64
|
||||
else
|
||||
export WINEPREFIX=${HOME}/.wine32 WINEARCH=win32
|
||||
fi
|
||||
rm -rf ${WINEPREFIX}
|
||||
rm -rf packages/pyinstaller/{build,dist}
|
||||
}
|
||||
|
||||
function install_python(){
|
||||
cd ${SRCPATH}
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
echo "Installing Python ${PYTHON_VERSION} 64b"
|
||||
wine msiexec -i python-${PYTHON_VERSION}.amd64.msi /q /norestart
|
||||
echo "Installing vcredist for 64 bit"
|
||||
wine vcredist_x64.exe /q /norestart
|
||||
else
|
||||
echo "Installing Python ${PYTHON_VERSION} 32b"
|
||||
wine msiexec -i python-${PYTHON_VERSION}.msi /q /norestart
|
||||
# MSVCR 2008 required for Windows XP
|
||||
cd ${SRCPATH}
|
||||
echo "Installing vc_redist (2008) for 32 bit "
|
||||
wine vcredist_x86.exe /Q
|
||||
fi
|
||||
# add cert
|
||||
if [ -f /usr/local/share/ca-certificates/bitmessage-proxy.crt ]; then
|
||||
wine python -m pip config set global.cert 'z:\usr\local\share\ca-certificates\bitmessage-proxy.crt'
|
||||
fi
|
||||
echo "Upgrading pip"
|
||||
wine python -m pip install --upgrade pip
|
||||
}
|
||||
|
||||
function install_pyqt(){
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
echo "Installing PyQt-${PYQT_VERSION} 64b"
|
||||
wine PyQt${PYQT_VERSION}-x64.exe /S /WX
|
||||
else
|
||||
echo "Installing PyQt-${PYQT_VERSION} 32b"
|
||||
wine PyQt${PYQT_VERSION}-x32.exe /S /WX
|
||||
fi
|
||||
}
|
||||
|
||||
function install_openssl(){
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
echo "Installing OpenSSL ${OPENSSL_VERSION} 64b"
|
||||
wine Win64OpenSSL-${OPENSSL_VERSION}.exe /q /norestart /silent /verysilent /sp- /suppressmsgboxes
|
||||
else
|
||||
echo "Installing OpenSSL ${OPENSSL_VERSION} 32b"
|
||||
wine Win32OpenSSL-${OPENSSL_VERSION}.exe /q /norestart /silent /verysilent /sp- /suppressmsgboxes
|
||||
fi
|
||||
}
|
||||
|
||||
function install_pyinstaller()
|
||||
{
|
||||
cd ${BASE_DIR}
|
||||
echo "Installing PyInstaller"
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
wine python -m pip install pyinstaller
|
||||
else
|
||||
# 3.2.1 is the last version to work on XP
|
||||
# see https://github.com/pyinstaller/pyinstaller/issues/2931
|
||||
wine python -m pip install -I pyinstaller==3.2.1
|
||||
fi
|
||||
}
|
||||
|
||||
function install_msgpack()
|
||||
{
|
||||
cd ${BASE_DIR}
|
||||
echo "Installing msgpack"
|
||||
wine python -m pip install msgpack-python
|
||||
}
|
||||
|
||||
function install_pyopencl()
|
||||
{
|
||||
cd ${SRCPATH}
|
||||
echo "Installing PyOpenCL"
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
wine python -m pip install pyopencl-2015.1-cp27-none-win_amd64.whl
|
||||
else
|
||||
wine python -m pip install pyopencl-2015.1-cp27-none-win32.whl
|
||||
fi
|
||||
sed -Ei 's/_DEFAULT_INCLUDE_OPTIONS = .*/_DEFAULT_INCLUDE_OPTIONS = [] /' $WINEPREFIX/drive_c/Python27/Lib/site-packages/pyopencl/__init__.py
|
||||
}
|
||||
|
||||
function build_dll(){
|
||||
cd ${BASE_DIR}
|
||||
cd src/bitmsghash
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
echo "Create dll"
|
||||
x86_64-w64-mingw32-g++ -D_WIN32 -Wall -O3 -march=native -I$HOME/.wine64/drive_c/OpenSSL-Win64/include -I/usr/x86_64-w64-mingw32/include -L$HOME/.wine64/drive_c/OpenSSL-Win64/lib -c bitmsghash.cpp
|
||||
x86_64-w64-mingw32-g++ -static-libgcc -shared bitmsghash.o -D_WIN32 -O3 -march=native -I$HOME/.wine64/drive_c/OpenSSL-Win64/include -L$HOME/.wine64/drive_c/OpenSSL-Win64 -L/usr/lib/x86_64-linux-gnu/wine -fPIC -shared -lcrypt32 -leay32 -lwsock32 -o bitmsghash64.dll -Wl,--out-implib,bitmsghash.a
|
||||
else
|
||||
echo "Create dll"
|
||||
i686-w64-mingw32-g++ -D_WIN32 -Wall -m32 -O3 -march=native -I$HOME/.wine32/drive_c/OpenSSL-Win32/include -I/usr/i686-w64-mingw32/include -L$HOME/.wine32/drive_c/OpenSSL-Win32/lib -c bitmsghash.cpp
|
||||
i686-w64-mingw32-g++ -static-libgcc -shared bitmsghash.o -D_WIN32 -O3 -march=native -I$HOME/.wine32/drive_c/OpenSSL-Win32/include -L$HOME/.wine32/drive_c/OpenSSL-Win32/lib/MinGW -fPIC -shared -lcrypt32 -leay32 -lwsock32 -o bitmsghash32.dll -Wl,--out-implib,bitmsghash.a
|
||||
fi
|
||||
}
|
||||
|
||||
function build_exe(){
|
||||
cd ${BASE_DIR}
|
||||
cd packages/pyinstaller
|
||||
wine pyinstaller bitmessagemain.spec
|
||||
}
|
||||
|
||||
# prepare on ubuntu
|
||||
# dpkg --add-architecture i386
|
||||
# apt update
|
||||
# apt -y install wget wine-stable wine-development winetricks mingw-w64 wine32 wine64 xvfb
|
||||
|
||||
|
||||
download_sources
|
||||
if [ "$1" == "--download-only" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
install_wine
|
||||
install_python
|
||||
install_pyqt
|
||||
install_openssl
|
||||
install_pyopencl
|
||||
install_msgpack
|
||||
install_pyinstaller
|
||||
build_dll
|
||||
build_exe
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python2
|
||||
"""
|
||||
Check dependendies and give recommendations about how to satisfy them
|
||||
Check dependencies and give recommendations about how to satisfy them
|
||||
|
||||
Limitations:
|
||||
|
||||
|
@ -164,7 +164,7 @@ if (not compiler or prereqs) and OPSYS in PACKAGE_MANAGER:
|
|||
if not compiler:
|
||||
compilerToPackages()
|
||||
prereqToPackages()
|
||||
if mandatory:
|
||||
if prereqs and mandatory:
|
||||
sys.exit(1)
|
||||
else:
|
||||
print("All the dependencies satisfied, you can install PyBitmessage")
|
||||
|
|
22
debian/README.Debian
vendored
Normal file
22
debian/README.Debian
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
bitmessage for Debian
|
||||
--------------------
|
||||
|
||||
In order to build the .deb yourself, you'll first have to install the stuff that's neccessary to compile .debs:
|
||||
|
||||
|
||||
apt-get install python-minimal python-setuptools python-all \
|
||||
python openssl libssl-dev dh-apparmor debhelper dh-python \
|
||||
python-msgpack python-qt4 git
|
||||
|
||||
|
||||
Next make some build directory and clone the newest git repository:
|
||||
|
||||
And if I haven't forgotten anything, you can build the .deb package now:
|
||||
|
||||
|
||||
dpkg-buildpackage -us -uc
|
||||
|
||||
|
||||
I've tried this with Debian Buster, but I'd expect it to work on most if not all recent debian-based distributions. Maybe with some minor changes.
|
||||
|
||||
-- citizenaspirant <citizenadmin@helicoptarianconstitocracy.org> Wed, 29 Apr 2020 17:53:21 +0000
|
19
debian/apparmor/pybitmessage
vendored
Normal file
19
debian/apparmor/pybitmessage
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Last Modified: Wed Apr 29 21:04:08 2020
|
||||
#include <tunables/global>
|
||||
|
||||
/usr/bin/pybitmessage {
|
||||
#include <abstractions/base>
|
||||
#include <abstractions/fonts>
|
||||
#include <abstractions/lightdm>
|
||||
#include <abstractions/python>
|
||||
#include <abstractions/user-tmp>
|
||||
|
||||
owner /home/*/.ICEauthority r,
|
||||
owner /home/*/.Xauthority r,
|
||||
owner /home/*/.config/PyBitmessage/ rw,
|
||||
owner /home/*/.config/PyBitmessage/* rwk,
|
||||
owner /home/*/.config/Trolltech.conf rwk,
|
||||
owner /home/*/.config/Trolltech.conf.* rw,
|
||||
owner /proc/*/mounts r,
|
||||
|
||||
}
|
1
debian/bitmessage-docs.docs
vendored
Normal file
1
debian/bitmessage-docs.docs
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
README.Debian
|