mirror of https://github.com/GOSTSec/sgminer
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
259 lines
16 KiB
259 lines
16 KiB
13 years ago
|
######################################################################################
|
||
|
# #
|
||
|
# Native WIN32 setup and build instructions (on mingw32/Windows): #
|
||
|
# #
|
||
|
######################################################################################
|
||
|
|
||
|
**************************************************************************************
|
||
|
* Introduction *
|
||
|
**************************************************************************************
|
||
|
The following instructions have been tested on both Windows 7 and Windows XP.
|
||
|
Most of what is described below (copying files, downloading files, etc.) can be done
|
||
|
directly in the MinGW MSYS shell; these instructions do not do so because package
|
||
|
versions and links change over time. The best way is to use your browser, go to the
|
||
|
links directly, and see for yourself which versions you want to install.
|
||
12 years ago
|
Winrar was used to do the extracting of archive files in the making of this guide.
|
||
13 years ago
|
|
||
12 years ago
|
If you think that this documentation was helpful and you wish to donate, you can
|
||
13 years ago
|
do so at the following address. 12KaKtrK52iQjPdtsJq7fJ7smC32tXWbWr
|
||
|
|
||
|
**************************************************************************************
|
||
12 years ago
|
* A tip that might help you along the way *
|
||
13 years ago
|
**************************************************************************************
|
||
|
Enable "QuickEdit Mode" in your Command Prompt Window or MinGW Command Prompt
|
||
|
Window (No need to go into the context menu to choose edit-mark/copy/paste):
|
||
|
Right-click on the title bar and click Properties. Under the Options tab, check
|
||
|
the box for "QuickEdit Mode". Alternately, if you want this change to be
|
||
|
permanent on all of your Command Prompt Windows; you can click Defaults instead
|
||
|
of Properties as described above. Now you can drag and select text you want to
|
||
|
copy, right-click to copy the text to the clipboard and right-click once again to
|
||
|
paste it at the desired location. You could for example, copy some text from this
|
||
|
document to the clipboard and right click in your Command Prompt Window to paste
|
||
|
what you copied.
|
||
|
|
||
|
**************************************************************************************
|
||
|
* Install mingw32 *
|
||
|
**************************************************************************************
|
||
|
Go to this url ==> http://www.mingw.org/wiki/Getting_Started
|
||
|
Click the link that says "Download and run the latest mingw-get-inst version."
|
||
|
Download and run the latest file. Install MinGW in the default directory.
|
||
12 years ago
|
(I downloaded the one labeled "mingw-get-inst-20120426" - note that this could
|
||
13 years ago
|
be a different version later.)
|
||
|
Make sure to check the option for "Download latest repository catalogs".
|
||
|
I just selected all the check boxes (excluding "Fortran Compiler") so that everything
|
||
|
was installed.
|
||
|
|
||
|
**************************************************************************************
|
||
|
* Run the MSYS shell for the first time to create your user directory *
|
||
12 years ago
|
**************************************************************************************
|
||
13 years ago
|
(Start Icon/keyboard key ==> All Programs ==> MinGW ==> MinGW Shell).
|
||
|
This will create your user directory for you.
|
||
|
|
||
|
**************************************************************************************
|
||
|
* Install libpdcurses *
|
||
|
**************************************************************************************
|
||
|
Type the lines below to install libpdcurses.
|
||
|
mingw-get install mingw32-libpdcurses
|
||
|
mingw-get install mingw32-pdcurses
|
||
|
Ctrl-D or typing "logout" and pressing the enter key should get you out of the
|
||
|
window.
|
||
|
|
||
|
**************************************************************************************
|
||
|
* Copy CGMiner source to your MSYS working directory *
|
||
|
**************************************************************************************
|
||
12 years ago
|
Copy CGMiner source code directory into:
|
||
13 years ago
|
\MinGW\msys\1.0\home\(folder with your user name)
|
||
|
|
||
|
**************************************************************************************
|
||
|
* Install AMD APP SDK, latest version (only if you want GPU mining) *
|
||
|
**************************************************************************************
|
||
|
Note: You do not need to install the AMD APP SDK if you are only using Nvidia GPU's
|
||
12 years ago
|
Go to this url for the latest AMD APP SDK:
|
||
12 years ago
|
http://developer.amd.com/tools/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/
|
||
13 years ago
|
Go to this url for legacy AMD APP SDK's:
|
||
12 years ago
|
http://developer.amd.com/tools/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/download-archive/
|
||
13 years ago
|
Download and install whichever version you like best.
|
||
12 years ago
|
Copy the folders in \Program Files (x86)\AMD APP\include to \MinGW\include
|
||
13 years ago
|
Copy \Program Files (x86)\AMD APP\lib\x86\libOpenCL.a to \MinGW\lib
|
||
12 years ago
|
Note: If you are on a 32 bit version of windows "Program Files (x86)" will be
|
||
13 years ago
|
"Program Files".
|
||
12 years ago
|
Note2: If you update your APP SDK later you might want to recopy the above files
|
||
13 years ago
|
|
||
|
**************************************************************************************
|
||
|
* Install AMD ADL SDK, latest version (only if you want GPU monitoring) *
|
||
|
**************************************************************************************
|
||
12 years ago
|
Note: You do not need to install the AMD ADL SDK if you are only using Nvidia GPU's
|
||
12 years ago
|
Go to this url ==> http://developer.amd.com/tools/graphics-development/display-library-adl-sdk/
|
||
13 years ago
|
Download and unzip the file you downloaded.
|
||
12 years ago
|
Pull adl_defines.h, adl_sdk.h, and adl_structures.h out of the include folder
|
||
13 years ago
|
Put those files into the ADL_SDK folder in your source tree as shown below.
|
||
|
\MinGW\msys\1.0\home\(folder with your user name)\cgminer-x.x.x\ADL_SDK
|
||
|
|
||
|
**************************************************************************************
|
||
|
* Install GTK-WIN, required for Pkg-config in the next step *
|
||
|
**************************************************************************************
|
||
12 years ago
|
Go to this url ==> http://sourceforge.net/projects/gtk-win/
|
||
13 years ago
|
Download the file.
|
||
|
After you have downloaded the file Double click/run it and this will install GTK+
|
||
|
I chose all the selection boxes when I installed.
|
||
12 years ago
|
Copy libglib-2.0-0.dll and intl.dll from \Program Files (x86)\gtk2-runtime\bin to
|
||
13 years ago
|
\MinGW\bin
|
||
12 years ago
|
Note: If you are on a 32 bit version of windows "Program Files (x86)" will be
|
||
13 years ago
|
"Program Files".
|
||
|
|
||
|
**************************************************************************************
|
||
|
* Install pkg-config *
|
||
|
**************************************************************************************
|
||
|
Go to this url ==> http://www.gtk.org/download/win32.php
|
||
|
Scroll down to where it shows pkg-cfg.
|
||
|
Download the file from the tool link. Extract "pkg-config.exe" from bin and place in
|
||
|
your \MinGW\bin directory.
|
||
|
Download the file from the "Dev" link. Extract "pkg.m4" from share\aclocal and place
|
||
|
in your \MingW\share\aclocal directory.
|
||
12 years ago
|
|
||
13 years ago
|
**************************************************************************************
|
||
|
* Install libcurl *
|
||
|
**************************************************************************************
|
||
|
Go to this url ==> http://curl.haxx.se/download.html#Win32
|
||
|
At the section where it says "Win32 - Generic", Click on the link that indicates
|
||
12 years ago
|
Win32 2000.XP 7.27.0 libcurl SSL and download it.
|
||
13 years ago
|
The one I downloaded may not be current for you. Choose the latest.
|
||
|
Extract the files that are in the zip (bin, include, and lib) to their respective
|
||
|
locations in MinGW (\MinGW\bin, \MinGW\include, and \MinGW\lib).
|
||
12 years ago
|
Edit the file \MinGW\lib\pkgconfig\libcurl.pc and change "-lcurl" to
|
||
13 years ago
|
"-lcurl -lcurldll".
|
||
|
Ref. http://old.nabble.com/gcc-working-with-libcurl-td20506927.html
|
||
|
|
||
|
**************************************************************************************
|
||
|
* Build cgminer.exe *
|
||
|
**************************************************************************************
|
||
12 years ago
|
Run the MinGW MSYS shell
|
||
|
(Start Icon/keyboard key ==> All Programs ==> MinGW ==> MinGW Shell).
|
||
13 years ago
|
Change the working directory to your CGMiner project folder.
|
||
|
Example: cd cgminer-2.1.2 [Enter Key] if you are unsure then type "ls -la"
|
||
12 years ago
|
Another way is to type "cd cg" and then press the tab key; It will auto fill.
|
||
13 years ago
|
Type the lines below one at a time. Look for problems after each one before going on
|
||
|
to the next.
|
||
|
|
||
|
adl.sh (optional - see below)
|
||
|
autoreconf -fvi
|
||
|
CFLAGS="-O2 -msse2" ./configure (additional config options, see below)
|
||
|
make
|
||
12 years ago
|
strip cgminer.exe <== only do this if you are not compiling for debugging
|
||
13 years ago
|
|
||
|
**************************************************************************************
|
||
|
* Copy files to a build directory/folder *
|
||
|
**************************************************************************************
|
||
|
Make a directory and copy the following files into it. This will be your CGMiner
|
||
|
Folder that you use for mining. Remember the .cl filenames could change on later
|
||
|
releases. If you installed a different version of libcurl then some of those dll's
|
||
|
may be different as well.
|
||
12 years ago
|
cgminer.exe from \MinGW\msys\1.0\home\(username)\cgminer-x.x.x
|
||
13 years ago
|
*.cl from \MinGW\msys\1.0\home\(username)\cgminer-x.x.x
|
||
|
README from \MinGW\msys\1.0\home\(username)\cgminer-x.x.x
|
||
|
libcurl.dll from \MinGW\bin
|
||
|
libidn-11.dll from \MinGW\bin
|
||
12 years ago
|
libeay32.dll from \MinGW\bin
|
||
|
ssleay32.dll from \MinGW\bin
|
||
13 years ago
|
libpdcurses.dll from \MinGW\bin
|
||
|
pthreadGC2.dll from \MinGW\bin
|
||
12 years ago
|
|
||
13 years ago
|
**************************************************************************************
|
||
|
* Optional - Install Git into MinGW/MSYS *
|
||
|
**************************************************************************************
|
||
|
Go to this url ==> http://code.google.com/p/msysgit/
|
||
|
Click on the Downloads tab.
|
||
|
Download the latest "Portable" git archive.
|
||
|
Extract the git*.exe files from the bin folder and put them into \MinGW\bin.
|
||
|
Extract the share\git-core folder and place it into \MinGW\share.
|
||
12 years ago
|
After the previous step you should have a folder called \MinGW\share\git-core.
|
||
13 years ago
|
To test if it is working, open a MinGW shell and type the following:
|
||
|
git config -–global core.autocrlf false (note: one time run only)
|
||
|
git clone git://github.com/ckolivas/cgminer.git
|
||
12 years ago
|
|
||
13 years ago
|
If you simply just want to update the source after you have already cloned, type:
|
||
12 years ago
|
git pull
|
||
12 years ago
|
"git pull" did not work for me. Try the following which does the same thing:
|
||
|
git fetch && git merge FETCH_HEAD
|
||
13 years ago
|
|
||
|
Now you can get the latest source directly from github.
|
||
|
|
||
|
**************************************************************************************
|
||
|
* Optional - Make a .sh file to automate copying over ADL files *
|
||
|
**************************************************************************************
|
||
|
Make a folder/directory in your home folder and name it ADL_SDK.
|
||
|
(ref: \MinGW\msys\1.0\home\(folder with your user name)\ADL_SDK)
|
||
|
Copy the ADL .h files into that folder/directory.
|
||
|
Open your favorite text editor and type the following into it.
|
||
|
cp -av ../ADL_SDK/*.h ADL_SDK
|
||
|
Save the file as "adl.sh" and then place the file into "\MinGW\msys\1.0\bin".
|
||
|
From now on when your current working directory is the cgminer source directory
|
||
|
You can simply type "adl.sh" and it will place the ADL header files into place
|
||
|
For you. Make sure you never remove the ADL_SDK folder from your home folder.
|
||
|
|
||
12 years ago
|
**************************************************************************************
|
||
|
* Optional - Install libusb if you need auto USB device detection; required for Ztex *
|
||
|
**************************************************************************************
|
||
12 years ago
|
Go to this url ==> http://git.libusb.org/?p=libusb.git;a=snapshot;h=master;sf=zip
|
||
|
save the file to your local storage. Open the file and copy the libusb* folder to
|
||
|
\MinGW\msys\1.0\home\(your user directory/folder).
|
||
|
Or if you do not want to download the file directly and would like to use git then
|
||
|
Type the following from the MSYS shell in your home folder.
|
||
|
git clone git://git.libusb.org/libusb.git
|
||
|
|
||
|
Run the MinGW MSYS shell
|
||
|
(Start Icon/keyboard key ==> All Programs ==> MinGW ==> MinGW Shell).
|
||
|
Change the working directory to your libusb project folder.
|
||
|
Example: cd libusb-something [Enter Key] if you are unsure then type "ls -la"
|
||
|
Another way is to type "cd libusb" and then press the tab key; It will auto fill.
|
||
|
Type the lines below one at a time. Look for problems after each one before going on
|
||
|
to the next.
|
||
|
|
||
12 years ago
|
./autogen.sh --disable-debug-log --prefix=/MinGW
|
||
12 years ago
|
make
|
||
|
make install
|
||
|
|
||
|
You may now exit the MSYS shell.
|
||
|
Ctrl-D or typing "logout" and pressing the enter key should get you out of the
|
||
|
window.
|
||
|
|
||
|
You will have to copy "libusb-1.0.dll" to your working cgminer binary directory.
|
||
|
You will find "libusb-1.0.dll" in the \MinGW\bin directory/folder.
|
||
|
|
||
|
Use this method if libusb does not work for you on Ztex. Once someone lets us know
|
||
|
Libusb works instead of libusbx then we will remove the section below this line.
|
||
|
Run the MSYS shell and change into the libusb folder as above.
|
||
|
Type ==> make uninstall
|
||
12 years ago
|
Go to this url ==> http://libusbx.org/
|
||
|
Click on the "Downloads" tab.
|
||
|
Click on "releases".
|
||
12 years ago
|
Click on the latest version. I downloaded 1.0.14; yours may be newer.
|
||
12 years ago
|
Do not download from the link that says "Looking for the latest version?".
|
||
|
Click on "Windows"
|
||
|
Click on the file and download it. I downloaded libusbx-1.0.12-win.7z.
|
||
|
Extract the the following from the file and place in where directed.
|
||
|
Copy libusb.h from include\libusbx-1.0 to \MinGW\include\libusb-1.0\libusb.h
|
||
|
Copy contents of MinGW32\static \MinGW\lib
|
||
|
Copy contents of MinGW32\dll to \MinGW\lib
|
||
|
You will have to copy "libusb-1.0.dll" to your working cgminer binary directory.
|
||
|
|
||
13 years ago
|
**************************************************************************************
|
||
|
* Some ./configure options *
|
||
|
**************************************************************************************
|
||
12 years ago
|
--enable-cpumining Build with cpu mining support(default disabled)
|
||
13 years ago
|
--disable-opencl Override detection and disable building with opencl
|
||
|
--disable-adl Override detection and disable building with adl
|
||
|
--enable-bitforce Compile support for BitForce FPGAs(default disabled)
|
||
|
--enable-icarus Compile support for Icarus Board(default disabled)
|
||
12 years ago
|
--enable-modminer Compile support for ModMiner FPGAs(default disabled)
|
||
|
--enable-ztex Compile support for Ztex Board(default disabled)
|
||
|
--enable-scrypt Compile support for scrypt litecoin mining (default disabled)
|
||
|
--without-curses Compile support for curses TUI (default enabled)
|
||
|
--without-libudev Autodetect FPGAs using libudev (default enabled)
|
||
13 years ago
|
|
||
|
######################################################################################
|
||
|
# #
|
||
|
# Native WIN32 setup and build instructions (on mingw32/Windows) complete #
|
||
|
# #
|
||
12 years ago
|
######################################################################################
|