diff options
| author | Po Lu | 2023-02-02 10:31:10 +0800 |
|---|---|---|
| committer | Po Lu | 2023-02-02 10:31:10 +0800 |
| commit | aa32c9b78b70287a17e52224b50a68a1998919a3 (patch) | |
| tree | 8cc4c06b0415f52f513c4631fc22d3debc80acc7 /java | |
| parent | 718b1d73d785847693668023ca2df7caf40e4f40 (diff) | |
| download | emacs-aa32c9b78b70287a17e52224b50a68a1998919a3.tar.gz emacs-aa32c9b78b70287a17e52224b50a68a1998919a3.zip | |
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.
Diffstat (limited to 'java')
| -rw-r--r-- | java/AndroidManifest.xml.in | 1 | ||||
| -rw-r--r-- | java/Makefile.in | 14 | ||||
| -rw-r--r-- | 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/>. --> | |||
| 62 | 62 | ||
| 63 | <application android:name="org.gnu.emacs.EmacsApplication" | 63 | <application android:name="org.gnu.emacs.EmacsApplication" |
| 64 | android:label="Emacs" | 64 | android:label="Emacs" |
| 65 | android:icon="@drawable/emacs" | ||
| 65 | android:hardwareAccelerated="true" | 66 | android:hardwareAccelerated="true" |
| 66 | android:supportsRtl="true" | 67 | android:supportsRtl="true" |
| 67 | android:theme="@android:style/Theme" | 68 | 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 @@ | |||
| 19 | 19 | ||
| 20 | top_builddir = @top_builddir@ | 20 | top_builddir = @top_builddir@ |
| 21 | top_srcdir = @top_srcdir@ | 21 | top_srcdir = @top_srcdir@ |
| 22 | srcdir = @srcdir@ | ||
| 22 | version = @version@ | 23 | version = @version@ |
| 23 | 24 | ||
| 24 | # This is the host lib-src and lib, not the cross compiler's lib-src. | 25 | # 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) | |||
| 56 | SIGN_EMACS_V2 = sign --v2-signing-enabled --ks emacs.keystore \ | 57 | SIGN_EMACS_V2 = sign --v2-signing-enabled --ks emacs.keystore \ |
| 57 | --debuggable-apk-permitted --ks-pass pass:emacs1 | 58 | --debuggable-apk-permitted --ks-pass pass:emacs1 |
| 58 | 59 | ||
| 59 | JAVA_FILES = $(shell find . -type f -name *.java) | 60 | JAVA_FILES = $(wildcard $(srcdir)/org/gnu/emacs/*.java) |
| 61 | RESOURCE_FILES = $(wildcard $(srcdir)/res/drawable/*) | ||
| 60 | CLASS_FILES = $(foreach file,$(JAVA_FILES),$(basename $(file)).class) | 62 | CLASS_FILES = $(foreach file,$(JAVA_FILES),$(basename $(file)).class) |
| 61 | 63 | ||
| 62 | # Compute the name for the Emacs application package. This should be: | 64 | # Compute the name for the Emacs application package. This should be: |
| @@ -112,7 +114,7 @@ $(libsrc)/asset-directory-tool: | |||
| 112 | $(MAKE) -C $(libsrc) $(notdir $@) | 114 | $(MAKE) -C $(libsrc) $(notdir $@) |
| 113 | 115 | ||
| 114 | emacs.apk-in: $(CROSS_BINS) $(CROSS_LIBS) $(libsrc)/asset-directory-tool \ | 116 | emacs.apk-in: $(CROSS_BINS) $(CROSS_LIBS) $(libsrc)/asset-directory-tool \ |
| 115 | AndroidManifest.xml $(NDK_BUILD_SHARED) | 117 | AndroidManifest.xml $(NDK_BUILD_SHARED) $(RESOURCE_FILES) |
| 116 | # Make the working directory for this stuff | 118 | # Make the working directory for this stuff |
| 117 | rm -rf install_temp | 119 | rm -rf install_temp |
| 118 | mkdir -p install_temp/lib/$(ANDROID_ABI) | 120 | mkdir -p install_temp/lib/$(ANDROID_ABI) |
| @@ -158,9 +160,11 @@ ifneq ($(NDK_BUILD_SHARED),) | |||
| 158 | endif | 160 | endif |
| 159 | # Package everything. Specifying the assets on this command line is | 161 | # Package everything. Specifying the assets on this command line is |
| 160 | # necessary for AAssetManager_getNextFileName to work on old versions | 162 | # necessary for AAssetManager_getNextFileName to work on old versions |
| 161 | # of Android. | 163 | # of Android. Make sure not to generate R.java, as it's not required |
| 162 | $(AAPT) package -I "$(ANDROID_JAR)" -F $@ -f \ | 164 | # by Emacs. |
| 163 | -M AndroidManifest.xml -A install_temp/assets | 165 | $(AAPT) package -I "$(ANDROID_JAR)" -F $@ -f \ |
| 166 | -M AndroidManifest.xml -A install_temp/assets \ | ||
| 167 | -S res -J install_temp | ||
| 164 | pushd install_temp; $(AAPT) add ../$@ `find lib -type f`; popd | 168 | pushd install_temp; $(AAPT) add ../$@ `find lib -type f`; popd |
| 165 | rm -rf install_temp | 169 | rm -rf install_temp |
| 166 | 170 | ||
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 | |||
| 2 | Android-like systems, along with files needed to create an application | 2 | Android-like systems, along with files needed to create an application |
| 3 | package out of them. | 3 | package out of them. |
| 4 | 4 | ||
| 5 | The ``org/gnu/emacs'' subdirectory contains the Java sources under the | ||
| 6 | ``org.gnu.emacs'' package identifier. | ||
| 7 | |||
| 8 | The ``res'' directory contains resources, mainly the Emacs icon. | ||
| 9 | |||
| 5 | `emacs.keystore' is the signing key used to build Emacs. It is kept | 10 | `emacs.keystore' is the signing key used to build Emacs. It is kept |
| 6 | here, and we encourage all people redistributing Emacs to use this | 11 | here, and we encourage all people redistributing Emacs to use this |
| 7 | key. It holds no security value, and otherwise it will be impossible | 12 | key. It holds no security value, and otherwise it will be impossible |