-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d683ff
commit aa7db58
Showing
5 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/.vs/ | ||
/artifacts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net9.0</TargetFramework> | ||
<ImplicitUsings>disable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="ELFSharp" Version="2.17.3" /> | ||
<PackageReference Include="K4os.Compression.LZ4" Version="1.3.8" /> | ||
<PackageReference Include="SharpZipLib" Version="1.4.2" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.12.35527.113 d17.12 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApkUncompress2", "ApkUncompress2.csproj", "{30280DEF-046C-4B47-B0B9-845BE8618A2E}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{30280DEF-046C-4B47-B0B9-845BE8618A2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{30280DEF-046C-4B47-B0B9-845BE8618A2E}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{30280DEF-046C-4B47-B0B9-845BE8618A2E}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{30280DEF-046C-4B47-B0B9-845BE8618A2E}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<Project> | ||
<!-- See https://aka.ms/dotnet/msbuild/customize for more details on customizing your build --> | ||
<PropertyGroup> | ||
<ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
using System.IO; | ||
|
||
namespace ApkUncompress2 | ||
{ | ||
internal class App | ||
{ | ||
static int Usage() | ||
{ | ||
Console.WriteLine("Usage: decompress-assemblies {file.{dll,apk,aab}} [{file.{dll,apk,aab} ...]"); | ||
Console.WriteLine(); | ||
Console.WriteLine("DLL files passed on command line are uncompressed to the file directory with the `uncompressed-` prefix added to their name."); | ||
Console.WriteLine("DLL files from AAB/APK archives are uncompressed to a subdirectory of the file directory named after the archive with extension removed"); | ||
return 1; | ||
} | ||
|
||
static int Main(string[] args) | ||
{ | ||
if (args.Length == 0) | ||
{ | ||
return Usage(); | ||
} | ||
|
||
bool haveErrors = false; | ||
foreach (string file in args) | ||
{ | ||
string ext = Path.GetExtension(file); | ||
string fullPath = Path.GetFullPath(file); | ||
if (string.IsNullOrEmpty(fullPath)) | ||
{ | ||
continue; | ||
} | ||
|
||
string? outputPath = Path.GetDirectoryName(fullPath); | ||
if (string.IsNullOrEmpty(outputPath)) | ||
{ | ||
continue; | ||
} | ||
} | ||
|
||
return haveErrors ? 1 : 0; | ||
} | ||
} | ||
} |