emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/android aa32c9b78b7 6/6: Add Emacs icon for Android package


From: Po Lu
Subject: feature/android aa32c9b78b7 6/6: Add Emacs icon for Android package
Date: Wed, 1 Feb 2023 21:31:28 -0500 (EST)

branch: feature/android
commit aa32c9b78b70287a17e52224b50a68a1998919a3
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Add Emacs icon for Android package
    
    * java/AndroidManifest.xml.in: Add new icon.
    * java/Makefile.in (srcdir): New variable.
    (JAVA_FILES, RESOURCE_FILES): Update variables.
    (emacs.apk-in): Apply resources.
    * java/README: Describe directory tree.
---
 java/AndroidManifest.xml.in |  1 +
 java/Makefile.in            | 14 +++++++++-----
 java/README                 |  5 +++++
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/java/AndroidManifest.xml.in b/java/AndroidManifest.xml.in
index 3833e1735c3..b465875f3f4 100644
--- a/java/AndroidManifest.xml.in
+++ b/java/AndroidManifest.xml.in
@@ -62,6 +62,7 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>. -->
 
   <application android:name="org.gnu.emacs.EmacsApplication"
               android:label="Emacs"
+              android:icon="@drawable/emacs"
               android:hardwareAccelerated="true"
               android:supportsRtl="true"
               android:theme="@android:style/Theme"
diff --git a/java/Makefile.in b/java/Makefile.in
index a7bc8ac027a..155754b59d2 100644
--- a/java/Makefile.in
+++ b/java/Makefile.in
@@ -19,6 +19,7 @@
 
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+srcdir = @srcdir@
 version = @version@
 
 # This is the host lib-src and lib, not the cross compiler's lib-src.
@@ -56,7 +57,8 @@ SIGN_EMACS = -keystore emacs.keystore -storepass emacs1 
$(JARSIGNER_FLAGS)
 SIGN_EMACS_V2 = sign --v2-signing-enabled --ks emacs.keystore \
        --debuggable-apk-permitted --ks-pass pass:emacs1
 
-JAVA_FILES = $(shell find . -type f -name *.java)
+JAVA_FILES = $(wildcard $(srcdir)/org/gnu/emacs/*.java)
+RESOURCE_FILES = $(wildcard $(srcdir)/res/drawable/*)
 CLASS_FILES = $(foreach file,$(JAVA_FILES),$(basename $(file)).class)
 
 # Compute the name for the Emacs application package.  This should be:
@@ -112,7 +114,7 @@ $(libsrc)/asset-directory-tool:
        $(MAKE) -C $(libsrc) $(notdir $@)
 
 emacs.apk-in: $(CROSS_BINS) $(CROSS_LIBS) $(libsrc)/asset-directory-tool \
-  AndroidManifest.xml $(NDK_BUILD_SHARED)
+  AndroidManifest.xml $(NDK_BUILD_SHARED) $(RESOURCE_FILES)
 # Make the working directory for this stuff
        rm -rf install_temp
        mkdir -p install_temp/lib/$(ANDROID_ABI)
@@ -158,9 +160,11 @@ ifneq ($(NDK_BUILD_SHARED),)
 endif
 # Package everything.  Specifying the assets on this command line is
 # necessary for AAssetManager_getNextFileName to work on old versions
-# of Android.
-       $(AAPT) package -I "$(ANDROID_JAR)" -F $@ -f \
-         -M AndroidManifest.xml -A install_temp/assets
+# of Android.  Make sure not to generate R.java, as it's not required
+# by Emacs.
+       $(AAPT) package -I "$(ANDROID_JAR)" -F $@ -f    \
+         -M AndroidManifest.xml -A install_temp/assets \
+         -S res -J install_temp
        pushd install_temp; $(AAPT) add ../$@ `find lib -type f`; popd
        rm -rf install_temp
 
diff --git a/java/README b/java/README
index 3bce2556403..5539871cc2c 100644
--- a/java/README
+++ b/java/README
@@ -2,6 +2,11 @@ This directory holds the Java sources of the port of GNU Emacs 
to
 Android-like systems, along with files needed to create an application
 package out of them.
 
+The ``org/gnu/emacs'' subdirectory contains the Java sources under the
+``org.gnu.emacs'' package identifier.
+
+The ``res'' directory contains resources, mainly the Emacs icon.
+
 `emacs.keystore' is the signing key used to build Emacs.  It is kept
 here, and we encourage all people redistributing Emacs to use this
 key.  It holds no security value, and otherwise it will be impossible



reply via email to

[Prev in Thread] Current Thread [Next in Thread]