Protect FAT Mach-O files

<< Click to Display Table of Contents >>

Navigation:  Code Virtualizer > Protecting an application >

Protect FAT Mach-O files

The current version of Code Virtualizer cannot protect FAT Mach-O files directly. With the help of Code Virtualizer command line parameters, you can extract all different architectures inside the FAT file to protect them individually. Once protected, you can append the protected architectures into the original FAT file.

 

Extract Architectures from a FAT file

 

To extract an architecture from a FAT file, you can use the /extract command line parameter. The following example extracts the x86 and x64 architectures from a FAT file:

 

Virtualizer.exe /extract /fat_file "C:\test\my_fat_file" /i386 "C:\test\my_file_x86" /x86_64 "C:\test\my_file_x64"

 

Protect Architectures

 

Once that you have extracted each architecture from within a FAT file, you can protect them normally like a single application. Example:

 

Virtualizer.exe /protect my_project.tmd /inputfile "C:\test\my_file_x86" /outputfile "C:\test\my_file_x86"

Virtualizer.exe /protect my_project.tmd /inputfile "C:\test\my_file_x64" /outputfile "C:\test\my_file_x64"

 

Append Architectures to an existing FAT file

 

Once that you have protected each architecture, you can append (replace) the existing architectures from a FAT file with the protected ones. Example:

 

Virtualizer.exe /append /fat_file "C:\test\my_fat_file" /i386 "C:\test\my_file_x86" /x86_64 "C:\test\my_file_x64"

 

Note that you have to pass an existing FAT file to append the different architectures. Once appended, Code Virtualizer will delete the individual architectures files from disk.