Compare commits

..

7 Commits

Author SHA1 Message Date
Chee Yee 0bd0a0f273 disable modal dialog mode 2024-02-16 02:19:45 -08:00
Chee Yee bf3f4330c0 add progress meter for file extraction and pkg install 2024-02-16 02:11:05 -08:00
Chee Yee f16850fed9 more bug fixes for install patch/dlc from remote 2024-02-16 01:19:27 -08:00
cy33hc a30a20f6db Update README.md 2024-02-15 21:47:57 -08:00
cy33hc 54b9a80410 Update README.md 2024-02-15 10:53:22 -08:00
Chee Yee fe55ddeb8a fix install of some patch/dlc pkg 2024-02-15 04:01:42 -08:00
Chee Yee a5a5f8d611 fix 2024-02-12 16:03:21 -08:00
7 changed files with 69 additions and 21 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ add_executable(ezremote_client
add_self(ezremote_client)
add_pkg(ezremote_client ${CMAKE_SOURCE_DIR}/data "RMTC00001" "ezRemote Client" "01.16" 32 0)
add_pkg(ezremote_client ${CMAKE_SOURCE_DIR}/data "RMTC00001" "ezRemote Client" "01.18" 32 0)
target_link_libraries(ezremote_client
c
+3 -3
View File
@@ -1,6 +1,6 @@
# ezRemote Client
ezRemote Client is an application that allows you to connect the PS4 to remote FTP/SFTP, SMB, NFS, WebDAV, HTTP servers and Google Drive to transfer files. The interface is inspired by Filezilla client which provides a commander like GUI.
ezRemote Client is an application that allows you to connect the PS4 to remote FTP/SFTP, SMB(Windows Share), NFS, WebDAV, HTTP servers and Google Drive to transfer files. The interface is inspired by Filezilla client which provides a commander like GUI.
**New:** As of version 1.0.8, ezRemote Client has a Web Interface that can be access from any modern browser to manage the PS4 files.
@@ -27,7 +27,7 @@ To distinguish between FTP, SMB, NFS, WebDAV or HTTP, the URL must be prefix wit
then in the password field enter file:///data/ezremote-client
```
- The url format for SMB is
- The url format for SMB(Windows Share) is
```
smb://hostname[:port]/sharename
@@ -114,7 +114,7 @@ Remote Package Installation with all Remote Server, even if they are password pr
- Upload files to the PS4
- Download files from the PS4
- Install packages on the PS4
- Install packages from shared links from mediafire, google and pixeldrain. For other filehost, they can installed via AllDebrid (See AllDebrid website for supported filehost).
- Install packages from shared links from mediafire, google and pixeldrain. For other filehost, they can installed via AllDebrid/RealDebrid (See respective websites for supported filehost).
## How to access the Web Interface ##
You need to launch the "ezRemote Client" app on the PS4. Then on any device(laptop, tablet, phone etc..) with web browser goto to http://<ip_address_of_ps4>:8080 . That's all.
+1
View File
@@ -778,6 +778,7 @@ namespace Actions
if (res != 0)
{
activity_inprogess = false;
file_transfering = false;
multi_selected_remote_files.clear();
Windows::SetModalMode(false);
}
+35 -8
View File
@@ -261,6 +261,7 @@ namespace INSTALLER
uint32_t content_type = BE32(header->pkg_content_type);
uint32_t flags = BE32(header->pkg_content_flags);
bool is_patch = false;
bool completed = false;
switch (content_type)
{
@@ -363,13 +364,19 @@ namespace INSTALLER
file_transfering = true;
bytes_to_download = 100;
bytes_transfered = 0;
while (bytes_transfered < 99)
while (!completed)
{
memset(&progress_info, 0, sizeof(progress_info));
ret = sceBgftServiceDownloadGetProgress(task_id, &progress_info);
if (ret || (progress_info.transferred > 0 && progress_info.errorResult != 0))
return 0;
bytes_transfered = (uint32_t)(((float)progress_info.transferred / progress_info.length) * 100.f);
if (progress_info.length > 0)
{
completed = progress_info.transferred == progress_info.length;
bytes_to_download = progress_info.length;
bytes_transfered = progress_info.transferred;
}
sceSystemServicePowerTick();
}
}
@@ -383,6 +390,8 @@ namespace INSTALLER
{
int ret;
pkg_header header;
bool completed = false;
memset(&header, 0, sizeof(header));
if (FS::Head(path.c_str(), (void *)&header, sizeof(header)) == 0)
return 0;
@@ -444,13 +453,19 @@ namespace INSTALLER
file_transfering = true;
bytes_to_download = 100;
bytes_transfered = 0;
while (bytes_transfered < 99)
while (!completed)
{
memset(&progress_info, 0, sizeof(progress_info));
ret = sceBgftServiceDownloadGetProgress(task_id, &progress_info);
if (ret || (progress_info.transferred > 0 && progress_info.errorResult != 0))
return 0;
bytes_transfered = (uint32_t)(((float)progress_info.transferred / progress_info.length) * 100.f);
if (progress_info.length > 0)
{
completed = progress_info.transferred == progress_info.length;
bytes_to_download = progress_info.length;
bytes_transfered = progress_info.transferred;
}
sceSystemServicePowerTick();
}
return 1;
@@ -462,6 +477,8 @@ namespace INSTALLER
int InstallLocalPkg(const std::string &path, pkg_header *header, bool remove_after_install)
{
int ret;
bool completed = false;
if (strncmp(path.c_str(), "/data/", 6) != 0 &&
strncmp(path.c_str(), "/user/data/", 11) != 0 &&
strncmp(path.c_str(), "/mnt/usb", 8) != 0)
@@ -547,15 +564,20 @@ namespace INSTALLER
sprintf(activity_message, "%s", lang_strings[STR_WAIT_FOR_INSTALL_MSG]);
bytes_to_download = 1;
bytes_transfered = 0;
while (prog < 99)
while (!completed)
{
memset(&progress_info, 0, sizeof(progress_info));
ret = sceBgftServiceDownloadGetProgress(task_id, &progress_info);
if (ret || (progress_info.transferred > 0 && progress_info.errorResult != 0))
return -3;
prog = (uint32_t)(((float)progress_info.transferred / progress_info.length) * 100.f);
bytes_to_download = progress_info.length;
bytes_transfered = progress_info.transferred;
if (progress_info.length > 0)
{
completed = progress_info.transferred == progress_info.length;
bytes_to_download = progress_info.length;
bytes_transfered = progress_info.transferred;
}
sceSystemServicePowerTick();
}
if (auto_delete_tmp_pkg)
FS::Rm(path);
@@ -747,6 +769,8 @@ namespace INSTALLER
if (progress_info.length > 0)
{
completed = progress_info.transferred == progress_info.length;
bytes_to_download = progress_info.length;
bytes_transfered = progress_info.transferred;
}
sceSystemServicePowerTick();
sceKernelUsleep(500000);
@@ -867,6 +891,7 @@ namespace INSTALLER
ret = 0;
goto finish;
}
goto retry;
}
}
else if (ret > 0)
@@ -902,6 +927,8 @@ namespace INSTALLER
if (progress_info.length > 0)
{
completed = progress_info.transferred == progress_info.length;
bytes_to_download = progress_info.length;
bytes_transfered = progress_info.transferred;
}
sceSystemServicePowerTick();
}
+22 -6
View File
@@ -1024,9 +1024,9 @@ namespace HttpServer
size_t range_len = (req.ranges[0].second - req.ranges[0].first) + 1;
if (req.ranges[0].second >= 18000000000000000000ul)
{
range_len = 65536ul - req.ranges[0].first;
range_len = 524288ul;
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)+"-65535/"+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));
}
std::pair<ssize_t, ssize_t> range = req.ranges[0];
res.set_content_provider(
@@ -1087,9 +1087,9 @@ namespace HttpServer
size_t range_len = (req.ranges[0].second - req.ranges[0].first) + 1;
if (req.ranges[0].second >= 18000000000000000000ul)
{
range_len = 65536ul - req.ranges[0].first;
range_len = 524288ul;
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)+"-65535/"+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));
}
std::pair<ssize_t, ssize_t> range = req.ranges[0];
res.set_content_provider(
@@ -1148,6 +1148,13 @@ namespace HttpServer
}
std::string hash = Util::UrlHash(filehost->GetUrl());
snprintf(activity_message, 1023, "%s %s", lang_strings[STR_INSTALLING], filehost->GetUrl().c_str());
activity_inprogess = true;
file_transfering = true;
bytes_to_download = 100;
bytes_transfered = 0;
Windows::SetModalMode(true);
std::string download_url = filehost->GetDownloadUrl();
if (download_url.empty())
{
@@ -1174,7 +1181,7 @@ namespace HttpServer
delete(baseclient);
std::string remote_install_url = std::string("http://localhost:") + std::to_string(http_server_port) + "/rmt_inst/Site%2099/" + hash;
int rc = INSTALLER::InstallRemotePkg(remote_install_url, &header, title);
int rc = INSTALLER::InstallRemotePkg(remote_install_url, &header, title, true);
if (rc == 0)
{
failed(res, 200, lang_strings[STR_FAIL_INSTALL_FROM_URL_MSG]);
@@ -1198,20 +1205,29 @@ namespace HttpServer
int ret = pthread_create(&install_data->thread, NULL, Actions::ExtractArchivePkg, install_data);
ret = INSTALLER::InstallArchivePkg(entry->filename, install_data, true);
ret = INSTALLER::InstallArchivePkg(entry->filename, install_data);
if (ret == 0)
{
failed(res, 200, lang_strings[STR_FAIL_INSTALL_FROM_URL_MSG]);
activity_inprogess = false;
file_transfering = false;
Windows::SetModalMode(false);
return;
}
}
else
{
failed(res, 200, lang_strings[STR_FAIL_INSTALL_FROM_URL_MSG]);
activity_inprogess = false;
file_transfering = false;
Windows::SetModalMode(false);
return;
}
}
activity_inprogess = false;
file_transfering = false;
Windows::SetModalMode(false);
success(res);
});
+3 -2
View File
@@ -2087,7 +2087,7 @@ namespace Windows
activity_inprogess = true;
sprintf(activity_message, "%s", "");
stop_activity = false;
file_transfering = false;
file_transfering = true;
selected_action = ACTION_NONE;
Actions::ExtractLocalZips();
break;
@@ -2096,7 +2096,7 @@ namespace Windows
activity_inprogess = true;
sprintf(activity_message, "%s", "");
stop_activity = false;
file_transfering = false;
file_transfering = true;
selected_action = ACTION_NONE;
Actions::ExtractRemoteZips();
break;
@@ -2182,6 +2182,7 @@ namespace Windows
case ACTION_INSTALL_REMOTE_PKG:
sprintf(status_message, "%s", "");
activity_inprogess = true;
file_transfering = true;
sprintf(activity_message, "%s", "");
stop_activity = false;
Actions::InstallRemotePkgs();
+4 -1
View File
@@ -289,6 +289,7 @@ namespace ZipUtil
{
ssize_t len;
unsigned char *buffer = (unsigned char *) malloc(ARCHIVE_TRANSFER_SIZE);
bytes_transfered = 0;
/* loop over file contents and write to fd */
for (int n = 0;; n++)
@@ -307,7 +308,8 @@ namespace ZipUtil
free(buffer);
return 0;
}
bytes_transfered += len;
if (write(fd, buffer, len) != len)
{
sprintf(status_message, "error write('%s')", pathname.c_str());
@@ -350,6 +352,7 @@ namespace ZipUtil
return;
}
bytes_to_download = archive_entry_size(e);
if ((fd = open(path.c_str(), O_RDWR | O_CREAT | O_TRUNC, 0777)) < 0)
{
sprintf(status_message, "error open('%s')", path.c_str());