mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-14 12:19:08 +00:00
Read ABIs from QuickLook.ApkReader 2.1.0
This commit is contained in:
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
using ICSharpCode.SharpZipLib.Zip;
|
using ICSharpCode.SharpZipLib.Zip;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -48,6 +47,7 @@ public static class ApkParser
|
|||||||
Labels = baseInfo.Labels,
|
Labels = baseInfo.Labels,
|
||||||
Locales = baseInfo.Locales,
|
Locales = baseInfo.Locales,
|
||||||
Densities = baseInfo.Densities,
|
Densities = baseInfo.Densities,
|
||||||
|
ABIs = [.. baseInfo.Abis],
|
||||||
LaunchableActivity = baseInfo.LaunchableActivity,
|
LaunchableActivity = baseInfo.LaunchableActivity,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -60,25 +60,6 @@ public static class ApkParser
|
|||||||
info.Logo = s.ReadBytes((int)entry.Size);
|
info.Logo = s.ReadBytes((int)entry.Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
var abiSet = new HashSet<string>();
|
|
||||||
|
|
||||||
foreach (ZipEntry entry in zip)
|
|
||||||
{
|
|
||||||
if (entry.IsFile && entry.Name.StartsWith("lib/"))
|
|
||||||
{
|
|
||||||
var relativePath = entry.Name.Substring("lib/".Length);
|
|
||||||
int slashIndex = relativePath.IndexOf('/');
|
|
||||||
|
|
||||||
if (slashIndex > 0)
|
|
||||||
{
|
|
||||||
string abi = relativePath.Substring(0, slashIndex);
|
|
||||||
abiSet.Add(abi);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
info.ABIs = [.. abiSet];
|
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@@ -76,7 +76,7 @@
|
|||||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="PureSharpCompress" Version="0.39.0" />
|
<PackageReference Include="PureSharpCompress" Version="0.39.0" />
|
||||||
<PackageReference Include="QuickLook.ApkReader" Version="2.0.2" />
|
<PackageReference Include="QuickLook.ApkReader" Version="2.1.0" />
|
||||||
<PackageReference Include="QuickLook.DiscUtils" Version="1.0.0" />
|
<PackageReference Include="QuickLook.DiscUtils" Version="1.0.0" />
|
||||||
<PackageReference Include="QuickLook.RpmReader" Version="1.0.0" />
|
<PackageReference Include="QuickLook.RpmReader" Version="1.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
Reference in New Issue
Block a user