Git Product home page Git Product logo

tu's Introduction

TU

A C++ library for Windows for automatically updating your software, with differential update support. Article at CodeProject: https://www.codeproject.com/Articles/5163875/TU-The-easy-update-library-for-your-projects

WebServer setup

Change the three defines on top of tu.php to define database name, admin u+p. Defaults:

define('TU_DATABASE', "tu.db");
define('TU_ADMIN_USERNAME','root');
define('TU_ADMIN_PASSWORD','muhahah');

Upload to your server, go to tu.php?admin Create a new project with a name and an upload password

C++ Windows app

TU::TU tu("ea6bde7e-ee50-43a5-9a2c-4eb80a3630d1",L"www.example.org",L"/update2/tu.php",true,443,0,0,0,L"12345678");

Use the GUID shown by tu.php admin panel, your site, the path to tu.php, SSL/Port/U/P options, and the upload password you have used in the project creation if you plan to do any uploads. The upload password will only be used from an "uploader" app; Don't enter the password in your distributed executable as users can sniff it.

// Add referenced files
vector<tuple<wstring, string>> tux;
auto a = L"m.docx";
tux.emplace_back(make_tuple<wstring, string>(forward<wstring>(a), string("A44BC1B3-D919-4835-A7D8-FC633EB7B7EC")));
auto b = L"m.pdf";
tux.emplace_back(make_tuple<wstring, string>(forward<wstring>(b), string("A44BC1B3-D919-4835-A7D8-FC633EB7B7ED")));
tu.AddFiles(tux);

// Upload your stuff from an external uploader application (don't put this in a redistributed executable as it has to use your upload password)
tu.Upload();

// Check for updates
auto hr = tu.Check(); // S_FALSE if updates are there, S_OK if no updates needed.

// Check for updates with differential support
auto hr = tu.CheckWithSigs();

// Download updates, full method
auto hr = tu.DownloadFull();

// Download updates, differential method
auto hr = tu.DownloadDiff();

tu's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.