1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- #!/bin/bash
- echo -e "\e[93mWin32 Cross-compiler Builder v2.0:\e[0m"
- sudo apt-get update
- sudo apt-get upgrade -y
- sudo apt-get install -y lzip build-essential git autoconf autopoint bison flex gperf libtool libtool-bin python ruby scons unzip intltool p7zip-full libgtk2.0-dev libssl-dev -y
- sudo apt-get install -y lftp zip pv pixz upx
- sudo apt-get install -y samba
- cat <<'EOF'>> smb.conf
- [global]
- workgroup = WORKGROUP
- server string = %h server (Samba, Ubuntu)
- log file = /var/log/samba/log.%m
- max log size = 2000
- logging = file
- panic action = /usr/share/samba/panic-action %d
- server role = standalone server
- obey pam restrictions = yes
- unix password sync = yes
- passwd program = /usr/bin/passwd %u
- pam password change = yes
- map to guest = bad user
- usershare allow guests = yes
- [Shared]
- public = yes
- delete readonly = yes
- writeable = yes
- path = /home/wareck/Bureau/win32_build/
- EOF
- sudo cp smb.conf /etc/samba/smb.conf
- sudo rm smb.conf
- sudo /etc/init.d/smbd restart
- if [ ! -d /home/wareck/Bureau/win32_build/ ]; then mkdir /home/wareck/Bureau/win32_build/;fi
- sudo chmod 777 /home/wareck/Bureau/win32_build/
- cd /opt
- sudo git clone https://github.com/mxe/mxe.git
- cd mxe
- sudo git reset --hard 64b283d64891348c92154b8d7eace6a9bff23411
- echo -e " "
- read -r -p "Installer le pack shared (bfgminer) ? [y/N] " response
- case "$response" in
- [yY][eE][sS]|[yY])
- export MXE_DIR=/opt/mxe
- export MXE_TARGETS='i686-w64-mingw32.static i686-w64-mingw32.shared '
- sudo make -j 4 -C $MXE_DIR MXE_TARGETS="$MXE_TARGETS" curl pthreads pdcurses ncurses jansson libzip libusb libusb1
- ;;
- *)
- export MXE_DIR=/opt/mxe
- export MXE_TARGETS='x86_64-w64-mingw32.static i686-w64-mingw32.static'
- sudo make -j 4 -C $MXE_DIR MXE_TARGETS="$MXE_TARGETS" curl pthreads pdcurses ncurses libusb libusb1 jansson libzip
- ;;
- esac
- if ! grep "export PKG_CONFIG_PATH=/opt/mxe/usr/x86_64-w64-mingw32.static/lib/pkgconfig/" ~/.profile >/dev/null
- then
- echo 'export PATH=/opt/mxe/usr/bin:$PATH' >> ~/.profile
- echo 'export PKG_CONFIG_PATH=/opt/mxe/usr/x86_64-w64-mingw32.static/lib/pkgconfig/' >> ~/.profile
- fi
- export PATH=/opt/mxe/usr/bin:$PATH
- export PKG_CONFIG_PATH=/opt/mxe/usr/x86_64-w64-mingw32.static/lib/pkgconfig/
- cd ~
- echo ""
- echo "Cross compilation environement ok."
- echo "Need reboot before use"
|