Skip to content

Commit cdc00dc

Browse files
committed
Linux: add support for building against FUSE3
1 parent f7c9e62 commit cdc00dc

8 files changed

Lines changed: 327 additions & 72 deletions

File tree

src/Build/CMakeLists.txt

Lines changed: 42 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ elseif ( NOT DEFINED NOGUI )
1010
MESSAGE(FATAL_ERROR "NOGUI variable MUST BE set to TRUE if building 'Console' version, 'FALSE' otherwise")
1111
endif()
1212

13+
option(VC_WITH_FUSE3 "Link against FUSE3 instead of FUSE2 when packaging" OFF)
14+
1315
# - Set version of the package
1416
set( FULL_VERSION "1.26.27" )
1517
set( VERSION "1.26.27" )
@@ -268,46 +270,56 @@ if ( ( PLATFORM STREQUAL "Debian" ) OR ( PLATFORM STREQUAL "Ubuntu" ) )
268270
set( CPACK_DEBIAN_PACKAGE_RELEASE ${CPACK_PACKAGE_RELEASE} )
269271
set( CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${ARCHITECTURE} ) # mandatory
270272

273+
# Determine the FUSE runtime package name that matches the selected FUSE version
274+
set(VC_DEBIAN_USE_T64 FALSE)
275+
if ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "13" ) )
276+
OR ( ( PLATFORM STREQUAL "Ubuntu" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "24.04" ) ) )
277+
set(VC_DEBIAN_USE_T64 TRUE)
278+
endif ()
279+
if (VC_WITH_FUSE3)
280+
set(VC_DEBIAN_FUSE_PACKAGE "libfuse3-3")
281+
else ()
282+
if (VC_DEBIAN_USE_T64)
283+
set(VC_DEBIAN_FUSE_PACKAGE "libfuse2t64")
284+
else ()
285+
set(VC_DEBIAN_FUSE_PACKAGE "libfuse2")
286+
endif ()
287+
endif ()
288+
271289
if (NOGUI)
272290
# Link against statically built wxWidgets so that we don't depend on any GTK library
273-
# In case of Ubuntu 24.04/ Debian 13 or newer, libfuse2 package was renamed libfuse2t64
274-
if ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "13" ) )
275-
OR ( ( PLATFORM STREQUAL "Ubuntu" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "24.04" ) ) )
276-
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libfuse2t64, dmsetup, sudo" )
277-
else ()
278-
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libfuse2, dmsetup, sudo" )
279-
endif()
291+
set( CPACK_DEBIAN_PACKAGE_DEPENDS "${VC_DEBIAN_FUSE_PACKAGE}, dmsetup, sudo" )
280292
else ()
281293
# Link against gtk3 version of wxWidgets if >= Debian 10 or >= Ubuntu 18.04
282294
# Otherwise, link against gtk2 version of wxWidgets
283295
if ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "13" ) )
284296
OR ( ( PLATFORM STREQUAL "Ubuntu" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "25.04" ) ) )
285297

286-
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.2-1t64, libayatana-appindicator3-1, libfuse2t64, dmsetup, sudo" )
298+
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.2-1t64, libayatana-appindicator3-1, ${VC_DEBIAN_FUSE_PACKAGE}, dmsetup, sudo" )
287299

288-
# In case of Ubuntu 24.04, we depend on libfuse2t64 instead of libfuse2 and we link statically against wxWidgets
300+
# In case of Ubuntu 24.04, we depend on the t64 variant of the FUSE package and we link statically against wxWidgets
289301
# because there is a bug in wxWidgets that ships with Ubuntu 24.04 and which was fixed in wxWidgets 3.2.5
290302
elseif ( ( PLATFORM STREQUAL "Ubuntu" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "24.04" ) )
291-
292-
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libgtk-3-0t64, libayatana-appindicator3-1, libfuse2t64, dmsetup, sudo" )
293303

294-
elseif ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "12" ) )
304+
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libgtk-3-0t64, libayatana-appindicator3-1, ${VC_DEBIAN_FUSE_PACKAGE}, dmsetup, sudo" )
305+
306+
elseif ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "12" ) )
295307
OR ( ( PLATFORM STREQUAL "Ubuntu" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "23.04" ) ) )
296-
297-
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.2-1, libayatana-appindicator3-1, libfuse2, dmsetup, sudo" )
298-
299-
elseif ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "10" ) )
308+
309+
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.2-1, libayatana-appindicator3-1, ${VC_DEBIAN_FUSE_PACKAGE}, dmsetup, sudo" )
310+
311+
elseif ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "10" ) )
300312
OR ( ( PLATFORM STREQUAL "Ubuntu" ) AND ( PLATFORM_VERSION VERSION_GREATER_EQUAL "18.04" ) ) )
301-
302-
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-gtk3-0v5, libayatana-appindicator3-1, libfuse2, dmsetup, sudo" )
303-
313+
314+
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-gtk3-0v5, libayatana-appindicator3-1, ${VC_DEBIAN_FUSE_PACKAGE}, dmsetup, sudo" )
315+
304316
else ()
305317
# Link against statically built wxWidgets on Ubuntu 14.04 and older, and Debian 8 and older
306318
if ( ( ( PLATFORM STREQUAL "Debian" ) AND ( PLATFORM_VERSION VERSION_LESS_EQUAL "8" ) )
307319
OR ( ( PLATFORM STREQUAL "Ubuntu" ) AND ( PLATFORM_VERSION VERSION_LESS_EQUAL "14.04" ) ) )
308-
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libgtk2.0-0, libfuse2, dmsetup, sudo" )
320+
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libgtk2.0-0, ${VC_DEBIAN_FUSE_PACKAGE}, dmsetup, sudo" )
309321
else ()
310-
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-0v5, libfuse2, dmsetup, sudo" )
322+
set( CPACK_DEBIAN_PACKAGE_DEPENDS "libwxgtk3.0-0v5, ${VC_DEBIAN_FUSE_PACKAGE}, dmsetup, sudo" )
311323
endif ()
312324

313325
endif()
@@ -330,7 +342,7 @@ elseif ( ( PLATFORM STREQUAL "CentOS" ) OR ( PLATFORM STREQUAL "openSUSE" ) OR (
330342
set( RPM_PRERM ${CMAKE_CURRENT_BINARY_DIR}/Packaging/rpm-control/prerm.sh)
331343

332344
set( CPACK_GENERATOR "RPM" ) # mandatory
333-
set( CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_SUMMARY} ) # mandatory
345+
set( CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY} ) # mandatory
334346
set( CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION} ) # mandatory
335347
set( CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME} ) # mandatory
336348
set( CPACK_RPM_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}.rpm ) # mandatory
@@ -341,17 +353,22 @@ elseif ( ( PLATFORM STREQUAL "CentOS" ) OR ( PLATFORM STREQUAL "openSUSE" ) OR (
341353
set( CPACK_RPM_PACKAGE_GROUP "Applications/System" ) # mandatory, https://fedoraproject.org/wiki/RPMGroups
342354
set( CPACK_RPM_PACKAGE_VENDOR ${CPACK_PACKAGE_VENDOR} ) # mandatory
343355
set( CPACK_RPM_PACKAGE_AUTOREQ "no" ) # disable automatic shared libraries dependency detection (most of the time buggy)
356+
if (VC_WITH_FUSE3)
357+
set(VC_RPM_FUSE_PACKAGE "fuse3")
358+
else ()
359+
set(VC_RPM_FUSE_PACKAGE "fuse")
360+
endif ()
344361

345362
if (NOGUI)
346-
set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, sudo" )
363+
set( CPACK_RPM_PACKAGE_REQUIRES "${VC_RPM_FUSE_PACKAGE}, device-mapper, sudo" )
347364
else ()
348365
find_package(PkgConfig REQUIRED)
349366
pkg_check_modules(GTK3 gtk+-3.0)
350367

351368
if(GTK3_FOUND)
352-
set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk3, sudo" )
369+
set( CPACK_RPM_PACKAGE_REQUIRES "${VC_RPM_FUSE_PACKAGE}, device-mapper, gtk3, sudo" )
353370
else()
354-
set( CPACK_RPM_PACKAGE_REQUIRES "fuse, device-mapper, gtk2, sudo" )
371+
set( CPACK_RPM_PACKAGE_REQUIRES "${VC_RPM_FUSE_PACKAGE}, device-mapper, gtk2, sudo" )
355372
endif()
356373
endif()
357374

src/Build/build_cmake_deb.sh

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,52 @@ export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5
4141

4242
cd $SOURCEPATH
4343

44+
# Detect requested FUSE version (defaults to FUSE2). Can be set via WITHFUSE3=1 or by passing FUSE3/--with-fuse3.
45+
build_with_fuse3=0
46+
if [ -n "$WITHFUSE3" ] && [ "$WITHFUSE3" != "0" ]; then
47+
build_with_fuse3=1
48+
fi
49+
50+
preserved_args=""
51+
while [ $# -gt 0 ]; do
52+
case "$1" in
53+
FUSE3|WITHFUSE3|--with-fuse3)
54+
build_with_fuse3=1
55+
;;
56+
FUSE2|WITHFUSE2|--with-fuse2)
57+
build_with_fuse3=0
58+
;;
59+
WXSTATIC|INDICATOR)
60+
if [ -z "$preserved_args" ]; then
61+
preserved_args="$1"
62+
else
63+
preserved_args="$preserved_args $1"
64+
fi
65+
;;
66+
*)
67+
echo "Warning: Unrecognized option '$1' (ignored)" >&2
68+
;;
69+
esac
70+
shift
71+
done
72+
73+
set --
74+
if [ -n "$preserved_args" ]; then
75+
for arg in $preserved_args; do
76+
set -- "$@" "$arg"
77+
done
78+
fi
79+
80+
if [ "$build_with_fuse3" = "1" ]; then
81+
FUSE3_MAKE_FLAG="WITHFUSE3=1"
82+
FUSE3_CMAKE_FLAG="-DVC_WITH_FUSE3=TRUE"
83+
echo "Building VeraCrypt packages against FUSE3"
84+
else
85+
FUSE3_MAKE_FLAG=""
86+
FUSE3_CMAKE_FLAG="-DVC_WITH_FUSE3=FALSE"
87+
echo "Building VeraCrypt packages against FUSE2"
88+
fi
89+
4490
build_and_install() {
4591
target=$1
4692
wxstatic=$2
@@ -63,7 +109,7 @@ build_and_install() {
63109
echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild."
64110
else
65111
echo "Using wxWidgets sources in $WX_ROOT"
66-
make $wxstatic_value $nogui wxbuild || exit 1
112+
make $wxstatic_value $nogui $FUSE3_MAKE_FLAG wxbuild || exit 1
67113
fi
68114
fi
69115

@@ -73,9 +119,9 @@ build_and_install() {
73119
fi
74120

75121
rm -rf "$PARENTDIR/VeraCrypt_Setup/$target"
76-
make $wxstatic_value $indicator_value $nogui clean || exit 1
77-
make $wxstatic_value $indicator_value $nogui || exit 1
78-
make $wxstatic_value $indicator_value $nogui install DESTDIR="$PARENTDIR/VeraCrypt_Setup/$target" || exit 1
122+
make $wxstatic_value $indicator_value $nogui $FUSE3_MAKE_FLAG clean || exit 1
123+
make $wxstatic_value $indicator_value $nogui $FUSE3_MAKE_FLAG || exit 1
124+
make $wxstatic_value $indicator_value $nogui $FUSE3_MAKE_FLAG install DESTDIR="$PARENTDIR/VeraCrypt_Setup/$target" || exit 1
79125
}
80126

81127
# Handle arguments
@@ -112,8 +158,8 @@ rm -rf $PARENTDIR/VeraCrypt_Packaging
112158
mkdir -p $PARENTDIR/VeraCrypt_Packaging/GUI
113159
mkdir -p $PARENTDIR/VeraCrypt_Packaging/Console
114160

115-
cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DNOGUI=FALSE || exit 1
161+
cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DNOGUI=FALSE $FUSE3_CMAKE_FLAG || exit 1
116162
cpack --config $PARENTDIR/VeraCrypt_Packaging/GUI/CPackConfig.cmake || exit 1
117163

118-
cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DNOGUI=TRUE || exit 1
164+
cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DNOGUI=TRUE $FUSE3_CMAKE_FLAG || exit 1
119165
cpack --config $PARENTDIR/VeraCrypt_Packaging/Console/CPackConfig.cmake || exit 1

src/Build/build_cmake_opensuse.sh

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,38 @@ export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5
4141

4242
cd $SOURCEPATH
4343

44+
# Detect requested FUSE version (defaults to FUSE2). Can be set via WITHFUSE3=1 or by passing FUSE3/--with-fuse3.
45+
build_with_fuse3=0
46+
if [ -n "$WITHFUSE3" ] && [ "$WITHFUSE3" != "0" ]; then
47+
build_with_fuse3=1
48+
fi
49+
50+
while [ $# -gt 0 ]; do
51+
case "$1" in
52+
FUSE3|WITHFUSE3|--with-fuse3)
53+
build_with_fuse3=1
54+
;;
55+
FUSE2|WITHFUSE2|--with-fuse2)
56+
build_with_fuse3=0
57+
;;
58+
*)
59+
echo "Unknown option: $1" >&2
60+
exit 1
61+
;;
62+
esac
63+
shift
64+
done
65+
66+
if [ "$build_with_fuse3" = "1" ]; then
67+
FUSE3_MAKE_FLAG="WITHFUSE3=1"
68+
FUSE3_CMAKE_FLAG="-DVC_WITH_FUSE3=TRUE"
69+
echo "Building VeraCrypt packages against FUSE3"
70+
else
71+
FUSE3_MAKE_FLAG=""
72+
FUSE3_CMAKE_FLAG="-DVC_WITH_FUSE3=FALSE"
73+
echo "Building VeraCrypt packages against FUSE2"
74+
fi
75+
4476
echo "Building GUI version of VeraCrypt for RPM using wxWidgets static libraries"
4577

4678
# This will be the temporary wxWidgets directory
@@ -51,14 +83,14 @@ if [ -L "${WX_BUILD_DIR}/wx-config" ]; then
5183
echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild."
5284
else
5385
echo "Using wxWidgets sources in $WX_ROOT"
54-
make WXSTATIC=1 wxbuild || exit 1
86+
make WXSTATIC=1 $FUSE3_MAKE_FLAG wxbuild || exit 1
5587
ln -s $WX_BUILD_DIR/lib $WX_BUILD_DIR/lib64
5688
fi
5789

5890
rm -rf "$PARENTDIR/VeraCrypt_Setup/GUI"
59-
make WXSTATIC=1 clean || exit 1
60-
make WXSTATIC=1 || exit 1
61-
make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1
91+
make WXSTATIC=1 $FUSE3_MAKE_FLAG clean || exit 1
92+
make WXSTATIC=1 $FUSE3_MAKE_FLAG || exit 1
93+
make WXSTATIC=1 $FUSE3_MAKE_FLAG install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1
6294

6395
echo "Building console version of VeraCrypt for RPM using wxWidgets static libraries"
6496

@@ -74,14 +106,14 @@ if [ -L "${WX_BUILD_DIR}/wx-config" ]; then
74106
echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild."
75107
else
76108
echo "Using wxWidgets sources in $WX_ROOT"
77-
make WXSTATIC=1 NOGUI=1 wxbuild || exit 1
109+
make WXSTATIC=1 NOGUI=1 $FUSE3_MAKE_FLAG wxbuild || exit 1
78110
ln -s $WX_BUILD_DIR/lib $WX_BUILD_DIR/lib64
79111
fi
80112

81113
rm -rf "$PARENTDIR/VeraCrypt_Setup/Console"
82-
make WXSTATIC=1 NOGUI=1 clean || exit 1
83-
make WXSTATIC=1 NOGUI=1 || exit 1
84-
make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1
114+
make WXSTATIC=1 NOGUI=1 $FUSE3_MAKE_FLAG clean || exit 1
115+
make WXSTATIC=1 NOGUI=1 $FUSE3_MAKE_FLAG || exit 1
116+
make WXSTATIC=1 NOGUI=1 $FUSE3_MAKE_FLAG install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1
85117

86118
echo "Creating VeraCrypt RPM packages "
87119

@@ -95,7 +127,7 @@ mkdir -p $PARENTDIR/VeraCrypt_Packaging/GUI
95127
mkdir -p $PARENTDIR/VeraCrypt_Packaging/Console
96128

97129
# wxWidgets was built using native GTK version
98-
cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DNOGUI=FALSE || exit 1
130+
cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DNOGUI=FALSE $FUSE3_CMAKE_FLAG || exit 1
99131
cpack --config $PARENTDIR/VeraCrypt_Packaging/GUI/CPackConfig.cmake || exit 1
100-
cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DNOGUI=TRUE || exit 1
132+
cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DNOGUI=TRUE $FUSE3_CMAKE_FLAG || exit 1
101133
cpack --config $PARENTDIR/VeraCrypt_Packaging/Console/CPackConfig.cmake|| exit 1

src/Build/build_cmake_rpm.sh

Lines changed: 45 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,38 @@ export WX_ROOT=$PARENTDIR/wxWidgets-3.2.5
4141

4242
cd $SOURCEPATH
4343

44+
# Detect requested FUSE version (defaults to FUSE2). Can be set via WITHFUSE3=1 or by passing FUSE3/--with-fuse3.
45+
build_with_fuse3=0
46+
if [ -n "$WITHFUSE3" ] && [ "$WITHFUSE3" != "0" ]; then
47+
build_with_fuse3=1
48+
fi
49+
50+
while [ $# -gt 0 ]; do
51+
case "$1" in
52+
FUSE3|WITHFUSE3|--with-fuse3)
53+
build_with_fuse3=1
54+
;;
55+
FUSE2|WITHFUSE2|--with-fuse2)
56+
build_with_fuse3=0
57+
;;
58+
*)
59+
echo "Unknown option: $1" >&2
60+
exit 1
61+
;;
62+
esac
63+
shift
64+
done
65+
66+
if [ "$build_with_fuse3" = "1" ]; then
67+
FUSE3_MAKE_FLAG="WITHFUSE3=1"
68+
FUSE3_CMAKE_FLAG="-DVC_WITH_FUSE3=TRUE"
69+
echo "Building VeraCrypt packages against FUSE3"
70+
else
71+
FUSE3_MAKE_FLAG=""
72+
FUSE3_CMAKE_FLAG="-DVC_WITH_FUSE3=FALSE"
73+
echo "Building VeraCrypt packages against FUSE2"
74+
fi
75+
4476
echo "Building GUI version of VeraCrypt for RPM using wxWidgets static libraries"
4577

4678
# This will be the temporary wxWidgets directory
@@ -51,13 +83,16 @@ if [ -L "${WX_BUILD_DIR}/wx-config" ]; then
5183
echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild."
5284
else
5385
echo "Using wxWidgets sources in $WX_ROOT"
54-
make WXSTATIC=1 wxbuild || exit 1
86+
make WXSTATIC=1 $FUSE3_MAKE_FLAG wxbuild || exit 1
87+
if [ -d "$WX_BUILD_DIR/lib" ] && [ ! -e "$WX_BUILD_DIR/lib64" ]; then
88+
ln -s "$WX_BUILD_DIR/lib" "$WX_BUILD_DIR/lib64"
89+
fi
5590
fi
5691

5792
rm -rf "$PARENTDIR/VeraCrypt_Setup/GUI"
58-
make WXSTATIC=1 clean || exit 1
59-
make WXSTATIC=1 || exit 1
60-
make WXSTATIC=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1
93+
make WXSTATIC=1 $FUSE3_MAKE_FLAG clean || exit 1
94+
make WXSTATIC=1 $FUSE3_MAKE_FLAG || exit 1
95+
make WXSTATIC=1 $FUSE3_MAKE_FLAG install DESTDIR="$PARENTDIR/VeraCrypt_Setup/GUI" || exit 1
6196

6297
echo "Building console version of VeraCrypt for RPM using wxWidgets static libraries"
6398

@@ -73,13 +108,13 @@ if [ -L "${WX_BUILD_DIR}/wx-config" ]; then
73108
echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild."
74109
else
75110
echo "Using wxWidgets sources in $WX_ROOT"
76-
make WXSTATIC=1 NOGUI=1 wxbuild || exit 1
111+
make WXSTATIC=1 NOGUI=1 $FUSE3_MAKE_FLAG wxbuild || exit 1
77112
fi
78113

79114
rm -rf "$PARENTDIR/VeraCrypt_Setup/Console"
80-
make WXSTATIC=1 NOGUI=1 clean || exit 1
81-
make WXSTATIC=1 NOGUI=1 || exit 1
82-
make WXSTATIC=1 NOGUI=1 install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1
115+
make WXSTATIC=1 NOGUI=1 $FUSE3_MAKE_FLAG clean || exit 1
116+
make WXSTATIC=1 NOGUI=1 $FUSE3_MAKE_FLAG || exit 1
117+
make WXSTATIC=1 NOGUI=1 $FUSE3_MAKE_FLAG install DESTDIR="$PARENTDIR/VeraCrypt_Setup/Console" || exit 1
83118

84119
echo "Creating VeraCrypt RPM packages "
85120

@@ -93,7 +128,7 @@ mkdir -p $PARENTDIR/VeraCrypt_Packaging/GUI
93128
mkdir -p $PARENTDIR/VeraCrypt_Packaging/Console
94129

95130
# wxWidgets was built using native GTK version
96-
cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DNOGUI=FALSE || exit 1
131+
cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/GUI -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/GUI" -DNOGUI=FALSE $FUSE3_CMAKE_FLAG || exit 1
97132
cpack --config $PARENTDIR/VeraCrypt_Packaging/GUI/CPackConfig.cmake || exit 1
98-
cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DNOGUI=TRUE || exit 1
133+
cmake -H$SCRIPTPATH -B$PARENTDIR/VeraCrypt_Packaging/Console -DVERACRYPT_BUILD_DIR="$PARENTDIR/VeraCrypt_Setup/Console" -DNOGUI=TRUE $FUSE3_CMAKE_FLAG || exit 1
99134
cpack --config $PARENTDIR/VeraCrypt_Packaging/Console/CPackConfig.cmake || exit 1

src/Driver/Fuse/Driver.make

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ OBJS :=
1616
OBJS += FuseService.o
1717

1818
CXXFLAGS += $(shell $(PKG_CONFIG) $(VC_FUSE_PACKAGE) --cflags)
19+
CXXFLAGS += -DVC_FUSE_VERSION=$(VC_FUSE_VERSION)
1920

2021
include $(BUILD_INC)/Makefile.inc

0 commit comments

Comments
 (0)