Closed Luro02 closed 6 years ago
Compiles now under Windows and I fixed some warnings....(caused by my own stuff XD)
binaries for Linux and Windows: pkg2zip-binaries.zip
tested with 5 themes, works as intended. Too bad vitasmith didnt add theme support to Refresh LiveArea like he did with DLCs so we could use raw files instead of bgdl.
But heck, as long as it works.
edit: tested with self-compiled latest commit & on 3.65 enso vita, so bgdl method still works just fine on that FW
I do not think I want bgdl approach in pkg2zip. That's why it did not have it for DLCs. I'm sure there should by way to install themes with same approach as main game files or dlcs.
Also your pull request needs multiple changes:
1) remove pause
from build.cmd. This makes CI testing on Appveyor impossible. And having pause there is super annoying - that's extra enter you need to press every time you build locally.
2) fix your indenting, currently it's all over place. Fix tabs vs spaces, I do not want tabs in code. And use type* variable
not type *variable
. Basically use same style as rest of code.
3) don't use system dependent functions in generic code (stat). Those should go into sys.c file.
4) no fopen/fwrite/fclose. sys.c is for all i/o dependent code
5) no malloc please. All of the code (except zip files) uses no dynamic memory allocations. And in many cases you are allocating fixed size buffer anyway. Change those to stack allocations.
6) too many hardcoded sizes for second argument to snprintf. Use sizeof.
7) useless includes - errno.h
8) no global variables - next_dir
as I said, DLC-like approach requires someone to add theme support to vitashell's refresh.c first, because of VitaSmith we could move DLCs from bgdl method to regular file extraction. Without it - only bgdl can do.
In case you've forgot, here is mentioned commit which has been made after we used bgdl for some time https://github.com/TheOfficialFloW/VitaShell/pull/310
I perfectly fine remember how DLC bgdl method was changed to normal install. I do see how that is relevant to this. DLC != theme.
I do not think I want pdb approach in pkg2zip. That's why it did not have it for DLCs. I'm sure there should by way to install themes with same approach as main game files or dlcs.
Unless I misunderstood that part. My general opinion is: if we have working tool for theme extraction via bgdl, someone will do commit refresh.c change that'd allow 'same approach as main game or dlc', not the other way around
this is the wrong place to ask those questions... please go on their discord or ask on gbatemp for help.
added theme pkg support I only compiled it in "Bash on Ubuntu on Windows" (doesn't work on windows atm)...
It's the first time I wrote some C code.