mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-19 01:44:53 +00:00
moved everything to old stuff
This commit is contained in:
parent
e420476829
commit
5f19daf3ba
53 changed files with 1 additions and 6 deletions
27
old_stuff/tools/pkg extractor/pkgextract.cpp
Normal file
27
old_stuff/tools/pkg extractor/pkgextract.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
#include <iostream>
|
||||
#include <sys/stat.h>
|
||||
#include <direct.h>
|
||||
#include "PKG.h"
|
||||
int main()
|
||||
{
|
||||
PKG pkg;
|
||||
if (!pkg.open("test.pkg"))
|
||||
{
|
||||
std::cout << "Error reading test.pkg\n";
|
||||
return 0;
|
||||
}
|
||||
pkg.printPkgHeader();
|
||||
std::string gamedir = "game/" + pkg.getTitleID();
|
||||
struct stat sb;
|
||||
if (stat(gamedir.c_str(), &sb) != 0)
|
||||
{
|
||||
_mkdir(gamedir.c_str());
|
||||
}
|
||||
std::string extractpath = "game/" + pkg.getTitleID() + "/";
|
||||
std::string failreason;
|
||||
if (!pkg.extract("test.pkg", extractpath, failreason))
|
||||
{
|
||||
std::cout << "Error extraction " << failreason;
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue