LucaSystemTools
LucaSystemTools copied to clipboard
What is the right command to repack the PAK archives?
Hello, what is the right command to repack the PAK archives? When I try this kind of command: LucaSystemTools -t pak -m import -f wrk -o rdy pops up a bunch of errors.
D:\wrk\LucaSystemTool>LucaSystemTools -t pak -m import -f wrk -o rdy
Unhandled exception. System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\wrk\LucaSystemTool\wrk\SCRIPT_unpacked\SEEN0513'.
at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at ProtPak.PAKManager.Pack(String file) in D:\wrk\LucaSystemTool\src\lben\LucaSystemTools\PakTools.cs:line 91
at ProtPak.PAKManager.FileImport(String path, String outpath) in D:\wrk\LucaSystemTool\src\lben\LucaSystemTools\PakTools.cs:line 227
at LucaSystem.Utils.CommandLineUtil.OnExecute() in D:\wrk\LucaSystemTool\src\lben\LucaSystemTools\Utils\CommandLineUtil.cs:line 179
--- End of stack trace from previous location where exception was thrown ---
at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.Invoke(MethodInfo method, Object instance, Object[] arguments)
at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext context, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<<Apply>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync[TApp](CommandLineContext context, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](CommandLineContext context)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](IConsole console, String[] args)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](String[] args)
at LucaSystemTools.Program.Main(String[] args) in D:\wrk\LucaSystemTool\src\lben\LucaSystemTools\Program.cs:line 17
The following folders and files are in the wrk folder:
\wrk\SCRIPT.PAK_unpacked\
\wrk\SCRIPT.PAK.pakhead
\wrk\SCRIPT.PAK
The following files are in the wrk\SCRIPT.PAK_unpacked\ folder:
SCRIPT.PAK_unpacked
_ARFLAG
_BUILD_COUNT
_CGMODE
_KEYWORD
_QUAKE
_SAYAVOICE
_SCR_LABEL
_TASK
_VARNUM
_VARSTR
_VOICE_PARAM
SEEN0513
SEEN0514
SEEN0515
SEEN0516
SEEN0517
SEEN0518
SEEN0519
SEEN0520
SEEN0521
SEEN0522
SEEN0523
SEEN0524
SEEN0525
SEEN0526
SEEN0527
SEEN0528
SEEN1000
SEEN1001
SEEN1002
SEEN1003
SEEN1004
SEEN1200
SEEN1201
SEEN1202
SEEN1203
SEEN2000
SEEN2001
SEEN2004
SEEN2005
SEEN2100
SEEN2500
SEEN2513
SEEN2514
SEEN2515
SEEN2516
SEEN2517
SEEN2518
SEEN2520
SEEN2521
SEEN2522
SEEN2523
SEEN2600
SEEN2601
SEEN2602
SEEN2603
SEEN2700
SEEN2800
SEEN2801
SEEN2802
SEEN2803
SEEN2804
SEEN2805
SEEN2806
SEEN2807
SEEN2808
SEEN2809
SEEN2810
SEEN2811
SEEN2812
SEEN2813
SEEN2814
SEEN2815
SEEN2816
SEEN2817
SEEN2818
SEEN2819
SEEN2830
SEEN2888
SEEN3000
SEEN3001
SEEN3524
SEEN3600
SEEN3601
SEEN3800
SEEN3900
SEEN4000
SEEN4001
SEEN4002
SEEN4003
SEEN4102
SEEN4103
SEEN4444
SEEN5000
SEEN5001
SEEN5002
SEEN5003
SEEN5004
SEEN5005
SEEN5006
SEEN5522
SEEN6000
SEEN6001
SEEN6002
SEEN6003
SEEN6010
SEEN6100
SEEN6101
SEEN6102
SEEN6518
SEEN7030
SEEN8010
SEEN8011
SEEN8030
SEEN8040
SEEN8050
SEEN8052
SEEN8054
SEEN8061
SEEN8090
SEEN8091
SEEN8110
SEEN8130
SEEN8140
SEEN8150
SEEN8220
SEEN8240
SEEN8241
SEEN8242
SEEN8243
SEEN8244
SEEN8245
SEEN8250
SEEN8500
SEEN8501
SEEN8530
SEEN8540
SEEN8580
SEEN8590
SEEN8600
SEEN8601
SEEN8610
SEEN8620
SEEN8621
SEEN8691
SEEN8692
SEEN8693
SEEN8694
SEEN8695
SEEN8721
SEEN8731
SEEN8733
SEEN8734
SEEN8735
SEEN8736
SEEN8737
SEEN8750
SEEN8751
SEEN8752
SEEN8753
SEEN8754
SEEN8755
SEEN8756
SEEN8757
SEEN8758
SEEN8760
SEEN8761
SEEN8770
SEEN9700
Using a bunch lb_en
I am confused by the error Could not find a part of the path 'D:\wrk\LucaSystemTool\wrk\SCRIPT_unpacked\SEEN0513'. There is no such folder SCRIPT_unpacked but SCRIPT .PAK _unpacked
Ow, when i replaced
public static void Pack(string file)
{
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
string out_file = Path.Combine(Path.GetDirectoryName(file), Path.GetFileNameWithoutExtension(file));
with
public static void Pack(string file)
{
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
string out_file = Path.Combine(Path.GetDirectoryName(file), Path.GetFileName(file));
In PakTools.cs, then renamed SCRIPT.PAK.pakhead into SCRIPT.PAK, a command LucaSystemTools -t pak -m import -f SCRIPT.PAK work without errors. When i need repack a multiple files, i use a command LucaSystemTools -t pak -m import -f wrk -o wrk, then all PAK files in folder repacked.