You need to compile love-android, ie rebuild the application. Compiling means very roughly (if you don't know) transcribing human language like C/C++ into machine language.
You have Lua which is an interpreted language (without going into detail with LuaJIT which is a just in time compiler, in short I don't want to lose you) which means that the computer interprets your scripts "live" (again it's an approximation) thanks to a program which in this case is Lua which itself was written in C and which had to be compiled to work. A program must be compiled for each target platform, so a program compiled for Windows will not work for Linux.
Well that's very basic theory, now regarding the compilation of love-android for Android, I don't know if I could explain it better than the
wiki but let's go!
Installing GIT:
First of all, here's one thing that will help you a lot (now and later) and that's the
git program. This will allow you to clone the love-android repository (the source) as well as the associated sub-modules.
For Windows:
https://gitforwindows.org/
For MacOS:
https://git-scm.com/download/mac
For Linux on a Debian-like distribution:
If you are on Windows:
I don't really know how it works anymore but maybe you should check if the GIT executable is in the PATH environment variable.
To check this you can open the terminal (WIN+R then type "cmd").
Once in the terminal type "git". If the command is not recognized then git is not in the PATH environment variable. You can add it either by simply searching for PATH or "Environment variables" in the start menu, or use this command (
replacing "<GIT_INSTALL_DIR>\bin" with the directory where you installed git and where is the file git.exe):
Code: Select all
setx /m PATH "%PATH%;<GIT_INSTALL_DIR>\bin"
Last preparations:
You will need the compilation tools for Android, the easiest way for you will be to install Android Studio directly, here is the link to download the installer:
https://developer.android.com/studio
If you are on Linux you can use snap:
Code: Select all
sudo snap install android-studio --classic
During installation you should have the choice to download several SDK API versions, the different versions give you different functionality depending on the version of Android you are targeting.
In our case you will need API 33. Perhaps during the installation (or after) you will also have to select the NDK (this is what allows you to compile C/C++ for Android, don't panic, you won't need to code C/C++, just compile it
)
If this is not offered during the installation you will have to go to the "SDK manager" menu and select the NDK to install it.
You will also need to have set the ANDROID_SDK_ROOT environment variable to the location of your Android SDK and run.
Normally Android Studio did it on its own.
If in doubt it's explained here in the love-android wiki:
https://github.com/love2d/love-android/ ... oid-studio
Clone love-android repository:
Now that you have GIT you can clone the repo, you will need to use this command which will include the love2d submodules:
Code: Select all
git clone --recurse-submodules https://github.com/love2d/love-android
This will clone the repository to the directory where the terminal is open. If you don't want to take the lead, open the folder in which you want to clone the directory and type "cmd" in the bar where the current directory is displayed, this should open a terminal directly in this folder.
Include your game source:
In the cloned repo folder, you go to "
app/src/embed/assets" and put all your game source files there, no need to compress it to .love.
You must have understood how to edit the graddle.properties file to put the version of your app, name, etc...
You can also change the icon which are contained in several resolutions in "
app/src/main/res"
Regarding the icons, I advise you to make an image of 1024x1024 and you can quickly obtain all sizes thanks to this site:
https://www.appicon.co/
Time to compile!
Now that you can compile you can do it either from Android Studio if you want to do it without typing command lines. Many tutorials exist then on YouTube or other.
Otherwise (and if the installation of Android Studio went well) you can do it from the gradlew or gradlew.bat files present in the repository you cloned by typing these commands:
For Windows:
Code: Select all
gradlew.bat assembleEmbedNoRecordRelease
For Linux:
Code: Select all
./gradlew assembleEmbedNoRecordRelease
assemble: Means that we want to make an APK, you can change it to "bundle" if you want an AAB to publish on the playstore.
Embed: Means you compile with the "embed" folder which contains your game, you can compile it with "Normal" for the normal version.
NoRecord: Means you will not use the microphone with your app.
Release: Means that you compile in release, you can replace it with "Debug" if you want to compile in debug. Be aware that to run a debug app on an Android device you will need permissions.
So if you want to compile the "normal" version of love-android it will give this:
If I explained this part badly, everything can be found again in the wiki:
https://github.com/love2d/love-android/ ... -Packaging
Signed your app:
You will also need to sign your application for it to run on your device.
Either you compile with Android Studio and everything should be offered to you automatically, or you compiled on the command line then in this case
uber-apk-signer if the app is for your personal use and you don't want to worry about it, otherwise you will have to create your personal keystore for signing it, here is an explanation on stackoverflow:
https://stackoverflow.com/a/40064149
Endnote:
That's very rich, I hope you have all the keys now but don't get used to being given all this to you every time
I hope I was clear enough anyway, compiling a program is not easy when you start so don't hesitate at the slightest problem, also hoping that I haven't forgotten anything
And especially if something is not clear either do not hesitate especially once again.
(and hoping that my English is decent enough to understand something so "technical")