diff --git a/README.md b/README.md
index a957d785..6aa4ed04 100644
--- a/README.md
+++ b/README.md
@@ -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.
diff --git a/archive.c b/archive.c
index 01eece7d..bf42b973 100644
--- a/archive.c
+++ b/archive.c
@@ -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;
@@ -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);
@@ -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));
@@ -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);
@@ -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);
@@ -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));
@@ -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;
}
diff --git a/init.c b/init.c
index dd44bd51..a8c8544d 100644
--- a/init.c
+++ b/init.c
@@ -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),
diff --git a/main_context.c b/main_context.c
index fc2e27d0..b081480c 100644
--- a/main_context.c
+++ b/main_context.c
@@ -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))
diff --git a/resources/changeinfo.txt b/resources/changeinfo.txt
index 11861f90..f8f23e59 100644
--- a/resources/changeinfo.txt
+++ b/resources/changeinfo.txt
@@ -314,4 +314,12 @@
- Fixed C2-12828-1 error.
]]>
+
+
+- Improved archive file system (opening archives should now be much faster).
+- Fixed keyboard freeze after using it multiple times.
+- Fixed file browser cursor correction.
+ ]]>
+
diff --git a/resources/electron/context.png b/resources/electron/context.png
index 33e37a5b..e99cd439 100644
Binary files a/resources/electron/context.png and b/resources/electron/context.png differ
diff --git a/resources/electron/context_more.png b/resources/electron/context_more.png
index 0e8567ab..cd3b98af 100644
Binary files a/resources/electron/context_more.png and b/resources/electron/context_more.png differ