Skip to content

Commit

Permalink
Obsidian 2.1 (#21)
Browse files Browse the repository at this point in the history
* add missing zstd libs

* Fix extraction failure when some paths exceed the 255 character limit (#20)

* Fix extraction failure when some paths exceed the 255 character limit

* Update MainWindow.xaml.cs

formatting

* use string.format and log the error

* working solution

* updated libs

* updated hashtable reader

* better hash generation 1

* better hash generation 2

* fixed a bug with file adding

* 2.1 assembly info

* new fantome lib

* correct fantome lib

* working create from directory

* new fantome

* packed bin files

* working create from direcotry, bin file packing
  • Loading branch information
Crauzer authored Aug 11, 2019
1 parent 7f042cf commit 4c4b224
Show file tree
Hide file tree
Showing 10 changed files with 182 additions and 93 deletions.
2 changes: 1 addition & 1 deletion Obsidian/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Expand Down
8 changes: 8 additions & 0 deletions Obsidian/App.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v3">
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
</assembly>
Binary file modified Obsidian/Fantome.Libraries.League.dll
Binary file not shown.
216 changes: 145 additions & 71 deletions Obsidian/MainWindow.xaml.cs

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions Obsidian/Obsidian.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>App.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Fantome.Libraries.League, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand All @@ -47,17 +50,18 @@
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
</Reference>
<Reference Include="MaterialDesignColors, Version=1.1.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MaterialDesignColors.1.1.3\lib\net45\MaterialDesignColors.dll</HintPath>
<Reference Include="MaterialDesignColors, Version=1.2.0.325, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MaterialDesignColors.1.2.0\lib\net45\MaterialDesignColors.dll</HintPath>
</Reference>
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
<Reference Include="MaterialDesignThemes.Wpf, Version=2.6.0.325, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MaterialDesignThemes.2.6.0\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Transactions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
Expand Down Expand Up @@ -113,6 +117,7 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="App.manifest" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
Expand Down
6 changes: 3 additions & 3 deletions Obsidian/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyTitle("Obsidian")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Crauzer")]
[assembly: AssemblyProduct("Obsidian")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
Expand Down Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.1.1")]
[assembly: AssemblyFileVersion("2.0.1.1")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
20 changes: 11 additions & 9 deletions Obsidian/Utils/WADHashGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,15 @@ private static IEnumerable<string> ProcessBINValue(BINFileValue value)

if (value.Type == BINFileValueType.String)
{
strings.Add(value.Value as string);
string valueString = value.Value as string;
strings.Add(valueString);

if (valueString.Contains('/') && Path.GetExtension(valueString) == ".dds")
{
int index = valueString.LastIndexOf('/');
strings.Add(valueString.Insert(index + 1, "2x_"));
strings.Add(valueString.Insert(index + 1, "4x_"));
}
}
else if (value.Type == BINFileValueType.AdditionalOptionalData)
{
Expand Down Expand Up @@ -171,14 +179,8 @@ private static IEnumerable<string> ProcessBINLinkedFiles(List<string> linkedFile
{
string fetchedString = linkedFiles[i];

if (fetchedString.StartsWith("DATA/Characters"))
{
strings.Add(fetchedString);
}
else
{
strings.AddRange(ProcessBINPackedLinkedFile(fetchedString));
}
strings.Add(fetchedString);
strings.AddRange(ProcessBINPackedLinkedFile(fetchedString));
}

return strings.AsEnumerable();
Expand Down
6 changes: 3 additions & 3 deletions Obsidian/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.8" targetFramework="net47" />
<package id="MaterialDesignColors" version="1.1.3" targetFramework="net462" />
<package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net462" />
<package id="Newtonsoft.Json" version="11.0.1" targetFramework="net462" />
<package id="MaterialDesignColors" version="1.2.0" targetFramework="net462" />
<package id="MaterialDesignThemes" version="2.6.0" targetFramework="net462" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net462" />
</packages>
Binary file added Obsidian/x64/libzstd.dll
Binary file not shown.
Binary file added Obsidian/x86/libzstd.dll
Binary file not shown.

0 comments on commit 4c4b224

Please sign in to comment.