[Android] More clean up AndroidManifest.xml

This commit is contained in:
zilmar 2021-07-27 21:11:57 +09:30
parent eea736fc71
commit 397b32b963
20 changed files with 357 additions and 163 deletions

1
Android/app/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

48
Android/app/build.gradle Normal file
View File

@ -0,0 +1,48 @@
plugins {
id 'com.android.application'
}
apply from: '../config/version.gradle'
android {
defaultConfig {
applicationId = "emu.Project64"
externalNativeBuild {
cmake {
cppFlags '-std=c++11'
}
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.android.material:material:1.1.0'
implementation "androidx.drawerlayout:drawerlayout:1.0.0"
implementation 'androidx.preference:preference:1.1.1'
testImplementation 'junit:junit:4.12'
implementation project(':jni:3rdParty:png')
implementation project(':jni:3rdParty:zlib')
implementation project(':jni:Common')
implementation project(':jni:Settings')
implementation project(':jni:Project64-core')
implementation project(':jni:Project64-bridge')
implementation project(':jni:Project64-video')
implementation project(':jni:Project64-audio')
implementation project(':jni:Plugin-input')
implementation project(':jni:Plugin-RspHle')
}

21
Android/app/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -55,11 +55,6 @@
</intent-filter>
</activity>
<!--
For the GameActivities, do not restart the activity when the phone's slider
opens or closes, or when the orientation (and thereby screen size) changes.
This behavior is specified in android:configChanges below.
-->
<activity
android:name="emu.project64.game.GameActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
@ -80,10 +75,10 @@
android:theme="@style/Theme.Project64.About" />
<activity
android:name="emu.project64.settings.SettingsActivity"
android:theme="@style/Theme.Project64.Apearance" />
android:theme="@style/Theme.Project64.Settings"/>
<activity
android:name="emu.project64.settings.GameSettingsActivity"
android:theme="@style/Theme.Project64.Apearance" />
android:theme="@style/Theme.Project64.Settings" />
</application>
</manifest>

View File

@ -1,12 +1,13 @@
/.cxx
/build
*.c
*.cpp
*.h
*.vcproj
*.vcxproj
*.vcxproj.filters
*.dsp
*.plg
ChangeLog
INDEX
README
zconf.h.in
*.in
/ChangeLog
/INDEX
/README
/adler32.c

View File

@ -0,0 +1 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="emu.project64.zlib" />

View File

@ -0,0 +1,34 @@
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_STANDARD 99)
project("zlib")
add_library(zlib STATIC
adler32.c
compress.c
crc32.c
deflate.c
gzclose.c
gzlib.c
gzread.c
gzwrite.c
infback.c
inffast.c
inflate.c
inftrees.c
trees.c
uncompr.c
zutil.c
contrib/minizip/ioapi.c
contrib/minizip/miniunz.c
contrib/minizip/minizip.c
contrib/minizip/mztools.c
contrib/minizip/unzip.c
contrib/minizip/zip.c)
add_definitions(-DANDROID)
add_definitions(-DUSE_FILE32API)
add_definitions(-DZ_BUFSIZE=46516)
target_link_libraries(zlib)

63
Android/jni/3rdParty/zlib/build.gradle vendored Normal file
View File

@ -0,0 +1,63 @@
apply plugin: 'com.android.library'
apply from: '../../../config/version.gradle'
android {
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ndk {
debugSymbolLevel 'FULL'
}
}
debug {
minifyEnabled true
jniDebuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ndk {
debugSymbolLevel 'FULL'
}
}
}
externalNativeBuild {
cmake {
version "3.10.2"
path "CMakeLists.txt"
}
}
defaultConfig {
externalNativeBuild {
cmake {
arguments "-DANDROID=1", "-DCMAKE_BUILD_TYPE=Release", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_TOOLCHAIN=clang"
cppFlags "-fexceptions", "-ffast-math", "-ftree-vectorize"
cFlags "-ffast-math", "-ftree-vectorize"
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
}
}
packagingOptions {
exclude 'lib/x86/libc++_shared.so'
exclude 'lib/x86_64/libc++_shared.so'
exclude 'lib/armeabi-v7a/libc++_shared.so'
exclude 'lib/arm64-v8a/libc++_shared.so'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
}

View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -1,40 +0,0 @@
#########################
# zlib
#########################
include $(CLEAR_VARS)
LOCAL_PATH := $(JNI_LOCAL_PATH)
SRCDIR := ./3rdParty/zlib
LOCAL_MODULE := zlib
LOCAL_C_INCLUDES := \
LOCAL_SRC_FILES := \
$(SRCDIR)/adler32.c \
$(SRCDIR)/compress.c \
$(SRCDIR)/crc32.c \
$(SRCDIR)/deflate.c \
$(SRCDIR)/gzclose.c \
$(SRCDIR)/gzlib.c \
$(SRCDIR)/gzread.c \
$(SRCDIR)/gzwrite.c \
$(SRCDIR)/infback.c \
$(SRCDIR)/inffast.c \
$(SRCDIR)/inflate.c \
$(SRCDIR)/inftrees.c \
$(SRCDIR)/trees.c \
$(SRCDIR)/uncompr.c \
$(SRCDIR)/zutil.c \
$(SRCDIR)/contrib/minizip/ioapi.c \
$(SRCDIR)/contrib/minizip/miniunz.c \
$(SRCDIR)/contrib/minizip/minizip.c \
$(SRCDIR)/contrib/minizip/mztools.c \
$(SRCDIR)/contrib/minizip/unzip.c \
$(SRCDIR)/contrib/minizip/zip.c \
LOCAL_CFLAGS := $(COMMON_CFLAGS) \
-DIOAPI_NO_64 \
LOCAL_CPPFLAGS := $(COMMON_CPPFLAGS)
include $(BUILD_STATIC_LIBRARY)

View File

@ -1,7 +1,8 @@
/.cxx
/build
*.cpp
*.h
*.vcproj
*.vcxproj
*.vcxproj.filters
*.dsp
*.plg
*.in

21
Android/jni/Common/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -1,9 +1,8 @@
/.cxx
/build
*.cpp
*.h
*.vcproj
*.vcxproj
*.vcxproj.filters
*.dsp
*.plg
*.txt
*.rc
*.in

View File

@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_STANDARD 99)
project("Project64-bridge")
include_directories(..)
add_library(Project64-bridge SHARED
JavaBridge.cpp
JavaRomList.cpp
jniBridge.cpp
jniBridgeSettings.cpp
Notification.cpp
SyncBridge.cpp
UISettings.cpp)
add_definitions(-DANDROID)
ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../3rdParty/zlib ${CMAKE_CURRENT_BINARY_DIR}/3rdParty/zlib)
ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../Common ${CMAKE_CURRENT_BINARY_DIR}/Common)
ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../Project64-core ${CMAKE_CURRENT_BINARY_DIR}/Project64-core)
target_link_libraries(Project64-bridge zlib Project64-core Common log)

View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -1,8 +1,8 @@
/.cxx
/build
*.cpp
*.h
*.vcproj
*.vcxproj
*.vcxproj.filters
*.dsp
*.plg
*.h.in
*.in

View File

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View File

@ -0,0 +1 @@
<manifest package="emu.project64.plugin_gfx" />

View File

@ -1,100 +0,0 @@
###############################
# Project64-gfx-Project64
###############################
include $(CLEAR_VARS)
LOCAL_PATH := $(JNI_LOCAL_PATH)
SRCDIR := ./
LOCAL_MODULE := Project64-gfx
LOCAL_STATIC_LIBRARIES := common \
zlib \
Settings \
png \
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/$(SRCDIR)/Project64-video/Renderer/inc \
$(LOCAL_PATH)/$(SRCDIR)/3rdParty \
LOCAL_SRC_FILES := \
$(SRCDIR)/Project64-video/3dmath.cpp \
$(SRCDIR)/Project64-video/Android.cpp \
$(SRCDIR)/Project64-video/Combine.cpp \
$(SRCDIR)/Project64-video/Config.cpp \
$(SRCDIR)/Project64-video/CRC.cpp \
$(SRCDIR)/Project64-video/Debugger.cpp \
$(SRCDIR)/Project64-video/DepthBufferRender.cpp \
$(SRCDIR)/Project64-video/F3DTEXA.cpp \
$(SRCDIR)/Project64-video/FBtoScreen.cpp \
$(SRCDIR)/Project64-video/Main.cpp \
$(SRCDIR)/Project64-video/rdp.cpp \
$(SRCDIR)/Project64-video/ScreenResolution.cpp \
$(SRCDIR)/Project64-video/Settings.cpp \
$(SRCDIR)/Project64-video/TexBuffer.cpp \
$(SRCDIR)/Project64-video/TexCache.cpp \
$(SRCDIR)/Project64-video/trace.cpp \
$(SRCDIR)/Project64-video/turbo3D.cpp \
$(SRCDIR)/Project64-video/ucode.cpp \
$(SRCDIR)/Project64-video/ucode00.cpp \
$(SRCDIR)/Project64-video/ucode01.cpp \
$(SRCDIR)/Project64-video/ucode02.cpp \
$(SRCDIR)/Project64-video/ucode03.cpp \
$(SRCDIR)/Project64-video/ucode04.cpp \
$(SRCDIR)/Project64-video/ucode05.cpp \
$(SRCDIR)/Project64-video/ucode06.cpp \
$(SRCDIR)/Project64-video/ucode07.cpp \
$(SRCDIR)/Project64-video/ucode08.cpp \
$(SRCDIR)/Project64-video/ucode09.cpp \
$(SRCDIR)/Project64-video/ucode09rdp.cpp \
$(SRCDIR)/Project64-video/ucodeFB.cpp \
$(SRCDIR)/Project64-video/Util.cpp \
$(SRCDIR)/Project64-video/Ext_TxFilter.cpp \
$(SRCDIR)/Project64-video/Renderer/OGLEScombiner.cpp \
$(SRCDIR)/Project64-video/Renderer/OGLESgeometry.cpp \
$(SRCDIR)/Project64-video/Renderer/OGLESglitchmain.cpp \
$(SRCDIR)/Project64-video/Renderer/OGLEStextures.cpp \
$(SRCDIR)/Project64-video/Renderer/OGLESwrappers.cpp \
$(SRCDIR)/Project64-video/Renderer/Renderer.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/TxFilterExport.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/TxFilter.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/TxCache.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/TxTexCache.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/TxHiResCache.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/TxQuantize.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/TxUtil.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/TextureFilters.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/TextureFilters_2xsai.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/TextureFilters_hq2x.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/TextureFilters_hq4x.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/TxImage.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/TxReSample.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/TxDbg.cpp \
$(SRCDIR)/Project64-video/TextureEnhancer/tc-1.1+/fxt1.c \
$(SRCDIR)/Project64-video/TextureEnhancer/tc-1.1+/dxtn.c \
$(SRCDIR)/Project64-video/TextureEnhancer/tc-1.1+/wrapper.c \
$(SRCDIR)/Project64-video/TextureEnhancer/tc-1.1+/texstore.c \
LOCAL_CFLAGS := \
$(COMMON_CFLAGS) \
-DUSE_FRAMESKIPPER \
-DNOSSE \
-DUSE_GLES \
-fsigned-char \
LOCAL_CPPFLAGS := $(COMMON_CPPFLAGS)
LOCAL_CPP_FEATURES := exceptions
LOCAL_LDLIBS := \
-ldl \
-lGLESv2 \
-llog \
-latomic \
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
# Use for ARM7a:
LOCAL_CFLAGS += -mfpu=vfp
LOCAL_CFLAGS += -mfloat-abi=softfp
endif
include $(BUILD_SHARED_LIBRARY)

View File

@ -0,0 +1,63 @@
apply plugin: 'com.android.library'
apply from: '../../config/version.gradle'
android {
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ndk {
debugSymbolLevel 'FULL'
}
}
debug {
minifyEnabled true
jniDebuggable true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ndk {
debugSymbolLevel 'FULL'
}
}
}
externalNativeBuild {
cmake {
version "3.10.2"
path "CMakeLists.txt"
}
}
defaultConfig {
externalNativeBuild {
cmake {
arguments "-DANDROID=1", "-DCMAKE_BUILD_TYPE=Release", "-DANDROID_ARM_NEON=TRUE", "-DANDROID_TOOLCHAIN=clang"
cppFlags "-fexceptions", "-ffast-math", "-ftree-vectorize"
cFlags "-ffast-math", "-ftree-vectorize"
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
}
}
packagingOptions {
exclude 'lib/x86/libc++_shared.so'
exclude 'lib/x86_64/libc++_shared.so'
exclude 'lib/armeabi-v7a/libc++_shared.so'
exclude 'lib/arm64-v8a/libc++_shared.so'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
}