diff --git a/ChangeLog b/ChangeLog index 49e4f3702..108c91537 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-10-05 Natalia Portillo + + * DiscImageChef.sln: + Move filesystems to a separate library. + 2015-10-05 Natalia Portillo * DiscImageChef.sln: diff --git a/DiscImageChef/Plugins/AmigaDOS.cs b/DiscImageChef.Filesystems/AmigaDOS.cs similarity index 98% rename from DiscImageChef/Plugins/AmigaDOS.cs rename to DiscImageChef.Filesystems/AmigaDOS.cs index 79abb8d49..08c7b2ce0 100644 --- a/DiscImageChef/Plugins/AmigaDOS.cs +++ b/DiscImageChef.Filesystems/AmigaDOS.cs @@ -46,7 +46,7 @@ namespace DiscImageChef.Plugins { class AmigaDOSPlugin : Plugin { - public AmigaDOSPlugin(PluginBase Core) + public AmigaDOSPlugin() { Name = "Amiga DOS filesystem"; PluginUUID = new Guid("3c882400-208c-427d-a086-9119852a1bc7"); @@ -199,12 +199,12 @@ namespace DiscImageChef.Plugins return false; ulong root_ptr = BigEndianBitConverter.ToUInt32(sector, 0x08); - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (AmigaDOS plugin): Bootblock points to {0} as Rootblock", root_ptr); root_ptr = (partitionEnd - partitionStart) / 2 + partitionStart; - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (AmigaDOS plugin): Nonetheless, going to block {0} for Rootblock", root_ptr); if (root_ptr >= imagePlugin.GetSectors()) @@ -242,7 +242,7 @@ namespace DiscImageChef.Plugins bootBlk.bootCode = new byte[BootBlockSectors.Length - 0x0C]; Array.Copy(BootBlockSectors, 0x0C, bootBlk.bootCode, 0, BootBlockSectors.Length - 0x0C); - if (MainClass.isDebug) + //if (MainClass.isDebug) { Console.WriteLine("DEBUG (AmigaDOS plugin): Stored boot blocks checksum is 0x{0:X8}", bootBlk.checksum); Console.WriteLine("DEBUG (AmigaDOS plugin): Probably incorrect calculated boot blocks checksum is 0x{0:X8}", AmigaChecksum(RootBlockSector)); @@ -290,7 +290,7 @@ namespace DiscImageChef.Plugins rootBlk.extension = BigEndianBitConverter.ToUInt32(RootBlockSector, (int)(0x18 + rootBlk.hashTableSize * 4 + 192)); rootBlk.sec_type = BigEndianBitConverter.ToUInt32(RootBlockSector, (int)(0x18 + rootBlk.hashTableSize * 4 + 196)); - if (MainClass.isDebug) + //if (MainClass.isDebug) { Console.WriteLine("DEBUG (AmigaDOS plugin): Stored root block checksum is 0x{0:X8}", rootBlk.checksum); Console.WriteLine("DEBUG (AmigaDOS plugin): Probably incorrect calculated root block checksum is 0x{0:X8}", AmigaChecksum(RootBlockSector)); diff --git a/DiscImageChef/Plugins/AppleHFS.cs b/DiscImageChef.Filesystems/AppleHFS.cs similarity index 99% rename from DiscImageChef/Plugins/AppleHFS.cs rename to DiscImageChef.Filesystems/AppleHFS.cs index 2c22a401d..86a6fd9b5 100644 --- a/DiscImageChef/Plugins/AppleHFS.cs +++ b/DiscImageChef.Filesystems/AppleHFS.cs @@ -52,7 +52,7 @@ namespace DiscImageChef.Plugins // "H+" const UInt16 HFSBB_MAGIC = 0x4C4B; // "LK" - public AppleHFS(PluginBase Core) + public AppleHFS() { Name = "Apple Hierarchical File System"; PluginUUID = new Guid("36405F8D-0D26-6ECC-0BBB-1D5225FF404F"); @@ -82,7 +82,7 @@ namespace DiscImageChef.Plugins if (drSigWord == HFS_MAGIC) { - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (HFS Plugin): HFS sector size is 512 bytes, but device's 2048"); drSigWord = BigEndianBitConverter.ToUInt16(mdb_sector, 0x7C); // Seek to embedded HFS+ signature diff --git a/DiscImageChef/Plugins/AppleHFSPlus.cs b/DiscImageChef.Filesystems/AppleHFSPlus.cs similarity index 99% rename from DiscImageChef/Plugins/AppleHFSPlus.cs rename to DiscImageChef.Filesystems/AppleHFSPlus.cs index 718470509..dd6a81a1d 100644 --- a/DiscImageChef/Plugins/AppleHFSPlus.cs +++ b/DiscImageChef.Filesystems/AppleHFSPlus.cs @@ -51,7 +51,7 @@ namespace DiscImageChef.Plugins // "H+" const UInt16 HFSX_MAGIC = 0x4858; // "HX" - public AppleHFSPlus(PluginBase Core) + public AppleHFSPlus() { Name = "Apple HFS+ filesystem"; PluginUUID = new Guid("36405F8D-0D26-6EBE-436F-62F0586B4F08"); diff --git a/DiscImageChef/Plugins/AppleMFS.cs b/DiscImageChef.Filesystems/AppleMFS.cs similarity index 99% rename from DiscImageChef/Plugins/AppleMFS.cs rename to DiscImageChef.Filesystems/AppleMFS.cs index 2c43d0a96..e91a9b75d 100644 --- a/DiscImageChef/Plugins/AppleMFS.cs +++ b/DiscImageChef.Filesystems/AppleMFS.cs @@ -49,7 +49,7 @@ namespace DiscImageChef.Plugins // "LK" const UInt16 MFSBB_MAGIC = 0x4C4B; - public AppleMFS(PluginBase Core) + public AppleMFS() { Name = "Apple Macintosh File System"; PluginUUID = new Guid("36405F8D-0D26-4066-6538-5DBF5D065C3A"); diff --git a/DiscImageChef/Plugins/BFS.cs b/DiscImageChef.Filesystems/BFS.cs similarity index 99% rename from DiscImageChef/Plugins/BFS.cs rename to DiscImageChef.Filesystems/BFS.cs index f2f406e1a..fed93b993 100644 --- a/DiscImageChef/Plugins/BFS.cs +++ b/DiscImageChef.Filesystems/BFS.cs @@ -57,7 +57,7 @@ namespace DiscImageChef.Plugins const UInt32 BEFS_CLEAN = 0x434C454E; const UInt32 BEFS_DIRTY = 0x44495254; - public BeFS(PluginBase Core) + public BeFS() { Name = "Be Filesystem"; PluginUUID = new Guid("dc8572b3-b6ad-46e4-8de9-cbe123ff6672"); diff --git a/DiscImageChef.Filesystems/ChangeLog b/DiscImageChef.Filesystems/ChangeLog new file mode 100644 index 000000000..83a438fc6 --- /dev/null +++ b/DiscImageChef.Filesystems/ChangeLog @@ -0,0 +1,29 @@ +2015-10-05 Natalia Portillo + + * ODS.cs: + * FFS.cs: + * FAT.cs: + * BFS.cs: + * SysV.cs: + * HPFS.cs: + * NTFS.cs: + * Opera.cs: + * extFS.cs: + * ext2FS.cs: + * ProDOS.cs: + * Plugin.cs: + * LisaFS.cs: + * Symbian.cs: + * ISO9660.cs: + * SolarFS.cs: + * MinixFS.cs: + * UNIXBFS.cs: + * AppleMFS.cs: + * AppleHFS.cs: + * AmigaDOS.cs: + * PCEngine.cs: + * AppleHFSPlus.cs: + * Properties/AssemblyInfo.cs: + * DiscImageChef.Filesystems.csproj: + Move filesystems to a separate library. + diff --git a/DiscImageChef.Filesystems/DiscImageChef.Filesystems.csproj b/DiscImageChef.Filesystems/DiscImageChef.Filesystems.csproj new file mode 100644 index 000000000..9e97a2d0d --- /dev/null +++ b/DiscImageChef.Filesystems/DiscImageChef.Filesystems.csproj @@ -0,0 +1,85 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {D7016DF2-5A5E-4524-B40D-BA2D59576688} + Library + DiscImageChef.Filesystems + DiscImageChef.Filesystems + 2.2 + v3.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {CC48B324-A532-4A45-87A6-6F91F7141E8D} + DiscImageChef.Checksums + + + {F2B84194-26EB-4227-B1C5-6602517E85AE} + DiscImageChef.CommonTypes + + + {F8BDF57B-1571-4CD0-84B3-B422088D359A} + DiscImageChef.Helpers + + + {DA7AB65D-B5BA-4003-8893-A51BB071BA2F} + DiscImageChef.Partitions + + + {74032CBC-339B-42F3-AF6F-E96C261F3E6A} + DiscImageChef.DiscImages + + + \ No newline at end of file diff --git a/DiscImageChef/Plugins/FAT.cs b/DiscImageChef.Filesystems/FAT.cs similarity index 99% rename from DiscImageChef/Plugins/FAT.cs rename to DiscImageChef.Filesystems/FAT.cs index 1acab9277..05a40b09d 100644 --- a/DiscImageChef/Plugins/FAT.cs +++ b/DiscImageChef.Filesystems/FAT.cs @@ -46,7 +46,7 @@ namespace DiscImageChef.Plugins { class FAT : Plugin { - public FAT(PluginBase Core) + public FAT() { Name = "Microsoft File Allocation Table"; PluginUUID = new Guid("33513B2C-0D26-0D2D-32C3-79D8611158E0"); @@ -86,7 +86,7 @@ namespace DiscImageChef.Plugins { first_fat_entry = BitConverter.ToUInt32(fat_sector, 0); // Easier to manage - if (MainClass.isDebug) + //if (MainClass.isDebug) { Console.WriteLine("DEBUG (FAT plugin): fats_no = {0}", fats_no); Console.WriteLine("DEBUG (FAT plugin): media_descriptor = 0x{0:X2}", media_descriptor); diff --git a/DiscImageChef/Plugins/FFS.cs b/DiscImageChef.Filesystems/FFS.cs similarity index 99% rename from DiscImageChef/Plugins/FFS.cs rename to DiscImageChef.Filesystems/FFS.cs index 16d717205..f17c428b9 100644 --- a/DiscImageChef/Plugins/FFS.cs +++ b/DiscImageChef.Filesystems/FFS.cs @@ -45,7 +45,7 @@ namespace DiscImageChef.Plugins { public class FFSPlugin : Plugin { - public FFSPlugin(PluginBase Core) + public FFSPlugin() { Name = "BSD Fast File System (aka UNIX File System, UFS)"; PluginUUID = new Guid("CC90D342-05DB-48A8-988C-C1FE000034A3"); @@ -379,7 +379,7 @@ namespace DiscImageChef.Plugins ufs_sb.fs_magic = BigEndianBitConverter.ToUInt32(ufs_sb_sectors, 0x055C); // 0x055C magic number ufs_sb.fs_space = ufs_sb_sectors[0x0560]; // 0x0560 list of blocks for each rotation - if (MainClass.isDebug) + //if (MainClass.isDebug) { Console.WriteLine("ufs_sb offset: 0x{0:X8}", sb_offset); Console.WriteLine("fs_link_42bsd: 0x{0:X8}", ufs_sb.fs_link_42bsd); diff --git a/DiscImageChef/Plugins/HPFS.cs b/DiscImageChef.Filesystems/HPFS.cs similarity index 99% rename from DiscImageChef/Plugins/HPFS.cs rename to DiscImageChef.Filesystems/HPFS.cs index 7539cb386..3bcf53fd6 100644 --- a/DiscImageChef/Plugins/HPFS.cs +++ b/DiscImageChef.Filesystems/HPFS.cs @@ -46,7 +46,7 @@ namespace DiscImageChef.Plugins { class HPFS : Plugin { - public HPFS(PluginBase Core) + public HPFS() { Name = "OS/2 High Performance File System"; PluginUUID = new Guid("33513B2C-f590-4acb-8bf2-0b1d5e19dec5"); diff --git a/DiscImageChef/Plugins/ISO9660.cs b/DiscImageChef.Filesystems/ISO9660.cs similarity index 98% rename from DiscImageChef/Plugins/ISO9660.cs rename to DiscImageChef.Filesystems/ISO9660.cs index 4a14f0777..e175e1737 100644 --- a/DiscImageChef/Plugins/ISO9660.cs +++ b/DiscImageChef.Filesystems/ISO9660.cs @@ -51,7 +51,7 @@ namespace DiscImageChef.Plugins { static bool alreadyLaunched; - public ISO9660Plugin(PluginBase Core) + public ISO9660Plugin() { Name = "ISO9660 Filesystem"; PluginUUID = new Guid("d812f4d3-c357-400d-90fd-3b22ef786aa8"); @@ -156,15 +156,15 @@ namespace DiscImageChef.Plugins while (true) { - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (ISO9660 Plugin): Processing VD loop no. {0}", counter); // Seek to Volume Descriptor - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (ISO9660 Plugin): Reading sector {0}", 16 + counter + partitionStart); byte[] vd_sector = imagePlugin.ReadSector(16 + counter + partitionStart); VDType = vd_sector[0]; - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (ISO9660 Plugin): VDType = {0}", VDType); if (VDType == 255) // Supposedly we are in the PVD. @@ -271,7 +271,7 @@ namespace DiscImageChef.Plugins ulong i = (ulong)BitConverter.ToInt32(VDPathTableStart, 0); - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (ISO9660 Plugin): VDPathTableStart = {0} + {1} = {2}", i, partitionStart, i + partitionStart); // TODO: Check this @@ -305,7 +305,7 @@ namespace DiscImageChef.Plugins byte[] ipbin_sector = imagePlugin.ReadSector(0 + partitionStart); Array.Copy(ipbin_sector, 0x000, SegaHardwareID, 0, 16); - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (ISO9660 Plugin): SegaHardwareID = \"{0}\"", Encoding.ASCII.GetString(SegaHardwareID)); switch (Encoding.ASCII.GetString(SegaHardwareID)) @@ -316,7 +316,7 @@ namespace DiscImageChef.Plugins { SegaCD = true; // Ok, this contains SegaCD IP.BIN - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (ISO9660 Plugin): Found SegaCD IP.BIN"); IPBinInformation.AppendLine("--------------------------------"); @@ -393,8 +393,8 @@ namespace DiscImageChef.Plugins Array.Copy(ipbin_sector, 0x1B0, spare_space7, 0, 64); // Inside here should be modem information, but I need to get a modem-enabled game Array.Copy(ipbin_sector, 0x1F0, region_codes, 0, 16); // Region codes, space-filled - if(MainClass.isDebug) - { + //if(MainClass.isDebug) + //{ Console.WriteLine("DEBUG (ISO9660 Plugin): segacd_ipbin.volume_name = \"{0}\"", Encoding.ASCII.GetString(volume_name)); Console.WriteLine("DEBUG (ISO9660 Plugin): segacd_ipbin.system_name = \"{0}\"", Encoding.ASCII.GetString(system_name)); Console.WriteLine("DEBUG (ISO9660 Plugin): segacd_ipbin.volume_version = \"{0}\"", Encoding.ASCII.GetString(volume_version)); @@ -416,7 +416,7 @@ namespace DiscImageChef.Plugins Console.WriteLine("DEBUG (ISO9660 Plugin): segacd_ipbin.product_code = \"{0}\"", Encoding.ASCII.GetString(product_code)); Console.WriteLine("DEBUG (ISO9660 Plugin): segacd_ipbin.peripherals = \"{0}\"", Encoding.ASCII.GetString(peripherals)); Console.WriteLine("DEBUG (ISO9660 Plugin): segacd_ipbin.region_codes = \"{0}\"", Encoding.ASCII.GetString(region_codes)); - } + //} // Decoding all data DateTime ipbindate; @@ -531,7 +531,7 @@ namespace DiscImageChef.Plugins { Saturn = true; - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (ISO9660 Plugin): Found Sega Saturn IP.BIN"); IPBinInformation.AppendLine("--------------------------------"); @@ -565,8 +565,8 @@ namespace DiscImageChef.Plugins Array.Copy(ipbin_sector, 0x050, peripherals, 0, 16); // Supported peripherals, see above Array.Copy(ipbin_sector, 0x060, product_name, 0, 112); // Game name, space-filled - if(MainClass.isDebug) - { + //if(MainClass.isDebug) + //{ Console.WriteLine("DEBUG (ISO9660 Plugin): saturn_ipbin.maker_id = \"{0}\"", Encoding.ASCII.GetString(maker_id)); Console.WriteLine("DEBUG (ISO9660 Plugin): saturn_ipbin.product_no = \"{0}\"", Encoding.ASCII.GetString(product_no)); Console.WriteLine("DEBUG (ISO9660 Plugin): saturn_ipbin.product_version = \"{0}\"", Encoding.ASCII.GetString(product_version)); @@ -580,7 +580,7 @@ namespace DiscImageChef.Plugins Console.WriteLine("DEBUG (ISO9660 Plugin): saturn_ipbin.region_codes = \"{0}\"", Encoding.ASCII.GetString(region_codes)); Console.WriteLine("DEBUG (ISO9660 Plugin): saturn_ipbin.peripherals = \"{0}\"", Encoding.ASCII.GetString(peripherals)); Console.WriteLine("DEBUG (ISO9660 Plugin): saturn_ipbin.product_name = \"{0}\"", Encoding.ASCII.GetString(product_name)); - } + //} // Decoding all data @@ -654,7 +654,7 @@ namespace DiscImageChef.Plugins { Dreamcast = true; - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (ISO9660 Plugin): Found Sega Dreamcast IP.BIN"); IPBinInformation.AppendLine("--------------------------------"); @@ -698,8 +698,8 @@ namespace DiscImageChef.Plugins Array.Copy(ipbin_sector, 0x070, producer, 0, 16); // Game producer, space-filled Array.Copy(ipbin_sector, 0x080, product_name, 0, 128); // Game name, space-filled - if(MainClass.isDebug) - { + //if(MainClass.isDebug) + //{ Console.WriteLine("DEBUG (ISO9660 Plugin): dreamcast_ipbin.maker_id = \"{0}\"", Encoding.ASCII.GetString(maker_id)); Console.WriteLine("DEBUG (ISO9660 Plugin): dreamcast_ipbin.dreamcast_crc = 0x{0}", Encoding.ASCII.GetString(dreamcast_crc)); Console.WriteLine("DEBUG (ISO9660 Plugin): dreamcast_ipbin.spare_space1 = \"{0}\"", Encoding.ASCII.GetString(spare_space1)); @@ -717,7 +717,7 @@ namespace DiscImageChef.Plugins Console.WriteLine("DEBUG (ISO9660 Plugin): dreamcast_ipbin.boot_filename = \"{0}\"", Encoding.ASCII.GetString(boot_filename)); Console.WriteLine("DEBUG (ISO9660 Plugin): dreamcast_ipbin.producer = \"{0}\"", Encoding.ASCII.GetString(producer)); Console.WriteLine("DEBUG (ISO9660 Plugin): dreamcast_ipbin.product_name = \"{0}\"", Encoding.ASCII.GetString(product_name)); - } + //} // Decoding all data DateTime ipbindate; diff --git a/DiscImageChef/Plugins/LisaFS.cs b/DiscImageChef.Filesystems/LisaFS.cs similarity index 99% rename from DiscImageChef/Plugins/LisaFS.cs rename to DiscImageChef.Filesystems/LisaFS.cs index 27a5b3958..127bed2d4 100644 --- a/DiscImageChef/Plugins/LisaFS.cs +++ b/DiscImageChef.Filesystems/LisaFS.cs @@ -63,7 +63,7 @@ namespace DiscImageChef.Plugins const UInt16 FILEID_ERASED = 0x7FFF; const UInt16 FILEID_MAX = FILEID_ERASED; - public LisaFS(PluginBase Core) + public LisaFS() { Name = "Apple Lisa File System"; PluginUUID = new Guid("7E6034D1-D823-4248-A54D-239742B28391"); @@ -92,7 +92,7 @@ namespace DiscImageChef.Plugins byte[] tag = imagePlugin.ReadSectorTag((ulong)i, SectorTagType.AppleSectorTag); UInt16 fileid = BigEndianBitConverter.ToUInt16(tag, 0x04); - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (LisaFS plugin): Sector {0}, file ID 0x{1:X4}", i, fileid); if (fileid == FILEID_MDDF) @@ -107,7 +107,7 @@ namespace DiscImageChef.Plugins mddf.blocksize = BigEndianBitConverter.ToUInt16(sector, 0x7C); mddf.datasize = BigEndianBitConverter.ToUInt16(sector, 0x7E); - if (MainClass.isDebug) + //if (MainClass.isDebug) { Console.WriteLine("DEBUG (LisaFS plugin): Current sector = {0}", i); Console.WriteLine("DEBUG (LisaFS plugin): mddf.mddf_block = {0}", mddf.mddf_block); @@ -149,7 +149,7 @@ namespace DiscImageChef.Plugins } catch (Exception ex) { - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (LisaFS plugin): Exception {0}, {1}, {2}", ex.Message, ex.InnerException, ex.StackTrace); return false; } @@ -181,7 +181,7 @@ namespace DiscImageChef.Plugins byte[] tag = imagePlugin.ReadSectorTag((ulong)i, SectorTagType.AppleSectorTag); UInt16 fileid = BigEndianBitConverter.ToUInt16(tag, 0x04); - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (LisaFS plugin): Sector {0}, file ID 0x{1:X4}", i, fileid); if (fileid == FILEID_MDDF) @@ -272,7 +272,7 @@ namespace DiscImageChef.Plugins mddf.vol_sequence = BigEndianBitConverter.ToUInt16(sector, 0x136); mddf.vol_left_mounted = sector[0x138]; - if (MainClass.isDebug) + //if (MainClass.isDebug) { Console.WriteLine("mddf.unknown1 = 0x{0:X2} ({0})", mddf.unknown1); Console.WriteLine("mddf.unknown2 = 0x{0:X2} ({0})", mddf.unknown2); @@ -400,7 +400,7 @@ namespace DiscImageChef.Plugins } catch (Exception ex) { - if (MainClass.isDebug) + //if (MainClass.isDebug) Console.WriteLine("DEBUG (LisaFS plugin): Exception {0}, {1}, {2}", ex.Message, ex.InnerException, ex.StackTrace); return; } diff --git a/DiscImageChef/Plugins/MinixFS.cs b/DiscImageChef.Filesystems/MinixFS.cs similarity index 99% rename from DiscImageChef/Plugins/MinixFS.cs rename to DiscImageChef.Filesystems/MinixFS.cs index dfb22ab76..60a56d89a 100644 --- a/DiscImageChef/Plugins/MinixFS.cs +++ b/DiscImageChef.Filesystems/MinixFS.cs @@ -67,7 +67,7 @@ namespace DiscImageChef.Plugins const UInt16 MINIX3_CIGAM = 0x5A4D; // Minix v3, 60 char filenames - public MinixFS(PluginBase Core) + public MinixFS() { Name = "Minix Filesystem"; PluginUUID = new Guid("FE248C3B-B727-4AE5-A39F-79EA9A07D4B3"); diff --git a/DiscImageChef/Plugins/NTFS.cs b/DiscImageChef.Filesystems/NTFS.cs similarity index 99% rename from DiscImageChef/Plugins/NTFS.cs rename to DiscImageChef.Filesystems/NTFS.cs index 713fe5345..e0ce26dd8 100644 --- a/DiscImageChef/Plugins/NTFS.cs +++ b/DiscImageChef.Filesystems/NTFS.cs @@ -45,7 +45,7 @@ namespace DiscImageChef.Plugins { class NTFS : Plugin { - public NTFS(PluginBase Core) + public NTFS() { Name = "New Technology File System (NTFS)"; PluginUUID = new Guid("33513B2C-1e6d-4d21-a660-0bbc789c3871"); diff --git a/DiscImageChef/Plugins/ODS.cs b/DiscImageChef.Filesystems/ODS.cs similarity index 99% rename from DiscImageChef/Plugins/ODS.cs rename to DiscImageChef.Filesystems/ODS.cs index ef532f780..933cd7251 100644 --- a/DiscImageChef/Plugins/ODS.cs +++ b/DiscImageChef.Filesystems/ODS.cs @@ -52,7 +52,7 @@ namespace DiscImageChef.Plugins { class ODS : Plugin { - public ODS(PluginBase Core) + public ODS() { Name = "Files-11 On-Disk Structure"; PluginUUID = new Guid("de20633c-8021-4384-aeb0-83b0df14491f"); diff --git a/DiscImageChef/Plugins/Opera.cs b/DiscImageChef.Filesystems/Opera.cs similarity index 99% rename from DiscImageChef/Plugins/Opera.cs rename to DiscImageChef.Filesystems/Opera.cs index b2d2db3f5..a8f2fbeac 100644 --- a/DiscImageChef/Plugins/Opera.cs +++ b/DiscImageChef.Filesystems/Opera.cs @@ -45,7 +45,7 @@ namespace DiscImageChef.Plugins { class OperaFS : Plugin { - public OperaFS(PluginBase Core) + public OperaFS() { Name = "Opera Filesystem Plugin"; PluginUUID = new Guid("0ec84ec7-eae6-4196-83fe-943b3fe46dbd"); diff --git a/DiscImageChef/Plugins/PCEngine.cs b/DiscImageChef.Filesystems/PCEngine.cs similarity index 98% rename from DiscImageChef/Plugins/PCEngine.cs rename to DiscImageChef.Filesystems/PCEngine.cs index 15dc9f056..f691a54e1 100644 --- a/DiscImageChef/Plugins/PCEngine.cs +++ b/DiscImageChef.Filesystems/PCEngine.cs @@ -44,7 +44,7 @@ namespace DiscImageChef.Plugins { class PCEnginePlugin : Plugin { - public PCEnginePlugin(PluginBase Core) + public PCEnginePlugin() { Name = "PC Engine CD Plugin"; PluginUUID = new Guid("e5ee6d7c-90fa-49bd-ac89-14ef750b8af3"); diff --git a/DiscImageChef/Plugins/Plugin.cs b/DiscImageChef.Filesystems/Plugin.cs similarity index 100% rename from DiscImageChef/Plugins/Plugin.cs rename to DiscImageChef.Filesystems/Plugin.cs diff --git a/DiscImageChef/Plugins/ProDOS.cs b/DiscImageChef.Filesystems/ProDOS.cs similarity index 99% rename from DiscImageChef/Plugins/ProDOS.cs rename to DiscImageChef.Filesystems/ProDOS.cs index 5449f8694..5da9a110f 100644 --- a/DiscImageChef/Plugins/ProDOS.cs +++ b/DiscImageChef.Filesystems/ProDOS.cs @@ -83,7 +83,7 @@ namespace DiscImageChef.Plugins const byte ProDOSEntryLength = 0x27; const byte ProDOSEntriesPerBlock = 0x0D; - public ProDOSPlugin(PluginBase Core) + public ProDOSPlugin() { Name = "Apple ProDOS filesystem"; PluginUUID = new Guid("43874265-7B8A-4739-BCF7-07F80D5932BF"); @@ -156,7 +156,7 @@ namespace DiscImageChef.Plugins year += 1900; if (year < 1940) year += 100; - if (MainClass.isDebug) + //if (MainClass.isDebug) { Console.WriteLine("DEBUG (ProDOS plugin): temp_timestamp_left = 0x{0:X4}", temp_timestamp_left); Console.WriteLine("DEBUG (ProDOS plugin): temp_timestamp_right = 0x{0:X4}", temp_timestamp_right); @@ -210,7 +210,7 @@ namespace DiscImageChef.Plugins if ((rootDirectoryKeyBlock.header.access & ProDOSBackupAttribute) == ProDOSBackupAttribute) sbInformation.AppendLine("Volume must be backed up"); - if (MainClass.isDebug) + //if (MainClass.isDebug) { if ((rootDirectoryKeyBlock.header.access & ProDOSReservedAttributeMask) != 0) sbInformation.AppendFormat("DEBUG(ProDOS plugin): Reserved attributes are set: {0:X2}", rootDirectoryKeyBlock.header.access).AppendLine(); diff --git a/DiscImageChef.Filesystems/Properties/AssemblyInfo.cs b/DiscImageChef.Filesystems/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..1e28207b3 --- /dev/null +++ b/DiscImageChef.Filesystems/Properties/AssemblyInfo.cs @@ -0,0 +1,27 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("DiscImageChef.Filesystems")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Claunia.com")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("© Claunia.com")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/DiscImageChef/Plugins/SolarFS.cs b/DiscImageChef.Filesystems/SolarFS.cs similarity index 99% rename from DiscImageChef/Plugins/SolarFS.cs rename to DiscImageChef.Filesystems/SolarFS.cs index ac5ad27db..46095069d 100644 --- a/DiscImageChef/Plugins/SolarFS.cs +++ b/DiscImageChef.Filesystems/SolarFS.cs @@ -45,7 +45,7 @@ namespace DiscImageChef.Plugins { class SolarFS : Plugin { - public SolarFS(PluginBase Core) + public SolarFS() { Name = "Solar_OS filesystem"; PluginUUID = new Guid("EA3101C1-E777-4B4F-B5A3-8C57F50F6E65"); @@ -100,7 +100,7 @@ namespace DiscImageChef.Plugins Array.Copy(bpb_sector, 0x35, bpb_strings, 0, 8); BPB.fs_type = StringHandlers.CToString(bpb_strings); - if (MainClass.isDebug) + //if (MainClass.isDebug) { BPB.x86_jump = new byte[3]; Array.Copy(bpb_sector, 0x00, BPB.x86_jump, 0, 3); diff --git a/DiscImageChef/Plugins/Symbian.cs b/DiscImageChef.Filesystems/Symbian.cs similarity index 99% rename from DiscImageChef/Plugins/Symbian.cs rename to DiscImageChef.Filesystems/Symbian.cs index 9f42c95fb..0ce25d5f1 100644 --- a/DiscImageChef/Plugins/Symbian.cs +++ b/DiscImageChef.Filesystems/Symbian.cs @@ -171,7 +171,7 @@ namespace DiscImageChef.Plugins ZU }; - public SymbianIS(PluginBase Core) + public SymbianIS() { base.Name = "Symbian Installation File Plugin"; base.PluginUUID = new Guid("0ec84ec7-eae6-4196-83fe-943b3fe48dbd"); diff --git a/DiscImageChef/Plugins/SysV.cs b/DiscImageChef.Filesystems/SysV.cs similarity index 99% rename from DiscImageChef/Plugins/SysV.cs rename to DiscImageChef.Filesystems/SysV.cs index f5df93738..57427929a 100644 --- a/DiscImageChef/Plugins/SysV.cs +++ b/DiscImageChef.Filesystems/SysV.cs @@ -60,7 +60,7 @@ namespace DiscImageChef.Plugins const UInt16 V7_NICFREE = 50; const UInt32 V7_MAXSIZE = 0x00FFFFFF; - public SysVfs(PluginBase Core) + public SysVfs() { Name = "UNIX System V filesystem"; PluginUUID = new Guid("9B8D016A-8561-400E-A12A-A198283C211D"); diff --git a/DiscImageChef/Plugins/UNIXBFS.cs b/DiscImageChef.Filesystems/UNIXBFS.cs similarity index 98% rename from DiscImageChef/Plugins/UNIXBFS.cs rename to DiscImageChef.Filesystems/UNIXBFS.cs index c0a0bbe83..8c7cc7b41 100644 --- a/DiscImageChef/Plugins/UNIXBFS.cs +++ b/DiscImageChef.Filesystems/UNIXBFS.cs @@ -47,7 +47,7 @@ namespace DiscImageChef.Plugins { const UInt32 BFS_MAGIC = 0x1BADFACE; - public BFS(PluginBase Core) + public BFS() { Name = "UNIX Boot filesystem"; PluginUUID = new Guid("1E6E0DA6-F7E4-494C-80C6-CB5929E96155"); @@ -87,7 +87,7 @@ namespace DiscImageChef.Plugins Array.Copy(bfs_sb_sector, 0x22, sb_strings, 0, 6); bfs_sb.s_volume = StringHandlers.CToString(sb_strings); - if (MainClass.isDebug) + //if (MainClass.isDebug) { Console.WriteLine("(BFS) bfs_sb.s_magic: 0x{0:X8}", bfs_sb.s_magic); Console.WriteLine("(BFS) bfs_sb.s_start: 0x{0:X8}", bfs_sb.s_start); diff --git a/DiscImageChef/Plugins/ext2FS.cs b/DiscImageChef.Filesystems/ext2FS.cs similarity index 99% rename from DiscImageChef/Plugins/ext2FS.cs rename to DiscImageChef.Filesystems/ext2FS.cs index fbce3fcc7..792cb18b6 100644 --- a/DiscImageChef/Plugins/ext2FS.cs +++ b/DiscImageChef.Filesystems/ext2FS.cs @@ -45,7 +45,7 @@ namespace DiscImageChef.Plugins { class ext2FS : Plugin { - public ext2FS(PluginBase Core) + public ext2FS() { Name = "Linux extended Filesystem 2, 3 and 4"; PluginUUID = new Guid("6AA91B88-150B-4A7B-AD56-F84FB2DF4184"); diff --git a/DiscImageChef/Plugins/extFS.cs b/DiscImageChef.Filesystems/extFS.cs similarity index 99% rename from DiscImageChef/Plugins/extFS.cs rename to DiscImageChef.Filesystems/extFS.cs index 2ee44d88d..4854f2f69 100644 --- a/DiscImageChef/Plugins/extFS.cs +++ b/DiscImageChef.Filesystems/extFS.cs @@ -45,7 +45,7 @@ namespace DiscImageChef.Plugins { class extFS : Plugin { - public extFS(PluginBase Core) + public extFS() { Name = "Linux extended Filesystem"; PluginUUID = new Guid("076CB3A2-08C2-4D69-BC8A-FCAA2E502BE2"); diff --git a/DiscImageChef.sln b/DiscImageChef.sln index e6b6e950d..f056319f8 100644 --- a/DiscImageChef.sln +++ b/DiscImageChef.sln @@ -17,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.CommonTypes", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.Partitions", "DiscImageChef.Partitions\DiscImageChef.Partitions.csproj", "{DA7AB65D-B5BA-4003-8893-A51BB071BA2F}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscImageChef.Filesystems", "DiscImageChef.Filesystems\DiscImageChef.Filesystems.csproj", "{D7016DF2-5A5E-4524-B40D-BA2D59576688}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 @@ -41,6 +43,10 @@ Global {CC48B324-A532-4A45-87A6-6F91F7141E8D}.Debug|x86.Build.0 = Debug|Any CPU {CC48B324-A532-4A45-87A6-6F91F7141E8D}.Release|x86.ActiveCfg = Release|Any CPU {CC48B324-A532-4A45-87A6-6F91F7141E8D}.Release|x86.Build.0 = Release|Any CPU + {D7016DF2-5A5E-4524-B40D-BA2D59576688}.Debug|x86.ActiveCfg = Debug|Any CPU + {D7016DF2-5A5E-4524-B40D-BA2D59576688}.Debug|x86.Build.0 = Debug|Any CPU + {D7016DF2-5A5E-4524-B40D-BA2D59576688}.Release|x86.ActiveCfg = Release|Any CPU + {D7016DF2-5A5E-4524-B40D-BA2D59576688}.Release|x86.Build.0 = Release|Any CPU {DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Debug|x86.ActiveCfg = Debug|Any CPU {DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Debug|x86.Build.0 = Debug|Any CPU {DA7AB65D-B5BA-4003-8893-A51BB071BA2F}.Release|x86.ActiveCfg = Release|Any CPU diff --git a/DiscImageChef/ChangeLog b/DiscImageChef/ChangeLog index faf1e3ca4..fa845fb4e 100644 --- a/DiscImageChef/ChangeLog +++ b/DiscImageChef/ChangeLog @@ -1,3 +1,32 @@ +2015-10-05 Natalia Portillo + + * Plugins.cs: + * Plugins/BFS.cs: + * Plugins/FFS.cs: + * Plugins/ODS.cs: + * Plugins/FAT.cs: + * Plugins/NTFS.cs: + * Plugins/HPFS.cs: + * Plugins/SysV.cs: + * Plugins/extFS.cs: + * Plugins/Opera.cs: + * Plugins/Plugin.cs: + * Plugins/LisaFS.cs: + * Plugins/ext2FS.cs: + * Plugins/ProDOS.cs: + * Plugins/SolarFS.cs: + * Plugins/Symbian.cs: + * Plugins/UNIXBFS.cs: + * Plugins/ISO9660.cs: + * Plugins/MinixFS.cs: + * Plugins/AmigaDOS.cs: + * Plugins/PCEngine.cs: + * Plugins/AppleMFS.cs: + * Plugins/AppleHFS.cs: + * DiscImageChef.csproj: + * Plugins/AppleHFSPlus.cs: + Move filesystems to a separate library. + 2015-10-05 Natalia Portillo * Plugins.cs: diff --git a/DiscImageChef/DiscImageChef.csproj b/DiscImageChef/DiscImageChef.csproj index 20592cd5e..27ea5bc22 100644 --- a/DiscImageChef/DiscImageChef.csproj +++ b/DiscImageChef/DiscImageChef.csproj @@ -39,28 +39,7 @@ - - - - - - - - - - - - - - - - - - - - - @@ -75,8 +54,6 @@ - - @@ -197,5 +174,9 @@ {DA7AB65D-B5BA-4003-8893-A51BB071BA2F} DiscImageChef.Partitions + + {D7016DF2-5A5E-4524-B40D-BA2D59576688} + DiscImageChef.Filesystems + \ No newline at end of file diff --git a/DiscImageChef/Plugins.cs b/DiscImageChef/Plugins.cs index 3a573503a..ebec2c39f 100644 --- a/DiscImageChef/Plugins.cs +++ b/DiscImageChef/Plugins.cs @@ -98,7 +98,7 @@ namespace DiscImageChef } } - assembly = Assembly.GetExecutingAssembly(); + assembly = Assembly.GetAssembly(typeof(Plugin)); foreach (Type type in assembly.GetTypes()) { @@ -106,7 +106,7 @@ namespace DiscImageChef { if (type.IsSubclassOf(typeof(Plugin))) { - Plugin plugin = (Plugin)type.GetConstructor(new [] { typeof(PluginBase) }).Invoke(new object[] { this }); + Plugin plugin = (Plugin)type.GetConstructor(Type.EmptyTypes).Invoke(new object[] { }); RegisterPlugin(plugin); } }