Re: [PATCH] Template for subsurface android package
On Wed, Jun 25, 2014 at 10:41:29AM +0200, Anton Lundin wrote: > > > > What's missing for me now is an INSTALL.Android that tells the uninitiated > > how to build for Android :-) > > Currently everything is collected and documented in > https://github.com/glance-/subsurface-android > > Maybe it should grow up into a proper INSTALL.Android and let the rest > move into packaging/android/ ... Yes, that's what I hope we are doing. /D ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
Re: [PATCH] Template for subsurface android package
On 25 June, 2014 - Dirk Hohndel wrote: > On Tue, Jun 24, 2014 at 10:41:45PM +0200, Anton Lundin wrote: > > On 24 June, 2014 - Dirk Hohndel wrote: > > > > > Just like I asked Miika - I would prefer to get these with SOB's from your > > > mentor. > > > > > > Andton, would you be able to do that? This way I know which patches the > > > mentor has reviewed and considers ready to make it into master. > > > > > > > NP. > > > > Here you go, the nicely updated version after the last review. > > Great, thanks. > > I'll push that in a minute. > > What's missing for me now is an INSTALL.Android that tells the uninitiated > how to build for Android :-) > Currently everything is collected and documented in https://github.com/glance-/subsurface-android Maybe it should grow up into a proper INSTALL.Android and let the rest move into packaging/android/ ... //Anton -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
Re: [PATCH] Template for subsurface android package
On Tue, Jun 24, 2014 at 10:41:45PM +0200, Anton Lundin wrote: > On 24 June, 2014 - Dirk Hohndel wrote: > > > Just like I asked Miika - I would prefer to get these with SOB's from your > > mentor. > > > > Andton, would you be able to do that? This way I know which patches the > > mentor has reviewed and considers ready to make it into master. > > > > NP. > > Here you go, the nicely updated version after the last review. Great, thanks. I'll push that in a minute. What's missing for me now is an INSTALL.Android that tells the uninitiated how to build for Android :-) /D ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
Re: [PATCH] Template for subsurface android package
On 24 June, 2014 - Venkatesh Shukla wrote: > On Mon, Jun 23, 2014 at 11:28 PM, Venkatesh Shukla < > venkatesh.shukla.ee...@iitbhu.ac.in> wrote: > > > > > > > > > On Mon, Jun 23, 2014 at 8:18 PM, Venkatesh Shukla < > > venkatesh.shukla.ee...@iitbhu.ac.in> wrote: > > > >> Hello > >> > >> For building subsurface on android, a template is needed. In this > >> template, android specific files, like AndroidManifest.xml, java files and > >> android xml files among others would be added. I am attaching a patch which > >> does takes care of this template while building for android. > >> The included manifest file contains permissions for USB usage on android > >> and device_filter.xml file to recognize the supported devices. > >> > >> -- > >> Venkatesh Shukla > >> > >> > > On suggestion of Anton, I have changed the package name to > > 'org.subsurface'. Other modifications include inclusion of string.xml for > > proper naming of application and proper formatting of AndroidManifest.xml > > and setting default orientation to landscape. > > > > -- > > Venkatesh Shukla > > > > Launcher icon suitable for various screen resolutions are now included. > Instead of the previous patches, this should be applied. > Finally i got some time to do a proper review of this. > From ebcf2e0e648f18478d889fcbdb81bc17c3cf8979 Mon Sep 17 00:00:00 2001 > From: Venkatesh Shukla > Date: Mon, 23 Jun 2014 17:18:17 +0530 > Subject: [PATCH] Template for subsurface android package > > For modifications to the final source code of built android package > such as permission additions and inclusion of xml and java files, it > is necessary to maintain a template. The template is copied without > any modifications on top of qt android-template before building > subsurface libraries. ( Refer: http://goo.gl/z44dQC ) I would recommend using the proper link here: http://qt-project.org/doc/qt-5/deployment-android.html#qmake-variables Its long and ugly, but its a bit clearer what you mean. > > All android specific files would be added to android subdirectory. > This isn't really true. The android.cpp file is android specific but shouldn't live in that directory. This needs rephrasing. > In this commit, permission for usage of USB devices is added to > AndroidManifest.xml. Also included is device_filter.xml. When > devices having VID, PID listed in this file is attached to android, > a dialogbox is displayed asking for permission for subsurface to > use this USB device. Accepting it would take you straight to subsurface > application. > I would move this to a separate commit. When this is applied subsurface knows nothing about usb devices, and i would hold off on those patches until that code reaches some sort of state that it can land in this repo. I refrained from commenting more on this below. > diff --git a/.gitignore b/.gitignore > index 9272286..24e8eb7 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -30,3 +30,5 @@ Makefile > subsurface.pro.user* > Subsurface.app > .DS_Store > +!android/**/*.xml > + Trailing newline here. > diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml > new file mode 100644 > index 000..314d58e > --- /dev/null > +++ b/android/AndroidManifest.xml > @@ -0,0 +1,118 @@ > + > +http://schemas.android.com/apk/res/android"; > +package="org.subsurface" > +android:installLocation="auto" > +android:versionCode="1" > +android:versionName="1.0" > > + > + +android:name="org.qtproject.qt5.android.bindings.QtApplication" > +android:hardwareAccelerated="true" > +android:label="@string/app_name" > +android:icon="@drawable/subsurface_icon" > > + +android:name="org.qtproject.qt5.android.bindings.QtActivity" > + > android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation" > +android:label="@string/app_name" > +android:launchMode="singleTop" > +android:screenOrientation="sensorLandscape" > I'm not sure about locking the beast to landscape. On my Nexus 5 the app is about as useful in portrait to. ... > diff --git a/android/res/xml/device_filter.xml > b/android/res/xml/device_filter.xml > new file mode 100644 > index 000..822680b > --- /dev/null > +++ b/android/res/xml/device_filter.xml > @@ -0,0 +1,16 @@ > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + Another trailing newline here. The rest of it looks good to me. //Anton -- Anton Lundin+46702-161604 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
Re: [PATCH] Template for subsurface android package
Just like I asked Miika - I would prefer to get these with SOB's from your mentor. Andton, would you be able to do that? This way I know which patches the mentor has reviewed and considers ready to make it into master. /D On Mon, Jun 23, 2014 at 11:28:52PM +0530, Venkatesh Shukla wrote: > On Mon, Jun 23, 2014 at 8:18 PM, Venkatesh Shukla < > venkatesh.shukla.ee...@iitbhu.ac.in> wrote: > > > Hello > > > > For building subsurface on android, a template is needed. In this > > template, android specific files, like AndroidManifest.xml, java files and > > android xml files among others would be added. I am attaching a patch which > > does takes care of this template while building for android. > > The included manifest file contains permissions for USB usage on android > > and device_filter.xml file to recognize the supported devices. > > > > -- > > Venkatesh Shukla > > > > > On suggestion of Anton, I have changed the package name to > 'org.subsurface'. Other modifications include inclusion of string.xml for > proper naming of application and proper formatting of AndroidManifest.xml > and setting default orientation to landscape. > > -- > Venkatesh Shukla > From 251ab194b9357e58eacb2cc3ec590b037e3effab Mon Sep 17 00:00:00 2001 > From: Venkatesh Shukla > Date: Mon, 23 Jun 2014 17:18:17 +0530 > Subject: [PATCH] Template for subsurface android package > > For modifications to the final source code of built android package > such as permission additions and inclusion of xml and java files, it > is necessary to maintain a template. The template is copied without > any modifications on top of qt android-template before building > subsurface libraries. ( Refer: http://goo.gl/z44dQC ) > > All android specific files would be added to android subdirectory. > > In this commit, permission for usage of USB devices is added to > AndroidManifest.xml. Also included is device_filter.xml. When > devices having VID, PID listed in this file is attached to android, > a dialogbox is displayed asking for permission for subsurface to > use this USB device. Accepting it would take you straight to subsurface > application. > > Signed-off-by: Venkatesh Shukla > --- > .gitignore| 2 + > android/AndroidManifest.xml | 117 > ++ > android/res/values/strings.xml| 8 +++ > android/res/xml/device_filter.xml | 16 ++ > subsurface-install.pri| 2 + > subsurface.pro| 6 ++ > 6 files changed, 151 insertions(+) > create mode 100644 android/AndroidManifest.xml > create mode 100644 android/res/values/strings.xml > create mode 100644 android/res/xml/device_filter.xml > > diff --git a/.gitignore b/.gitignore > index 9272286..24e8eb7 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -30,3 +30,5 @@ Makefile > subsurface.pro.user* > Subsurface.app > .DS_Store > +!android/**/*.xml > + > diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml > new file mode 100644 > index 000..4eb97e5 > --- /dev/null > +++ b/android/AndroidManifest.xml > @@ -0,0 +1,117 @@ > + > +http://schemas.android.com/apk/res/android"; > +package="org.subsurface" > +android:installLocation="auto" > +android:versionCode="1" > +android:versionName="1.0" > > + > + +android:name="org.qtproject.qt5.android.bindings.QtApplication" > +android:hardwareAccelerated="true" > +android:label="@string/app_name" > > + +android:name="org.qtproject.qt5.android.bindings.QtActivity" > + > android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation" > +android:label="@string/app_name" > +android:launchMode="singleTop" > +android:screenOrientation="sensorLandscape" > > + > + > + > + > + > + > + +android:name="android.app.lib_name" > +android:value="-- %%INSERT_APP_LIB_NAME%% --" /> > + +android:name="android.app.qt_sources_resource_id" > +android:resource="@array/qt_sources" /> > + +android:name="android.app.repository" > +android:value="default" /> > + +android:name="android.app.qt_libs_re
Re: [PATCH] Template for subsurface android package
On Mon, Jun 23, 2014 at 8:18 PM, Venkatesh Shukla < venkatesh.shukla.ee...@iitbhu.ac.in> wrote: > Hello > > For building subsurface on android, a template is needed. In this > template, android specific files, like AndroidManifest.xml, java files and > android xml files among others would be added. I am attaching a patch which > does takes care of this template while building for android. > The included manifest file contains permissions for USB usage on android > and device_filter.xml file to recognize the supported devices. > > -- > Venkatesh Shukla > > On suggestion of Anton, I have changed the package name to 'org.subsurface'. Other modifications include inclusion of string.xml for proper naming of application and proper formatting of AndroidManifest.xml and setting default orientation to landscape. -- Venkatesh Shukla From 251ab194b9357e58eacb2cc3ec590b037e3effab Mon Sep 17 00:00:00 2001 From: Venkatesh Shukla Date: Mon, 23 Jun 2014 17:18:17 +0530 Subject: [PATCH] Template for subsurface android package For modifications to the final source code of built android package such as permission additions and inclusion of xml and java files, it is necessary to maintain a template. The template is copied without any modifications on top of qt android-template before building subsurface libraries. ( Refer: http://goo.gl/z44dQC ) All android specific files would be added to android subdirectory. In this commit, permission for usage of USB devices is added to AndroidManifest.xml. Also included is device_filter.xml. When devices having VID, PID listed in this file is attached to android, a dialogbox is displayed asking for permission for subsurface to use this USB device. Accepting it would take you straight to subsurface application. Signed-off-by: Venkatesh Shukla --- .gitignore| 2 + android/AndroidManifest.xml | 117 ++ android/res/values/strings.xml| 8 +++ android/res/xml/device_filter.xml | 16 ++ subsurface-install.pri| 2 + subsurface.pro| 6 ++ 6 files changed, 151 insertions(+) create mode 100644 android/AndroidManifest.xml create mode 100644 android/res/values/strings.xml create mode 100644 android/res/xml/device_filter.xml diff --git a/.gitignore b/.gitignore index 9272286..24e8eb7 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ Makefile subsurface.pro.user* Subsurface.app .DS_Store +!android/**/*.xml + diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml new file mode 100644 index 000..4eb97e5 --- /dev/null +++ b/android/AndroidManifest.xml @@ -0,0 +1,117 @@ + +http://schemas.android.com/apk/res/android"; +package="org.subsurface" +android:installLocation="auto" +android:versionCode="1" +android:versionName="1.0" > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/res/values/strings.xml b/android/res/values/strings.xml new file mode 100644 index 000..2a79f11 --- /dev/null +++ b/android/res/values/strings.xml @@ -0,0 +1,8 @@ + + +Subsurface + +Can\'t find Ministro service.\nThe application can\'t start. +This application requires Ministro service. Would you like to install it? +Your application encountered a fatal error and cannot continue. + diff --git a/android/res/xml/device_filter.xml b/android/res/xml/device_filter.xml new file mode 100644 index 000..822680b --- /dev/null +++ b/android/res/xml/device_filter.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/subsurface-install.pri b/subsurface-install.pri index db1c0ff..0fec89d 100644 --- a/subsurface-install.pri +++ b/subsurface-install.pri @@ -130,6 +130,8 @@ mac { } else: android { # Android install rules QMAKE_BUNDLE_DATA += translation qttranslation + # Android template directory + ANDROID_PACKAGE_SOURCE_DIR = $$OUT_PWD/android } else { # Linux install rules # On Linux, we can count on packagers doing the right thing diff --git a/subsurface.pro b/subsurface.pro index 1172020..86d19cd 100644 --- a/subsurface.pro +++ b/subsurface.pro @@ -263,6 +263,12 @@ theme.commands += $(CHK_DIR_EXISTS) $$OUT_PWD/theme || $(COPY_DIR) $$PWD/theme $ all.depends += theme QMAKE_EXTRA_TARGETS += theme +android { + android.commands += $(CHK_DIR_EXISTS) $$OUT_PWD/android ||
[PATCH] Template for subsurface android package
Hello For building subsurface on android, a template is needed. In this template, android specific files, like AndroidManifest.xml, java files and android xml files among others would be added. I am attaching a patch which does takes care of this template while building for android. The included manifest file contains permissions for USB usage on android and device_filter.xml file to recognize the supported devices. -- Venkatesh Shukla From c59907d4b3040fcc50e9bdb174254179aeb56665 Mon Sep 17 00:00:00 2001 From: Venkatesh Shukla Date: Mon, 23 Jun 2014 17:18:17 +0530 Subject: [PATCH] Template for subsurface android package For modifications to the final source code of built android package such as permission additions and inclusion of xml and java files, it is necessary to maintain a template. The template is copied without any modifications on top of qt android-template before building subsurface libraries. ( Refer: http://goo.gl/z44dQC ) All android specific files would be added to android subdirectory. In this commit, permission for usage of USB devices is added to AndroidManifest.xml. Also included is device_filter.xml. When devices having VID, PID listed in this file is attached to android, a dialogbox is displayed asking for permission for subsurface to use this USB device. Accepting it would take you straight to subsurface application. Signed-off-by: Venkatesh Shukla --- .gitignore| 2 ++ android/AndroidManifest.xml | 62 +++ android/res/xml/device_filter.xml | 16 ++ subsurface-install.pri| 2 ++ subsurface.pro| 6 5 files changed, 88 insertions(+) create mode 100644 android/AndroidManifest.xml create mode 100644 android/res/xml/device_filter.xml diff --git a/.gitignore b/.gitignore index 9272286..24e8eb7 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ Makefile subsurface.pro.user* Subsurface.app .DS_Store +!android/**/*.xml + diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml new file mode 100644 index 000..b5fc4ca --- /dev/null +++ b/android/AndroidManifest.xml @@ -0,0 +1,62 @@ + +http://schemas.android.com/apk/res/android"; android:versionName="1.0" android:versionCode="1" android:installLocation="auto"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/res/xml/device_filter.xml b/android/res/xml/device_filter.xml new file mode 100644 index 000..822680b --- /dev/null +++ b/android/res/xml/device_filter.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/subsurface-install.pri b/subsurface-install.pri index db1c0ff..0fec89d 100644 --- a/subsurface-install.pri +++ b/subsurface-install.pri @@ -130,6 +130,8 @@ mac { } else: android { # Android install rules QMAKE_BUNDLE_DATA += translation qttranslation + # Android template directory + ANDROID_PACKAGE_SOURCE_DIR = $$OUT_PWD/android } else { # Linux install rules # On Linux, we can count on packagers doing the right thing diff --git a/subsurface.pro b/subsurface.pro index 1172020..86d19cd 100644 --- a/subsurface.pro +++ b/subsurface.pro @@ -263,6 +263,12 @@ theme.commands += $(CHK_DIR_EXISTS) $$OUT_PWD/theme || $(COPY_DIR) $$PWD/theme $ all.depends += theme QMAKE_EXTRA_TARGETS += theme +android { + android.commands += $(CHK_DIR_EXISTS) $$OUT_PWD/android || $(COPY_DIR) $$PWD/android $$OUT_PWD + all.depends += android + QMAKE_EXTRA_TARGETS += android +} + DESKTOP_FILE = subsurface.desktop mac: ICON = packaging/macosx/Subsurface.icns else: ICON = subsurface-icon.svg -- 1.9.3 ___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface