leafo / itchio-app-old

Desktop itch.io client
MIT License
45 stars 6 forks source link

Running a game #7

Open leafo opened 9 years ago

leafo commented 9 years ago

After downloading a game the "Download" button should turn into a "Run" button. For the initial release we'll try to guess which file needs to be run, but I think in the long term the game developers should be required to provide a manifest file on itch.io site that instructs the app on how to start a game for certain platforms.

The logic could be simple like:

This doesn't really take into account games have their own installers. I think for the initial release it's okay to just run the installer, and then the user is responsible for running the installed game afterwards.

We also need to figure out to extract files reliably cross platform, does this mean bundling a zip binary with the installation? What about other formats? Should we require archives to be zip?

joseccandido commented 9 years ago

Going forward i think a standard file format, like zip, should be set. Now only it will help consumers but allows more control over files as it will not be needed to make many assumptions about them.

joseccandido commented 9 years ago

I got http://osdab.42cows.org/snippets/zip.php?mode=advanced to work and used it to unzip files. Still not commited because i am not sure on how to go about it. It's license is GPL v2.

joseccandido commented 9 years ago

Having file name and size data on a manifest so we can perform integrity checks.

leafo commented 9 years ago

I can get you md5 of file (or crc32) in addition to file sizes. I think it's fine just supporting zip for now.

Another option instead of compiling in an archive tool I think it might be easier to shell out to executables we bundle with the app. Thoughts?

joseccandido commented 9 years ago

Zlib is contained in the Qt5core dll. So the only concern is using some external wrapper or making one.