Descent3 icon indicating copy to clipboard operation
Descent3 copied to clipboard

Create an Android build

Open tophyr opened this issue 1 year ago • 6 comments

Pull Request Type

  • [x] GitHub Workflow changes
  • [x] Documentation or Wiki changes
  • [x] Build and Dependency changes
  • [x] Runtime changes
    • [ ] Render changes
    • [ ] Audio changes
    • [ ] Input changes
    • [ ] Network changes
    • [x] Other changes

Description

Adds Android as a supported platform. Uses Gradle to perform the build overall.

Checklist

  • [x] I have tested my changes locally and verified that they work as intended.
  • [x] I have documented any new or modified functionality.
  • [x] I have reviewed the changes to ensure they do not introduce any unnecessary complexity or duplicate code.
  • [x] I understand that by submitting this pull request, I am agreeing to license my contributions under the project's license.

tophyr avatar Jun 24 '24 07:06 tophyr

Just a suggestion... You can add the __LINUX__ define for android platforms instead of adding it to every check

Lgt2x avatar Jun 24 '24 07:06 Lgt2x

Just a suggestion... You can add the __LINUX__ define for android platforms instead of adding it to every check

SDL specifically undefines __LINUX__ when ANDROID is defined, unfortunately.

tophyr avatar Jun 24 '24 07:06 tophyr

Ready for review.

Includes https://github.com/DescentDevelopers/Descent3/pull/493, https://github.com/DescentDevelopers/Descent3/pull/492, https://github.com/DescentDevelopers/Descent3/pull/469, and https://github.com/DescentDevelopers/Descent3/pull/465 as dependencies (see merge commit at base). Those PRs should be reviewed and merged prior to this one; marking this PR as a draft until then.

tophyr avatar Jul 13 '24 04:07 tophyr

@Lgt2x this is finally ready! The game builds, has a mechanism to easily (and legally) put gamedata on the device, and will start up a level.

There's still a fair bit of work to do in order get the game playable, but at this point I think it's stable enough to start relying on build signals from GitHub CI.

Do note that this now PR includes the ExternalProject change from #465.

tophyr avatar Dec 30 '24 07:12 tophyr

Overall this is a pretty large and impactful port, I will need time before deciding whether to merge it. I especially want to make sure that I'm able to build, run and debug it, so I can independently fix the build ~if~ when it will break, with the goal of making it more sustainable. I'm not familiar at all with Java and Android, so wish me luck with that Android Studio thingy :)

Lgt2x avatar Jan 01 '25 14:01 Lgt2x

Sounds like you've managed to build and run it, at least! Hit me up with any questions about this specifically or Android development in general.

tophyr avatar Jan 01 '25 20:01 tophyr