Release v1.00

This commit is contained in:
TheFloW 2016-09-12 22:34:03 +02:00
parent a82bd91867
commit cbe96a16b7
16 changed files with 113 additions and 37 deletions

View File

@ -40,7 +40,7 @@ ASFLAGS = $(CFLAGS)
all: $(TARGET).vpk
%.vpk: eboot.bin
vita-mksfoex -d PARENTAL_LEVEL=1 -s APP_VER=00.95 -s TITLE_ID=$(TITLE_ID) "$(TARGET)" param.sfo
vita-mksfoex -d PARENTAL_LEVEL=1 -s APP_VER=01.00 -s TITLE_ID=$(TITLE_ID) "$(TARGET)" param.sfo
vita-pack-vpk -s param.sfo -b eboot.bin \
--add pkg/sce_sys/icon0.png=sce_sys/icon0.png \
--add pkg/sce_sys/livearea/contents/bg.png=sce_sys/livearea/contents/bg.png \

View File

@ -81,6 +81,26 @@ https://github.com/xy2iii/vitashell-themes
Be sure you pull request your customized design or language file there.
### In order to compile VitaShell you'll need ###
* vitasdk: https://github.com/vitasdk
* vita2dlib: https://github.com/xerpi/vita2dlib
* ftpvitalib https://github.com/xerpi/ftpvitalib
* EasyRPG libraries: https://ci.easyrpg.org/view/Toolchains/job/toolchain-vita/
### Credits ###
* Team Molecule for HENkaku
* xerpi for ftpvitalib and vita2dlib
* wololo for the Revitalize contest
* Everybody who contributed on vitasdk
### Changelog 1.00 ###
- Added audio player with .MP3 and .OGG support (Press /\ to turn off the display while listening to music. Graphics by Valle).
- Added changelog to the VitaShell bubble (press /\ or hold the bubble of VitaShell in the livearea).
- Added ability to resume to the directory you've last visted before exiting VitaShell).
- Leaving to livearea or suspending the device does now no longer corrupt an IO process anymore (while copying things you can leave now VitaShell and resume).
- Improved text editor and added search feature to context menu (press /\).
- Fixed bug where copying to different partitions didn't work.
### Changelog 0.95 ###
- Added ability to install update files as .vpk (for Vitamin).
- Added patch to make .vpk installation appearing as full version instead of test version.
@ -184,16 +204,4 @@ Be sure you pull request your customized design or language file there.
- Added some cosmetic changes.
- Fixed crash when deleting marked entries.
- Copied entries now still rest in clipboard after pasting them.
- The application now cleans itself before launching homebrews.
### In order to compile VitaShell you'll need ###
* vitasdk: https://github.com/vitasdk
* vita2dlib: https://github.com/xerpi/vita2dlib
* ftpvitalib https://github.com/xerpi/ftpvitalib
* EasyRPG libraries: https://ci.easyrpg.org/view/Toolchains/job/toolchain-vita/
### Credits ###
* Team Molecule for HENkaku
* xerpi for ftpvitalib and vita2dlib
* wololo for the Revitalize contest
* Everybody who contributed on vitasdk
- The application now cleans itself before launching homebrews.

View File

@ -26,14 +26,33 @@
#include "audio/player.h"
struct fileInfo *fileinfo = NULL;
vita2d_texture *tex = NULL;
static char title[128], album[128], artist[128], genre[128], year[12];
static struct fileInfo *fileinfo = NULL;
static vita2d_texture *tex = NULL;
void shortenString(char *out, char *in, int width) {
strcpy(out, in);
int i;
for (i = strlen(out) - 1; i > 0; i--) {
if (vita2d_pgf_text_width(font, FONT_SIZE, out) < width)
break;
out[i] = '\0';
}
}
void getAudioInfo(char *file) {
char *buffer = NULL;
fileinfo = getInfoFunct();
shortenString(title, fileinfo->title[0] == '\0' ? "-" : fileinfo->title, 390);
shortenString(album, fileinfo->album[0] == '\0' ? "-" : fileinfo->album, 390);
shortenString(artist, fileinfo->artist[0] == '\0' ? "-" : fileinfo->artist, 390);
shortenString(genre, fileinfo->genre[0] == '\0' ? "-" : fileinfo->genre, 390);
shortenString(year, fileinfo->year[0] == '\0' ? "-" : fileinfo->year, 390);
if (tex) {
vita2d_free_texture(tex);
tex = NULL;
@ -222,7 +241,8 @@ int audioPlayer(char *file, int type, FileList *list, FileListEntry *entry, int
} else {
vita2d_draw_texture(cover_image, SHELL_MARGIN_X, START_Y);
}
// Info
float x = 2.0f * SHELL_MARGIN_X + cover_size;
pgf_draw_text(x, START_Y + (0 * FONT_Y_SPACE), AUDIO_INFO_ASSIGN, FONT_SIZE, language_container[TITLE]);
@ -231,11 +251,15 @@ int audioPlayer(char *file, int type, FileList *list, FileListEntry *entry, int
pgf_draw_text(x, START_Y + (3 * FONT_Y_SPACE), AUDIO_INFO_ASSIGN, FONT_SIZE, language_container[GENRE]);
pgf_draw_text(x, START_Y + (4 * FONT_Y_SPACE), AUDIO_INFO_ASSIGN, FONT_SIZE, language_container[YEAR]);
pgf_draw_text(x + 120.0f, START_Y + (0 * FONT_Y_SPACE), AUDIO_INFO, FONT_SIZE, fileinfo->title[0] == '\0' ? "-" : fileinfo->title);
pgf_draw_text(x + 120.0f, START_Y + (1 * FONT_Y_SPACE), AUDIO_INFO, FONT_SIZE, fileinfo->album[0] == '\0' ? "-" : fileinfo->album);
pgf_draw_text(x + 120.0f, START_Y + (2 * FONT_Y_SPACE), AUDIO_INFO, FONT_SIZE, fileinfo->artist[0] == '\0' ? "-" : fileinfo->artist);
pgf_draw_text(x + 120.0f, START_Y + (3 * FONT_Y_SPACE), AUDIO_INFO, FONT_SIZE, fileinfo->genre[0] == '\0' ? "-" : fileinfo->genre);
pgf_draw_text(x + 120.0f, START_Y + (4 * FONT_Y_SPACE), AUDIO_INFO, FONT_SIZE, fileinfo->year[0] == '\0' ? "-" : fileinfo->year);
x += 120.0f;
pgf_draw_text(x, START_Y + (0 * FONT_Y_SPACE), AUDIO_INFO, FONT_SIZE, title);
pgf_draw_text(x, START_Y + (1 * FONT_Y_SPACE), AUDIO_INFO, FONT_SIZE, album);
pgf_draw_text(x, START_Y + (2 * FONT_Y_SPACE), AUDIO_INFO, FONT_SIZE, artist);
pgf_draw_text(x, START_Y + (3 * FONT_Y_SPACE), AUDIO_INFO, FONT_SIZE, genre);
pgf_draw_text(x, START_Y + (4 * FONT_Y_SPACE), AUDIO_INFO, FONT_SIZE, year);
x -= 120.0f;
float y = SCREEN_HEIGHT - 6.0f * SHELL_MARGIN_Y;

2
init.c
View File

@ -210,7 +210,7 @@ void initVitaShell() {
// Write changeinfo.xml file to patch
SceIoStat stat;
memset(&stat, 0, sizeof(stat));
if (sceIoGetstat("ux0:patch/VITASHELL/sce_sys/changeinfo/changeinfo.xml", &stat) < 0 && (int)stat.st_size != (int)&_binary_resources_changeinfo_txt_size) {
if (sceIoGetstat("ux0:patch/VITASHELL/sce_sys/changeinfo/changeinfo.xml", &stat) < 0 || (int)stat.st_size != (int)&_binary_resources_changeinfo_txt_size) {
sceIoMkdir("ux0:patch", 0777);
sceIoMkdir("ux0:patch/VITASHELL", 0777);
sceIoMkdir("ux0:patch/VITASHELL/sce_sys", 0777);

View File

@ -25,14 +25,6 @@
static uint64_t current_value = 0;
void closeWaitDialog() {
sceMsgDialogClose();
while (updateMessageDialog() != MESSAGE_DIALOG_RESULT_NONE) {
sceKernelDelayThread(1000);
}
}
int cancelHandler() {
return (updateMessageDialog() != MESSAGE_DIALOG_RESULT_RUNNING);
}
@ -261,6 +253,10 @@ int copy_thread(SceSize args_size, CopyArguments *args) {
copy_entry = copy_entry->next;
}
// Check memory card free space
if (checkMemoryCardFreeSpace(size))
goto EXIT;
// Update thread
thid = createStartUpdateThread(size + folders);

View File

@ -49,7 +49,6 @@ typedef struct {
char *file_path;
} HashArguments;
void closeWaitDialog();
int cancelHandler();
void SetProgress(uint64_t value, uint64_t max);
SceUID createStartUpdateThread(uint64_t max);

View File

@ -126,6 +126,7 @@ void loadLanguage(int id) {
// Others
LANGUAGE_ENTRY(SAVE_MODIFICATIONS),
LANGUAGE_ENTRY(NO_SPACE_ERROR),
LANGUAGE_ENTRY(WIFI_ERROR),
LANGUAGE_ENTRY(FTP_SERVER),
LANGUAGE_ENTRY(SYS_INFO),

View File

@ -84,6 +84,7 @@ enum LanguageContainer {
// Others
SAVE_MODIFICATIONS,
NO_SPACE_ERROR,
WIFI_ERROR,
FTP_SERVER,
SYS_INFO,

1
main.c
View File

@ -24,7 +24,6 @@
- Duplicate when same location or same name. /lol to /lol - Backup. or overwrite question.
- Shortcuts
- CPU changement
- Media player
*/
#include "main.h"

4
main.h
View File

@ -66,8 +66,8 @@
#define ENABLE_FILE_LOGGING 1
// VitaShell version major.minor
#define VITASHELL_VERSION_MAJOR 0x00
#define VITASHELL_VERSION_MINOR 0x95
#define VITASHELL_VERSION_MAJOR 0x01
#define VITASHELL_VERSION_MINOR 0x00
#define VITASHELL_VERSION ((VITASHELL_VERSION_MAJOR << 0x18) | (VITASHELL_VERSION_MINOR << 0x10))

View File

@ -391,6 +391,10 @@ int install_thread(SceSize args_size, InstallArguments *args) {
uint32_t folders = 0, files = 0;
getArchivePathInfo(src_path, &size, &folders, &files);
// Check memory card free space
if (checkMemoryCardFreeSpace(size))
goto EXIT;
// Update thread
thid = createStartUpdateThread(size + folders);
@ -448,6 +452,10 @@ EXIT:
if (thid >= 0)
sceKernelWaitThreadEnd(thid, NULL, NULL);
// Recursively clean up package_temp directory
removePath(PACKAGE_PARENT, NULL);
sceIoMkdir(PACKAGE_PARENT, 0777);
// Unlock power timers
powerUnlock();

View File

@ -28,7 +28,7 @@
<frame id="frame4">
<liveitem>
<text align="left" text-align="left" word-wrap="off" ellipsis="on">
<str size="18" color="#ffffff" shadow="on">v0.95</str>
<str size="18" color="#ffffff" shadow="on">v1.00</str>
</text>
</liveitem>
</frame>

View File

@ -132,4 +132,14 @@
- Dropped GENERAL_COLOR, now all colors are adjustable.<br>
]]>
</changes>
<changes app_ver="01.00">
<![CDATA[
- Added audio player with .MP3 and .OGG support (Press /\ to turn off the display while listening to music. Graphics by Valle).<br>
- Added changelog to the VitaShell bubble (press /\ or hold the bubble of VitaShell in the livearea).<br>
- Added ability to resume to the directory you've last visted before exiting VitaShell).<br>
- Leaving to livearea or suspending the device does now no longer corrupt an IO process anymore (while copying things you can leave now VitaShell and resume).<br>
- Improved text editor and added search feature to context menu (press /\).<br>
- Fixed bug where copying to different partitions didn't work.<br>
]]>
</changes>
</changeinfo>

View File

@ -64,7 +64,8 @@ HASH_FILE_QUESTION = "SHA1 hashing may take a long time. Conti
# Others
SAVE_MODIFICATIONS = "Do you want to save your modifications?"
NO_SPACE_ERROR = "There is not enough free space on the memory\card.\At least %s more space is needed."
WIFI_ERROR = "You must use Wi-Fi to do this."
FTP_SERVER = "FTP server is now running at\ftp://%s:%i\\Press 'OK' to keep it in background.\Press 'Cancel' to disconnect."
SYS_INFO = "System software: %s\Model: 0x%08X\MAC address: %s\IP address: %s\Memory card: %s/%s"
UPDATE_QUESTION = "VitaShell %s is now available.\\Do you want to update the application?"
UPDATE_QUESTION = "VitaShell %s is now available.\\Do you want to update the application?"

25
utils.c
View File

@ -89,6 +89,14 @@ void endDrawing() {
sceDisplayWaitVblankStart();
}
void closeWaitDialog() {
sceMsgDialogClose();
while (updateMessageDialog() != MESSAGE_DIALOG_RESULT_NONE) {
sceKernelDelayThread(1000);
}
}
void errorDialog(int error) {
if (error < 0) {
initMessageDialog(SCE_MSG_DIALOG_BUTTON_TYPE_OK, language_container[ERROR], error);
@ -108,6 +116,23 @@ void infoDialog(char *msg, ...) {
dialog_step = DIALOG_STEP_INFO;
}
int checkMemoryCardFreeSpace(uint64_t size) {
uint64_t free_size = 0, max_size = 0;
sceAppMgrGetDevInfo("ux0:", &max_size, &free_size);
if (size >= (free_size + (40 * 1024 * 1024))) {
closeWaitDialog();
char size_string[16];
getSizeString(size_string, size - (free_size + (40 * 1024 * 1024)));
infoDialog(language_container[NO_SPACE_ERROR], size_string);
return 1;
}
return 0;
}
int power_tick_thread(SceSize args, void *argp) {
while (1) {
if (lock_power > 0) {

View File

@ -50,9 +50,13 @@ extern uint32_t old_buttons, current_buttons, pressed_buttons, hold_buttons, hol
void startDrawing(vita2d_texture *bg);
void endDrawing();
void closeWaitDialog();
void errorDialog(int error);
void infoDialog(char *msg, ...);
int checkMemoryCardFreeSpace(uint64_t size);
void initPowerTickThread();
void powerLock();
void powerUnlock();