{"id":67,"date":"2016-08-16T12:06:00","date_gmt":"2016-08-16T12:06:00","guid":{"rendered":"https:\/\/blogs.scummvm.org\/tkachov\/?p=67"},"modified":"2022-05-24T12:16:28","modified_gmt":"2022-05-24T12:16:28","slug":"gsoc-project-summary","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/tkachov\/2016\/08\/16\/gsoc-project-summary\/","title":{"rendered":"GSoC: Project Summary"},"content":{"rendered":"<p>What I\u00a0was working on\u00a0during GSoC\u00a0is Cloud storages support in\u00a0ScummVM. Describing this feature in\u00a0<a href=\"https:\/\/summerofcode.withgoogle.com\/serve\/6309354911301632\/\">my\u00a0proposal<\/a>\u00a0(<a href=\"http:\/\/tkachov.ru\/gsoc\/2016\/proposal.pdf\">mirror<\/a>), I\u00a0mentioned that it\u00a0would include an\u00a0API to\u00a0interact with supported storage providers (which are Dropbox, OneDrive, Google Drive and Box), saves syncing mechanism, functionality to\u00a0upload and download games data, and, of\u00a0course, GUI for all of\u00a0these. Proposal also has some extra tasks mostly making user experience better.<\/p>\n<p>Some things were rediscussed during my\u00a0work, but the main idea remained intact. The work is\u00a0done and\u00a0<a href=\"https:\/\/github.com\/scummvm\/scummvm\/pull\/788\">pull request<\/a>\u00a0already awaits final review before getting merged. API for all four announced storage providers works fine, saves are syncing and games data could be\u00a0easily downloaded. Not only described extra tasks were complete, but also some functionality not mentioned in\u00a0the proposal was added.<\/p>\n<p>Saves sync is\u00a0probably the main reason why Cloud storages support is\u00a0needed at\u00a0all. It\u00a0allows users to\u00a0easily continue playing the game on\u00a0another device by\u00a0simply connecting both to\u00a0the same storage and doing the sync. It\u2019s automatically started on\u00a0ScummVM\u00a0launch, on\u00a0games saving (including autosaves) and when user opens Save\/Load dialog. This dialog was updated to\u00a0show a\u00a0progress bar while syncing and also to\u00a0\u00ablock\u00bb slots which are being synced. To\u00a0indicate that there is\u00a0a\u00a0sync in\u00a0progress, small Cloud icon is\u00a0shown in\u00a0the corner.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blogs.scummvm.org\/tkachov\/wp-content\/uploads\/sites\/60\/2022\/05\/load.png\" \/><\/p>\n<p>To\u00a0use the feature, users must connect a\u00a0storage first. To\u00a0do\u00a0so, they should navigate into Cloud tab of\u00a0Options dialog, select a\u00a0storage provider and press \u00abConnect\u00bb button. It\u00a0opens a\u00a0special Storage Connection Wizard, which provides the instructions on\u00a0connecting. It\u00a0has different variations depending on\u00a0set of\u00a0libraries ScummVM was compiled with. In\u00a0the most simple case it\u00a0says users should navigate to\u00a0a\u00a0special short link (to\u00a0scummvm.org), which redirects them to\u00a0provider\u2019s page. When they allow ScummVM to\u00a0use their storage on\u00a0that page, they are redirected back to\u00a0scummvm.org, where the code is\u00a0shown. This code should be\u00a0typed in\u00a0the wizard dialog. It\u2019s used by\u00a0ScummVM to\u00a0connect to\u00a0the storage and use provider\u2019s REST API then.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blogs.scummvm.org\/tkachov\/wp-content\/uploads\/sites\/60\/2022\/05\/wizard.png\" \/><\/p>\n<p>ScummVM page makes the code that way so\u00a0wizard could check that code has no\u00a0mistakes in\u00a0it. If\u00a0there is\u00a0a\u00a0mistake, it\u00a0notifies user where it\u00a0probably\u00a0is. If\u00a0ScummVM was built with SDL2, pasting from clipboard is\u00a0supported. Wizard also has \u00abOpen URL\u00bb button, which makes it\u00a0easier to\u00a0navigate to\u00a0provider\u2019s page on\u00a0platforms where URL opening was implemtented (these are Windows, Linux, Mac OS\u00a0X, Android\u00a0\u2014 iOS and Symbian are coming).<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blogs.scummvm.org\/tkachov\/wp-content\/uploads\/sites\/60\/2022\/05\/s_code.png\" \/><\/p>\n<p>But it\u2019s much easier to\u00a0connect a\u00a0storage when ScummVM\u2019s built with SDL_net support, because then ScummVM runs a\u00a0local webserver. In\u00a0this case users are not redirected to\u00a0ScummVM site from provider\u2019s page\u00a0\u2014 instead, they navigate directly to\u00a0webserver\u2019s page. No\u00a0code typing is\u00a0needed then, because ScummVM automatically gets it\u00a0from user browser\u2019s HTTP request. This webserver makes connecting a\u00a0storage really fast and simple.<\/p>\n<p>Another thing Cloud storage might be\u00a0used for is\u00a0games data download. Users can put their games into storage and then easily download on\u00a0all their devices. A\u00a0special \u00abDownload\u00bb button in\u00a0Cloud tab opens Download Dialog, where users can select a\u00a0remote directory to\u00a0download and a\u00a0local directory to\u00a0download into. It\u00a0shows a\u00a0progress bar there and automatically tries to\u00a0detect a\u00a0game when download is\u00a0complete. Users are also free to\u00a0run download in\u00a0background: no\u00a0detection will happen, but a\u00a0message will appear on\u00a0the screen to\u00a0notify them of\u00a0finished download.<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" class=\"alignnone\" src=\"https:\/\/blogs.scummvm.org\/tkachov\/wp-content\/uploads\/sites\/60\/2022\/05\/dd.png\" \/>Both storage connecting and game downloading are shown in\u00a0<a href=\"https:\/\/youtu.be\/CFVPsv_deAo\">a\u00a0video<\/a>\u00a0I\u2019ve recorded. I\u2019ve also posted information about my\u00a0progress in\u00a0<a href=\"http:\/\/tkachov.ru\/gsoc\/\">the blog<\/a>\u00a0every week. Feature is\u00a0documented on\u00a0<a href=\"http:\/\/wiki.scummvm.org\/index.php\/Developer_Central#Networking\">the wiki pages<\/a>, with some diagrams included.<\/p>\n<p>And, finally, we\u2019ve decided that\u00a0I should do\u00a0a\u00a0big extra task. Local webserver, which\u00a0I originally proposed to\u00a0simplify storage connecting process only, has been extended to\u00a0be\u00a0used for \u00abWi-Fi Sharing\u00bb feature. It\u00a0means that while ScummVM\u2019s local webserver is\u00a0running, one can use browser on\u00a0another device to\u00a0navigate through directories, download files, create new directories or\u00a0upload files!<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blogs.scummvm.org\/tkachov\/wp-content\/uploads\/sites\/60\/2022\/05\/687474703a2f2f746b6163686f762e72752f67736f632f323031362f50522f66696c65735f616a61782e706e67.png\" \/><\/p>\n<p>Users can specify server\u2019s port and their \u2019\/root\/\u2019 directory within the same Cloud tab. Only files under specified directory and ScummVM\u2019s saves directory are available, so\u00a0users secure data is\u00a0safe.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blogs.scummvm.org\/tkachov\/wp-content\/uploads\/sites\/60\/2022\/05\/server_settings.png\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What I\u00a0was working on\u00a0during GSoC\u00a0is Cloud storages support in\u00a0ScummVM. Describing this feature in\u00a0my\u00a0proposal\u00a0(mirror), I\u00a0mentioned that it\u00a0would include an\u00a0API to\u00a0interact with supported storage providers (which are Dropbox, OneDrive, Google Drive and Box), saves syncing mechanism, functionality to\u00a0upload and download games data, and, of\u00a0course, GUI for all of\u00a0these. Proposal also has some extra tasks mostly making user [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-67","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/tkachov\/wp-json\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/tkachov\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/tkachov\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/tkachov\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/tkachov\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/tkachov\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":69,"href":"https:\/\/blogs.scummvm.org\/tkachov\/wp-json\/wp\/v2\/posts\/67\/revisions\/69"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/tkachov\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/tkachov\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/tkachov\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}