mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: more
This commit is contained in:
1 parent
693c3f42a6
commit
b70d65f37b
4 files changed
+52
-34
No files matched your search
@@ -21,11 +21,18 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: ${{ secrets.GH_TOKEN }}
|
||||||
|
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
|
||||||
|
- name: Restore
|
||||||
|
run: dotnet restore
|
||||||
|
|
||||||
- name: Setup DepotDownloader
|
- name: Setup DepotDownloader
|
||||||
run: |
|
run: |
|
||||||
mkdir -p temp
|
mkdir -p temp
|
||||||
@@ -43,7 +50,7 @@ jobs:
|
|||||||
echo "Download complete; files:"
|
echo "Download complete; files:"
|
||||||
ls temp/depotDownloader
|
ls temp/depotDownloader
|
||||||
|
|
||||||
- name: (Steam) Download client
|
- name: Download client
|
||||||
run: |
|
run: |
|
||||||
chmod +x temp/depotDownloader/DepotDownloader
|
chmod +x temp/depotDownloader/DepotDownloader
|
||||||
temp/depotDownloader/DepotDownloader \
|
temp/depotDownloader/DepotDownloader \
|
||||||
@@ -52,4 +59,21 @@ jobs:
|
|||||||
-os ${{ env.STEAM_OS }} \
|
-os ${{ env.STEAM_OS }} \
|
||||||
-app ${{ env.STEAM_APP }} \
|
-app ${{ env.STEAM_APP }} \
|
||||||
-depot ${{ env.STEAM_DEPOT }} \
|
-depot ${{ env.STEAM_DEPOT }} \
|
||||||
-filelist regex:.+/Blitz/Content/Paks/.+\.pak
|
-dir temp/depots
|
||||||
|
|
||||||
|
- name: Unpack
|
||||||
|
run: |
|
||||||
|
cd temp/depots/${{ env.STEAM_APP }}
|
||||||
|
|
||||||
|
SUBDIR_COUNT=$(ls | wc -l)
|
||||||
|
if [ "$SUBDIR_COUNT" -ne 1 ]; then
|
||||||
|
echo "Error: Expected exactly 1 subdirectory, found $SUBDIR_COUNT"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
DEPOT_BRANCH_BUILD_ID=$(ls)
|
||||||
|
echo "Found build ID: $DEPOT_BRANCH_BUILD_ID"
|
||||||
|
|
||||||
|
cd ../../../src/CLI
|
||||||
|
|
||||||
|
dotnet run unpack ../../temp/depots/${{ env.STEAM_APP }}/$DEPOT_BRANCH_BUILD_ID/
|
||||||
@@ -1,15 +1,26 @@
|
|||||||
using CLI.Models;
|
|
||||||
using CLI.Utils;
|
|
||||||
|
|
||||||
namespace CLI.Functions
|
namespace CLI.Functions
|
||||||
{
|
{
|
||||||
class DLC
|
class Unpacker
|
||||||
{
|
{
|
||||||
public static void Run(Arguments args)
|
public static void Unpack(string[] args)
|
||||||
{
|
{
|
||||||
BlitzVfs vfs = new();
|
if (args.Length < 2)
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Missing required working directory argument");
|
||||||
|
}
|
||||||
|
|
||||||
vfs.Initialize();
|
string workingDirectory = args[1];
|
||||||
|
string paksDirectory = Path.Combine(workingDirectory, "Blitz/Content/Paks");
|
||||||
|
string[] files = Directory.GetFiles(paksDirectory, "*.pak");
|
||||||
|
|
||||||
|
foreach (string file in files)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Reading \"{file}\"");
|
||||||
|
}
|
||||||
|
|
||||||
|
// BlitzVfs vfs = new();
|
||||||
|
|
||||||
|
// vfs.Initialize();
|
||||||
|
|
||||||
// DefaultFileProvider provider = new(
|
// DefaultFileProvider provider = new(
|
||||||
// directory: new(
|
// directory: new(
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
namespace CLI.Models
|
|
||||||
{
|
|
||||||
public class Arguments
|
|
||||||
{
|
|
||||||
public string[] raw;
|
|
||||||
public bool sanitize;
|
|
||||||
|
|
||||||
public Arguments(string[] args)
|
|
||||||
{
|
|
||||||
raw = args;
|
|
||||||
sanitize = args.Contains("--sanitize");
|
|
||||||
|
|
||||||
if (args.Length < 1)
|
|
||||||
{
|
|
||||||
throw new ArgumentException("No arguments provided");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+7
-5
@@ -1,5 +1,4 @@
|
|||||||
using CLI.Functions;
|
using CLI.Functions;
|
||||||
using CLI.Models;
|
|
||||||
|
|
||||||
namespace CLI
|
namespace CLI
|
||||||
{
|
{
|
||||||
@@ -7,15 +6,18 @@ namespace CLI
|
|||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
Arguments arguments = new(args);
|
|
||||||
|
|
||||||
switch (args[0])
|
switch (args[0])
|
||||||
{
|
{
|
||||||
case "dlc":
|
case "unpack":
|
||||||
{
|
{
|
||||||
DLC.Run(arguments);
|
Unpacker.Unpack(args);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
throw new ArgumentException("Invalid command");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user