Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added theme support #14

Closed
wants to merge 11 commits into from
Closed

added theme support #14

wants to merge 11 commits into from

Conversation

Luro02
Copy link

@Luro02 Luro02 commented Mar 19, 2018

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.

Lucas added 8 commits March 19, 2018 14:29
It's neither good nor perfect but it's working :),
I apologize for my bad code (this is the first thing I've ever done in C and it's based on PkgDecrypt's pdb implementation for DLC's)....
@Luro02
Copy link
Author

Luro02 commented Mar 19, 2018

Compiles now under Windows and I fixed some warnings....(caused by my own stuff XD)

@Luro02
Copy link
Author

Luro02 commented Mar 19, 2018

binaries for Linux and Windows:
pkg2zip-binaries.zip

@TheRadziu
Copy link
Contributor

TheRadziu commented Mar 19, 2018

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

@mmozeiko
Copy link
Owner

mmozeiko commented Mar 19, 2018

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

@TheRadziu
Copy link
Contributor

TheRadziu commented Mar 19, 2018

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
TheOfficialFloW/VitaShell#310

@mmozeiko
Copy link
Owner

I perfectly fine remember how DLC bgdl method was changed to normal install. I do see how that is relevant to this. DLC != theme.

@TheRadziu
Copy link
Contributor

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

@Luro02 Luro02 closed this Mar 19, 2018
@Luro02
Copy link
Author

Luro02 commented Jul 11, 2018

this is the wrong place to ask those questions...
please go on their discord or ask on gbatemp for help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants