mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Sync ReVPK fixes to packedstore concommand
* Check if workspace directory exists. * Check if VPK directory tree file was successfully parsed.
This commit is contained in:
parent
5266a2e9de
commit
f49fbffa9a
@ -642,16 +642,24 @@ void VPK_Pack_f(const CCommand& args)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
VPKPair_t pair(args.Arg(1), args.Arg(2), args.Arg(3), NULL);
|
const char* workspacePath = fs_packedstore_workspace->GetString();
|
||||||
CFastTimer timer;
|
|
||||||
|
|
||||||
Msg(eDLL_T::FS, "*** Starting VPK build command for: '%s'\n", pair.m_DirName.Get());
|
if (!FileSystem()->IsDirectory(workspacePath, "PLATFORM"));
|
||||||
|
{
|
||||||
|
Error(eDLL_T::FS, NO_ERROR, "Workspace path \"%s\" doesn't exist!\n", workspacePath);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
VPKPair_t pair(args.Arg(1), args.Arg(2), args.Arg(3), NULL);
|
||||||
|
Msg(eDLL_T::FS, "*** Starting VPK build command for: '%s'\n", pair.m_DirName.String());
|
||||||
|
|
||||||
|
CFastTimer timer;
|
||||||
timer.Start();
|
timer.Start();
|
||||||
|
|
||||||
CPackedStoreBuilder builder;
|
CPackedStoreBuilder builder;
|
||||||
|
|
||||||
builder.InitLzEncoder(fs_packedstore_max_helper_threads->GetInt(), fs_packedstore_compression_level->GetString());
|
builder.InitLzEncoder(fs_packedstore_max_helper_threads->GetInt(), fs_packedstore_compression_level->GetString());
|
||||||
builder.PackStore(pair, fs_packedstore_workspace->GetString(), "vpk/");
|
builder.PackStore(pair, workspacePath, "vpk/");
|
||||||
|
|
||||||
timer.End();
|
timer.End();
|
||||||
Msg(eDLL_T::FS, "*** Time elapsed: '%lf' seconds\n", timer.GetDuration().GetSeconds());
|
Msg(eDLL_T::FS, "*** Time elapsed: '%lf' seconds\n", timer.GetDuration().GetSeconds());
|
||||||
@ -673,11 +681,18 @@ void VPK_Unpack_f(const CCommand& args)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CUtlString arg = args.Arg(1);
|
CUtlString fileName = args.Arg(1);
|
||||||
VPKDir_t vpk(arg, (args.ArgC() > 2));
|
VPKDir_t vpk(fileName, (args.ArgC() > 2));
|
||||||
CFastTimer timer;
|
|
||||||
|
|
||||||
Msg(eDLL_T::FS, "*** Starting VPK extraction command for: '%s'\n", arg.Get());
|
if (vpk.Failed())
|
||||||
|
{
|
||||||
|
Error(eDLL_T::FS, NO_ERROR, "Failed to parse directory tree file \"%s\"!\n", fileName.String());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Msg(eDLL_T::FS, "*** Starting VPK extraction command for: '%s'\n", fileName.String());
|
||||||
|
|
||||||
|
CFastTimer timer;
|
||||||
timer.Start();
|
timer.Start();
|
||||||
|
|
||||||
CPackedStoreBuilder builder;
|
CPackedStoreBuilder builder;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user