MacOSX: remove MacFUSE dependency and link against OSXFuse library. Now, only standard OSXFuse install is needed without MacFUSE compatibility option.

This commit is contained in:
Mounir IDRASSI 2016-09-29 15:41:19 +02:00
parent e362d804b0
commit 7d6347f468
No known key found for this signature in database
GPG Key ID: DD0C382D5FCFB8FC
4 changed files with 17 additions and 73 deletions

View File

@ -119,27 +119,20 @@ namespace VeraCrypt
int status;
bool bIsOSXFuse = false;
if ((status = sysctlbyname ("macfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
if ((status = sysctlbyname ("osxfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
{
fuseVersionStringLength = MAXHOSTNAMELEN;
if ((status = sysctlbyname ("osxfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
if ((status = sysctlbyname ("vfs.generic.osxfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
{
fuseVersionStringLength = MAXHOSTNAMELEN;
if ((status = sysctlbyname ("vfs.generic.osxfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
{
throw HigherFuseVersionRequired (SRC_POS);
}
}
// look for compatibility mode
struct stat sb;
if ((0 == stat("/usr/local/lib/libfuse.dylib", &sb)) && (0 == stat("/Library/Frameworks/MacFUSE.framework/MacFUSE", &sb)))
{
bIsOSXFuse = true;
}
else
throw HigherFuseVersionRequired (SRC_POS);
}
}
// look for OSXFuse dynamic library
struct stat sb;
if (0 != stat("/usr/local/lib/libosxfuse_i64.2.dylib", &sb))
{
throw HigherFuseVersionRequired (SRC_POS);
}
vector <string> fuseVersion = StringConverter::Split (string (fuseVersionString), ".");
@ -149,12 +142,7 @@ namespace VeraCrypt
uint32 fuseVersionMajor = StringConverter::ToUInt32 (fuseVersion[0]);
uint32 fuseVersionMinor = StringConverter::ToUInt32 (fuseVersion[1]);
if (bIsOSXFuse)
{
if (fuseVersionMajor < 2 || (fuseVersionMajor == 2 && fuseVersionMinor < 5))
throw HigherFuseVersionRequired (SRC_POS);
}
else if (fuseVersionMajor < 1 || (fuseVersionMajor == 1 && fuseVersionMinor < 3))
if (fuseVersionMajor < 2 || (fuseVersionMajor == 2 && fuseVersionMinor < 5))
throw HigherFuseVersionRequired (SRC_POS);
// Mount volume image

View File

@ -106,8 +106,11 @@ endif
#------ FUSE configuration ------
ifeq "$(PLATFORM)" "MacOSX"
FUSE_LIBS = $(shell pkg-config osxfuse --libs)
else
FUSE_LIBS = $(shell pkg-config fuse --libs)
+endif
#------ Executable ------

View File

@ -493,7 +493,7 @@ namespace VeraCrypt
EX2MSG (UnsupportedTrueCryptFormat, LangString["UNSUPPORTED_TRUECRYPT_FORMAT"]);
#ifdef TC_MACOSX
EX2MSG (HigherFuseVersionRequired, _("VeraCrypt requires OSXFUSE 2.3 or later with MacFUSE compatibility layer installer.\nPlease ensure that you have selected this compatibility layer during OSXFUSE installation."));
EX2MSG (HigherFuseVersionRequired, _("VeraCrypt requires OSXFUSE 2.5 or above."));
#endif
#undef EX2MSG

View File

@ -790,7 +790,7 @@
<key>SECONDARY_VALUE</key>
<string></string>
<key>VALUE</key>
<string>OSXFuse seems to be missing on your machine. VeraCrypt requires OSXFuse 2.3 or above.
<string>OSXFuse seems to be missing on your machine. VeraCrypt requires OSXFuse 2.5 or above.
Please download the latest OSXFuse version from :
https://osxfuse.github.io/</string>
</dict>
@ -800,7 +800,7 @@ https://osxfuse.github.io/</string>
<key>SECONDARY_VALUE</key>
<string></string>
<key>VALUE</key>
<string>OSXFuse semble ne pas être installé sur votre machine. VeraCrypt nécessite OSXFuse 2.3 ou supérieur.
<string>OSXFuse semble ne pas être installé sur votre machine. VeraCrypt nécessite OSXFuse 2.5 ou supérieur.
Merci de télécharger la dernière version de OSXFuse à partir de :
https://osxfuse.github.io/
@ -812,53 +812,6 @@ https://osxfuse.github.io/
<key>STATE</key>
<true/>
</dict>
<dict>
<key>BEHAVIOR</key>
<integer>3</integer>
<key>DICTIONARY</key>
<dict>
<key>IC_REQUIREMENT_FILES_CONDITION</key>
<integer>0</integer>
<key>IC_REQUIREMENT_FILES_DISK_TYPE</key>
<integer>1</integer>
<key>IC_REQUIREMENT_FILES_LIST</key>
<array>
<string>/Library/Frameworks/MacFUSE.framework/MacFUSE</string>
<string>/usr/local/lib/libfuse.dylib</string>
</array>
<key>IC_REQUIREMENT_FILES_SELECTOR</key>
<integer>1</integer>
</dict>
<key>IC_REQUIREMENT_CHECK_TYPE</key>
<integer>0</integer>
<key>IDENTIFIER</key>
<string>fr.whitebox.Packages.requirement.files</string>
<key>MESSAGE</key>
<array>
<dict>
<key>LANGUAGE</key>
<string>English</string>
<key>SECONDARY_VALUE</key>
<string></string>
<key>VALUE</key>
<string>VeraCrypt needs OSXFUSE to be installed with MacFUSE compatibility layer enabled.
Please re-install OSXFUSE and check the MacFUSE compatibility layer in the installer.</string>
</dict>
<dict>
<key>LANGUAGE</key>
<string>French</string>
<key>SECONDARY_VALUE</key>
<string></string>
<key>VALUE</key>
<string>VeraCrypt nécessite que OSXFUSE soit installé avec l'option "MacFUSE compatibility layer".
Merci de ré-installer OSXFUSE et de cocher l'option de compatibilité MacFUSE dans l'installeur.</string>
</dict>
</array>
<key>NAME</key>
<string>MacFUSE compatibility layer</string>
<key>STATE</key>
<true/>
</dict>
</array>
<key>POSTINSTALL_PATH</key>
<dict/>