this builds on 10.12 SDK and works on sierra. UDF has replaced ext temporarily althou... master
authorbob mert <bobmert@bobs-MacBook-Pro.local>
Sun, 15 Oct 2017 12:49:15 +0000 (05:49 -0700)
committerbob mert <bobmert@bobs-MacBook-Pro.local>
Sun, 15 Oct 2017 12:49:15 +0000 (05:49 -0700)
.gitignore
Core/Unix/CoreUnix.cpp
Core/Unix/MacOSX/CoreMacOSX.cpp
Core/VolumeCreator.h
Main/CommandLineInterface.cpp
Main/Forms/EncryptionOptionsWizardPage.cpp
Main/Forms/VolumeCreationWizard.cpp
Main/Forms/VolumeFormatOptionsWizardPage.cpp
Main/Main.make
Makefile

index bc136ee..692560f 100644 (file)
@@ -1,3 +1,5 @@
+.DS_Store
+*.nem
 README.md
 /Makefile
 *.o
index 5f6dda1..c1cc95a 100644 (file)
@@ -208,17 +208,17 @@ namespace nemesis
 
        string CoreUnix::GetDefaultMountPointPrefix () const
        {
-               const char *envPrefix = getenv ("TRUECRYPT_MOUNT_PREFIX");
+               const char *envPrefix = getenv ("NEMESIS_MOUNT_PREFIX");
                if (envPrefix && !string (envPrefix).empty())
                        return envPrefix;
                
                if (FilesystemPath ("/media").IsDirectory())
-                       return "/media/truecrypt";
+                       return "/media/nemesis";
                
                if (FilesystemPath ("/mnt").IsDirectory())
-                       return "/mnt/truecrypt";
+                       return "/mnt/nemesis";
                
-               return GetTempDirectory() + "/truecrypt_mnt";
+               return GetTempDirectory() + "/nemesis_mnt";
        }
 
        uint32 CoreUnix::GetDeviceSectorSize (const DevicePath &devicePath) const
index 03104a8..29d1bd1 100644 (file)
@@ -1,6 +1,7 @@
 /*
  Copyright (c) 2016 nemesis project/mrn@sdf.org. All rights reserved.
  http://mrn.sixbit.org/
+ http://svn.screwjackllc.com
 
  Governed by the BSD 2 Clause license, the full text of which is contained in
  the file License.txt included in nemesis binary and source code distribution
@@ -19,6 +20,7 @@
 #include <sys/mount.h>
 #include <sys/sysctl.h>
 #include <sys/types.h>
+#include <sys/stat.h>
 #include <sys/wait.h>
 #include "CoreMacOSX.h"
 #include "Driver/Fuse/FuseService.h"
@@ -39,64 +41,64 @@ namespace nemesis
 
        shared_ptr <VolumeInfo> CoreMacOSX::DismountVolume (shared_ptr <VolumeInfo> mountedVolume, bool ignoreOpenFiles, bool syncVolumeInfo)
        {
-               if (!mountedVolume->VirtualDevice.IsEmpty() && mountedVolume->VirtualDevice.IsBlockDevice())
-               {
-                       list <string> args;
-                       args.push_back ("detach");
-                       args.push_back (mountedVolume->VirtualDevice);
-
-                       if (ignoreOpenFiles)
-                               args.push_back ("-force");
-
-                       try
-                       {
-                               Process::Execute ("hdiutil", args);
-                       }
-                       catch (ExecutedProcessFailed &e)
-                       {
-                               if (!ignoreOpenFiles)
-                               {
-                                       string err = e.GetErrorOutput();
-
-                                       if (err.find ("couldn't unmount") != string::npos
-                                               || err.find ("busy") != string::npos
-                                               || err.find ("49153") != string::npos)
-                                       {
-                                               throw MountedVolumeInUse (SRC_POS);
-                                       }
-                               }
-
-                               throw;
-                       }
-               }
-
-               if (syncVolumeInfo || mountedVolume->Protection == VolumeProtection::HiddenVolumeReadOnly)
-               {
-                       sync();
-                       VolumeInfoList ml = GetMountedVolumes (mountedVolume->Path);
-
-                       if (ml.size() > 0)
-                               mountedVolume = ml.front();
-               }
-
-               list <string> args;
-               args.push_back ("--");
-               args.push_back (mountedVolume->AuxMountPoint);
-
-               for (int t = 0; true; t++)
-               {
-                       try
-                       {
-                               Process::Execute ("umount", args);
-                               break;
-                       }
-                       catch (ExecutedProcessFailed&)
-                       {
-                               if (t > 10)
-                                       throw;
-                               Thread::Sleep (200);
-                       }
-               }
+        if (!mountedVolume->VirtualDevice.IsEmpty() && mountedVolume->VirtualDevice.IsBlockDevice())
+        {
+            list <string> args;
+            args.push_back ("detach");
+            args.push_back (mountedVolume->VirtualDevice);
+            
+            if (ignoreOpenFiles)
+                args.push_back ("-force");
+            
+            try
+            {
+                Process::Execute ("hdiutil", args);
+            }
+            catch (ExecutedProcessFailed &e)
+            {
+                if (!ignoreOpenFiles)
+                {
+                    string err = e.GetErrorOutput();
+                    
+                    if (err.find ("couldn't unmount") != string::npos
+                        || err.find ("busy") != string::npos
+                        || err.find ("49153") != string::npos)
+                    {
+                        throw MountedVolumeInUse (SRC_POS);
+                    }
+                }
+                
+                throw;
+            }
+        }
+        
+        if (syncVolumeInfo || mountedVolume->Protection == VolumeProtection::HiddenVolumeReadOnly)
+        {
+            sync();
+            VolumeInfoList ml = GetMountedVolumes (mountedVolume->Path);
+            
+            if (ml.size() > 0)
+                mountedVolume = ml.front();
+        }
+        
+        list <string> args;
+        args.push_back ("--");
+        args.push_back (mountedVolume->AuxMountPoint);
+        
+        for (int t = 0; true; t++)
+        {
+            try
+            {
+                Process::Execute ("umount", args);
+                break;
+            }
+            catch (ExecutedProcessFailed&)
+            {
+                if (t > 10)
+                    throw;
+                Thread::Sleep (200);
+            }
+        }
 
                try
                {
@@ -116,22 +118,49 @@ namespace nemesis
 
        void CoreMacOSX::MountAuxVolumeImage (const DirectoryPath &auxMountPoint, const MountOptions &options) const
        {
-               // Check FUSE version
-               char fuseVersionString[MAXHOSTNAMELEN + 1] = { 0 };
-               size_t fuseVersionStringLength = MAXHOSTNAMELEN;
-
-//             if (sysctlbyname ("macfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0) != 0)
-//                     throw HigherFuseVersionRequired (SRC_POS);
-
-//             vector <string> fuseVersion = StringConverter::Split (string (fuseVersionString), ".");
-//             if (fuseVersion.size() < 2)
-//                     throw HigherFuseVersionRequired (SRC_POS);
-
-//             uint32 fuseVersionMajor = StringConverter::ToUInt32 (fuseVersion[0]);
-//             uint32 fuseVersionMinor = StringConverter::ToUInt32 (fuseVersion[1]);
+        // Check FUSE version
+        char fuseVersionString[MAXHOSTNAMELEN + 1] = { 0 };
+        size_t fuseVersionStringLength = MAXHOSTNAMELEN;
+        int status;
+        bool bIsOSXFuse = false;
+        
+        if ((status = sysctlbyname ("macfuse.version.number", fuseVersionString, &fuseVersionStringLength, NULL, 0)) != 0)
+        {
+            fuseVersionStringLength = MAXHOSTNAMELEN;
+            if ((status = sysctlbyname ("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);
+            
+        }
+        vector <string> fuseVersion = StringConverter::Split (string (fuseVersionString), ".");
+        if (fuseVersion.size() < 2)
+            throw HigherFuseVersionRequired (SRC_POS);
+        
+        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))
+            throw HigherFuseVersionRequired (SRC_POS);
 
-//             if (fuseVersionMajor < 1 || (fuseVersionMajor == 1 && fuseVersionMinor < 3))
-//                     throw HigherFuseVersionRequired (SRC_POS);
 
                // Attach volume image, do not mount with hdiutil
                string volImage = string (auxMountPoint) + FuseService::GetVolumeImagePath();
@@ -151,8 +180,26 @@ namespace nemesis
                args.push_back (volImage);
                args.push_back ("-nomount");
 
-               std::string xml;
-               std::string magicRes;
+        if (!options.NoFilesystem && options.MountPoint && !options.MountPoint->IsEmpty())
+        {
+            args.push_back ("-mount");
+            args.push_back ("required");
+            
+            // Let the system specify mount point except when the user specified a non-default one
+            if (string (*options.MountPoint).find (GetDefaultMountPointPrefix()) != 0)
+            {
+                args.push_back ("-mountpoint");
+                args.push_back (*options.MountPoint);
+            }
+        }
+        else
+            args.push_back ("-nomount");
+        
+        if (options.Protection == VolumeProtection::ReadOnly)
+            args.push_back ("-readonly");
+
+               string xml;
+               string magicRes;
 
                while (true)
                {
@@ -172,21 +219,40 @@ namespace nemesis
                                throw;
                        }
                }
-
-               size_t p = xml.find ("<key>dev-entry</key>");
-               if (p == string::npos)
-                       throw ParameterIncorrect (SRC_POS);
-
-               p = xml.find ("<string>", p);
-               if (p == string::npos)
-                       throw ParameterIncorrect (SRC_POS);
-               p += 8;
-
-               size_t e = xml.find ("</string>", p);
-               if (e == string::npos)
-                       throw ParameterIncorrect (SRC_POS);
-               DevicePath virtualDev = StringConverter::Trim (xml.substr (p, e - p));
-               cerr << "virtualDev: " << StringConverter::Trim (xml.substr (p, e - p));
+        size_t p = xml.find ("<key>dev-entry</key>");
+        if (p == string::npos)
+            throw ParameterIncorrect (SRC_POS);
+        
+        p = xml.find ("<string>", p);
+        if (p == string::npos)
+            throw ParameterIncorrect (SRC_POS);
+        p += 8;
+        
+        size_t e = xml.find ("</string>", p);
+        if (e == string::npos)
+            throw ParameterIncorrect (SRC_POS);
+        DevicePath virtualDev = StringConverter::Trim (xml.substr (p, e - p));
+        cerr << "virtualDev: " << StringConverter::Trim (xml.substr (p, e - p));
+
+        try
+        {
+            FuseService::SendAuxDeviceInfo (auxMountPoint, virtualDev);
+        }
+        catch (...)
+        {
+            try
+            {
+                list <string> args;
+                args.push_back ("detach");
+                args.push_back (volImage);
+                args.push_back ("-force");
+                
+                Process::Execute ("hdiutil", args);
+            }
+            catch (ExecutedProcessFailed&) { }
+            throw;
+        } //note: the right way to do the autodetecting and fix ext3 support is to write an fstyp_ helper and let OS X handle the autodetection of the mount. we will need a new fuse-ext package, and will write one based on fuse-lwext4
+   //     FuseService::SendAuxDeviceInfo (auxMountPoint, virtualDev);
 
 
                // If we're going to mount, do it with diskutil, in order to properly pass options to /Library/Filesystems utility.
@@ -196,7 +262,8 @@ namespace nemesis
                // in order to mount fuse-ext2 respecting rw/ro status you must have adouble42 fork of fuse-ext2 installed
                // the /Library/Filesystems utility has been modified to respect the diskutil flag "rdonly" and otherwise return a
                // rw mount, in order not to break hdiutil automounts completely
-               if (!options.NoFilesystem) {
+#ifdef disabledcode
+        if (!options.NoFilesystem) {
                  du_args.push_back("mount");
 
                  dub_args.push_back("info");
@@ -216,80 +283,100 @@ namespace nemesis
                        }
                    }
                  du_args.push_back(virtualDev);
-                 try
-                   {
-                       Process::Execute ("diskutil", du_args);
-                   }
-                 catch (ExecutedProcessFailed&)
-                   {
-                     throw;
-                   }
-                  try
-                    {
-                       xml = Process::Execute ("diskutil", dub_args);
-                    }
-                  catch (ExecutedProcessFailed&)
-                    {
-                      throw;
-                    }
-                  try
-                    {
-                        magicRes = Process::Execute ("/usr/bin/file", magic_args);
-                    }
-                  catch (ExecutedProcessFailed&)
-                    {
-                      throw;
-                    }
-               }
-               try
-               {
+            try
+            {
+                magicRes = Process::Execute ("/usr/bin/file", magic_args);
+                break;
+            }
+            catch (ExecutedProcessFailed&)
+            {
+                throw;
+            }
+            if ((magicRes.find("ext2")) || (magicRes.find("ext3")) || (magicRes.find("ext4"))) {
+                try
+                {
+                    xml = Process::Execute ("diskutil", du_args);
+                    break;
+                }
+                catch (ExecutedProcessFailed&)
+                {
+                    throw;
+                }
                 size_t p = xml.find ("<key>MountPoint</key>");
                 if (p == string::npos)
-                        throw ParameterIncorrect (SRC_POS);
-
+                    throw ParameterIncorrect (SRC_POS);
+                
                 p = xml.find ("<string>", p);
                 if (p == string::npos)
-                        throw ParameterIncorrect (SRC_POS);
+                    throw ParameterIncorrect (SRC_POS);
                 p += 8;
-
+                
                 size_t e = xml.find ("</string>", p);
                 if (e == string::npos)
-                        throw ParameterIncorrect (SRC_POS);
+                    throw ParameterIncorrect (SRC_POS);
                 DevicePath volumeMountPoint = StringConverter::Trim (xml.substr (p, e - p));
-               cerr << "mountPoint: " << string(volumeMountPoint) << "\n" << "magicRes: " << magicRes << "\n";
-               if ((magicRes.find("ext2")) || (magicRes.find("ext3")) || (magicRes.find("ext4"))) {
-                 mgc_mt_args.push_back("-orw,force,local,allow_other,uid=501,gid=20");
-                 mgc_mt_args.push_back("-t");
-                 mgc_mt_args.push_back("fuse-ext2");
-                 mgc_mt_args.push_back(virtualDev);
-                 mgc_mt_args.push_back(volumeMountPoint);
-                  try
+                mgc_mt_args.push_back("-orw,force,local,allow_other,uid=501,gid=20");
+                mgc_mt_args.push_back("-t");
+                mgc_mt_args.push_back("fuse-ext2");
+                mgc_mt_args.push_back(virtualDev);
+                mgc_mt_args.push_back(volumeMountPoint);
+                try
+                {
+                    Process::Execute ("mount", mgc_mt_args);
+                }
+                catch (ExecutedProcessFailed&)
+                {
+                    try
                     {
-                        Process::Execute ("mount", mgc_mt_args);
+                        cerr << "dismount called\n";
+                        list <string> args;
+                        args.push_back ("detach");
+                        args.push_back (volImage);
+                        args.push_back ("-force");
+                        
+                        Process::Execute ("hdiutil", args);
                     }
-                  catch (ExecutedProcessFailed&)
+                    catch (ExecutedProcessFailed&) { }
+                    throw;
+                }
+                int mountedOk=1;
+            } else {
+                try
+                   {
+                       Process::Execute ("diskutil", du_args);
+                   }
+                 catch (ExecutedProcessFailed&)
+                {
+                    try
                     {
-                      throw;
+                        cerr << "dismount called\n";
+                        list <string> args;
+                        args.push_back ("detach");
+                        args.push_back (volImage);
+                        args.push_back ("-force");
+                        
+                        Process::Execute ("hdiutil", args);
                     }
-               }
-//                     cerr << "trying fuseservice: " << string (auxMountPoint) << string(*options.MountPoint) < "\n";
-                       FuseService::SendAuxDeviceInfo (auxMountPoint, virtualDev);
-               }
-               catch (...)
-               {
-                       try
-                       {
-                               cerr << "dismount called\n";
-                               list <string> args;
-                               args.push_back ("detach");
-                               args.push_back (volImage);
-                               args.push_back ("-force");
+                    catch (ExecutedProcessFailed&) { }
+                    throw;
+                }
+                size_t pb = xml.find ("<key>MountPoint</key>");
+            if (pb == string::npos)
+                throw ParameterIncorrect(SRC_POS);
+            }
+        //        try
+          //          {
+                   //    xml = Process::Execute ("diskutil", dub_args);
+              //      }
+                //  catch (ExecutedProcessFailed&)
+                //    {
+                  //    throw;
+                  //  }
 
-                               Process::Execute ("hdiutil", args);
-                       }
-                       catch (ExecutedProcessFailed&) { }
-                       throw;
+
+                       FuseService::SendAuxDeviceInfo (auxMountPoint, virtualDev);
                }
+#endif
        }
 
        auto_ptr <CoreBase> Core (new CoreServiceProxy <CoreMacOSX>);
index 1058a14..0be408b 100644 (file)
@@ -51,14 +51,15 @@ namespace nemesis
                        {
 #ifdef TC_WINDOWS
                                return VolumeCreationOptions::FilesystemType::NTFS;
-#elif defined (TC_LINUX)
+#endif
+#ifdef TC_LINUX
                                return VolumeCreationOptions::FilesystemType::UDF;
-#elif defined (TC_MACOSX)
+#endif
+#ifdef TC_MACOSX
                                return VolumeCreationOptions::FilesystemType::UDF;
-#elif defined (TC_FREEBSD) || defined (TC_SOLARIS)
+#endif
+#ifdef TC_FREEBSD
                                return VolumeCreationOptions::FilesystemType::Ext3;
-#else
-                               return VolumeCreationOptions::FilesystemType::FAT;
 #endif
                        }
                };
index eebbae8..d1fa10c 100644 (file)
@@ -279,9 +279,9 @@ namespace nemesis
                                ArgMountOptions.FilesystemType = wstring (str);
                                
                                if (str.IsSameAs (L"FAT", false))
-                                       ArgFilesystem = VolumeCreationOptions::FilesystemType::FAT;
+                                       ArgFilesystem = VolumeCreationOptions::FilesystemType::UDF;
                                else
-                                       ArgFilesystem = VolumeCreationOptions::FilesystemType::None;
+                                       ArgFilesystem = VolumeCreationOptions::FilesystemType::UDF;
                        }
                }
 
index 142cde7..77ae614 100644 (file)
@@ -21,22 +21,32 @@ namespace nemesis
        {
 
                EncryptionAlgorithms = EncryptionAlgorithm::GetAvailableAlgorithms();
-               foreach (shared_ptr <EncryptionAlgorithm> ea, EncryptionAlgorithms)
+        int i=0;
+        foreach (shared_ptr <EncryptionAlgorithm> ea, EncryptionAlgorithms)
                {
                        if (!ea->IsDeprecated())
                                EncryptionAlgorithmChoice->Append (ea->GetName(), ea.get());
-               }
-
-               EncryptionAlgorithmChoice->Select (0);
-               
-               Hashes = Hash::GetAvailableAlgorithms();
+            if (ea->GetName() == "Serpent-Twofish-Camellia")
+                EncryptionAlgorithmChoice->Select(i);
+            i++;
+        }
+
+       //      EncryptionAlgorithmChoice->Select (8);
+        int xy=0;
+        Hashes = Hash::GetAvailableAlgorithms();
                foreach (shared_ptr <Hash> hash, Hashes)
                {
-                       if (!hash->IsDeprecated())
+            if (!hash->IsDeprecated())
                                HashChoice->Append (hash->GetName(), hash.get());
-               }
-
-               HashChoice->Select (0);
+            if (hash->GetName() == (wstring) L"Blake-512")
+                HashChoice->Select (xy-1);
+            xy++;
+        }
+// I'm not in favor of deprecating SHA, AES and pushing strong robust combiners in place, but i'm
+// all for deprecating SHA, AES and pushing strong robust combiners in place
+// if they're going to pay off RSA to push bad elliptic curves this is called pragmatism
+// better yet call it a chilling effect
+//        HashChoice->Select (2);
                OnEncryptionAlgorithmSelected();
 
        }
index b7b2899..80e28ed 100644 (file)
@@ -231,7 +231,7 @@ namespace nemesis
                        
                case Step::CrossPlatformSupport:
                        {
-                               SingleChoiceWizardPage <bool> *page = new SingleChoiceWizardPage <bool> (GetPageParent(), wxEmptyString, true);
+                SingleChoiceWizardPage <bool> *page = new SingleChoiceWizardPage <bool> (GetPageParent(), wxEmptyString, true);
                                page->SetPageTitle (_("Cross-Platform Support"));
 
                                page->AddChoice (true, _("I will mount the volume on other platforms"),
@@ -591,7 +591,7 @@ namespace nemesis
                                                                {
                                                                        if (partition.MountPoint == "/")
                                                                        {
-                                                                               Gui->ShowError (_("Error: You are trying to encrypt a system drive.\n\nnemesis can encrypt a system drive only under Windows."));
+                                                                               Gui->ShowError (_("Error: You are trying to encrypt a system drive.\n\nnemesis can not encrypt a system drive."));
                                                                                return GetCurrentStep();
                                                                        }
                                                                }
@@ -626,7 +626,7 @@ namespace nemesis
                                                        {
                                                                if (mountPoint == "/")
                                                                {
-                                                                       Gui->ShowError (_("Error: You are trying to encrypt a system partition.\n\nnemesis can encrypt system partitions only under Windows."));
+                                                                       Gui->ShowError (_("Error: You are trying to encrypt a system partition.\n\nnemesis can not encrypt system partitions."));
                                                                        return GetCurrentStep();
                                                                }
 
@@ -762,13 +762,17 @@ namespace nemesis
                                {
                                        return GetCurrentStep();
                                }
+#ifdef TC_FREEBSD
+                    SelectedFilesystemType = VolumeCreationOptions::FilesystemType::Ext3;
+#endif
 
-                               if (LargeFilesSupport)
-                                       SelectedFilesystemType = VolumeCreationOptions::FilesystemType::GetPlatformNative();
-                               else
-                                       SelectedFilesystemType = VolumeCreationOptions::FilesystemType::FAT;
-
-                               return Step::FormatOptions;
+#ifdef TC_MACOSX
+                                       SelectedFilesystemType = VolumeCreationOptions::FilesystemType::UDF;
+#endif
+#ifdef TC_LINUX
+                    SelectedFilesystemType = VolumeCreationOptions::FilesystemType::UDF;
+#endif
+                return Step::FormatOptions;
                        }
 
                case Step::FormatOptions:
@@ -778,7 +782,9 @@ namespace nemesis
                                QuickFormatEnabled = page->IsQuickFormatEnabled();
 
                                if (SelectedFilesystemType != VolumeCreationOptions::FilesystemType::None
-                                       && SelectedFilesystemType != VolumeCreationOptions::FilesystemType::FAT)
+                                       && SelectedFilesystemType != VolumeCreationOptions::FilesystemType::FAT
+                    && SelectedFilesystemType != VolumeCreationOptions::FilesystemType::UDF
+                    && SelectedFilesystemType != VolumeCreationOptions::FilesystemType::Ext3)
                                        return Step::CrossPlatformSupport;
 
                                return Step::CreationProgress;
@@ -798,7 +804,7 @@ namespace nemesis
                                }
 
                                if (forward && CrossPlatformSupport)
-                                       Gui->ShowWarning (StringFormatter (_("Please note that the volume will not be formatted with a FAT filesystem and, therefore, you may be required to install additional filesystem drivers on platforms other than {0}, which will enable you to mount the volume."), SystemInfo::GetPlatformName())); 
+                                       Gui->ShowWarning (StringFormatter (_("Please note that the volume will not be formatted with a portable filesystem and, therefore, you may be required to install additional filesystem drivers on platforms other than {0}, which will enable you to mount the volume. Currently we suggest using UDF."), SystemInfo::GetPlatformName()));
 
                                return Step::CreationProgress;
                        }
index 6dbaf9c..f6ed6d3 100644 (file)
@@ -18,15 +18,22 @@ namespace nemesis
        VolumeFormatOptionsWizardPage::VolumeFormatOptionsWizardPage (wxPanel* parent, uint64 volumeSize, uint32 sectorSize, bool enableQuickFormatButton, bool disableNoneFilesystem, bool disable32bitFilesystems)
                : VolumeFormatOptionsWizardPageBase (parent)
        {
-               InfoStaticText->SetLabel (_(
+#ifdef TC_FREEBSD
+        InfoStaticText->SetLabel (_(
                        "In order to enable your operating system to mount your new volume, it has to be formatted with a filesystem. Please select a filesystem type.\n\nFreeBSD: ext3 is preferred. May need to load ext2fs module for support (kldload ext2fs)."));
+#endif
+#ifdef TC_MACOSX
+        InfoStaticText->SetLabel (_(
+                                    "In order to enable your operating system to mount your new volume, it has to be formatted with a filesystem. Please select a filesystem type.\n\OSX: UDF is preferred."));
+#endif
+#ifdef TC_LINUX
+        InfoStaticText->SetLabel (_(
+                                    "In order to enable your operating system to mount your new volume, it has to be formatted with a filesystem. Please select a filesystem type.\n\Linux: UDF is preferred."));
+#endif
 
-               if (!disableNoneFilesystem)
+        if (!disableNoneFilesystem)
                        FilesystemTypeChoice->Append (LangString["NONE"],       (void *) VolumeCreationOptions::FilesystemType::None);
 
-               if (!disable32bitFilesystems && volumeSize <= TC_MAX_FAT_SECTOR_COUNT * sectorSize)
-                       FilesystemTypeChoice->Append (L"FAT",                   (void *) VolumeCreationOptions::FilesystemType::FAT);
-
 #ifdef TC_WINDOWS
                FilesystemTypeChoice->Append (L"NTFS",                          (void *) VolumeCreationOptions::FilesystemType::NTFS);
 #elif defined (TC_LINUX)
@@ -34,12 +41,14 @@ namespace nemesis
                FilesystemTypeChoice->Append (L"Linux Ext3",            (void *) VolumeCreationOptions::FilesystemType::Ext3);
                FilesystemTypeChoice->Append (L"Linux Ext2",            (void *) VolumeCreationOptions::FilesystemType::Ext2);
                FilesystemTypeChoice->Append (L"Linux Ext4",            (void *) VolumeCreationOptions::FilesystemType::Ext4);
-#elif defined (TC_MACOSX)
+        SetFilesystemType (VolumeCreationOptions::FilesystemType::UDF);
+#elif defined TC_MACOSX
                FilesystemTypeChoice->Append (L"UDF",           (void *) VolumeCreationOptions::FilesystemType::UDF);
                FilesystemTypeChoice->Append (L"Linux Ext3",            (void *) VolumeCreationOptions::FilesystemType::Ext3);
                FilesystemTypeChoice->Append (L"Mac OS Extended",       (void *) VolumeCreationOptions::FilesystemType::MacOsExt);
                FilesystemTypeChoice->Append (L"exFAT",                 (void *) VolumeCreationOptions::FilesystemType::exFAT);
-#elif defined (TC_FREEBSD) || defined (TC_SOLARIS)
+        SetFilesystemType (VolumeCreationOptions::FilesystemType::UDF);
+#elif defined TC_FREEBSD || defined TC_SOLARIS
 //             FilesystemTypeChoice->Append (L"UFS",                           (void *) VolumeCreationOptions::FilesystemType::UFS);
 //             FilesystemTypeChoice->Append (L"Linux Ext2",            (void *) VolumeCreationOptions::FilesystemType::Ext2);
                FilesystemTypeChoice->Append (L"Linux Ext3",            (void *) VolumeCreationOptions::FilesystemType::Ext3);
@@ -47,12 +56,10 @@ namespace nemesis
 //             FilesystemTypeChoice->Append (L"NTFS",                          (void *) VolumeCreationOptions::FilesystemType::NTFS);
 //#elif defined (TC_LINUX) || defined (TC_MACOSX)
 //             FilesystemTypeChoice->Append (L"UDF",                           (void *) VolumeCreationOptions::FilesystemType::UDF);
+        SetFilesystemType (VolumeCreationOptions::FilesystemType::Ext3);
 #endif
-               if (!disable32bitFilesystems && volumeSize <= TC_MAX_FAT_SECTOR_COUNT * sectorSize)
-                       SetFilesystemType (VolumeCreationOptions::FilesystemType::FAT);
-               else
-                       SetFilesystemType (VolumeCreationOptions::FilesystemType::GetPlatformNative());
-
+        if (!disable32bitFilesystems && volumeSize <= TC_MAX_FAT_SECTOR_COUNT * sectorSize)
+            FilesystemTypeChoice->Append (L"FAT",                      (void *) VolumeCreationOptions::FilesystemType::FAT);
                QuickFormatCheckBox->Enable (enableQuickFormatButton);
        }
 
index 715c20b..75a7a80 100644 (file)
@@ -95,8 +95,8 @@ endif
 
 #------ FUSE configuration ------
 
-FUSE_LIBS = $(shell pkg-config fuse --libs)
-
+#FUSE_LIBS = $(shell pkg-config fuse --libs)
+FUSE_LIBS = -losxfuse
 
 #------ Executable ------
 
index 91d38e4..da8b5bd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -201,14 +201,15 @@ ifeq "$(shell uname -s)" "Darwin"
        export CXX = clang++
        APPNAME := nemesis
 
-       TC_OSX_SDK ?= /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
+       TC_OSX_SDK ?= /Library/Developer/CommandLineTools/SDKs/MacOSX10.12.sdk/
+#      TC_OSX_SDK ?= /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
        CC := clang
        CXX := clang++
-
-       OBJCXXFLAGS += -std=c++11
-       LDFLAGS += -stdlib=libstdc++ -static-libstdc++
-       CXXFLAGS += -stdlib=libstdc++
-       C_CXX_FLAGS += -DTC_UNIX -DTC_BSD -DTC_MACOSX -mmacosx-version-min=10.12 -isysroot $(TC_OSX_SDK) -static-libstdc++
+       CFLAGS += -stdlib=libstdc++
+       OBJCXXFLAGS := 
+       LDFLAGS += -stdlib=libstdc++ -static-libstdc++ -std=c++11 
+       CXXFLAGS +=  -std=c++11 -stdlib=libstdc++ -DHAVE_TR1_TYPE_TRAITS
+       C_CXX_FLAGS += -DTC_UNIX -DTC_BSD -DTC_MACOSX -mmacosx-version-min=10.12 -isysroot $(TC_OSX_SDK) -static-libstdc++ -I/usr/local/include
 
 #      LFLAGS += -mmacosx-version-min=10.4 -Wl,-syslibroot $(TC_OSX_SDK)
 #      WX_CONFIGURE_FLAGS += --with-macosx-version-min=10.4 --with-macosx-sdk=$(TC_OSX_SDK)
This page took 0.353377 seconds and 4 git commands to generate. Download a nemesis OSX (sierra+high sierra, tested/working) binary, with fuse-ext3 via e2fsprogs, at this link. application and installer are signed by screwjack, llc. must install fuse with macFUSE layer first.