Untitled


SUBMITTED BY: Guest

DATE: Dec. 16, 2013, 2:30 a.m.

FORMAT: Text only

SIZE: 16.6 kB

HITS: 19113

  1. ######################################################################################
  2. # #
  3. # Native WIN32 setup and build instructions (on mingw32/Windows): #
  4. # #
  5. ######################################################################################
  6. **************************************************************************************
  7. * Introduction *
  8. **************************************************************************************
  9. The following instructions have been tested on both Windows 7 and Windows XP.
  10. Most of what is described below (copying files, downloading files, etc.) can be done
  11. directly in the MinGW MSYS shell; these instructions do not do so because package
  12. versions and links change over time. The best way is to use your browser, go to the
  13. links directly, and see for yourself which versions you want to install.
  14. Winrar was used to do the extracting of archive files in the making of this guide.
  15. If you think that this documentation was helpful and you wish to donate, you can
  16. do so at the following address. 12KaKtrK52iQjPdtsJq7fJ7smC32tXWbWr
  17. **************************************************************************************
  18. * A tip that might help you along the way *
  19. **************************************************************************************
  20. Enable "QuickEdit Mode" in your Command Prompt Window or MinGW Command Prompt
  21. Window (No need to go into the context menu to choose edit-mark/copy/paste):
  22. Right-click on the title bar and click Properties. Under the Options tab, check
  23. the box for "QuickEdit Mode". Alternately, if you want this change to be
  24. permanent on all of your Command Prompt Windows; you can click Defaults instead
  25. of Properties as described above. Now you can drag and select text you want to
  26. copy, right-click to copy the text to the clipboard and right-click once again to
  27. paste it at the desired location. You could for example, copy some text from this
  28. document to the clipboard and right click in your Command Prompt Window to paste
  29. what you copied.
  30. **************************************************************************************
  31. * Install mingw32 *
  32. **************************************************************************************
  33. Go to this url ==> http://www.mingw.org/wiki/Getting_Started
  34. Click the link that says "Download and run the latest mingw-get-inst version."
  35. Download and run the latest file. Install MinGW in the default directory.
  36. (I downloaded the one labeled "mingw-get-inst-20120426" - note that this could
  37. be a different version later.)
  38. Make sure to check the option for "Download latest repository catalogs".
  39. I just selected all the check boxes (excluding "Fortran Compiler") so that everything
  40. was installed.
  41. **************************************************************************************
  42. * Run the MSYS shell for the first time to create your user directory *
  43. **************************************************************************************
  44. (Start Icon/keyboard key ==> All Programs ==> MinGW ==> MinGW Shell).
  45. This will create your user directory for you.
  46. **************************************************************************************
  47. * Install libpdcurses *
  48. **************************************************************************************
  49. Type the lines below to install libpdcurses.
  50. mingw-get install mingw32-libpdcurses
  51. mingw-get install mingw32-pdcurses
  52. Ctrl-D or typing "logout" and pressing the enter key should get you out of the
  53. window.
  54. **************************************************************************************
  55. * Copy CGMiner source to your MSYS working directory *
  56. **************************************************************************************
  57. Copy CGMiner source code directory into:
  58. \MinGW\msys\1.0\home\(folder with your user name)
  59. **************************************************************************************
  60. * Install AMD APP SDK, latest version (only if you want GPU mining) *
  61. **************************************************************************************
  62. Note: You do not need to install the AMD APP SDK if you are only using Nvidia GPU's
  63. Go to this url for the latest AMD APP SDK:
  64. http://developer.amd.com/tools/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/
  65. Go to this url for legacy AMD APP SDK's:
  66. http://developer.amd.com/tools/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/download-archive/
  67. Download and install whichever version you like best.
  68. Copy the folders in \Program Files (x86)\AMD APP\include to \MinGW\include
  69. Copy \Program Files (x86)\AMD APP\lib\x86\libOpenCL.a to \MinGW\lib
  70. Note: If you are on a 32 bit version of windows "Program Files (x86)" will be
  71. "Program Files".
  72. Note2: If you update your APP SDK later you might want to recopy the above files
  73. **************************************************************************************
  74. * Install AMD ADL SDK, latest version (only if you want GPU monitoring) *
  75. **************************************************************************************
  76. Note: You do not need to install the AMD ADL SDK if you are only using Nvidia GPU's
  77. Go to this url ==> http://developer.amd.com/tools/graphics-development/display-library-adl-sdk/
  78. Download and unzip the file you downloaded.
  79. Pull adl_defines.h, adl_sdk.h, and adl_structures.h out of the include folder
  80. Put those files into the ADL_SDK folder in your source tree as shown below.
  81. \MinGW\msys\1.0\home\(folder with your user name)\cgminer-x.x.x\ADL_SDK
  82. **************************************************************************************
  83. * Install GTK-WIN, required for Pkg-config in the next step *
  84. **************************************************************************************
  85. Go to this url ==> http://sourceforge.net/projects/gtk-win/
  86. Download the file.
  87. After you have downloaded the file Double click/run it and this will install GTK+
  88. I chose all the selection boxes when I installed.
  89. Copy libglib-2.0-0.dll and intl.dll from \Program Files (x86)\gtk2-runtime\bin to
  90. \MinGW\bin
  91. Note: If you are on a 32 bit version of windows "Program Files (x86)" will be
  92. "Program Files".
  93. **************************************************************************************
  94. * Install pkg-config *
  95. **************************************************************************************
  96. Go to this url ==> http://www.gtk.org/download/win32.php
  97. Scroll down to where it shows pkg-cfg.
  98. Download the file from the tool link. Extract "pkg-config.exe" from bin and place in
  99. your \MinGW\bin directory.
  100. Download the file from the "Dev" link. Extract "pkg.m4" from share\aclocal and place
  101. in your \MingW\share\aclocal directory.
  102. **************************************************************************************
  103. * Install libcurl *
  104. **************************************************************************************
  105. Go to this url ==> http://curl.haxx.se/download.html#Win32
  106. At the section where it says "Win32 - Generic", Click on the link that indicates
  107. Win32 2000.XP 7.27.0 libcurl SSL and download it.
  108. The one I downloaded may not be current for you. Choose the latest.
  109. Extract the files that are in the zip (bin, include, and lib) to their respective
  110. locations in MinGW (\MinGW\bin, \MinGW\include, and \MinGW\lib).
  111. Edit the file \MinGW\lib\pkgconfig\libcurl.pc and change "-lcurl" to
  112. "-lcurl -lcurldll".
  113. Ref. http://old.nabble.com/gcc-working-with-libcurl-td20506927.html
  114. **************************************************************************************
  115. * Build cgminer.exe *
  116. **************************************************************************************
  117. Run the MinGW MSYS shell
  118. (Start Icon/keyboard key ==> All Programs ==> MinGW ==> MinGW Shell).
  119. Change the working directory to your CGMiner project folder.
  120. Example: cd cgminer-2.1.2 [Enter Key] if you are unsure then type "ls -la"
  121. Another way is to type "cd cg" and then press the tab key; It will auto fill.
  122. Type the lines below one at a time. Look for problems after each one before going on
  123. to the next.
  124. adl.sh (optional - see below)
  125. autoreconf -fvi
  126. CFLAGS="-O2 -msse2" ./configure (additional config options, see below)
  127. make
  128. strip cgminer.exe <== only do this if you are not compiling for debugging
  129. **************************************************************************************
  130. * Copy files to a build directory/folder *
  131. **************************************************************************************
  132. Make a directory and copy the following files into it. This will be your CGMiner
  133. Folder that you use for mining. Remember the .cl filenames could change on later
  134. releases. If you installed a different version of libcurl then some of those dll's
  135. may be different as well.
  136. cgminer.exe from \MinGW\msys\1.0\home\(username)\cgminer-x.x.x
  137. *.cl from \MinGW\msys\1.0\home\(username)\cgminer-x.x.x
  138. README from \MinGW\msys\1.0\home\(username)\cgminer-x.x.x
  139. libcurl.dll from \MinGW\bin
  140. libidn-11.dll from \MinGW\bin
  141. libeay32.dll from \MinGW\bin
  142. ssleay32.dll from \MinGW\bin
  143. libpdcurses.dll from \MinGW\bin
  144. pthreadGC2.dll from \MinGW\bin
  145. **************************************************************************************
  146. * Optional - Install Git into MinGW/MSYS *
  147. **************************************************************************************
  148. Go to this url ==> http://code.google.com/p/msysgit/
  149. Click on the Downloads tab.
  150. Download the latest "Portable" git archive.
  151. Extract the git*.exe files from the bin folder and put them into \MinGW\bin.
  152. Extract the share\git-core folder and place it into \MinGW\share.
  153. After the previous step you should have a folder called \MinGW\share\git-core.
  154. To test if it is working, open a MinGW shell and type the following:
  155. git config -–global core.autocrlf false (note: one time run only)
  156. git clone git://github.com/ckolivas/cgminer.git
  157. If you simply just want to update the source after you have already cloned, type:
  158. git pull
  159. "git pull" did not work for me. Try the following which does the same thing:
  160. git fetch && git merge FETCH_HEAD
  161. Now you can get the latest source directly from github.
  162. **************************************************************************************
  163. * Optional - Make a .sh file to automate copying over ADL files *
  164. **************************************************************************************
  165. Make a folder/directory in your home folder and name it ADL_SDK.
  166. (ref: \MinGW\msys\1.0\home\(folder with your user name)\ADL_SDK)
  167. Copy the ADL .h files into that folder/directory.
  168. Open your favorite text editor and type the following into it.
  169. cp -av ../ADL_SDK/*.h ADL_SDK
  170. Save the file as "adl.sh" and then place the file into "\MinGW\msys\1.0\bin".
  171. From now on when your current working directory is the cgminer source directory
  172. You can simply type "adl.sh" and it will place the ADL header files into place
  173. For you. Make sure you never remove the ADL_SDK folder from your home folder.
  174. **************************************************************************************
  175. * Optional - Install libusb if you need auto USB device detection; required for Ztex *
  176. **************************************************************************************
  177. Go to this url ==> http://git.libusb.org/?p=libusb.git;a=snapshot;h=master;sf=zip
  178. save the file to your local storage. Open the file and copy the libusb* folder to
  179. \MinGW\msys\1.0\home\(your user directory/folder).
  180. Or if you do not want to download the file directly and would like to use git then
  181. Type the following from the MSYS shell in your home folder.
  182. git clone git://git.libusb.org/libusb.git
  183. Run the MinGW MSYS shell
  184. (Start Icon/keyboard key ==> All Programs ==> MinGW ==> MinGW Shell).
  185. Change the working directory to your libusb project folder.
  186. Example: cd libusb-something [Enter Key] if you are unsure then type "ls -la"
  187. Another way is to type "cd libusb" and then press the tab key; It will auto fill.
  188. Type the lines below one at a time. Look for problems after each one before going on
  189. to the next.
  190. ./autogen.sh --disable-debug-log --prefix=/MinGW
  191. make
  192. make install
  193. You may now exit the MSYS shell.
  194. Ctrl-D or typing "logout" and pressing the enter key should get you out of the
  195. window.
  196. You will have to copy "libusb-1.0.dll" to your working cgminer binary directory.
  197. You will find "libusb-1.0.dll" in the \MinGW\bin directory/folder.
  198. Use this method if libusb does not work for you on Ztex. Once someone lets us know
  199. Libusb works instead of libusbx then we will remove the section below this line.
  200. Run the MSYS shell and change into the libusb folder as above.
  201. Type ==> make uninstall
  202. Go to this url ==> http://libusbx.org/
  203. Click on the "Downloads" tab.
  204. Click on "releases".
  205. Click on the latest version. I downloaded 1.0.14; yours may be newer.
  206. Do not download from the link that says "Looking for the latest version?".
  207. Click on "Windows"
  208. Click on the file and download it. I downloaded libusbx-1.0.12-win.7z.
  209. Extract the the following from the file and place in where directed.
  210. Copy libusb.h from include\libusbx-1.0 to \MinGW\include\libusb-1.0\libusb.h
  211. Copy contents of MinGW32\static \MinGW\lib
  212. Copy contents of MinGW32\dll to \MinGW\lib
  213. You will have to copy "libusb-1.0.dll" to your working cgminer binary directory.
  214. **************************************************************************************
  215. * Some ./configure options *
  216. **************************************************************************************
  217. --enable-cpumining Build with cpu mining support(default disabled)
  218. --disable-opencl Override detection and disable building with opencl
  219. --disable-adl Override detection and disable building with adl
  220. --enable-bitforce Compile support for BitForce FPGAs(default disabled)
  221. --enable-icarus Compile support for Icarus Board(default disabled)
  222. --enable-modminer Compile support for ModMiner FPGAs(default disabled)
  223. --enable-ztex Compile support for Ztex Board(default disabled)
  224. --enable-scrypt Compile support for scrypt litecoin mining (default disabled)
  225. --without-curses Compile support for curses TUI (default enabled)
  226. --without-libudev Autodetect FPGAs using libudev (default enabled)
  227. ######################################################################################
  228. # #
  229. # Native WIN32 setup and build instructions (on mingw32/Windows) complete #
  230. # #
  231. ######################################################################################

comments powered by Disqus