|
@@ -1,120 +1,186 @@
|
|
|
-***Warning: the MMGen installation process on Windows is not for the faint of
|
|
|
-heart, success is not guaranteed and the user experience is less than optimal.
|
|
|
+***Warning: though the MMGen installation process on Windows has become easier,
|
|
|
+it still requires patience, and the user experience is less than optimal.
|
|
|
You're urged to use the prebuilt [MMGenLive][20] USB image instead. It's now
|
|
|
the preferred way for all non-Linux users to run MMGen.***
|
|
|
|
|
|
-##### Note: The following instructions assume you'll be unpacking all archives to `C:\`, the root directory on most Windows installations. If you choose to unpack to another location, the `cd` commands must be adjusted accordingly.
|
|
|
+### 1. Create the build directory:
|
|
|
|
|
|
-#### 1. Install the Python interpreter:
|
|
|
+Enter your MSYS environment, create the directory `/build` and move to it.
|
|
|
+This is where you'll be unpacking and building archives:
|
|
|
|
|
|
-Grab the [Windows 32-bit installer][09] and run it, accepting the defaults.
|
|
|
-Add the Python base and Scripts directories to your [path][08], e.g.
|
|
|
-`C:\Python27;C:\Python27\Scripts`.
|
|
|
+ $ mkdir /build
|
|
|
+ $ cd /build
|
|
|
|
|
|
-#### 2. Build OpenSSL:
|
|
|
+If the machine you're installing on is online, you can download the various
|
|
|
+tarballs and zipped archives you need from the Internet exactly as described in
|
|
|
+the instructions below. If you're offline, you'll need to download them first
|
|
|
+on another machine and then transfer them to the install computer using a USB
|
|
|
+stick, for example.
|
|
|
|
|
|
-Grab the [latest tarball][06] from the [openssl.org download page][05] and unpack
|
|
|
-it. At the MSYS prompt, run:
|
|
|
+In either case, you'll probably be downloading the archives to a folder
|
|
|
+somewhere outside the root of your MSYS filesystem. To access it within MSYS,
|
|
|
+use `/c/` for drive `C:`, `/d/` for drive `D:` and so forth. A full path to an
|
|
|
+archive would thus look something like this:
|
|
|
+`/c/my_downloaded_archives/archive_name.tar.gz`.
|
|
|
|
|
|
- $ cd /c/openssl-1.0.1g
|
|
|
- $ ./config --openssldir=/usr
|
|
|
+### 2. Build OpenSSL:
|
|
|
+
|
|
|
+Grab the v1.0.x [tarball][06] from openssl.org, unpack and build:
|
|
|
+
|
|
|
+ $ tar -xzf <path to openssl archive>/openssl-1.0.2j.tar.gz
|
|
|
+ $ cd openssl-1.0.2j
|
|
|
+ $ ./Configure mingw64 --openssldir=/usr
|
|
|
$ make
|
|
|
$ make install
|
|
|
|
|
|
-#### 3. Build the Scrypt Python module:
|
|
|
+### 3. Build the Scrypt Python module:
|
|
|
+
|
|
|
+The latest scrypt tarball available from [Python][07] at this writing
|
|
|
+(scrypt-0.8.0.tar.gz) has missing files and doesn't build, so grab the latest
|
|
|
+[zipfile][07z] from the scrypt source repository, unzip and build:
|
|
|
+
|
|
|
+ $ cd /build
|
|
|
+ $ unzip <path to scrypt archive>/91d194b6a6bd.zip
|
|
|
+ $ cd mhallin-py-scrypt-91d194b6a6bd
|
|
|
+
|
|
|
+Open the file `setup.py` in your text editor. Change the line reading
|
|
|
+
|
|
|
+ from setuptools import setup, Extension
|
|
|
|
|
|
-Grab the [latest tarball][07] from python.org and unpack it. At the MSYS prompt,
|
|
|
-run:
|
|
|
+to read
|
|
|
|
|
|
- $ cd /c/scrypt-0.6.1
|
|
|
+ from distutils.core import setup, Extension
|
|
|
|
|
|
-Open `setup.py` in your text editor and make the following changes:
|
|
|
+Right before the line beginning with
|
|
|
|
|
|
-> Change the line:
|
|
|
+ scrypt_module = Extension(
|
|
|
+
|
|
|
+add the following lines (with no indentation):
|
|
|
+
|
|
|
+ library_dirs = [r'c:\mingw64\x86_64-w4-mingw32\lib','/msys/lib']
|
|
|
+ includes = [r'c:\msys\include']
|
|
|
+
|
|
|
+Save `setup.py`, build and install:
|
|
|
+
|
|
|
+ $ python setup.py build --compiler=mingw32
|
|
|
+ $ python setup.py install
|
|
|
|
|
|
- library_dirs = ['c:\OpenSSL-Win32\lib\MinGW']
|
|
|
+Now, to solve a problem with the interpreter not finding the scrypt extension
|
|
|
+module, we have to do this little fixup:
|
|
|
|
|
|
-> to read:
|
|
|
+ $ cd /mingw/opt/lib/python2.7/site-packages
|
|
|
+ $ unzip scrypt*.egg
|
|
|
|
|
|
- library_dirs = ['c:\msys\lib','c:\WINDOWS\system32']
|
|
|
+### 4. Build the pycrypto Python module:
|
|
|
|
|
|
-> Change the line:
|
|
|
+Download the latest pycrypto [tarball][02] from the Python website and unpack it:
|
|
|
|
|
|
- includes = ['c:\OpenSSL-Win32\include']
|
|
|
+ $ cd /build
|
|
|
+ $ tar -xzf <path to pycrypto archive>/pycrypto-2.6.1.tar.gz
|
|
|
+ $ cd pycrypto-2.6.1
|
|
|
|
|
|
-> to read:
|
|
|
+Open the file `setup.py` in your text editor. Remove *exactly* four spaces at
|
|
|
+the beginning of this line:
|
|
|
|
|
|
- includes = ['c:\msys\include']
|
|
|
+ self.__remove_extensions(["CryptoPublicKey._fastmath"])
|
|
|
|
|
|
-Save the file. At the MSYS prompt, run:
|
|
|
+to move it one level of indentation to the left. Save the file and exit the
|
|
|
+editor. Now build and install:
|
|
|
|
|
|
$ python setup.py build --compiler=mingw32
|
|
|
+ $ python setup.py install
|
|
|
+
|
|
|
+### 5. Install the ecdsa Python module:
|
|
|
|
|
|
-Ignore the warning messages at the end and run:
|
|
|
+Grab the latest python-ecdsa [tarball][03], unpack and build:
|
|
|
|
|
|
+ $ cd /build
|
|
|
+ $ tar -xzf <path to ecdsa archive>/ecdsa-0.13.tar.gz
|
|
|
+ $ cd ecdsa-0.13
|
|
|
$ python setup.py install
|
|
|
|
|
|
-#### 4. Install the Pycrypto Python module:
|
|
|
+### 6. Install the colorama Python module:
|
|
|
+
|
|
|
+Grab the latest colorama [tarball][14], unpack and build:
|
|
|
|
|
|
-Source code is available from the [Pycrypto home page][00], but it appears to
|
|
|
-build only with MS Visual Studio, not MinGW. Until this situation is fixed,
|
|
|
-you can install the precompiled binaries available from [Voidspace][01].
|
|
|
-Download and run the [Windows installer][02], accepting the defaults.
|
|
|
+ $ cd /build
|
|
|
+ $ tar -xzf <path to colorama archive>/colorama-0.3.7.tar.gz
|
|
|
+ $ cd colorama-0.3.7
|
|
|
+ $ python setup.py install
|
|
|
|
|
|
-#### 5. Install the ecdsa Python module:
|
|
|
+### 7. Install the pexpect Python module (needed for test suite):
|
|
|
|
|
|
-Grab the [tarball][03] and unpack it. At the MSYS prompt, run:
|
|
|
+Grab the latest pexpect [tarball][15], unpack and build:
|
|
|
|
|
|
- $ cd /c/ecdsa-0.11
|
|
|
+ $ cd /build
|
|
|
+ $ tar -xzf <path to pexpect archive>/pexpect-4.2.1.tar.gz
|
|
|
+ $ cd pexpect-4.2.1
|
|
|
$ python setup.py install
|
|
|
|
|
|
-#### 6. Install the bitcoin-python Python module:
|
|
|
+### 8. Install sdelete utility (needed for secure wallet deletion):
|
|
|
|
|
|
-Grab the [tarball][04] and unpack it. At the MSYS prompt, run:
|
|
|
+Grab the latest SDelete [zip archive][16], unzip and copy `sdelete.exe` to
|
|
|
+your execution path (`c:\windows`, for example).
|
|
|
|
|
|
- $ cd /c/bitcoin-python-0.3
|
|
|
- $ cp -a src/bitcoinrpc /c/Python27/Lib/site-packages
|
|
|
+### 9. Build libsecp256k1:
|
|
|
|
|
|
-This is a workaround for a dependency issue with the package's setup script.
|
|
|
-If your Python is installed in a different location, you'll have to adjust the
|
|
|
-destination path accordingly.
|
|
|
+Libsecp256k1 requires GNU autotools to build, and they're not included in the
|
|
|
+MinGW-64 distribution for some reason, so you'll have to retrieve and unpack
|
|
|
+them yourself. You'll need these archives:
|
|
|
|
|
|
-#### 7. Install the colorama Python module (optional but recommended):
|
|
|
+> * [autoconf][31]
|
|
|
+> * [automake][32]
|
|
|
+> * [libtool][33]
|
|
|
|
|
|
-Grab the [tarball][14] and unpack it. At the MSYS prompt, run:
|
|
|
+Unpack them in your /mingw directory and fix up some filenames:
|
|
|
|
|
|
- $ cd /c/colorama-0.3.3
|
|
|
- $ python setup.py install
|
|
|
+ $ cd /mingw
|
|
|
+ $ tar -xzf <path to>/autoconf2.5-2.68-1-mingw32-bin.tar.lzma
|
|
|
+ $ tar -xzf <path to>/automake1.11-1.11.1-1-mingw32-bin.tar.lzma
|
|
|
+ $ tar -xzf <path to>/libtool-2.4-1-mingw32-bin.tar.lzma
|
|
|
+ $ cd bin
|
|
|
+ $ cp autoconf-* autoconf
|
|
|
+ $ cp automake-* automake
|
|
|
+ $ cp aclocal-* aclocal
|
|
|
+ $ cp autoreconf-* autoreconf
|
|
|
|
|
|
-#### 8. Install MMGen:
|
|
|
+Now get the latest libsecp256k1 [zip archive][11] from GitHub, unpack, build and
|
|
|
+install:
|
|
|
|
|
|
-Get the [zip archive][10b] from GitHub and unpack it. At the MSYS prompt, run:
|
|
|
+ $ cd /build
|
|
|
+ $ unzip.exe <path to libsecp256k1 archive>/master.zip
|
|
|
+ $ cd secp256k1-master
|
|
|
+ $ ./autogen.sh
|
|
|
+ $ ./configure
|
|
|
+ $ make
|
|
|
+ $ make install
|
|
|
|
|
|
- $ cd /c/mmgen-stable_mswin
|
|
|
- $ sudo ./setup.py install
|
|
|
+### 10. Install MMGen:
|
|
|
+
|
|
|
+Get the [zip archive][10] of the latest stable version from GitHub, unpack and install:
|
|
|
|
|
|
-Type:
|
|
|
+ $ cd /build
|
|
|
+ $ unzip.exe <path to mmgen archive>/stable_mswin.zip
|
|
|
+ $ cd mmgen-stable_mswin
|
|
|
+ $ python setup.py build --compiler=mingw32
|
|
|
+ $ sudo ./setup.py install
|
|
|
|
|
|
- $ echo $PATH
|
|
|
+If you wish, you may run the MMGen test suite to make sure your installation's
|
|
|
+working:
|
|
|
|
|
|
-The `C:\Python27;C:\Python27\Scripts` you added to your path in Step 1 of this
|
|
|
-page should be included in your PATH variable. If not, then exit MSYS and open
|
|
|
-a new MSYS window to update your path.
|
|
|
+ $ test/test.py -s
|
|
|
|
|
|
-[00]: https://www.dlitz.net/software/pycrypto/
|
|
|
-[01]: http://www.voidspace.org.uk/python/modules.shtml#pycrypto
|
|
|
-[02]: http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.win32-py2.7.exe)
|
|
|
-[03]: https://pypi.python.org/pypi/ecdsa
|
|
|
-[04]: https://pypi.python.org/pypi/bitcoin-python/0.3
|
|
|
-[09]: https://www.python.org/ftp/python/2.7.6/python-2.7.6.msi
|
|
|
-[08]: Editing-the-user-path-in-Windows
|
|
|
+[02]: https://pypi.python.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz#md5=55a61a054aa66812daf5161a0d5d7eda
|
|
|
+[03]: https://pypi.python.org/packages/f9/e5/99ebb176e47f150ac115ffeda5fedb6a3dbb3c00c74a59fd84ddf12f5857/ecdsa-0.13.tar.gz#md5=1f60eda9cb5c46722856db41a3ae6670
|
|
|
+[06]: https://www.openssl.org/source/openssl-1.0.2j.tar.gz
|
|
|
[07]: https://pypi.python.org/pypi/scrypt/
|
|
|
-[06]: http://www.openssl.org/source/openssl-1.0.1g.tar.gz
|
|
|
-[05]: http://www.openssl.org/source/
|
|
|
-[10]: https://github.com/mmgen/mmgen/archive/master.zip
|
|
|
-[10b]: https://github.com/mmgen/mmgen/archive/stable_mswin.zip
|
|
|
-[11]: http://slproweb.com/download/Win32OpenSSL-1_0_1f.exe
|
|
|
-[12]: http://www.openssl.org/related/binaries.html
|
|
|
-[13]: Getting-Started-with-MMGen
|
|
|
-[14]: https://pypi.python.org/pypi/colorama
|
|
|
+[07z]: https://bitbucket.org/mhallin/py-scrypt/get/91d194b6a6bd.zip
|
|
|
+[10]: https://github.com/mmgen/mmgen/archive/stable_mswin.zip
|
|
|
+[14]: https://pypi.python.org/packages/f0/d0/21c6449df0ca9da74859edc40208b3a57df9aca7323118c913e58d442030/colorama-0.3.7.tar.gz#md5=349d2b02618d3d39e5c6aede36fe3c1a
|
|
|
+[15]: https://pypi.python.org/packages/e8/13/d0b0599099d6cd23663043a2a0bb7c61e58c6ba359b2656e6fb000ef5b98/pexpect-4.2.1.tar.gz#md5=3694410001a99dff83f0b500a1ca1c95
|
|
|
+[16]: https://download.sysinternals.com/files/SDelete.zip
|
|
|
[20]: https://github.com/mmgen/MMGenLive
|
|
|
+[11]: https://github.com/bitcoin-core/secp256k1/archive/master.zip
|
|
|
+[31]: https://sourceforge.net/projects/mingw/files/MinGW/Extension/autoconf/autoconf2.5/autoconf2.5-2.68-1/autoconf2.5-2.68-1-mingw32-bin.tar.lzma
|
|
|
+[32]: https://sourceforge.net/projects/mingw/files/MinGW/Extension/automake/automake1.11/automake1.11-1.11.1-1/automake1.11-1.11.1-1-mingw32-bin.tar.lzma
|
|
|
+[33]: https://sourceforge.net/projects/mingw/files/MinGW/Extension/libtool/libtool-2.4-1/libtool-2.4-1-mingw32-bin.tar.lzma
|