{"id":20217370,"url":"https://github.com/windowsnt/tu","last_synced_at":"2025-04-10T15:43:39.250Z","repository":{"id":80700418,"uuid":"200397038","full_name":"WindowsNT/tu","owner":"WindowsNT","description":"Win32 Differential Update Library","archived":false,"fork":false,"pushed_at":"2019-12-30T13:47:30.000Z","size":284,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T13:36:06.449Z","etag":null,"topics":["cplusplus","cpp","differential","liveupdate","php","update","upload","win32"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WindowsNT.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-03T16:26:45.000Z","updated_at":"2023-12-16T19:30:58.000Z","dependencies_parsed_at":"2023-07-22T09:46:02.830Z","dependency_job_id":null,"html_url":"https://github.com/WindowsNT/tu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindowsNT%2Ftu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindowsNT%2Ftu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindowsNT%2Ftu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WindowsNT%2Ftu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WindowsNT","download_url":"https://codeload.github.com/WindowsNT/tu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243497,"owners_count":21071054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cplusplus","cpp","differential","liveupdate","php","update","upload","win32"],"created_at":"2024-11-14T06:33:49.679Z","updated_at":"2025-04-10T15:43:39.241Z","avatar_url":"https://github.com/WindowsNT.png","language":"C++","readme":"# TU\nA C++ library for Windows for automatically updating your software, with differential update support.\nArticle at CodeProject: https://www.codeproject.com/Articles/5163875/TU-The-easy-update-library-for-your-projects\n\n\n## WebServer setup\nChange the three defines on top of tu.php to define database name, admin u+p.\nDefaults:\n\n\n```PHP\ndefine('TU_DATABASE', \"tu.db\");\ndefine('TU_ADMIN_USERNAME','root');\ndefine('TU_ADMIN_PASSWORD','muhahah');\n```\n\nUpload to your server, go to tu.php?admin\nCreate a new project with a name and an upload password\n\n\n## C++ Windows app\n```C++\nTU::TU tu(\"ea6bde7e-ee50-43a5-9a2c-4eb80a3630d1\",L\"www.example.org\",L\"/update2/tu.php\",true,443,0,0,0,L\"12345678\");\n```\n\nUse 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.\nThe upload password will only be used from an \"uploader\" app; Don't enter the password in your distributed executable as users can sniff it.\n\n\n\n\n```C++\n\n// Add referenced files\nvector\u003ctuple\u003cwstring, string\u003e\u003e tux;\nauto a = L\"m.docx\";\ntux.emplace_back(make_tuple\u003cwstring, string\u003e(forward\u003cwstring\u003e(a), string(\"A44BC1B3-D919-4835-A7D8-FC633EB7B7EC\")));\nauto b = L\"m.pdf\";\ntux.emplace_back(make_tuple\u003cwstring, string\u003e(forward\u003cwstring\u003e(b), string(\"A44BC1B3-D919-4835-A7D8-FC633EB7B7ED\")));\ntu.AddFiles(tux);\n\n// Upload your stuff from an external uploader application (don't put this in a redistributed executable as it has to use your upload password)\ntu.Upload();\n\n// Check for updates\nauto hr = tu.Check(); // S_FALSE if updates are there, S_OK if no updates needed.\n\n// Check for updates with differential support\nauto hr = tu.CheckWithSigs();\n\n// Download updates, full method\nauto hr = tu.DownloadFull();\n\n// Download updates, differential method\nauto hr = tu.DownloadDiff();\n\n```\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindowsnt%2Ftu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwindowsnt%2Ftu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindowsnt%2Ftu/lists"}