Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5a250a4182 | |||
| 89fa9aba69 |
+1
-1
@@ -67,7 +67,7 @@ add_executable(ezremote_client
|
||||
|
||||
add_self(ezremote_client)
|
||||
|
||||
add_pkg(ezremote_client ${CMAKE_SOURCE_DIR}/data "RMTC00001" "ezRemote Client" "01.24" 32 0)
|
||||
add_pkg(ezremote_client ${CMAKE_SOURCE_DIR}/data "RMTC00001" "ezRemote Client" "01.25" 32 0)
|
||||
|
||||
target_link_libraries(ezremote_client
|
||||
c
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
STR_CONNECTION_SETTINGS=连接设置
|
||||
STR_SITE=地点
|
||||
STR_LOCAL=当地的
|
||||
STR_REMOTE=偏僻的
|
||||
STR_MESSAGES=留言
|
||||
STR_SITE=站点
|
||||
STR_LOCAL=本地
|
||||
STR_REMOTE=远程路径
|
||||
STR_MESSAGES=信息
|
||||
STR_UPDATE_SOFTWARE=更新软件
|
||||
STR_CONNECT=连接
|
||||
STR_DISCONNECT=断开
|
||||
@@ -11,51 +11,123 @@ STR_REFRESH=刷新
|
||||
STR_SERVER=服务器
|
||||
STR_USERNAME=用户名
|
||||
STR_PASSWORD=密码
|
||||
STR_PORT=港口
|
||||
STR_PASV=帕夫
|
||||
STR_PORT=端口
|
||||
STR_PASV=被动模式
|
||||
STR_DIRECTORY=目录
|
||||
STR_FILTER=筛选
|
||||
STR_YES=是的
|
||||
STR_NO=不
|
||||
STR_FILTER=过滤器
|
||||
STR_YES=是
|
||||
STR_NO=否
|
||||
STR_CANCEL=取消
|
||||
STR_CONTINUE=继续
|
||||
STR_CLOSE=关闭
|
||||
STR_FOLDER=文件夹
|
||||
STR_FILE=文件
|
||||
STR_TYPE=类型
|
||||
STR_NAME=姓名
|
||||
STR_SIZE=尺寸
|
||||
STR_NAME=名称
|
||||
STR_SIZE=大小
|
||||
STR_DATE=日期
|
||||
STR_NEW_FOLDER=新建文件夹
|
||||
STR_RENAME=改名
|
||||
STR_RENAME=重命名
|
||||
STR_DELETE=删除
|
||||
STR_UPLOAD=上传
|
||||
STR_DOWNLOAD=下载
|
||||
STR_SELECT_ALL=全选
|
||||
STR_CLEAR_ALL=全部清除
|
||||
STR_UPLOADING=上传
|
||||
STR_DOWNLOADING=下载
|
||||
STR_CLEAR_ALL=取消全选
|
||||
STR_UPLOADING=上传中
|
||||
STR_DOWNLOADING=下载中
|
||||
STR_OVERWRITE=覆盖
|
||||
STR_DONT_OVERWRITE=不要覆盖
|
||||
STR_ASK_FOR_CONFIRM=要求确认
|
||||
STR_DONT_ASK_CONFIRM=不要要求确认
|
||||
STR_DONT_OVERWRITE=不覆盖
|
||||
STR_ASK_FOR_CONFIRM=确认请求
|
||||
STR_DONT_ASK_CONFIRM=不确认请求
|
||||
STR_ALLWAYS_USE_OPTION=始终使用此选项,不再询问
|
||||
STR_ACTIONS=行动
|
||||
STR_CONFIRM=确认
|
||||
STR_OVERWRITE_OPTIONS=覆盖选项
|
||||
STR_PROPERTIES=特性
|
||||
STR_PROGRESS=进步
|
||||
STR_PROPERTIES=属性
|
||||
STR_PROGRESS=进度
|
||||
STR_UPDATES=更新
|
||||
STR_DEL_CONFIRM_MSG=您确定要删除此文件/文件夹吗?
|
||||
STR_CANCEL_ACTION_MSG=取消。 等待最后一个动作完成
|
||||
STR_DEL_CONFIRM_MSG=您确定要删除此文件/文件夹?
|
||||
STR_CANCEL_ACTION_MSG=取消中。请等待最后一个操作结束
|
||||
STR_FAIL_UPLOAD_MSG=上传文件失败
|
||||
STR_FAIL_DOWNLOAD_MSG=下载文件失败
|
||||
STR_FAIL_READ_LOCAL_DIR_MSG=读取目录内容失败或文件夹不存在。
|
||||
STR_CONNECTION_CLOSE_ERR_MSG=426 连接已关闭。
|
||||
STR_REMOTE_TERM_CONN_MSG=426 远程服务器已终止连接。
|
||||
STR_FAIL_LOGIN_MSG=300 登录失败。 请检查您的用户名或密码。
|
||||
STR_FAIL_TIMEOUT_MSG=426 失败。 连接超时。
|
||||
STR_FAIL_LOGIN_MSG=300 登录失败。请检查您的用户名或密码。
|
||||
STR_FAIL_TIMEOUT_MSG=426 失败。连接超时。
|
||||
STR_FAIL_DEL_DIR_MSG=删除目录失败
|
||||
STR_DELETING=删除
|
||||
STR_DELETING=删除中
|
||||
STR_FAIL_DEL_FILE_MSG=删除文件失败
|
||||
STR_DELETED=已删除
|
||||
STR_DELETED=删除完毕
|
||||
STR_LINK=链接
|
||||
STR_SHARE=分享
|
||||
STR_FAILED=310 失败
|
||||
STR_FAIL_CREATE_LOCAL_FILE_MSG=310 无法本地创建文件
|
||||
STR_INSTALL=安装
|
||||
STR_INSTALLING=正在安装中
|
||||
STR_INSTALL_SUCCESS=成功
|
||||
STR_INSTALL_FAILED=失败
|
||||
STR_INSTALL_SKIPPED=已忽略
|
||||
STR_CHECK_HTTP_MSG=正在检查与远程HTTP服务器的连接
|
||||
STR_FAILED_HTTP_CHECK=连接到HTTP服务器失败
|
||||
STR_REMOTE_NOT_HTTP=远程不是HTTP服务器
|
||||
STR_INSTALL_FROM_DATA_MSG=文件包不在/data或/mnt/usbX文件夹中
|
||||
STR_ALREADY_INSTALLED_MSG=文件包已经安装
|
||||
STR_INSTALL_FROM_URL=从网址安装
|
||||
STR_CANNOT_READ_PKG_HDR_MSG=无法读取包文件头信息
|
||||
STR_FAVORITE_URLS=收藏网址
|
||||
STR_SLOT=槽位
|
||||
STR_EDIT=编辑
|
||||
STR_ONETIME_URL=一次性网址
|
||||
STR_NOT_A_VALID_PACKAGE=不是有效的程序包
|
||||
STR_WAIT_FOR_INSTALL_MSG=正在等待包完成安装
|
||||
STR_FAIL_INSTALL_TMP_PKG_MSG=未能安装pkg文件。请手动删除tmp pkg
|
||||
STR_AUTO_DELETE_TMP_PKG=安装后自动删除临时下载的pkg文件
|
||||
STR_PROTOCOL_NOT_SUPPORTED=不支持该协议
|
||||
STR_COULD_NOT_RESOLVE_HOST=无法解析主机名
|
||||
STR_EXTRACT=提取
|
||||
STR_EXTRACTING=提取中
|
||||
STR_FAILED_TO_EXTRACT=提取失败
|
||||
STR_EXTRACT_LOCATION=提取位置
|
||||
STR_COMPRESS=压缩
|
||||
STR_ZIP_FILE_PATH=Zip 文件名
|
||||
STR_COMPRESSING=压缩中
|
||||
STR_ERROR_CREATE_ZIP=正在创建zip文件时出现错误
|
||||
STR_UNSUPPORTED_FILE_FORMAT=不支持的压缩文件格式
|
||||
STR_CUT=剪切
|
||||
STR_COPY=复制
|
||||
STR_PASTE=粘贴
|
||||
STR_MOVING=移动中
|
||||
STR_COPYING=复制中
|
||||
STR_FAIL_MOVE_MSG=移动文件失败
|
||||
STR_FAIL_COPY_MSG=复制文件事变
|
||||
STR_CANT_MOVE_TO_SUBDIR_MSG=无法将父目录移动到子目录
|
||||
STR_CANT_COPY_TO_SUBDIR_MSG=无法将父目录复制到子目录
|
||||
STR_UNSUPPORTED_OPERATION_MSG=不支持操作
|
||||
STR_HTTP_PORT=Http 端口
|
||||
STR_REINSTALL_CONFIRM_MSG=内容已安装。是否要继续安装
|
||||
STR_REMOTE_NOT_SUPPORT_MSG=受保护的服务器不支持远程程序包安装。
|
||||
STR_CANNOT_CONNECT_REMOTE_MSG=无法访问远程HTTP服务器。
|
||||
STR_DOWNLOAD_INSTALL_MSG=无法安装远程程序包。是否下载软件包并进行安装?
|
||||
STR_CHECKING_REMOTE_SERVER_MSG=正在检查远程服务器的远程包安装。
|
||||
STR_FILES=文件
|
||||
STR_EDITOR=编辑器
|
||||
STR_SAVE=保存
|
||||
STR_MAX_EDIT_FILE_SIZE_MSG=无法编辑大于全部的文件。
|
||||
STR_DELETE_LINE=删除所选行
|
||||
STR_INSERT_LINE=在所选行下方插入
|
||||
STR_MODIFIED=已修改
|
||||
STR_FAIL_GET_TOKEN_MSG=无法从获取访问令牌
|
||||
STR_GET_TOKEN_SUCCESS_MSG=登录成功。您可以关闭浏览器并返回应用程序
|
||||
STR_NEW_FILE=新文件
|
||||
STR_SETTINGS=设置
|
||||
STR_GLOBAL=全局
|
||||
STR_COPY_LINE=复制所选行
|
||||
STR_PASTE_LINE=粘贴到所选行
|
||||
STR_SHOW_HIDDEN_FILES=显示隐藏文件
|
||||
STR_SET_DEFAULT_DIRECTORY=设置默认文件夹
|
||||
STR_SET_DEFAULT_DIRECTORY_MSG=已设置为默认目录
|
||||
STR_NFS_EXP_PATH_MISSING_MSG=URL中缺少NFS导出路径
|
||||
STR_FAIL_INIT_NFS_CONTEXT=无法初始化NFS上下文
|
||||
STR_FAIL_MOUNT_NFS_MSG=挂在 NFS 共享失败
|
||||
STR_VIEW_IMAGE=查看图片
|
||||
@@ -409,6 +409,7 @@ namespace Actions
|
||||
snprintf(activity_message, 1024, "%s %s", lang_strings[STR_UPLOADING], entries[i].path);
|
||||
bytes_to_download = entries[i].file_size;
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
ret = UploadFile(entries[i].path, new_path);
|
||||
if (ret <= 0)
|
||||
{
|
||||
@@ -1067,6 +1068,7 @@ namespace Actions
|
||||
void *InstallUrlPkgThread(void *argp)
|
||||
{
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
sprintf(status_message, "%s", "");
|
||||
pkg_header header;
|
||||
char filename[2000];
|
||||
@@ -1384,6 +1386,7 @@ namespace Actions
|
||||
snprintf(activity_message, 1024, "%s %s", isCopy ? lang_strings[STR_COPYING] : lang_strings[STR_MOVING], entries[i].path);
|
||||
bytes_to_download = entries[i].file_size;
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
ret = CopyOrMoveLocalFile(entries[i].path, new_path, isCopy);
|
||||
if (ret <= 0)
|
||||
{
|
||||
@@ -1633,6 +1636,7 @@ namespace Actions
|
||||
snprintf(activity_message, 1024, "%s %s", lang_strings[STR_COPYING], entries[i].path);
|
||||
bytes_to_download = entries[i].file_size;
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
ret = CopyOrMoveRemoteFile(entries[i].path, new_path, true);
|
||||
if (ret <= 0)
|
||||
{
|
||||
@@ -1726,6 +1730,7 @@ namespace Actions
|
||||
sprintf(activity_message, "%s %s to %s", lang_strings[STR_DOWNLOADING], filename.c_str(), local_file);
|
||||
remoteclient->Size(filename, &bytes_to_download);
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
file_transfering = true;
|
||||
int ret = remoteclient->Get(local_file, filename);
|
||||
if (ret == 0)
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef ACTIONS_H
|
||||
#define ACTIONS_H
|
||||
#ifndef EZ_ACTIONS_H
|
||||
#define EZ_ACTIONS_H
|
||||
|
||||
#include <pthread.h>
|
||||
#include "installer.h"
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef BASE64_H_
|
||||
#define BASE64_H_
|
||||
#ifndef EZ_BASE64_H_
|
||||
#define EZ_BASE64_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef APACHE_H
|
||||
#define APACHE_H
|
||||
#ifndef EZ_APACHE_H
|
||||
#define EZ_APACHE_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -102,6 +102,8 @@ int BaseClient::Get(const std::string &outputfile, const std::string &path, uint
|
||||
{
|
||||
std::ofstream file_stream(outputfile, std::ios::binary);
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
if (auto res = client->Get(GetFullPath(path),
|
||||
[&](const char *data, size_t data_length)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef BASESERVER_H
|
||||
#define BASESERVER_H
|
||||
#ifndef EZ_BASESERVER_H
|
||||
#define EZ_BASESERVER_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef FTPCLIENT_H
|
||||
#define FTPCLIENT_H
|
||||
#ifndef EZ_FTPCLIENT_H
|
||||
#define EZ_FTPCLIENT_H
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
@@ -307,6 +307,7 @@ int GDriveClient::Get(const std::string &outputfile, const std::string &path, ui
|
||||
{
|
||||
std::ofstream file_stream(outputfile, std::ios::binary);
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
std::string id = GetValue(path_id_map, path);
|
||||
std::string drive_id = GetDriveId(path);
|
||||
@@ -399,9 +400,9 @@ int GDriveClient::Update(const std::string &inputfile, const std::string &path)
|
||||
{
|
||||
bytes_to_download = FS::GetSize(inputfile);
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
std::ifstream file_stream(inputfile, std::ios::binary);
|
||||
bytes_transfered = 0;
|
||||
|
||||
std::string id = GetValue(path_id_map, path);
|
||||
std::string drive_id = GetDriveId(path);
|
||||
@@ -473,9 +474,9 @@ int GDriveClient::Put(const std::string &inputfile, const std::string &path, uin
|
||||
|
||||
bytes_to_download = FS::GetSize(inputfile);
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
std::ifstream file_stream(inputfile, std::ios::binary);
|
||||
bytes_transfered = 0;
|
||||
|
||||
size_t path_pos = path.find_last_of("/");
|
||||
std::string parent_dir;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef GDRIVE_H
|
||||
#define GDRIVE_H
|
||||
#ifndef EZ_GDRIVE_H
|
||||
#define EZ_GDRIVE_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef IIS_H
|
||||
#define IIS_H
|
||||
#ifndef EZ_IIS_H
|
||||
#define EZ_IIS_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -213,6 +213,7 @@ int NfsClient::Get(const std::string &outputfile, const std::string &ppath, uint
|
||||
void *buff = malloc(BUF_SIZE);
|
||||
int count = 0;
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
while ((count = nfs_read(nfs, nfsfh, BUF_SIZE, buff)) > 0)
|
||||
{
|
||||
if (count < 0)
|
||||
@@ -382,6 +383,7 @@ int NfsClient::Put(const std::string &inputfile, const std::string &ppath, uint6
|
||||
void* buff = malloc(BUF_SIZE);
|
||||
uint64_t count = 0;
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
while ((count = FS::Read(in, buff, BUF_SIZE)) > 0)
|
||||
{
|
||||
if (count < 0)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef NFSCLIENT_H
|
||||
#define NFSCLIENT_H
|
||||
#ifndef EZ_NFSCLIENT_H
|
||||
#define EZ_NFSCLIENT_H
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef NGINX_H
|
||||
#define NGINX_H
|
||||
#ifndef EZ_NGINX_H
|
||||
#define EZ_NGINX_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef NPXSERVE_H
|
||||
#define NPXSERVE_H
|
||||
#ifndef EZ_NPXSERVE_H
|
||||
#define EZ_NPXSERVE_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef RCLONE_H
|
||||
#define RCLONE_H
|
||||
#ifndef EZ_RCLONE_H
|
||||
#define EZ_RCLONE_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef REMOTECLIENT_H
|
||||
#define REMOTECLIENT_H
|
||||
#ifndef EZ_REMOTECLIENT_H
|
||||
#define EZ_REMOTECLIENT_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -284,6 +284,8 @@ int SFTPClient::Get(const std::string &outputfile, const std::string &path, uint
|
||||
char *buff = (char *)malloc(FTP_CLIENT_BUFSIZ);
|
||||
int rc, count = 0;
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
do
|
||||
{
|
||||
rc = libssh2_sftp_read(sftp_handle, buff, FTP_CLIENT_BUFSIZ);
|
||||
@@ -418,6 +420,8 @@ int SFTPClient::Put(const std::string &inputfile, const std::string &path, uint6
|
||||
buff = (char *)malloc(FTP_CLIENT_BUFSIZ);
|
||||
int nread, count = 0;
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
do
|
||||
{
|
||||
nread = FS::Read(in, buff, FTP_CLIENT_BUFSIZ);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef SFTPCLIENT_H
|
||||
#define SFTPCLIENT_H
|
||||
#ifndef EZ_SFTPCLIENT_H
|
||||
#define EZ_SFTPCLIENT_H
|
||||
|
||||
#include <libssh2.h>
|
||||
#include <libssh2_sftp.h>
|
||||
|
||||
@@ -214,6 +214,8 @@ int SmbClient::Get(const std::string &outputfile, const std::string &ppath, uint
|
||||
uint8_t *buff = (uint8_t*)malloc(max_read_size);
|
||||
int count = 0;
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
while ((count = smb2_read(smb2, in, buff, max_read_size)) > 0)
|
||||
{
|
||||
if (count < 0)
|
||||
@@ -418,6 +420,8 @@ int SmbClient::Put(const std::string &inputfile, const std::string &ppath, uint6
|
||||
uint8_t* buff = (uint8_t*)malloc(max_write_size);
|
||||
int count = 0;
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
while ((count = FS::Read(in, buff, max_write_size)) > 0)
|
||||
{
|
||||
if (count < 0)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef SMBCLIENT_H
|
||||
#define SMBCLIENT_H
|
||||
#ifndef EZ_SMBCLIENT_H
|
||||
#define EZ_SMBCLIENT_H
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
@@ -151,6 +151,7 @@ int WebDAVClient::Put(const std::string &inputfile, const std::string &path, uin
|
||||
{
|
||||
size_t bytes_remaining = FS::GetSize(inputfile);
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
FILE* in = FS::OpenRead(inputfile);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef WEBDAV_H
|
||||
#define WEBDAV_H
|
||||
#ifndef EZ_WEBDAV_H
|
||||
#define EZ_WEBDAV_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
#ifndef EZ_COMMON_H
|
||||
#define EZ_COMMON_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef LAUNCHER_CONFIG_H
|
||||
#define LAUNCHER_CONFIG_H
|
||||
#ifndef EZ_CONFIG_H
|
||||
#define EZ_CONFIG_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef FICHIER_HOST_H
|
||||
#define FICHIER_HOST_H
|
||||
#ifndef EZ_FICHIER_HOST_H
|
||||
#define EZ_FICHIER_HOST_H
|
||||
|
||||
#include "filehost.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef ALLDEBRID_HOST_H
|
||||
#define ALLDEBRID_HOST_H
|
||||
#ifndef EZ_ALLDEBRID_HOST_H
|
||||
#define EZ_ALLDEBRID_HOST_H
|
||||
|
||||
#include "filehost.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef DIRECT_HOST_H
|
||||
#define DIRECT_HOST_H
|
||||
#ifndef EZ_DIRECT_HOST_H
|
||||
#define EZ_DIRECT_HOST_H
|
||||
|
||||
#include "filehost.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef FILEHOST_H
|
||||
#define FILEHOST_H
|
||||
#ifndef EZ_FILEHOST_H
|
||||
#define EZ_FILEHOST_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef GDRIVE_HOST_H
|
||||
#define GDRIVE_HOST_H
|
||||
#ifndef EZ_GDRIVE_HOST_H
|
||||
#define EZ_GDRIVE_HOST_H
|
||||
|
||||
#include "filehost.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef MEDIAFIRE_HOST_H
|
||||
#define MEDIAFIRE_HOST_H
|
||||
#ifndef EZ_MEDIAFIRE_HOST_H
|
||||
#define EZ_MEDIAFIRE_HOST_H
|
||||
|
||||
#include "filehost.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef PIXELDRAIN_HOST_H
|
||||
#define PIXELDRAIN_HOST_H
|
||||
#ifndef EZ_PIXELDRAIN_HOST_H
|
||||
#define EZ_PIXELDRAIN_HOST_H
|
||||
|
||||
#include "filehost.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef REALDEBRID_HOST_H
|
||||
#define REALDEBRID_HOST_H
|
||||
#ifndef EZ_REALDEBRID_HOST_H
|
||||
#define EZ_REALDEBRID_HOST_H
|
||||
|
||||
#include "filehost.h"
|
||||
|
||||
|
||||
@@ -510,6 +510,8 @@ namespace FS
|
||||
|
||||
size_t bytes_read = 0;
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
const size_t buf_size = 0x10000;
|
||||
unsigned char *buf = new unsigned char[buf_size];
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef LAUNCHER_FS_H
|
||||
#define LAUNCHER_FS_H
|
||||
#ifndef EZ_FS_H
|
||||
#define EZ_FS_H
|
||||
|
||||
#pragma once
|
||||
#include <string.h>
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef LAUNCHER_GUI_H
|
||||
#define LAUNCHER_GUI_H
|
||||
#ifndef EZ_GUI_H
|
||||
#define EZ_GUI_H
|
||||
|
||||
#include <string>
|
||||
#include "SDL2/SDL.h"
|
||||
|
||||
+2
-2
@@ -16,8 +16,8 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __IME_DIALOG_H__
|
||||
#define __IME_DIALOG_H__
|
||||
#ifndef __EZ_IME_DIALOG_H__
|
||||
#define __EZ_IME_DIALOG_H__
|
||||
|
||||
#define IME_DIALOG_RESULT_NONE 0
|
||||
#define IME_DIALOG_RESULT_RUNNING 1
|
||||
|
||||
@@ -390,6 +390,8 @@ namespace INSTALLER
|
||||
file_transfering = true;
|
||||
bytes_to_download = 100;
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
while (!completed)
|
||||
{
|
||||
memset(&progress_info, 0, sizeof(progress_info));
|
||||
@@ -489,6 +491,7 @@ namespace INSTALLER
|
||||
file_transfering = true;
|
||||
bytes_to_download = 100;
|
||||
bytes_transfered = 0;
|
||||
|
||||
while (!completed)
|
||||
{
|
||||
memset(&progress_info, 0, sizeof(progress_info));
|
||||
@@ -600,6 +603,8 @@ namespace INSTALLER
|
||||
sprintf(activity_message, "%s", lang_strings[STR_WAIT_FOR_INSTALL_MSG]);
|
||||
bytes_to_download = 1;
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
while (!completed)
|
||||
{
|
||||
memset(&progress_info, 0, sizeof(progress_info));
|
||||
@@ -916,6 +921,8 @@ namespace INSTALLER
|
||||
file_transfering = true;
|
||||
bytes_to_download = 100;
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
while (!completed)
|
||||
{
|
||||
memset(&progress_info, 0, sizeof(progress_info));
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef __LANG_H__
|
||||
#define __LANG_H__
|
||||
#ifndef __EZ_LANG_H__
|
||||
#define __EZ_LANG_H__
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef MEM_FILE_H
|
||||
#define MEM_FILE_H
|
||||
#ifndef EZ_MEM_FILE_H
|
||||
#define EZ_MEM_FILE_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "zip_util.h"
|
||||
#include "util.h"
|
||||
#include "installer.h"
|
||||
// #include "dbglogger.h"
|
||||
|
||||
#define SERVER_CERT_FILE "/app0/assets/certs/domain.crt"
|
||||
#define SERVER_PRIVATE_KEY_FILE "/app0/assets/certs/domain.key"
|
||||
@@ -30,6 +31,7 @@
|
||||
#define SUCCESS_MSG "{ \"result\": { \"success\": true, \"error\": null } }"
|
||||
#define FAILURE_MSG "{ \"result\": { \"success\": false, \"error\": \"%s\" } }"
|
||||
#define SUCCESS_MSG_LEN 48
|
||||
#define PKG_INITIAL_REQUEST_SIZE 8388608ul
|
||||
|
||||
using namespace httplib;
|
||||
|
||||
@@ -1056,9 +1058,10 @@ namespace HttpServer
|
||||
size_t range_len = (req.ranges[0].second - req.ranges[0].first) + 1;
|
||||
if (req.ranges[0].second >= 18000000000000000000ul)
|
||||
{
|
||||
range_len = 524288ul;
|
||||
range_len = PKG_INITIAL_REQUEST_SIZE;
|
||||
res.set_header("Content-Length", std::to_string(range_len));
|
||||
res.set_header("Content-Range", std::string("bytes ") + std::to_string(req.ranges[0].first)+"-" + std::to_string(req.ranges[0].first+524288ul-1) + "/"+std::to_string(range_len));
|
||||
res.set_header("Content-Range", std::string("bytes ") + std::to_string(req.ranges[0].first)+"-" + std::to_string(req.ranges[0].first+PKG_INITIAL_REQUEST_SIZE-1) + "/"+std::to_string(range_len));
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
if (site_idx != 98)
|
||||
tmp_client = GetRemoteClient(site_idx, true);
|
||||
}
|
||||
@@ -1073,7 +1076,7 @@ namespace HttpServer
|
||||
range_len, "application/octet-stream",
|
||||
[tmp_client, path, range, range_len, site_idx](size_t offset, size_t length, DataSink &sink) {
|
||||
int ret;
|
||||
if (range_len == 524288ul)
|
||||
if (range_len == PKG_INITIAL_REQUEST_SIZE)
|
||||
{
|
||||
ret = tmp_client->GetRange(path, sink, range_len, range.first);
|
||||
}
|
||||
@@ -1146,9 +1149,10 @@ namespace HttpServer
|
||||
size_t range_len = (req.ranges[0].second - req.ranges[0].first) + 1;
|
||||
if (req.ranges[0].second >= 18000000000000000000ul)
|
||||
{
|
||||
range_len = 524288ul;
|
||||
range_len = PKG_INITIAL_REQUEST_SIZE;
|
||||
res.set_header("Content-Length", std::to_string(range_len));
|
||||
res.set_header("Content-Range", std::string("bytes ") + std::to_string(req.ranges[0].first)+"-" + std::to_string(req.ranges[0].first+524288ul-1) + "/"+std::to_string(range_len));
|
||||
res.set_header("Content-Range", std::string("bytes ") + std::to_string(req.ranges[0].first)+"-" + std::to_string(req.ranges[0].first+PKG_INITIAL_REQUEST_SIZE-1) + "/"+std::to_string(range_len));
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
}
|
||||
std::pair<ssize_t, ssize_t> range = req.ranges[0];
|
||||
res.set_content_provider(
|
||||
@@ -1211,6 +1215,8 @@ namespace HttpServer
|
||||
file_transfering = true;
|
||||
bytes_to_download = 100;
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
Windows::SetModalMode(true);
|
||||
|
||||
std::string download_url = filehost->GetDownloadUrl();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef HTTP_SERVER_H
|
||||
#define HTTP_SERVER_H
|
||||
#ifndef EZ_HTTP_SERVER_H
|
||||
#define EZ_HTTP_SERVER_H
|
||||
|
||||
#include "http/httplib.h"
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef LAUNCHER_SFO_H
|
||||
#define LAUNCHER_SFO_H
|
||||
#ifndef EZ_SFO_H
|
||||
#define EZ_SFO_H
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef SPLIT_FILE_H
|
||||
#define SPLIT_FILE_H
|
||||
#ifndef EZ_SPLIT_FILE_H
|
||||
#define EZ_SPLIT_FILE_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#ifndef EZ_SYSTEM_H
|
||||
#define EZ_SYSTEM_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -42,3 +45,5 @@ void convertLocalTimeToUtc(const OrbisDateTime *local_time, OrbisDateTime *utc);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef LAUNCHER_TEXTURES_H
|
||||
#define LAUNCHER_TEXTURES_H
|
||||
#ifndef EZ_TEXTURES_H
|
||||
#define EZ_TEXTURES_H
|
||||
|
||||
#include <string>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
+61
-2
@@ -14,10 +14,11 @@
|
||||
#include "util.h"
|
||||
#include "lang.h"
|
||||
#include "ime_dialog.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "IconsFontAwesome6.h"
|
||||
#include "OpenFontIcons.h"
|
||||
#include "textures.h"
|
||||
#include "sfo.h"
|
||||
#include "system.h"
|
||||
|
||||
#define MAX_IMAGE_HEIGHT 980
|
||||
#define MAX_IMAGE_WIDTH 1820
|
||||
@@ -30,6 +31,9 @@ extern "C"
|
||||
bool paused = false;
|
||||
int view_mode;
|
||||
static float scroll_direction = 0.0f;
|
||||
static int selected_local_position = -1;
|
||||
static int selected_remote_position = -1;
|
||||
|
||||
static ime_callback_t ime_callback = nullptr;
|
||||
static ime_callback_t ime_after_update = nullptr;
|
||||
static ime_callback_t ime_before_update = nullptr;
|
||||
@@ -43,6 +47,8 @@ static char txt_http_server_port[6];
|
||||
bool handle_updates = false;
|
||||
int64_t bytes_transfered;
|
||||
int64_t bytes_to_download;
|
||||
OrbisTick prev_tick;
|
||||
|
||||
std::vector<DirEntry> local_files;
|
||||
std::vector<DirEntry> remote_files;
|
||||
std::set<DirEntry> multi_selected_local_files;
|
||||
@@ -614,6 +620,22 @@ namespace Windows
|
||||
ImGui::Text("%s", item.name);
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_GamepadDpadUp) && !paused)
|
||||
{
|
||||
if (j == 0)
|
||||
{
|
||||
selected_local_position = local_files.size()-1;
|
||||
scroll_direction = 0.0f;
|
||||
}
|
||||
}
|
||||
else if (ImGui::IsKeyPressed(ImGuiKey_GamepadDpadDown) && !paused)
|
||||
{
|
||||
if (j == local_files.size()-1)
|
||||
{
|
||||
selected_local_position = 0;
|
||||
scroll_direction = 1.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows))
|
||||
{
|
||||
@@ -623,6 +645,12 @@ namespace Windows
|
||||
ImGui::SetScrollHereY(0.5f);
|
||||
sprintf(local_file_to_select, "");
|
||||
}
|
||||
if (selected_local_position == j && !paused)
|
||||
{
|
||||
SetNavFocusHere();
|
||||
ImGui::SetScrollHereY(scroll_direction);
|
||||
selected_local_position = -1;
|
||||
}
|
||||
selected_browser |= LOCAL_BROWSER;
|
||||
}
|
||||
ImGui::NextColumn();
|
||||
@@ -779,6 +807,22 @@ namespace Windows
|
||||
ImGui::Text("%s", item.name);
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
if (ImGui::IsKeyPressed(ImGuiKey_GamepadDpadUp) && !paused)
|
||||
{
|
||||
if (j == 0)
|
||||
{
|
||||
selected_remote_position = remote_files.size()-1;
|
||||
scroll_direction = 0.0f;
|
||||
}
|
||||
}
|
||||
else if (ImGui::IsKeyPressed(ImGuiKey_GamepadDpadDown) && !paused)
|
||||
{
|
||||
if (j == remote_files.size()-1)
|
||||
{
|
||||
selected_remote_position = 0;
|
||||
scroll_direction = 1.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
ImGui::PopID();
|
||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows))
|
||||
@@ -789,6 +833,12 @@ namespace Windows
|
||||
ImGui::SetScrollHereY(0.5f);
|
||||
sprintf(remote_file_to_select, "");
|
||||
}
|
||||
if (selected_remote_position == j && !paused)
|
||||
{
|
||||
SetNavFocusHere();
|
||||
ImGui::SetScrollHereY(scroll_direction);
|
||||
selected_remote_position = -1;
|
||||
}
|
||||
selected_browser |= REMOTE_BROWSER;
|
||||
}
|
||||
ImGui::NextColumn();
|
||||
@@ -1356,9 +1406,18 @@ namespace Windows
|
||||
if (file_transfering)
|
||||
{
|
||||
static float progress = 0.0f;
|
||||
static double transfer_speed = 0.0f;
|
||||
static char progress_text[32];
|
||||
static OrbisTick cur_tick;
|
||||
static double tick_delta;
|
||||
|
||||
sceRtcGetCurrentTick(&cur_tick);
|
||||
tick_delta = (cur_tick.mytick - prev_tick.mytick) * 1.0f / 1000000.0f;
|
||||
|
||||
progress = bytes_transfered * 1.0f / (float)bytes_to_download;
|
||||
sprintf(progress_text, "%.2f%%", progress*100.0f);
|
||||
transfer_speed = (bytes_transfered * 1.0f / tick_delta) / 1048576.0f;
|
||||
|
||||
sprintf(progress_text, "%.2fMB/s", transfer_speed);
|
||||
ImGui::ProgressBar(progress, ImVec2(625, 0), progress_text);
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef LAUNCHER_WINDOWS_H
|
||||
#define LAUNCHER_WINDOWS_H
|
||||
#ifndef EZ_WINDOWS_H
|
||||
#define EZ_WINDOWS_H
|
||||
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#include <set>
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "imgui_internal.h"
|
||||
#include "common.h"
|
||||
#include "actions.h"
|
||||
#include "system.h"
|
||||
#include "SDL2/SDL.h"
|
||||
|
||||
#define LOCAL_BROWSER 1
|
||||
@@ -16,6 +17,7 @@ extern int view_mode;
|
||||
extern bool handle_updates;
|
||||
extern int64_t bytes_transfered;
|
||||
extern int64_t bytes_to_download;
|
||||
extern OrbisTick prev_tick;
|
||||
extern std::vector<DirEntry> local_files;
|
||||
extern std::vector<DirEntry> remote_files;
|
||||
extern std::set<DirEntry> multi_selected_local_files;
|
||||
|
||||
@@ -72,6 +72,8 @@ namespace ZipUtil
|
||||
convertToZipTime(file_stat.st_mtim.tv_sec, &zi.tmz_date);
|
||||
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
bytes_to_download = file_stat.st_size;
|
||||
|
||||
// Large file?
|
||||
@@ -290,6 +292,7 @@ namespace ZipUtil
|
||||
ssize_t len;
|
||||
unsigned char *buffer = (unsigned char *) malloc(ARCHIVE_TRANSFER_SIZE);
|
||||
bytes_transfered = 0;
|
||||
sceRtcGetCurrentTick(&prev_tick);
|
||||
|
||||
/* loop over file contents and write to fd */
|
||||
for (int n = 0;; n++)
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#ifndef ZIP_UTIL_H
|
||||
#define ZIP_UTIL_H
|
||||
#ifndef EZ_ZIP_UTIL_H
|
||||
#define EZ_ZIP_UTIL_H
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
Reference in New Issue
Block a user