VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Build/build_veracrypt_macosx.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Build/build_veracrypt_macosx.sh')
-rwxr-xr-xsrc/Build/build_veracrypt_macosx.sh14
1 files changed, 13 insertions, 1 deletions
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