-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
272 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
buildscript { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
// https://developer.android.google.cn/build/releases/gradle-plugin?hl=zh-cn | ||
classpath 'com.android.tools.build:gradle:8.2.2' | ||
} | ||
} | ||
|
||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
apply plugin: 'com.android.application' | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar']) | ||
implementation 'androidx.core:core:1.10.1' | ||
} | ||
|
||
android { | ||
/******************************************************* | ||
* The following variables: | ||
* - androidBuildToolsVersion, | ||
* - androidCompileSdkVersion | ||
* - qtAndroidDir - holds the path to qt android files | ||
* needed to build any Qt application | ||
* on Android. | ||
* | ||
* are defined in gradle.properties file. This file is | ||
* updated by QtCreator and androiddeployqt tools. | ||
* Changing them manually might break the compilation! | ||
*******************************************************/ | ||
|
||
compileSdkVersion androidCompileSdkVersion | ||
buildToolsVersion androidBuildToolsVersion | ||
ndkVersion androidNdkVersion | ||
|
||
// Extract native libraries from the APK | ||
packagingOptions.jniLibs.useLegacyPackaging true | ||
|
||
sourceSets { | ||
main { | ||
manifest.srcFile 'AndroidManifest.xml' | ||
java.srcDirs = [qtAndroidDir + '/src', 'src', 'java'] | ||
aidl.srcDirs = [qtAndroidDir + '/src', 'src', 'aidl'] | ||
res.srcDirs = [qtAndroidDir + '/res', 'res'] | ||
resources.srcDirs = ['resources'] | ||
renderscript.srcDirs = ['src'] | ||
assets.srcDirs = ['assets'] | ||
jniLibs.srcDirs = ['libs'] | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile) { | ||
options.incremental = true | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
|
||
lintOptions { | ||
abortOnError false | ||
} | ||
|
||
// Do not compress Qt binary resources file | ||
aaptOptions { | ||
noCompress 'rcc' | ||
} | ||
|
||
defaultConfig { | ||
resConfig "en" | ||
minSdkVersion qtMinSdkVersion | ||
targetSdkVersion qtTargetSdkVersion | ||
ndk.abiFilters = qtTargetAbiList.split(",") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="org.KangLinStudio.MimeTypeBrowser" | ||
android:installLocation="auto" | ||
android:versionCode="0" | ||
android:versionName="2.2.6"> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
|
||
<supports-screens | ||
android:anyDensity="true" | ||
android:largeScreens="true" | ||
android:normalScreens="true" | ||
android:smallScreens="true" /> | ||
<application | ||
android:name="org.qtproject.qt.android.bindings.QtApplication" | ||
android:hardwareAccelerated="true" | ||
android:label="@string/app_name" | ||
android:requestLegacyExternalStorage="true" | ||
android:allowBackup="true" | ||
android:fullBackupOnly="false"> | ||
<activity | ||
android:name="org.qtproject.qt.android.bindings.QtActivity" | ||
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" | ||
android:launchMode="singleTop" | ||
android:screenOrientation="unspecified" | ||
android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
|
||
<meta-data | ||
android:name="android.app.lib_name" | ||
android:value="MimeTypeBrowser" /> | ||
|
||
<meta-data | ||
android:name="android.app.arguments" | ||
android:value="" /> | ||
</activity> | ||
|
||
<provider | ||
android:name="androidx.core.content.FileProvider" | ||
android:authorities="${applicationId}.qtprovider" | ||
android:exported="false" | ||
android:grantUriPermissions="true"> | ||
<meta-data | ||
android:name="android.support.FILE_PROVIDER_PATHS" | ||
android:resource="@xml/qtprovider_paths"/> | ||
</provider> | ||
</application> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
buildscript { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
// https://developer.android.google.cn/build/releases/gradle-plugin?hl=zh-cn | ||
classpath 'com.android.tools.build:gradle:8.2.2' | ||
} | ||
} | ||
|
||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
apply plugin: 'com.android.application' | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar']) | ||
implementation 'androidx.core:core:1.10.1' | ||
} | ||
|
||
android { | ||
/******************************************************* | ||
* The following variables: | ||
* - androidBuildToolsVersion, | ||
* - androidCompileSdkVersion | ||
* - qtAndroidDir - holds the path to qt android files | ||
* needed to build any Qt application | ||
* on Android. | ||
* | ||
* are defined in gradle.properties file. This file is | ||
* updated by QtCreator and androiddeployqt tools. | ||
* Changing them manually might break the compilation! | ||
*******************************************************/ | ||
|
||
compileSdkVersion androidCompileSdkVersion | ||
buildToolsVersion androidBuildToolsVersion | ||
ndkVersion androidNdkVersion | ||
|
||
// Extract native libraries from the APK | ||
packagingOptions.jniLibs.useLegacyPackaging true | ||
|
||
sourceSets { | ||
main { | ||
manifest.srcFile 'AndroidManifest.xml' | ||
java.srcDirs = [qtAndroidDir + '/src', 'src', 'java'] | ||
aidl.srcDirs = [qtAndroidDir + '/src', 'src', 'aidl'] | ||
res.srcDirs = [qtAndroidDir + '/res', 'res'] | ||
resources.srcDirs = ['resources'] | ||
renderscript.srcDirs = ['src'] | ||
assets.srcDirs = ['assets'] | ||
jniLibs.srcDirs = ['libs'] | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile) { | ||
options.incremental = true | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
|
||
lintOptions { | ||
abortOnError false | ||
} | ||
|
||
// Do not compress Qt binary resources file | ||
aaptOptions { | ||
noCompress 'rcc' | ||
} | ||
|
||
defaultConfig { | ||
resConfig "en" | ||
minSdkVersion qtMinSdkVersion | ||
targetSdkVersion qtTargetSdkVersion | ||
ndk.abiFilters = qtTargetAbiList.split(",") | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
<string name="app_name">Mime类型浏览器</string> | ||
|
||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
|
||
<string name="app_name">Mime Type Browser</string> | ||
|
||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,8 @@ Author:Kang Lin([email protected]) | |
[![master status](https://github.com/KangLin/RabbitCommon/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/KangLin/RabbitCommon/actions/workflows/build.yml) | ||
[![develop status](https://github.com/KangLin/RabbitCommon/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/KangLin/RabbitCommon/actions/workflows/build.yml) | ||
|
||
[![Build status](https://ci.appveyor.com/api/projects/status/cy6jwbbysuj7t1wp?svg=true)](https://ci.appveyor.com/project/KangLin/rabbitcommon) | ||
|
||
[:cn: Chinese](README_zh_CN.md) | ||
|
||
- Project home site: https://github.com/KangLin/RabbitCommon | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
if [ -n $1 ]; then | ||
Qt6_ROOT=$1 | ||
fi | ||
|
||
mkdir -p build_android | ||
cd build_android | ||
${Qt6_ROOT}/bin/qt-cmake .. \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DQT_HOST_PATH=${Qt6_ROOT}/../gcc_64 \ | ||
-DQt6LinguistTools_DIR=${Qt6_ROOT}/../gcc_64/lib/cmake/Qt6LinguistTools \ | ||
-DCMAKE_INSTALL_PREFIX=`pwd`/install \ | ||
-DANDROID_PLATFORM=android-35 \ | ||
-DBUILD_TEST=OFF \ | ||
-DBUILD_APP=OFF | ||
|
||
cmake --build . -j $(nproc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters