wareck 2 years ago
parent
commit
836ac405ac
1 changed files with 7 additions and 3 deletions
  1. 7 3
      make_environement.sh

+ 7 - 3
make_environement.sh

@@ -1,4 +1,5 @@
 #!/bin/bash
+echo -e "\e[93mWin32 Cross-compiler Builder v1.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
@@ -7,14 +8,17 @@ cd /opt
 sudo git clone -n https://github.com/mxe/mxe.git
 cd mxe
 sudo git reset --hard 64b283d64891348c92154b8d7eace6a9bff23411
-#sudo git pull
 export MXE_DIR=/opt/mxe
 export MXE_TARGETS='i686-w64-mingw32.static'
-sudo make -j 5 -C $MXE_DIR MXE_TARGETS="$MXE_TARGETS" curl pthreads pdcurses ncurses libusb1 jansson libevent libmicrohttpd curl
+sudo make -j 5 -C $MXE_DIR MXE_TARGETS="$MXE_TARGETS" curl pthreads pdcurses ncurses libusb1 jansson libevent libmicrohttpd libzip
+if ! grep "export PKG_CONFIG_PATH=/opt/mxe/usr/i686-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/i686-w64-mingw32.static/lib/pkgconfig/' >> ~/.profile
+fi
 export PATH=/opt/mxe/usr/bin:$PATH
 export PKG_CONFIG_PATH=/opt/mxe/usr/i686-w64-mingw32.static/lib/pkgconfig/
 cd ~
 echo ""
-echo "environement ok"
+echo "Cross compilation environement ok."
+echo "Need reboot before use"