From abee19da1d4bcd89e1d2053e2ea76602035f6e65 Mon Sep 17 00:00:00 2001 From: bucanero Date: Fri, 13 Oct 2023 11:17:09 -0300 Subject: [PATCH] new version check improve download speed update docs --- CHANGELOG.md | 22 +++++++++++++++++++++- CMakeLists.txt | 2 +- README.md | 16 +++++++++------- docs/README.md | 22 ++++++++++++---------- source/pkgi.c | 16 ++++++++-------- source/pkgi_download.c | 4 ++-- 6 files changed, 53 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8054ca..2ca2586 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,26 @@ All notable changes to the `pkgi-psp` project will be documented in this file. T ## [Unreleased]() +## [v1.0.0](https://github.com/bucanero/pkgi-psp/releases/tag/v1.0.0) - 2023-10-14 + +### Added + +* Package install as `ISO`/`CSO`/`Digital` +* PSP Go internal storage detection (`ef0`/`ms0`) +* Update database files from URLs (`Refresh` option) +* Enabled `Search` option (on-screen keyboard) +* Added PSX category +* PKGi new version check & notification + +### Fixed + +* Install and decrypt themes to `/PSP/THEME/` + +### Misc + +* Improved download speed (~400Kb/s average) +* Network proxy settings support + ## [v0.8.0](https://github.com/bucanero/pkgi-psp/releases/tag/v0.8.0) - 2023-10-01 First public release. In memory of Leon & Luna. @@ -15,7 +35,7 @@ First public release. In memory of Leon & Luna. - Generic text database format support - Filter unsupported or missing URLs when loading a database * Content categorization and filtering -* Support for HTTP, HTTPS, FTP, FTPS links with TLS v1.2 +* Support for `HTTP`, `HTTPS`, `FTP`, `FTPS` links with TLS v1.2 * Localization support (Finnish, French, German, Indonesian, Italian, Polish, Portuguese, Spanish, Turkish) - Language detection based on PSP settings * Enter button detection (`cross`/`circle`) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3134d4..074cdb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,7 +104,7 @@ add_custom_target(createzip add_custom_target(copy COMMAND @echo "Copying to $$PSPMS/PSP/GAME/PKGI/EBOOT.PBP ..." - COMMAND @mkdir -p $$PSPMS/PSP/GAME/APOLLO + COMMAND @mkdir -p $$PSPMS/PSP/GAME/PKGI COMMAND @cp -v EBOOT.PBP $$PSPMS/PSP/GAME/PKGI/EBOOT.PBP DEPENDS ${PROJECT_NAME} ) diff --git a/README.md b/README.md index 7e14c4e..8640f97 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,8 @@ This homebrew app allows to download and install `.pkg` files directly on your P ### Notes: * **content activation:** downloaded content requires a valid license to run. If your PSP hasn't been activated, you can use one of the following plugins: + - [npdrm_free plugin](https://github.com/qwikrazor87/npdrm_free) (PSP/PS1/PCEngine games and DLCs) - [npdrm_free_mod plugin](https://github.com/lusid1/npdrm_free_mod) (PSP/PS1 games only) - - [npdrm_free plugin](https://github.com/qwikrazor87/npdrm_free) (PSP/PS1 games and DLCs) - [nploader_mod](https://github.com/lusid1/nploader_mod) (PSP DLCs only) # Download @@ -62,12 +62,15 @@ You can refresh and sync an online database by adding the DB URL(s) to the `conf For example: ``` -url http://www.mysite.com/mylist.csv +url_games http://www.mysite.com/mylist.csv url_demos http://www.demos.com/otherlist.csv url_emulators http://www.example.com/emulators.csv ``` -Using this setup, `pkgi.txt` will be updated with `mylist.csv`, `pgi_demos.txt` with `otherlist.csv` , and `pkgi_emulators.txt` with `emulators.csv`. +Using this setup, +- `pkgi_games.txt` will be updated with `http://www.mysite.com/mylist.csv`, +- `pkgi_demos.txt` with `http://www.demos.com/otherlist.csv`, +- and `pkgi_emulators.txt` with `http://www.example.com/emulators.csv`. Next time you open the app, you'll have an additional menu option ![Triangle](https://github.com/bucanero/pkgi-ps3/raw/master/data/TRIANGLE.png) called **Refresh**. When you select it, the local databases will be syncronized with the defined URLs. @@ -91,7 +94,7 @@ where: | `type` | is a number for the item's content type. See the [table below](#content-types) for details. (set it to 0 if unknown) | `name` | is a string for the item's name. | `description` | is a string for the item's description. -| `rap` | the 16 hex bytes for a RAP file, if needed by the item (`.rap` files will be created on `/dev_hdd0/exdata`). Leave empty to skip the `.rap` file. +| `rap` | the 16 hex bytes for a RAP file, if needed by the item (`.rap` files will be created on `ms0:/PKG/RAP`). Leave empty to skip the `.rap` file. | `url` | is the HTTP/HTTPS/FTP/FTPS URL where to download the `.pkg` file. | `size` | is the size in bytes of the `.pkg` file, or 0 if unknown. | `checksum` | is a SHA256 digest of the `.pkg` file (as 32 hex bytes) to make sure the file is not tampered with. Leave empty to skip the check. @@ -215,10 +218,9 @@ Run `cmake . && make` to create a release build. If you want to create a `.zip` ## Debugging -To enable debug logging, pass `-DPKGI_ENABLE_DEBUG=ON` argument to cmake. The application will send debug messages to -UDP multicast address `239.255.0.100:30000`. To receive them you can use [socat][] on your computer: +To enable debug logging, pass `-DPKGI_ENABLE_DEBUG=ON` argument to `cmake`. The application will write debug messages to - $ socat udp4-recv:30000,ip-add-membership=239.255.0.100:0.0.0.0 - + ms0:/pkgi-psp.log You can also set the `PSPIP` environment variable to your PSP's IP address, and use `make send` to upload `EBOOT.PBP` directly to the `ms0:/PSP/GAME/PKGI` folder. diff --git a/docs/README.md b/docs/README.md index 39950c9..2c0df10 100644 --- a/docs/README.md +++ b/docs/README.md @@ -22,8 +22,8 @@ This homebrew app allows to download and install `.pkg` files directly on your P ### Notes: * **content activation:** downloaded content requires a valid license to run. If your PSP hasn't been activated, you can use one of the following plugins: + - [npdrm_free plugin](https://github.com/qwikrazor87/npdrm_free) (PSP/PS1/PCEngine games and DLCs) - [npdrm_free_mod plugin](https://github.com/lusid1/npdrm_free_mod) (PSP/PS1 games only) - - [npdrm_free plugin](https://github.com/qwikrazor87/npdrm_free) (PSP/PS1 games and DLCs) - [nploader_mod](https://github.com/lusid1/nploader_mod) (PSP DLCs only) # Download @@ -46,7 +46,7 @@ You can also load additional database files: - `pkgi_games.txt` - `pkgi_dlcs.txt` - `pkgi_themes.txt` -- `pkgi_avatars.txt` +- `pkgi_psx.txt` - `pkgi_demos.txt` - `pkgi_updates.txt` - `pkgi_emulators.txt` @@ -62,12 +62,15 @@ You can refresh and sync an online database by adding the DB URL(s) to the `conf For example: ``` -url http://www.mysite.com/mylist.csv +url_games http://www.mysite.com/mylist.csv url_demos http://www.demos.com/otherlist.csv url_emulators http://www.example.com/emulators.csv ``` -Using this setup, `pkgi.txt` will be updated with `mylist.csv`, `pgi_demos.txt` with `otherlist.csv` , and `pkgi_emulators.txt` with `emulators.csv`. +Using this setup, +- `pkgi_games.txt` will be updated with `http://www.mysite.com/mylist.csv`, +- `pkgi_demos.txt` with `http://www.demos.com/otherlist.csv`, +- and `pkgi_emulators.txt` with `http://www.example.com/emulators.csv`. Next time you open the app, you'll have an additional menu option ![Triangle](https://github.com/bucanero/pkgi-ps3/raw/master/data/TRIANGLE.png) called **Refresh**. When you select it, the local databases will be syncronized with the defined URLs. @@ -91,7 +94,7 @@ where: | `type` | is a number for the item's content type. See the [table below](#content-types) for details. (set it to 0 if unknown) | `name` | is a string for the item's name. | `description` | is a string for the item's description. -| `rap` | the 16 hex bytes for a RAP file, if needed by the item (`.rap` files will be created on `/dev_hdd0/exdata`). Leave empty to skip the `.rap` file. +| `rap` | the 16 hex bytes for a RAP file, if needed by the item (`.rap` files will be created on `ms0:/PKG/RAP`). Leave empty to skip the `.rap` file. | `url` | is the HTTP/HTTPS/FTP/FTPS URL where to download the `.pkg` file. | `size` | is the size in bytes of the `.pkg` file, or 0 if unknown. | `checksum` | is a SHA256 digest of the `.pkg` file (as 32 hex bytes) to make sure the file is not tampered with. Leave empty to skip the check. @@ -117,7 +120,7 @@ EP0001-UPDWEBMOD_00-0000000000000000,9,webMAN MOD v1.47.36,Backup Manager,,http: | 1 | Game | `pkgi_games.txt` | 2 | DLC | `pkgi_dlcs.txt` | 3 | Theme | `pkgi_themes.txt` -| 4 | Avatar | `pkgi_avatars.txt` +| 4 | PSX | `pkgi_psx.txt` | 5 | Demo | `pkgi_demos.txt` | 6 | Update | `pkgi_updates.txt` | 7 | Emulator | `pkgi_emulators.txt` @@ -198,7 +201,7 @@ It will open the context menu. Press ![Triangle](https://github.com/bucanero/pkg ## Acknowledgements -* [mmozeiko](https://github.com/mmozeiko/): [PS Vita pkgi](https://github.com/mmozeiko/pkgi) +* [mmozeiko](https://github.com/mmozeiko/): [pkgi](https://github.com/mmozeiko/pkgi) (PS Vita), [pkg2zip](https://github.com/mmozeiko/pkg2zip) * [qwikrazor87](https://github.com/qwikrazor87/): [Depackager](https://github.com/bucanero/psptools/tree/master/depackager) # Building @@ -215,10 +218,9 @@ Run `cmake . && make` to create a release build. If you want to create a `.zip` ## Debugging -To enable debug logging, pass `-DPKGI_ENABLE_DEBUG=ON` argument to cmake. The application will send debug messages to -UDP multicast address `239.255.0.100:30000`. To receive them you can use [socat][] on your computer: +To enable debug logging, pass `-DPKGI_ENABLE_DEBUG=ON` argument to `cmake`. The application will write debug messages to - $ socat udp4-recv:30000,ip-add-membership=239.255.0.100:0.0.0.0 - + ms0:/pkgi-psp.log You can also set the `PSPIP` environment variable to your PSP's IP address, and use `make send` to upload `EBOOT.PBP` directly to the `ms0:/PSP/GAME/PKGI` folder. diff --git a/source/pkgi.c b/source/pkgi.c index 847329f..a5da285 100644 --- a/source/pkgi.c +++ b/source/pkgi.c @@ -601,7 +601,7 @@ static void reposition(void) } } -static void pkgi_update_check_thread(void) +static void pkgi_update_check(void) { char *buffer; uint32_t size; @@ -659,6 +659,8 @@ static void pkgi_update_check_thread(void) *end = 0; LOG("download URL is %s", start); + pkgi_dialog_message("New PKGi Version Available!", "Update PKGi PSP to the latest version:\nhttps://github.com/bucanero/pkgi-psp/"); +/* DbItem update_item = { .content = "UP0001-NP00PKGI3_00-0000000000000000", .name = "PKGi PSP Update", @@ -672,10 +674,10 @@ static void pkgi_update_check_thread(void) pkgi_dialog_message(update_item.name, _("Successfully downloaded PKGi PSP update")); LOG("update downloaded!"); } +*/ end_update: free(buffer); - pkgi_thread_exit(); } static void pkgi_load_language(const char* lang) @@ -718,11 +720,6 @@ int main(int argc, char* argv[]) background = pkgi_load_image_buffer(background, png); - if (config.version_check) - { -// pkgi_start_thread("update_thread", &pkgi_update_check_thread); - } - memset(&input, 0, sizeof(pkgi_input)); while (pkgi_update(&input) && (state != StateTerminate)) { @@ -730,7 +727,10 @@ int main(int argc, char* argv[]) if (state == StateUpdateDone) { - psp_network_up(); + if (psp_network_up() && config.version_check) + { + pkgi_update_check(); + } pkgi_db_configure(NULL, &config); state = StateMain; diff --git a/source/pkgi_download.c b/source/pkgi_download.c index d2c50d1..dbed223 100644 --- a/source/pkgi_download.c +++ b/source/pkgi_download.c @@ -106,9 +106,9 @@ static int update_progress(void *p, int64_t dltotal, int64_t dlnow, int64_t ulto } pkgi_dialog_update_progress(text, dialog_extra, dialog_eta, percent); - info_update = info_now + 500; + info_update = info_now + 1000; + progress_screen_refresh(); } - progress_screen_refresh(); return (pkgi_dialog_is_cancelled()); }