From 129570c0fe9e07a3a3ca313d0438ab826f0509b2 Mon Sep 17 00:00:00 2001
From: Mathieu Virbel
- Buildozer has been used to build a project and should be functionnal
- for yours. It is preferrable to add a Shared Folder and build from there.
+ Buildozer is ready to be used. You'll need internet connection for
+ download the Android SDK/NDK (automatically done), and during the first
+ compilation.
+
- Go into your project directory, then:
- How to use the VM
+ It is preferrable to add a share a folder
+ between your host and the VM, then build from there.
+
By the time we shipped the VM and you using it, you may need to
update buildozer.
# Just build your application
-buildozer android_new debug
-
-# Build your application, deploy on the phone,
-# run it, and display the logs from the phone
-buildozer android_new debug deploy run logcat
+ Don't try to use latest Android SDK or NDK. The defaults from buildozer
+ works: Android SDK 20, Android NDK 9c. Recent Android SDK doesn't work
+ the same as before (no more android command), and python-for-android
+ project have issues with it. As for NDK, you can use r13c, it works too.
+
buildozer init
buildozer.spec
:
+ [buildozer] +# change the name of your app +package.name = myapp + +# change the domain of your package +package.domain = com.mydomain + +# specify hostpython2 manually. If you want to use python 3, check buildozer +# README about it, the VM is not preinstalled for that. +requirements = hostpython2,kivy + +[buildozer] +# update the build directory (issue with virtualbox shared folder and symlink) +build_dir = /build/myapp +
buildozer android_new debug
buildozer android_new debug deploy run logcat
+ Virtualbox allows you to share a folder between your computer and the + VM. To do, just: +
/media/sf_directoryname
/build
directory where you can put your
build in it. Edit your buildozer.ini
:
[buildozer] build_dir = /build/buildozer-myapp- +
The buildozer version you have may be outdated, as well as the dependencies. The best is to regulary update buildozer: diff --git a/buildozer/tools/packer/scripts/additional-packages.sh b/buildozer/tools/packer/scripts/additional-packages.sh index f8ee816..b97ebe8 100644 --- a/buildozer/tools/packer/scripts/additional-packages.sh +++ b/buildozer/tools/packer/scripts/additional-packages.sh @@ -1,10 +1,13 @@ #!/bin/bash -eux +# Don't use openjdk-9, the conf directory is missing, and we get +# an error when using the android sdk: +# "Can't read cryptographic policy directory: unlimited" wget http://bootstrap.pypa.io/get-pip.py python get-pip.py rm get-pip.py -apt-get -y install lib32z1 lib32ncurses5 +apt-get -y install lib32stdc++6 lib32z1 lib32ncurses5 apt-get -y install build-essential -apt-get -y install git openjdk-9-jdk --no-install-recommends zlib1g-dev +apt-get -y install git openjdk-8-jdk --no-install-recommends zlib1g-dev pip install cython buildozer python-for-android diff --git a/buildozer/tools/packer/scripts/setup.sh b/buildozer/tools/packer/scripts/setup.sh index 701f09d..2338387 100644 --- a/buildozer/tools/packer/scripts/setup.sh +++ b/buildozer/tools/packer/scripts/setup.sh @@ -38,15 +38,17 @@ sed -i "s:Greybird:Adwaita:g" /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsetting sed -i "s:Greybird:Adwaita:g" /etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml sed -i "s:Greybird:Adwaita:g" /etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml sed -i "s:Greybird:Adwaita:g" /etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml +sed -i "s:elementary-xfce-darker:elementary-xfce-darkest:g" /etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml sed -i "s:elementary-xfce-dark:elementary-xfce-darkest:g" /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml # add desktop icon wget $PACKER_HTTP_ADDR/buildozer.desktop mkdir -p /home/kivy/Desktop cp buildozer.desktop /home/kivy/Desktop/ -chown kivy.kivy /home/kivy/Desktop +chown kivy.kivy -R /home/kivy/Desktop +chmod +x /home/kivy/Desktop/buildozer.desktop mv buildozer.desktop /usr/share/applications/ -sed -i "s:^favorites=.*$:favorites=buildozer.desktop,exo-terminal-emulator.desktop,exo-web-browser.desktop,exo-file-manager.desktop,org.gnome.Software.desktop,xfhelp4.desktop:g" /etc/xdg/xdg-xubuntu/xfce4/whiskermenu/defaults.rc +sed -i "s:^favorites=.*$:favorites=buildozer.desktop,exo-terminal-emulator.desktop,exo-web-browser.desktop,xfce-keyboard-settings.desktop,exo-file-manager.desktop,org.gnome.Software.desktop,xfhelp4.desktop:g" /etc/xdg/xdg-xubuntu/xfce4/whiskermenu/defaults.rc # copy welcome directory mkdir -p /usr/share/applications/buildozer-welcome