I think, I have an idea how do incremental builds for Android.
It can be "Update package" item in Android menu.
Steps:
Checks if apk (and obb, if expansion is selected) exists in rapt\bin folder.
I’ll refer to apk or obb as zip [file].
For update we need to build a list of updated files.
Walk zip file tree and compare files timestamps to corresponding source game folder files.
If the latter is newer - add it to the list.
Use the list to delete files from archive in one pass.
If zip is APK: delete signatures in same pass.
Then use the list to update archive (without intermediate copy as 'x-*' files):
Code: Select all
zipfile.write('C:\renpy-6.99.12.2-sdk\the_question\game\script.rpyc', arcname='assets\x-game\x-script.rpyc')
If zip is APK: resign + zipalign.
This should make Android builds a lot faster.
AFAIK, very few people do Android builds, but those who do know it’s quite slow process.
Again, it’s needed because RenPy game behavior in emulator and real device is not the same and having fast builds should make Android development more pleasant.
I guess, very similar process can be use for initial APK build (without intermediate copying as well), but it’s not really needed.
Once we have incremental build - we can do initial build once only.
I do know, v7 is underway, so it’s not a request of any sort.
Just want to throw an idea for discussion.