Discussion in 'Tutorials & Guides' started by lmn7, Apr 7, 2019.
wua spectacular this program..!!!
@lmn7 I've made some modifications to your pkg_custom.exe
- It's slightly faster building the pkg (../../ is added at a more efficient place in the code)
- Added display of package size in decimal and the number of files & folders
- Added support for drag & drop a folder without a batch file.
- If the parameter is not a folder, the file is extracted
- Uses the default content_id if one is not provided
- Added detection of default folder "custom" if the program runs without parameters (i.e. double click)
- If the folder name is a content_id, it's used as content id of the pkg
- Bug fix: Now extracts in the same folder (not 2 folders up due ../../)
The source code with my modifications is included
Wow, great work! When I have some more time I'll see about fixing the extraction memory issue so the tool can extract large pkgs (I've already fixed the listing function). FYI your exe wrapper creates false positives for malware, I recompiled the source code with py2exe and had no issues. Thanks a lot for your contributions
I used: pyinstaller.exe --onefile pkg_custom.py
Find attached to this post the version "1.3 MOD"
- It packs 2X or 3X faster (It doesn't calculate the qadigest for all the files, saving a lot of processing time)
- Added a better icon.
- The extract now is done in chunks of 100MB. It should fix the issue with large files (I didn't test this)
- Changed the function getfiles (it should be slightly faster and should use less memory)
I tested the pkg built without qadigest on Rebug 4.86 and it worked fine... not sure if HEN could have issues.
Great stuff! I just checked and large PKG indexing and extraction is still broken due to both functions loading the whole pkg file into memory. That's really interesting about the QA digest, I assume the PS3 doesn't check it? I think I can remember having issues with that on HAN at some point, but it was a while ago now so I could be wrong.
Edit: I see now that the qadigest is used as the key to encrypt the pkg. It should be fine.
@aldostools Here's an update:
- Fixed pkg file indexing
- Fixed large pkg extraction (uses temporary file for extraction, it can possibly be updated to work in memory)
- Added default pkg name when the tool is started without parameters
I merged your fixes into the main tool so I removed the "MOD" in the version function. Feel free to make changes or check for bugs.
Neat!! I made some new changes in version 1.4
- The package is now created super fast...
e.g. In my tests, creating a pkg containing the files of webman installer (on my i7 quad-core)
ver 1.2: ~3 minutes 20 seconds
ver 1.3: ~25 seconds
ver 1.4: ~5 seconds (even faster than psn_package_npdrm: 10 seconds)
- if PARAM.SFO is found in the initial folder, the package now is created as gameData
- If USRDIR/EBOOT.BIN is found the PKG is created as gameExec (instead of gameData)
- Otherwise the package is created as a custom package (theme)
Awesome, this tool is really useful now. I just fixed some of my mistakes and uploaded this improved version to the OP. Thanks again for improving the script
Separate names with a comma.