1 # 2 # Copyright (c) 2013-2017 IDRIX 3 # Governed by the Apache License 2.0 the full text of which is contained 4 # in the file License.txt included in VeraCrypt binary and source 5 # code distribution packages. 6 # 7 8 # Absolute path to this script 9 SCRIPT=$(readlink -f "$0") 10 # Absolute path this script is in 11 SCRIPTPATH=$(dirname "$SCRIPT") 12 # source directory which contains the Makefile 13 SOURCEPATH=$(readlink -f "$SCRIPTPATH/..") 14 # directory where the VeraCrypt has been checked out 15 PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..") 16 17 # Make sure only root can run our script 18 if [ "$(id -u)" != "0" ]; then 19 echo "VeraCrypt must be built by root" 1>&2 20 exit 1 21 fi 22 23 # the sources of wxWidgets 3.0.3 must be extracted to the parent directory 24 export WX_ROOT=$PARENTDIR/wxWidgets-3.0.4 25 echo "Using wxWidgets sources in $WX_ROOT" 26 27 cd $SOURCEPATH 28 29 echo "Building GUI version of VeraCrypt" 30 31 # this will be the temporary wxWidgets directory 32 export WX_BUILD_DIR=$PARENTDIR/wxBuildGuiNoSSE2 33 34 make WXSTATIC=1 NOSSE2=1 wxbuild && make WXSTATIC=1 NOSSE2=1 clean && make WXSTATIC=1 NOSSE2=1 && make WXSTATIC=1 NOSSE2=1 package 35 36 # Uncomment below and comment line above to reuse existing wxWidgets build 37 # make WXSTATIC=1 NOSSE2=1 clean && make WXSTATIC=1 NOSSE2=1 && make WXSTATIC=1 NOSSE2=1 package 38 39 echo "Building console version of VeraCrypt" 40 41 # this will be the temporary wxWidgets directory 42 export WX_BUILD_DIR=$PARENTDIR/wxBuildConsoleNoSSE2 43 44 make WXSTATIC=1 NOGUI=1 NOSSE2=1 wxbuild && make WXSTATIC=1 NOGUI=1 NOSSE2=1 clean && make WXSTATIC=1 NOGUI=1 NOSSE2=1 && make WXSTATIC=1 NOGUI=1 NOSSE2=1 package 45 46 # Uncomment below and comment line above to reuse existing wxWidgets build 47 # make WXSTATIC=1 NOGUI=1 NOSSE2=1 clean && make WXSTATIC=1 NOGUI=1 NOSSE2=1 && make WXSTATIC=1 NOGUI=1 NOSSE2=1 package