VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Build/build_cmake_opensuse.sh
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2024-07-06 09:33:04 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2024-07-06 09:33:04 +0200
commitab1b98923064e84686fbd12e93a3b0ee404e86c9 (patch)
tree7a9ca1b25b25975b39aec4343d6cd6b1602a9368 /src/Build/build_cmake_opensuse.sh
parent3095fc265a2c4104953abc664a8640efb900e897 (diff)
downloadVeraCrypt-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/Build/build_cmake_opensuse.sh')
-rw-r--r--src/Build/build_cmake_opensuse.sh12
1 files changed, 12 insertions, 0 deletions
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