Inno Header v6 reading almost works
This commit is contained in:
@@ -70,7 +70,7 @@ sealed class InnoLoader {
|
||||
|
||||
public Version Version => _version;
|
||||
|
||||
internal int Version2 => _version.Major * 1000 + _version.Minor * 100 + _version.Revision;
|
||||
internal int Version2 => _version.Major * 1000 + _version.Minor * 100 + _version.Build;
|
||||
|
||||
public bool IsUnicode => _isUnicode;
|
||||
|
||||
@@ -78,7 +78,7 @@ sealed class InnoLoader {
|
||||
|
||||
public InnoSetup GetSetup() {
|
||||
_file.Seek(_offsets.Offset0 + HeaderSize, SeekOrigin.Begin);
|
||||
if (!InnoSetup.TryParse(_file, Version2, out InnoSetup result))
|
||||
if (!InnoSetup.TryParse(_file, Version2, out InnoSetup? result))
|
||||
throw new FormatException("Failed to parse Inno Setup");
|
||||
return result;
|
||||
}
|
||||
@@ -199,7 +199,7 @@ sealed class InnoLoader {
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct InnoLoaderOffsetTableV6 {
|
||||
internal uint TotalSize; // Minimum expected size of setup.exe
|
||||
internal uint OffsetEXE; // Offset of compressed setup.e32
|
||||
@@ -224,7 +224,7 @@ sealed class InnoLoader {
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct InnoLoaderOffsetTableV7 {
|
||||
internal uint TotalSize; // Minimum expected size of setup.exe
|
||||
internal uint OffsetEXE; // Offset of compressed setup.e32
|
||||
@@ -248,7 +248,7 @@ sealed class InnoLoader {
|
||||
}
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct InnoLoaderOffsetTableV8 {
|
||||
internal uint Version; // SetupLdrOffsetTableVersion
|
||||
internal uint TotalSize; // Minimum expected size of setup.exe
|
||||
|
||||
Reference in New Issue
Block a user