step2.sh 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #!/bin/bash
  2. sudo chmod -R 777 /opt/mxe/usr/i686-w64-mingw32.shared/
  3. if [ ! -d /home/wareck/bfgminer ]
  4. then
  5. cd /home/wareck
  6. git clone https://github.com/wareck/bfgminer.git
  7. fi
  8. if [ ! -d /home/wareck/libraries ]
  9. then
  10. mkdir /home/wareck/libraries
  11. else
  12. rm -r /home/wareck/libraries
  13. mkdir /home/wareck/libraries
  14. fi
  15. function libs {
  16. cd /home/wareck/libraries
  17. wget https://github.com/troydhanson/uthash/archive/master.zip -O uthash.zip
  18. unzip uthash.zip
  19. cp /home/wareck/libraries/uthash-master/src/* /opt/mxe/usr/i686-w64-mingw32.shared/include
  20. cd /home/wareck/libraries
  21. wget https://github.com/downloads/libevent/libevent/libevent-2.0.10-stable.tar.gz
  22. tar xvfz libevent-2.0.10-stable.tar.gz
  23. cd /home/wareck/libraries/libevent-2.0.10-stable
  24. ./autogen.sh
  25. CFLAGS="-O2 -msse2" ./configure --host=i686-w64-mingw32.shared --enable-shared --disable-openssl --disable-debug-mode --prefix=/opt/mxe/usr/i686-w64-mingw32.shared/
  26. make
  27. make install
  28. cd /home/wareck/libraries
  29. wget -c https://github.com/libusb/hidapi/archive/refs/tags/hidapi-0.13.1.zip
  30. unzip hidapi-0.13.1.zip
  31. cd hidapi-hidapi-0.13.1
  32. ./bootstrap
  33. CFLAGS="-O2 -msse2" ./configure --host=i686-w64-mingw32.shared --prefix=/opt/mxe/usr/i686-w64-mingw32.shared/
  34. make
  35. make install
  36. cd /home/wareck/libraries
  37. wget -c https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2
  38. tar xvfj libusb-1.0.26.tar.bz2
  39. cd libusb-1.0.26
  40. CFLAGS="-O2 -msse2" ./configure --host=i686-w64-mingw32.shared --disable-static --prefix=/opt/mxe/usr/i686-w64-mingw32.shared/
  41. make
  42. make install
  43. cd /home/wareck/libraries
  44. wget -c https://github.com/Karlson2k/libmicrohttpd/releases/download/v0.9.75/libmicrohttpd-0.9.75.tar.gz
  45. tar xvfz libmicrohttpd-0.9.75.tar.gz
  46. cd libmicrohttpd-0.9.75
  47. CFLAGS="-O2 -msse2" ./configure --host=i686-w64-mingw32.shared --prefix=/opt/mxe/usr/i686-w64-mingw32.shared/
  48. make
  49. make install
  50. }
  51. cd /home/wareck/
  52. git clone https://github.com/wareck/bfgminer.git
  53. cd bfgminer
  54. git submodule init
  55. git submodule update
  56. function build_ {
  57. cd /home/wareck/bfgminer/
  58. autoreconf -fi
  59. CFLAGS="-O2 -msse2" ./configure --host=i686-w64-mingw32.shared --disable-static --enable-scrypt --enable-futurebit --disable-other-drivers
  60. make
  61. }
  62. function copy_dll {
  63. cd /home/wareck/bfgminer/
  64. if [ ! -d /home/wareck/Bureau/win32_build/bfgminer/ ];then mkdir /home/wareck/Bureau/win32_build/bfgminer/;fi
  65. cp bfgminer.exe /home/wareck/Bureau/win32_build/bfgminer/
  66. cp /home/wareck/bfgminer/libbase58/.libs/libbase58-0.dll /home/wareck/Bureau/win32_build/bfgminer/
  67. cp /home/wareck/bfgminer/libblkmaker/.libs/libblkmaker-0.1-8.dll /home/wareck/Bureau/win32_build/bfgminer/
  68. cp /home/wareck/bfgminer/libblkmaker/.libs/libblkmaker_jansson-0.1-8.dll /home/wareck/Bureau/win32_build/bfgminer/
  69. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libcurl-4.dll /home/wareck/Bureau/win32_build/bfgminer/
  70. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libevent-2-0-5.dll /home/wareck/Bureau/win32_build/bfgminer/
  71. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libjansson-4.dll /home/wareck/Bureau/win32_build/bfgminer/
  72. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libmicrohttpd-12.dll /home/wareck/Bureau/win32_build/bfgminer/
  73. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libncurses5.dll /home/wareck/Bureau/win32_build/bfgminer/
  74. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libwinpthread-1.dll /home/wareck/Bureau/win32_build/bfgminer/
  75. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libusb-1.0.dll /home/wareck/Bureau/win32_build/bfgminer/
  76. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libidn2-0.dll /home/wareck/Bureau/win32_build/bfgminer/
  77. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libssh2-1.dll /home/wareck/Bureau/win32_build/bfgminer/
  78. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libgcc_s_sjlj-1.dll /home/wareck/Bureau/win32_build/bfgminer/
  79. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libintl-8.dll /home/wareck/Bureau/win32_build/bfgminer/
  80. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libunistring-2.dll /home/wareck/Bureau/win32_build/bfgminer/
  81. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libgcrypt-20.dll /home/wareck/Bureau/win32_build/bfgminer/
  82. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libiconv-2.dll /home/wareck/Bureau/win32_build/bfgminer/
  83. cp /opt/mxe/usr/i686-w64-mingw32.shared/bin/libgpg-error-0.dll /home/wareck/Bureau/win32_build/bfgminer/
  84. }
  85. build_
  86. copy_dll