Use rawgit for automatic updates

This commit is contained in:
TheFloW 2018-03-14 16:24:01 +01:00
parent 7609f2fd22
commit cf73744e7b
6 changed files with 14 additions and 10 deletions

View File

@ -14,7 +14,7 @@ project(VitaShell)
include("${VITASDK}/share/vita.cmake" REQUIRED)
set(VITA_APP_NAME "VitaShell")
set(VITA_TITLEID "VITASHELL")
set(VITA_VERSION "01.82")
set(VITA_VERSION "01.83")
# Flags and includes
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3 -Wno-unused-variable -Wno-unused-but-set-variable -Wno-format-truncation -fno-lto")
@ -189,6 +189,11 @@ vita_create_vpk(VitaShell.vpk ${VITA_TITLEID} eboot.bin
pkg/sce_sys/livearea/contents/template.xml sce_sys/livearea/contents/template.xml
)
add_custom_target(release
COMMAND cp VitaShell.vpk ../release/VitaShell.vpk
DEPENDS VitaShell.vpk
)
add_custom_target(send
COMMAND curl -T eboot.bin ftp://$(PSVITAIP):1337/ux0:/app/${VITA_TITLEID}/
DEPENDS eboot.bin

2
main.h
View File

@ -53,7 +53,7 @@
// VitaShell version major.minor
#define VITASHELL_VERSION_MAJOR 0x01
#define VITASHELL_VERSION_MINOR 0x82
#define VITASHELL_VERSION_MINOR 0x83
#define VITASHELL_VERSION ((VITASHELL_VERSION_MAJOR << 0x18) | (VITASHELL_VERSION_MINOR << 0x10))

View File

@ -160,7 +160,9 @@ ContextMenu context_menu_more = {
};
int gameDataMount(const char *path) {
return sceAppMgrGameDataMount(path, 0, 0, pfs_mount_point);
int res = sceAppMgrGameDataMount(path, 0, 0, pfs_mount_point);
debugPrintf("res: 0x%08X, %s\n", res, pfs_mount_point);
return res;
}
int gameDataUmount() {

View File

@ -27,8 +27,8 @@
#include "language.h"
#include "utils.h"
#define BASE_ADDRESS "https://github.com/TheOfficialFloW/VitaShell/releases/download"
#define VERSION_URL "/0.2/version.bin"
#define BASE_ADDRESS "https://cdn.rawgit.com/TheOfficialFloW/VitaShell/release"
#define VERSION_URL "/version.bin"
#define VITASHELL_UPDATE_FILE "ux0:VitaShell/internal/VitaShell.vpk"
#define VITASHELL_VERSION_FILE "ux0:VitaShell/internal/version.bin"
@ -75,11 +75,8 @@ int network_update_thread(SceSize args, void *argp) {
goto EXIT;
}
char url[128];
snprintf(url, sizeof(url), BASE_ADDRESS "/%s/VitaShell.vpk", version_string);
// Yes
return downloadFileProcess(url, VITASHELL_UPDATE_FILE, DIALOG_STEP_DOWNLOADED);
return downloadFileProcess(BASE_ADDRESS "/VitaShell.vpk", VITASHELL_UPDATE_FILE, DIALOG_STEP_DOWNLOADED);
}
}
}

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">v1.82</str>
<str size="18" color="#ffffff" shadow="on">v1.83</str>
</text>
</liveitem>
</frame>

BIN
release/version.bin Normal file

Binary file not shown.