Skip to content

Commit

Permalink
Update v1.77
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOfficialFloW committed Jan 1, 2018
1 parent 0b4116a commit 6f79086
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 63 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ The english language file is provided in **'VitaShellCustomization.rar'** and av
* sakya for Lightmp3
* Everybody who contributed on vitasdk

### Changelog 1.77 ###
- Added archive support for .7z, .tar.gz, .tar.bz2 and more by using libarchive.
- Improved archive file system (opening archives should now be much faster).
- Fixed keyboard freeze after using it multiple times.
- Fixed file browser cursor correction.

### Changelog 1.76 ###
- Added DLC refresh + restore license from Sqlite DB by VitaSmith.
- Added license database refresh by VitaSmith.
Expand Down
34 changes: 22 additions & 12 deletions archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ typedef struct ArchiveFileNode {
struct ArchiveFileNode *child;
struct ArchiveFileNode *next;
char name[MAX_NAME_LENGTH];
int name_length;
int is_folder;
SceMode mode;
SceOff size;
SceDateTime ctime;
SceDateTime mtime;
Expand Down Expand Up @@ -75,14 +75,18 @@ ArchiveFileNode *createArchiveNode(const char *name, const struct stat *stat, in
node->next = NULL;
if (is_folder || stat->st_mode & S_IFDIR)
node->is_folder = 1;
node->name_length = strlen(name);
strcpy(node->name, name);

if (stat) {
SceDateTime time;

if (stat->st_mode & S_IFDIR)
node->mode |= SCE_S_IFDIR;
if (stat->st_mode & S_IFREG)
node->mode |= SCE_S_IFREG;

node->size = stat->st_size;

sceRtcSetTime_t(&time, stat->st_ctime);
convertLocalTimeToUtc(&node->ctime, &time);

Expand Down Expand Up @@ -336,7 +340,7 @@ int fileListGetArchiveEntries(FileList *list, const char *path, int sort) {
list->files++;
}

entry->name_length = curr->name_length;
entry->name_length = strlen(entry->name);
entry->size = curr->size;

memcpy(&entry->ctime, (SceDateTime *)&curr->ctime, sizeof(SceDateTime));
Expand All @@ -355,7 +359,12 @@ int fileListGetArchiveEntries(FileList *list, const char *path, int sort) {
int getArchivePathInfo(const char *path, uint64_t *size, uint32_t *folders, uint32_t *files) {
SceIoStat stat;
memset(&stat, 0, sizeof(SceIoStat));
if (archiveFileGetstat(path, &stat) < 0) {

int res = archiveFileGetstat(path, &stat);
if (res < 0)
return res;

if (SCE_S_ISDIR(stat.st_mode)) {
FileList list;
memset(&list, 0, sizeof(FileList));
fileListGetArchiveEntries(&list, path, SORT_NONE);
Expand Down Expand Up @@ -392,7 +401,12 @@ int getArchivePathInfo(const char *path, uint64_t *size, uint32_t *folders, uint
int extractArchivePath(const char *src, const char *dst, FileProcessParam *param) {
SceIoStat stat;
memset(&stat, 0, sizeof(SceIoStat));
if (archiveFileGetstat(src, &stat) < 0) {

int res = archiveFileGetstat(src, &stat);
if (res < 0)
return res;

if (SCE_S_ISDIR(stat.st_mode)) {
FileList list;
memset(&list, 0, sizeof(FileList));
fileListGetArchiveEntries(&list, src, SORT_NONE);
Expand Down Expand Up @@ -510,15 +524,12 @@ int extractArchivePath(const char *src, const char *dst, FileProcessParam *param
}

int archiveFileGetstat(const char *file, SceIoStat *stat) {
// Is directory
if (hasEndSlash(file + archive_path_start))
return -1;

ArchiveFileNode *node = findArchiveNode(file + archive_path_start);
if (!node)
return -1;

if (stat) {
stat->st_mode = node->mode;
stat->st_size = node->size;
memcpy(&stat->st_ctime, &node->ctime, sizeof(SceDateTime));
memcpy(&stat->st_mtime, &node->mtime, sizeof(SceDateTime));
Expand Down Expand Up @@ -598,8 +609,7 @@ int ReadArchiveFile(const char *file, void *buf, int size) {
}

int archiveClose() {
freeArchiveNodes(archive_root->child);
free(archive_root);
freeArchiveNodes(archive_root);
return 0;
}

Expand Down
90 changes: 45 additions & 45 deletions init.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,51 +91,51 @@ static DefaultFile default_files[] = {

DEFAULT_FILE("ux0:VitaShell/theme/theme.txt", theme_txt, 0),

DEFAULT_FILE("ux0:VitaShell/theme/Default/colors.txt", default_colors_txt, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/archive_icon.png", default_archive_icon_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/audio_icon.png", default_audio_icon_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/battery.png", default_battery_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/battery_bar_charge.png", default_battery_bar_charge_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/battery_bar_green.png", default_battery_bar_green_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/battery_bar_red.png", default_battery_bar_red_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/cover.png", default_cover_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/fastforward.png", default_fastforward_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/fastrewind.png", default_fastrewind_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/file_icon.png", default_file_icon_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/folder_icon.png", default_folder_icon_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/ftp.png", default_ftp_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/image_icon.png", default_image_icon_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/pause.png", default_pause_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/play.png", default_play_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/sfo_icon.png", default_sfo_icon_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/text_icon.png", default_text_icon_png, 0),

DEFAULT_FILE("ux0:VitaShell/theme/Electron/colors.txt", electron_colors_txt, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/archive_icon.png", electron_archive_icon_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/audio_icon.png", electron_audio_icon_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/battery.png", electron_battery_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/battery_bar_charge.png", electron_battery_bar_charge_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/battery_bar_green.png", electron_battery_bar_green_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/battery_bar_red.png", electron_battery_bar_red_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/bg_audioplayer.png", electron_bg_audioplayer_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/bg_browser.png", electron_bg_browser_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/bg_hexeditor.png", electron_bg_hexeditor_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/bg_photoviewer.png", electron_bg_photoviewer_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/bg_texteditor.png", electron_bg_texteditor_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/context.png", electron_context_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/context_more.png", electron_context_more_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/cover.png", electron_cover_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/dialog.png", electron_dialog_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/fastforward.png", electron_fastforward_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/fastrewind.png", electron_fastrewind_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/file_icon.png", electron_file_icon_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/folder_icon.png", electron_folder_icon_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/ftp.png", electron_ftp_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/image_icon.png", electron_image_icon_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/pause.png", electron_pause_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/play.png", electron_play_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/sfo_icon.png", electron_sfo_icon_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/text_icon.png", electron_text_icon_png, 0),
DEFAULT_FILE("ux0:VitaShell/theme/Default/colors.txt", default_colors_txt, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/archive_icon.png", default_archive_icon_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/audio_icon.png", default_audio_icon_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/battery.png", default_battery_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/battery_bar_charge.png", default_battery_bar_charge_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/battery_bar_green.png", default_battery_bar_green_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/battery_bar_red.png", default_battery_bar_red_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/cover.png", default_cover_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/fastforward.png", default_fastforward_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/fastrewind.png", default_fastrewind_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/file_icon.png", default_file_icon_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/folder_icon.png", default_folder_icon_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/ftp.png", default_ftp_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/image_icon.png", default_image_icon_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/pause.png", default_pause_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/play.png", default_play_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/sfo_icon.png", default_sfo_icon_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Default/text_icon.png", default_text_icon_png, 1),

DEFAULT_FILE("ux0:VitaShell/theme/Electron/colors.txt", electron_colors_txt, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/archive_icon.png", electron_archive_icon_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/audio_icon.png", electron_audio_icon_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/battery.png", electron_battery_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/battery_bar_charge.png", electron_battery_bar_charge_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/battery_bar_green.png", electron_battery_bar_green_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/battery_bar_red.png", electron_battery_bar_red_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/bg_audioplayer.png", electron_bg_audioplayer_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/bg_browser.png", electron_bg_browser_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/bg_hexeditor.png", electron_bg_hexeditor_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/bg_photoviewer.png", electron_bg_photoviewer_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/bg_texteditor.png", electron_bg_texteditor_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/context.png", electron_context_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/context_more.png", electron_context_more_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/cover.png", electron_cover_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/dialog.png", electron_dialog_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/fastforward.png", electron_fastforward_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/fastrewind.png", electron_fastrewind_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/file_icon.png", electron_file_icon_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/folder_icon.png", electron_folder_icon_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/ftp.png", electron_ftp_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/image_icon.png", electron_image_icon_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/pause.png", electron_pause_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/play.png", electron_play_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/sfo_icon.png", electron_sfo_icon_png, 1),
DEFAULT_FILE("ux0:VitaShell/theme/Electron/text_icon.png", electron_text_icon_png, 1),

DEFAULT_FILE("ux0:VitaShell/module/user.suprx", user_suprx, 1),
DEFAULT_FILE("ux0:VitaShell/module/usbdevice.skprx", usbdevice_skprx, 1),
Expand Down
12 changes: 6 additions & 6 deletions main_context.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ enum MenuMoreEntrys {
};

MenuEntry menu_more_entries[] = {
{ COMPRESS, 13, 0, CTX_INVISIBLE },
{ INSTALL_ALL, 14, 0, CTX_INVISIBLE },
{ INSTALL_FOLDER, 15, 0, CTX_INVISIBLE },
{ EXPORT_MEDIA, 16, 0, CTX_INVISIBLE },
{ CALCULATE_SHA1, 17, 0, CTX_INVISIBLE },
{ OPEN_DECRYPTED, 18, 0, CTX_INVISIBLE },
{ COMPRESS, 12, 0, CTX_INVISIBLE },
{ INSTALL_ALL, 13, 0, CTX_INVISIBLE },
{ INSTALL_FOLDER, 14, 0, CTX_INVISIBLE },
{ EXPORT_MEDIA, 15, 0, CTX_INVISIBLE },
{ CALCULATE_SHA1, 16, 0, CTX_INVISIBLE },
{ OPEN_DECRYPTED, 17, 0, CTX_INVISIBLE },
};

#define N_MENU_MORE_ENTRIES (sizeof(menu_more_entries) / sizeof(MenuEntry))
Expand Down
8 changes: 8 additions & 0 deletions resources/changeinfo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -314,4 +314,12 @@
- Fixed C2-12828-1 error.<br>
]]>
</changes>
<changes app_ver="01.77">
<![CDATA[
- Added archive support for .7z, .tar.gz, .tar.bz2 and more by using libarchive.<br>
- Improved archive file system (opening archives should now be much faster).<br>
- Fixed keyboard freeze after using it multiple times.<br>
- Fixed file browser cursor correction.<br>
]]>
</changes>
</changeinfo>
Binary file modified resources/electron/context.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/electron/context_more.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6f79086

Please sign in to comment.