diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-07-06 09:33:04 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-07-06 09:33:04 +0200 |
commit | ab1b98923064e84686fbd12e93a3b0ee404e86c9 (patch) | |
tree | 7a9ca1b25b25975b39aec4343d6cd6b1602a9368 /src | |
parent | 3095fc265a2c4104953abc664a8640efb900e897 (diff) | |
download | VeraCrypt-ab1b98923064e84686fbd12e93a3b0ee404e86c9.tar.gz VeraCrypt-ab1b98923064e84686fbd12e93a3b0ee404e86c9.zip |
Linux/MacOSX: during build, fallback to /tmp if wxWidgets sources not found in parent directory
Diffstat (limited to 'src')
-rwxr-xr-x | src/Build/build_cmake_deb.sh | 12 | ||||
-rw-r--r-- | src/Build/build_cmake_opensuse.sh | 12 | ||||
-rw-r--r-- | src/Build/build_cmake_rpm.sh | 12 | ||||
-rwxr-xr-x | src/Build/build_veracrypt_freebsd.sh | 14 | ||||
-rwxr-xr-x | src/Build/build_veracrypt_linux.sh | 14 | ||||
-rwxr-xr-x | src/Build/build_veracrypt_linux_no_sse2.sh | 14 | ||||
-rwxr-xr-x | src/Build/build_veracrypt_macosx.sh | 14 |
7 files changed, 88 insertions, 4 deletions
diff --git a/src/Build/build_cmake_deb.sh b/src/Build/build_cmake_deb.sh index 17103a61..797b6d77 100755 --- a/src/Build/build_cmake_deb.sh +++ b/src/Build/build_cmake_deb.sh @@ -18,8 +18,20 @@ export SOURCEPATH=$(readlink -f "$SCRIPTPATH/..") # Directory where the VeraCrypt has been checked out export PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..") +# Check if wxWidgets-3.2.5 exists in PARENTDIR; if not, use /tmp +if [ ! -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + export PARENTDIR="/tmp" +fi + # The sources of wxWidgets 3.2.5 must be extracted to the parent directory export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5 + +# Exit with error if wxWidgets is not found +if [ ! -d "$WX_ROOT" ]; then + echo "Error: wxWidgets-3.2.5 not found in either the default PARENTDIR or /tmp. Exiting." + exit 1 +fi + echo "Using wxWidgets sources in $WX_ROOT" cd $SOURCEPATH diff --git a/src/Build/build_cmake_opensuse.sh b/src/Build/build_cmake_opensuse.sh index 52bed78a..32c5a6cc 100644 --- a/src/Build/build_cmake_opensuse.sh +++ b/src/Build/build_cmake_opensuse.sh @@ -18,8 +18,20 @@ export SOURCEPATH=$(readlink -f "$SCRIPTPATH/..") # Directory where the VeraCrypt has been checked out export PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..") +# Check if wxWidgets-3.2.5 exists in PARENTDIR; if not, use /tmp +if [ ! -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + export PARENTDIR="/tmp" +fi + # The sources of wxWidgets 3.2.5 must be extracted to the parent directory export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5 + +# Exit with error if wxWidgets is not found +if [ ! -d "$WX_ROOT" ]; then + echo "Error: wxWidgets-3.2.5 not found in either the default PARENTDIR or /tmp. Exiting." + exit 1 +fi + echo "Using wxWidgets sources in $WX_ROOT" cd $SOURCEPATH diff --git a/src/Build/build_cmake_rpm.sh b/src/Build/build_cmake_rpm.sh index 938bf40f..247c1e5e 100644 --- a/src/Build/build_cmake_rpm.sh +++ b/src/Build/build_cmake_rpm.sh @@ -18,8 +18,20 @@ export SOURCEPATH=$(readlink -f "$SCRIPTPATH/..") # Directory where the VeraCrypt has been checked out export PARENTDIR=$(readlink -f "$SCRIPTPATH/../../..") +# Check if wxWidgets-3.2.5 exists in PARENTDIR; if not, use /tmp +if [ ! -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + export PARENTDIR="/tmp" +fi + # The sources of wxWidgets 3.2.5 must be extracted to the parent directory export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5 + +# Exit with error if wxWidgets is not found +if [ ! -d "$WX_ROOT" ]; then + echo "Error: wxWidgets-3.2.5 not found in either the default PARENTDIR or /tmp. Exiting." + exit 1 +fi + echo "Using wxWidgets sources in $WX_ROOT" cd $SOURCEPATH diff --git a/src/Build/build_veracrypt_freebsd.sh b/src/Build/build_veracrypt_freebsd.sh index fe7f1f84..00fbdd0a 100755 --- a/src/Build/build_veracrypt_freebsd.sh +++ b/src/Build/build_veracrypt_freebsd.sh @@ -21,8 +21,20 @@ if [ "$(id -u)" != "0" ]; then exit 1 fi -# the sources of wxWidgets 3.2.5 must be extracted to the parent directory +# Check if wxWidgets-3.2.5 exists in PARENTDIR; if not, use /tmp +if [ ! -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + export PARENTDIR="/tmp" +fi + +# The sources of wxWidgets 3.2.5 must be extracted to the parent directory export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5 + +# Exit with error if wxWidgets is not found +if [ ! -d "$WX_ROOT" ]; then + echo "Error: wxWidgets-3.2.5 not found in either the default PARENTDIR or /tmp. Exiting." + exit 1 +fi + echo "Using wxWidgets sources in $WX_ROOT" cd $SOURCEPATH diff --git a/src/Build/build_veracrypt_linux.sh b/src/Build/build_veracrypt_linux.sh index f8c8c325..7c226937 100755 --- a/src/Build/build_veracrypt_linux.sh +++ b/src/Build/build_veracrypt_linux.sh @@ -20,8 +20,20 @@ if [ "$(id -u)" != "0" ]; then exit 1 fi -# the sources of wxWidgets 3.2.5 must be extracted to the parent directory +# Check if wxWidgets-3.2.5 exists in PARENTDIR; if not, use /tmp +if [ ! -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + export PARENTDIR="/tmp" +fi + +# The sources of wxWidgets 3.2.5 must be extracted to the parent directory export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5 + +# Exit with error if wxWidgets is not found +if [ ! -d "$WX_ROOT" ]; then + echo "Error: wxWidgets-3.2.5 not found in either the default PARENTDIR or /tmp. Exiting." + exit 1 +fi + echo "Using wxWidgets sources in $WX_ROOT" cd $SOURCEPATH diff --git a/src/Build/build_veracrypt_linux_no_sse2.sh b/src/Build/build_veracrypt_linux_no_sse2.sh index 5f29dc49..7162ecd4 100755 --- a/src/Build/build_veracrypt_linux_no_sse2.sh +++ b/src/Build/build_veracrypt_linux_no_sse2.sh @@ -20,8 +20,20 @@ if [ "$(id -u)" != "0" ]; then exit 1 fi -# the sources of wxWidgets 3.2.5 must be extracted to the parent directory +# Check if wxWidgets-3.2.5 exists in PARENTDIR; if not, use /tmp +if [ ! -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + export PARENTDIR="/tmp" +fi + +# The sources of wxWidgets 3.2.5 must be extracted to the parent directory export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5 + +# Exit with error if wxWidgets is not found +if [ ! -d "$WX_ROOT" ]; then + echo "Error: wxWidgets-3.2.5 not found in either the default PARENTDIR or /tmp. Exiting." + exit 1 +fi + echo "Using wxWidgets sources in $WX_ROOT" cd $SOURCEPATH diff --git a/src/Build/build_veracrypt_macosx.sh b/src/Build/build_veracrypt_macosx.sh index aaaae8b5..918a9ad1 100755 --- a/src/Build/build_veracrypt_macosx.sh +++ b/src/Build/build_veracrypt_macosx.sh @@ -55,8 +55,20 @@ if [ -n "$brew" ]; then exit 0 fi -# the sources of wxWidgets 3.2.5 must be extracted to the parent directory (for night mode) +# Check if wxWidgets-3.2.5 exists in PARENTDIR; if not, use /tmp +if [ ! -d "$PARENTDIR/wxWidgets-3.2.5" ]; then + export PARENTDIR="/tmp" +fi + +# The sources of wxWidgets 3.2.5 must be extracted to the parent directory export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5 + +# Exit with error if wxWidgets is not found +if [ ! -d "$WX_ROOT" ]; then + echo "Error: wxWidgets-3.2.5 not found in either the default PARENTDIR or /tmp. Exiting." + exit 1 +fi + echo "Using wxWidgets sources in $WX_ROOT" # this will be the temporary wxWidgets directory |