love2d / love-android

Android build setup for LÖVE.
https://love2d.org
Other
212 stars 73 forks source link

Developer tools #42

Closed slime73 closed 10 years ago

slime73 commented 10 years ago

Original report by Paul Bienkowski (Bitbucket: opatut, GitHub: opatut).


It would be nice to have a few tools for developers to help quick testing on the device.

This would include some shortcut to deploying the test application to the device and running the Löve app, all of which can be done using adb. A simple bash wrapper script should do. This could be connected with #40 to show the output of the game (print()).

Also, the pure Löve app (the one that is precompiled as an apk) could be able to load *.love (zip) files and run them directly, allowing the developer to store several versions or different games on the device and selecting them inside the app for testing. Again, some interface to transfer and run a specific *.love file from the command line would be nice.

slime73 commented 10 years ago

Original comment by Jairo Luiz (Bitbucket: tangzero, GitHub: tangzero).


http://love2d.org/forums/viewtopic.php?f=11&t=76979&start=50#p161390

slime73 commented 10 years ago

Original comment by Martin Felis (Bitbucket: MartinFelis, GitHub: MartinFelis).


Would be best to have even something cross platform. An option could be to use SGit: https://play.google.com/store/apps/details?id=me.sheimi.sgit that would allow to easily play around with different versions of your game and would also simplify synchronization.

To simply push a game to your device you can use the script that @tangzero suggests at http://love2d.org/forums/viewtopic.php?f=11&t=76979&start=50#p161390

File association on Android is a bit tricky. I have created a separate issue for this. You can find it here: #43/associate-love-files-with-the-app

slime73 commented 10 years ago

Original comment by Ranguna (Bitbucket: Ranguna, GitHub: Ranguna).


Sending stdout from the android device to the machine throught adb, wouldn't that require root access ?

slime73 commented 10 years ago

Original comment by Jairo Luiz (Bitbucket: tangzero, GitHub: tangzero).


That's only possible with the logcat.

slime73 commented 10 years ago

Original comment by Martin Felis (Bitbucket: MartinFelis, GitHub: MartinFelis).


@Ranguna You do not need root access for that. You only need to install the Android SDK, connect your phone via USB to your computer, enable debugging on your phone and you can open a shell on your phone using adb shell. After that you can get all logcat output by runnung logcat.

One can also replace the standard print function with SDL.log(). That would do the trick already as SDL_Log() prints to logcat by default.

This again could be defined in a possible love.android module.

slime73 commented 10 years ago

Original comment by Ranguna (Bitbucket: Ranguna, GitHub: Ranguna).


So logcat stores apps' output, the more you know huh Thanks for the info :)

slime73 commented 10 years ago

Original comment by Martin Felis (Bitbucket: MartinFelis, GitHub: MartinFelis).


Instructions on how to simply send a game and start it are described here: https://love2d.org/forums/viewtopic.php?f=11&t=76979&start=110#p163114

Additionally file association works reasonably well.