Skip to content

Conversation

@plumenator
Copy link

@plumenator plumenator commented Dec 12, 2024

This is an initial attempt. I managed to make this work with a private AWS S3 bucket as the update source. Please let me know if I need to update any tests or sample code

@plumenator plumenator force-pushed the cpp-custom-update-source branch from 817ad38 to 40d17d8 Compare December 12, 2024 06:51
@caesay caesay force-pushed the cpp-custom-update-source branch from 40d17d8 to 9ee7507 Compare December 19, 2024 16:37
@caesay
Copy link
Member

caesay commented Dec 19, 2024

Hey, thanks for this PR. I've rebased to latest, and pushed a new commit with some changes to the rust c header. Firstly, do you think the approach is on the right track? Secondly, if you agree with the direction would you mind updating the Velopack.hpp c++ header to align with the new C functions?

To summarise,

  • There are now new API's for creating sources (eg. vpkc_new_source_file, vpkc_new_source_http_url, vpkc_new_source_custom_callback)
  • These sources, once created, can be passed into vpkc_new_update_manager_with_source.
  • Progress (during downloads) can be reported back to velopack via vpkc_source_report_progress

I've not tested these changes yet.

@caesay caesay force-pushed the cpp-custom-update-source branch from 9ee7507 to d800407 Compare December 20, 2024 21:12
@codecov
Copy link

codecov bot commented Dec 21, 2024

Codecov Report

Attention: Patch coverage is 0% with 162 lines in your changes missing coverage. Please review.

Project coverage is 37.34%. Comparing base (8ac4f68) to head (4e2ffde).
Report is 6 commits behind head on develop.

Files with missing lines Patch % Lines
src/lib-cpp/src/lib.rs 0.00% 58 Missing ⚠️
src/lib-cpp/src/csource.rs 0.00% 49 Missing ⚠️
src/lib-cpp/src/raw.rs 0.00% 44 Missing ⚠️
src/lib-rust/src/manager.rs 0.00% 8 Missing ⚠️
src/lib-cpp/src/statics.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #401      +/-   ##
===========================================
- Coverage    47.05%   37.34%   -9.71%     
===========================================
  Files          223       51     -172     
  Lines        13673     5992    -7681     
  Branches      1251        0    -1251     
===========================================
- Hits          6434     2238    -4196     
+ Misses        6906     3754    -3152     
+ Partials       333        0     -333     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@caesay caesay merged commit c29a8ec into velopack:develop Dec 21, 2024
22 of 25 checks passed
@plumenator
Copy link
Author

@caesay Sorry, I just saw this. I guess you made reasonable choices? Please let me know if you'd like me to do anything more. Glad that the change is in main!

@caesay
Copy link
Member

caesay commented Dec 23, 2024

The changes have been released, and there is an example in the CPlusPlusWidgets sample. Could you please review/test that the final implementation is suitable? It is available in the latest release, so you can just download a pre-built from there.

@plumenator
Copy link
Author

I integrated with our app and tested it. It works as intended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants