Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVTOOLS: Add packaging scripts for DLC #5300

Merged
merged 10 commits into from Sep 14, 2023
Merged

Conversation

ankushdutt
Copy link
Contributor

This PR adds packaging scripts to prepare the games (DLCs) and, if applicable, bundle them with base ScummVM binary in formats recognized by different distribution platforms.

The main package.py produces a ready-to-upload packaged file to upload for the provided distribution platform. The ready-to-upload file can either be a packaged standalone game data (DLC) or bundled together with base ScummVM binary, depending on the requirement of distribution stores. Eg. For the Android Play Store, the DLCs must be bundled together with the base ScummVM APK in an Android App Bundle format.

This PR only contains entry for packaging DLCs for the Android Play Store and includes the required dependencies (3rd party scripts from here, bundletool.jar, etc.) in scripts/android.

@ankushdutt ankushdutt marked this pull request as draft August 29, 2023 10:52
@sev- sev- added the GSoC Part of a Google Summer of Code project label Aug 30, 2023
@sev-
Copy link
Member

sev- commented Sep 4, 2023

Where does bundletool-all-1.15.1.jar file come from? Does it belong to the repo?

Copy link
Member

@sev- sev- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed, primarily I have question about source of the imported files.

Also, I am still looking to the description on the Wiki how to describe new game

@@ -0,0 +1,92 @@
#!/usr/bin/env python3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a license header here

@@ -0,0 +1,921 @@
# -*- coding: utf-8 -*-
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this file generated? Do we have to have it in the repo, or it could be generated on demand?

If not, then how it should be updated after the config.proto file is changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it can be generated on demand by using protobuf-compiler (cmd: protoc --python_out . config.proto).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs the protobuf compiler though, which is not the same as having installed the python protobuf package.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the protobuf-compiler needs to be installed on the user's pc, which makes the protoc command available. The protobuf-compiler is only needed for generating the new _pb2.py file (if config.proto is changed or if available version of python-protobuf is not supported) and is not required for the packaging process. The packaging process requires this _pb2.py file and the python-protobuf package (now available in docker-bb).

@@ -0,0 +1,197 @@
syntax = "proto3";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this file come from? What is its license?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took it from: https://github.com/android/app-bundle-samples/blob/main/PlayAssetDelivery/BundletoolScriptSample/config.proto

However, it seems that config.proto in above repo is from the bundletool repository.

The license of both the source code is Apache 2.0.

"platform": "pc"
},
"size": "69377781",
"url": "https://downloads.scummvm.org/frs/extras/Beneath%20a%20Steel%20Sky/bass-cd-1.2.zip"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to describe a game that consists of many files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sev- Can you give an example? Do you mean the game is available to download in multiple .zip parts (due to its large size)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I mean, a game that will be represented in different packages, but that consists of many files. Or do you mean that for preparing a game for distribution, we must first zip it?

@ankushdutt
Copy link
Contributor Author

ankushdutt commented Sep 5, 2023

Where does bundletool-all-1.15.1.jar file come from? Does it belong to the repo?

It is from the releases of https://github.com/google/bundletool.

@sev- sev- marked this pull request as ready for review September 14, 2023 06:23
@sev-
Copy link
Member

sev- commented Sep 14, 2023

Thanks, merging. You may continue development in-tree

@sev- sev- merged commit 8b73a4c into scummvm:master Sep 14, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GSoC Part of a Google Summer of Code project
Projects
None yet
3 participants