forked from akasubi/Mpir.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHowToBuild.txt
More file actions
75 lines (56 loc) · 2.76 KB
/
Copy pathHowToBuild.txt
File metadata and controls
75 lines (56 loc) · 2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
How to build Mpir.NET for Windows
=================================
To make a complete build of Mpir.NET, 3 sub projects must be built in the
following order:
1) MPIR
2) The modified X-MPIR
3) Mpir.NET
The FAKE (F# make) build script only builds the Mpir.NET part.
Building MPIR
-------------
I've used Visual Studio 2015 to build MPIR, but it can probably be built with
other versions as well.
1) Download MPIR from http://mpir.org/ and unpack it to a folder.
2) Get vsyasm from Brian Gladman at http://173.254.28.24/~brgladma/vsyasm.zip
(the official version is at http://www.tortall.net/projects/yasm/, but
somehow the download is botched and has been so since 2014).
3) Copy the vsyasm files to the VS2015 folder, e.g.
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
4) Open <your MPIR folder>\build.vc14\mpir.sln in Visual Studio 2015.
5) Select "Release" solution configuration and build lib_mpir_p3. The resulting
DLL ends up in <your MPIR folder>\lib\Win32\Release, together with a bunch
of header files (it also ends up in <your MPIR folder>\build.vc14, but
without the header files).
6) Build lib_mpir_k8 from within Visual Studio 2015. The resulting DLL ends up
in <your MPIR folder>\lib\x64\Release, together with a bunch of header
files.
7) Copy everything in <your MPIR folder>\lib\Win32\Release to
Mpir.NET\xmpir_ModdedForMpir.NET\mpir-precompiled\win32.
8) Copy everything in <your MPIR folder>\lib\x64\Release to
Mpir.NET\xmpir_ModdedForMpir.NET\mpir-precompiled\win64.
Building the modified X-MPIR
----------------------------
1) Install PHP (a portable version will do).
2) Edit the paths in xmpir_ModdedForMpir.NET\gen-and-build-win.bat to match
your system.
3) Open a command prompt in xmpir_ModdedForMpir.NET and run
gen-and-build-win.bat. The build result gets copied to the appropriate
Mpir.NET folder.
Building Mpir.NET
-----------------
Mpir.NET can be built with Visual Studio 2015, or by running build.cmd.
Generating docs
---------------
The API reference is generated by Doxygen. Run doxygen and open "Doxyfile" in
the project root directory. The intro and samples
(http://wezeku.github.io/Mpir.NET/) are generated and uploaded by "build
releasedocs", which also uploads the API reference.
Building for Linux
==================
According to their respective authors, MPIR and X-MPIR can be built for Linux.
That should probably also be true for my modified version of X-MPIR, as I have
tried not to mess with the Linux specific parts. However, since I have had no
need to run X-MPIR under Linux, I haven't tried it. If it works, then so should
the Mpir.NET dll. Unfortunately, I can't provide any instructions for building
a Linux version, but Linux users have no problems finding out things
by themselves.