Projects
Extra
pkg2zip
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
pkg2zip.changes
Changed
@@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri May 18 11:18:03 UTC 2018 - p.seiler@linuxmail.org + +- Added patch to enable listing of generating output zip +- updated manpage + +------------------------------------------------------------------- Mon Nov 20 08:37:23 UTC 2017 - p.seiler@linuxmail.org - update to version 1.8
View file
pkg2zip.spec
Changed
@@ -25,6 +25,7 @@ URL: https://github.com/mmozeiko/pkg2zip Source0: %{name}-%{version}.tar.gz Source1: %{name}.1 +Patch0: add_support_for_file_listing.patch %description Utility that decrypts PlayStation Vita pkg file and creates zip package. Supported pkg files - main application, DLC, patch and PSM files. Supports also PSX files for use with Adrenaline. @@ -33,6 +34,7 @@ %prep %setup -q +%patch0 -p1 %build make %{?_smp_mflags}
View file
add_support_for_file_listing.patch
Added
@@ -0,0 +1,144 @@ +Fri May 18 13:08:34 CEST 2018 <p.seiler@linuxmail.org> +*Added support for listing the output file +* Added information about listing parameter in README.md +* Added info about openSUSE + +diff --git a/README.md b/README.md +index 847c213..b22956a 100644 +--- a/README.md ++++ b/README.md +@@ -42,6 +42,10 @@ If you don't have zRIF fake license, but just want to unpack files, then omit la + + Resulting zip file will not include work.bin. This is useful for patch pkg files. + ++To get output file name of the zip, use `-l` (must come before pkg file and cannot be used with `-x`): ++ ++ pkg2zip -l package.pkg ++ + To avoid zipping process and create individual files, use `-x` argument (must come before pkg file): + + pkg2zip -x package.pkg [zRIF_STRING] +diff --git a/pkg2zip.c b/pkg2zip.c +index c99d17e..3a6686a 100644 +--- a/pkg2zip.c ++++ b/pkg2zip.c +@@ -272,9 +272,9 @@ typedef enum { + int main(int argc, char* argv[]) + { + sys_output_init(); +- sys_output("pkg2zip v1.8\n"); + + int zipped = 1; ++ int listing = 0; + int cso = 0; + const char* pkg_arg = NULL; + const char* zrif_arg = NULL; +@@ -284,6 +284,10 @@ int main(int argc, char* argv[]) + { + zipped = 0; + } ++ else if (strcmp(argv[i], "-l") == 0) ++ { ++ listing = 1; ++ } + else if (strncmp(argv[i], "-c", 2) == 0) + { + if (argv[i][2] != 0) +@@ -305,14 +309,20 @@ int main(int argc, char* argv[]) + } + } + } +- ++ if (listing == 0) ++ { ++ sys_output("pkg2zip v1.8\n"); ++ } + if (pkg_arg == NULL) + { + fprintf(stderr, "ERROR: no pkg file specified\n"); +- sys_error("Usage: %s [-x] [-c[N]] file.pkg [zRIF]\n", argv[0]); ++ sys_error("Usage: %s [-x] [-l] [-c[N]] file.pkg [zRIF]\n", argv[0]); + } + +- sys_output("[*] loading...\n"); ++ if (listing == 0) ++ { ++ sys_output("[*] loading...\n"); ++ } + + uint64_t pkg_size; + sys_file pkg = sys_open(pkg_arg, &pkg_size); +@@ -496,32 +506,50 @@ int main(int argc, char* argv[]) + type_str = content_type == 0xe ? "PSP-Go" : content_type == 0xf ? "PSP-Mini" : "PSP-NeoGeo"; + } + snprintf(root, sizeof(root), "%s [%.9s] [%s]%s", title, id, type_str, ext); +- sys_output("[*] unpacking %s\n", type_str); ++ if (listing == 0) ++ { ++ sys_output("[*] unpacking %s\n", type_str); ++ } + } + else if (type == PKG_TYPE_PSX) + { + snprintf(root, sizeof(root), "%s [%.9s] [PSX]%s", title, id, ext); +- sys_output("[*] unpacking PSX\n"); ++ if (listing == 0) ++ { ++ sys_output("[*] unpacking PSX\n"); ++ } + } + else if (type == PKG_TYPE_VITA_DLC) + { + snprintf(root, sizeof(root), "%s [%.9s] [%s] [DLC-%s]%s", title, id, get_region(id), id2, ext); +- sys_output("[*] unpacking Vita DLC\n"); ++ if (listing == 0) ++ { ++ sys_output("[*] unpacking Vita DLC\n"); ++ } + } + else if (type == PKG_TYPE_VITA_PATCH) + { + snprintf(root, sizeof(root), "%s [%.9s] [%s] [PATCH] [v%s]%s", title, id, get_region(id), pkg_version, ext); +- sys_output("[*] unpacking Vita PATCH\n"); ++ if (listing == 0) ++ { ++ sys_output("[*] unpacking Vita PATCH\n"); ++ } + } + else if (type == PKG_TYPE_VITA_PSM) + { + snprintf(root, sizeof(root), "%.9s [%s] [PSM]%s", id, get_region(id), ext); +- sys_output("[*] unpacking Vita PSM\n"); ++ if (listing == 0) ++ { ++ sys_output("[*] unpacking Vita PSM\n"); ++ } + } + else if (type == PKG_TYPE_VITA_APP) + { + snprintf(root, sizeof(root), "%s [%.9s] [%s]%s", title, id, get_region(id), ext); +- sys_output("[*] unpacking Vita APP\n"); ++ if (listing == 0) ++ { ++ sys_output("[*] unpacking Vita APP\n"); ++ } + } + else + { +@@ -529,6 +557,16 @@ int main(int argc, char* argv[]) + sys_error("ERROR: unsupported type\n"); + } + ++ if (listing && zipped) ++ { ++ sys_output("%s\n", root); ++ exit(0); ++ } ++ else if (listing || zipped) ++ { ++ sys_error("ERROR: Listing option without creating zip is useless\n"); ++ } ++ + if (zipped) + { + sys_output("[*] creating '%s' archive\n", root);
View file
pkg2zip.1
Changed
@@ -61,6 +61,14 @@ .PP Resulting zip file will not include work.bin. This is useful for patch pkg files. .PP +To get output file name of the zip, use \fB\fC\-l\fR (must come before pkg file and cannot be used with \fB\fC\-x\fR): +.PP +.RS +.nf +pkg2zip \-l package.pkg +.fi +.RE +.PP To avoid zipping process and create individual files, use \fB\fC\-x\fR argument (must come before pkg file): .PP .RS @@ -126,6 +134,15 @@ $ pacaur \-S pkg2zip .fi .RE +.PP +openSUSE users can download the package from the Packman \[la]http://packman.links2linux.de/package/pkg2zip\[ra] repository. +If this repository is enabled, just install pkg2zip with zypper. +.PP +.RS +.nf +# zypper install pkg2zip +.fi +.RE .SH Building .PP Execute \fB\fCmake\fR if you are on GNU/Linux or macOS.
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.