Skip to content

Commit

Permalink
Bundled the latest version of 7zip
Browse files Browse the repository at this point in the history
  • Loading branch information
slxdy committed Nov 14, 2024
1 parent a561e3d commit a4773bd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
Binary file added Generator/Dependencies/7zz
Binary file not shown.
4 changes: 4 additions & 0 deletions Generator/Generator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@
<ItemGroup>
<PackageReference Include="Octokit" Version="13.0.1" />
</ItemGroup>

<ItemGroup>
<None Include="Dependencies/**" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

</Project>
4 changes: 3 additions & 1 deletion Generator/SevenZip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ namespace Generator;

public static class SevenZip
{
private static readonly string sevenZipPath = Path.Combine(Path.GetDirectoryName(Environment.ProcessPath)!, "Dependencies", "7zz");

public static async Task ExtractAsync(string archive, string outputDir, bool keepStructure, params string[] fileFilter)
{
var args = new List<string>()
Expand All @@ -13,7 +15,7 @@ public static async Task ExtractAsync(string archive, string outputDir, bool kee

args.AddRange(fileFilter);

var proc = Process.Start("7z", args);
var proc = Process.Start(sevenZipPath, args);
await proc.WaitForExitAsync();
if (proc.ExitCode != 0)
throw new($"7z exit code: {proc.ExitCode}");
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ The generator project itself is licensed under the Apache License, Version 2.0.

Third-party Libraries used as Source Code and/or bundled in Binary Form:

- [7-Zip](https://www.7-zip.org/) is licensed under the GNU LGPL License. See [LICENSE](https://www.7-zip.org/license.txt) for the full License.
- [octokit.net](https://github.com/octokit/octokit.net) is licensed under the MIT License. See [LICENSE](https://github.com/octokit/octokit.net/blob/main/LICENSE.txt) for the full License.

External Libraries and Tools that are downloaded and/or used:

- [7-Zip](https://www.7-zip.org/) is licensed under the GNU LGPL License. See [LICENSE](https://www.7-zip.org/license.txt) for the full License.
- Unity Runtime Libraries are part of Unity Software.
Their usage is subject to [Unity Terms of Service](https://unity3d.com/legal/terms-of-service), including [Unity Software Additional Terms](https://unity3d.com/legal/terms-of-service/software).

Expand Down

0 comments on commit a4773bd

Please sign in to comment.