SDL: separate permission to read OBB file
This commit is contained in:
@@ -310,9 +310,12 @@ echo "# API is defined in file SDL_android.h: int SDL_ANDROID_OpenAudioRecording
|
||||
echo "# This option will add additional permission to Android manifest (y)/(n)" >> AndroidAppSettings.cfg
|
||||
echo AppRecordsAudio=$AppRecordsAudio >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
echo "# Application needs to access SD card. Always disable it, unless you want to access user photos and downloads. (y) / (n)" >> AndroidAppSettings.cfg
|
||||
echo "# Application needs read/write access SD card. Always disable it, unless you want to access user photos and downloads. (y) / (n)" >> AndroidAppSettings.cfg
|
||||
echo AccessSdCard=$AccessSdCard >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
echo "# Application needs to read it's own OBB file. Enable this if you are using Play Store expansion files. (y) / (n)" >> AndroidAppSettings.cfg
|
||||
echo ReadObbFile=$ReadObbFile >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
echo "# Application needs Internet access. If you disable it, you'll have to bundle all your data files inside .apk (y) / (n)" >> AndroidAppSettings.cfg
|
||||
echo AccessInternet=$AccessInternet >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
@@ -867,8 +870,15 @@ esac
|
||||
|
||||
if [ "$AccessSdCard" = "y" ]; then
|
||||
$SEDI "/==NOT_EXTERNAL_STORAGE==/ d" project/AndroidManifest.xml
|
||||
$SEDI "/==READ_OBB==/ d" project/AndroidManifest.xml
|
||||
else
|
||||
$SEDI "/==EXTERNAL_STORAGE==/ d" project/AndroidManifest.xml # Disabled by default
|
||||
if [ "$ReadObbFile" = "y" ]; then
|
||||
$SEDI "/==EXTERNAL_STORAGE==/ d" project/AndroidManifest.xml # Disabled by default
|
||||
$SEDI "/==NOT_EXTERNAL_STORAGE==/ d" project/AndroidManifest.xml
|
||||
else
|
||||
$SEDI "/==EXTERNAL_STORAGE==/ d" project/AndroidManifest.xml # Disabled by default
|
||||
$SEDI "/==READ_OBB==/ d" project/AndroidManifest.xml
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$AccessInternet" = "n" ]; then
|
||||
|
||||
@@ -62,7 +62,10 @@
|
||||
<!-- ==INTERNET== --> <uses-permission android:name="android.permission.INTERNET" />
|
||||
<!-- ==EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<!-- ==EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<!-- ==NOT_EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="18" /> <!-- App has write access to it's own dir on SD card without this permission on Android 4.4 and above -->
|
||||
<!-- ==NOT_EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />
|
||||
<!-- ==NOT_EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="18" /> <!-- App has write access to it's own dir on SD card without this permission on Android 4.4 and above -->
|
||||
<!-- ==READ_OBB== --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />
|
||||
<!-- ==READ_OBB== --> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="23" /> <!-- OBB file requires explicit permission before Marshmallow -->
|
||||
<!-- ==RECORD_AUDIO== --> <uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<!-- ==ADMOB== --> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
|
||||
|
||||
@@ -660,6 +660,9 @@ public class Settings
|
||||
nativeSetEnv( "ANDROID_PACKAGE_PATH", p.getPackageCodePath() );
|
||||
nativeSetEnv( "ANDROID_MY_OWN_APP_FILE", p.getPackageResourcePath() ); // This may be different from p.getPackageCodePath() on multi-user systems, but should still be the same .apk file
|
||||
nativeSetEnv( "ANDROID_OBB_DIR", Environment.getExternalStorageDirectory().getAbsolutePath() + "/Android/obb/" + p.getPackageName() );
|
||||
try {
|
||||
nativeSetEnv( "ANDROID_OBB_DIR", p.getObbDir().getAbsolutePath() );
|
||||
} catch (Exception eeeeeee) {}
|
||||
try {
|
||||
nativeSetEnv( "ANDROID_APP_NAME", p.getString(p.getApplicationInfo().labelRes) );
|
||||
} catch (Exception eeeeee) {}
|
||||
|
||||
@@ -7,10 +7,10 @@ AppName="SuperTux"
|
||||
AppFullName=org.lethargik.supertux2
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=05118
|
||||
AppVersionCode=05119
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="0.5.1.18"
|
||||
AppVersionName="0.5.1.19"
|
||||
|
||||
# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'
|
||||
# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu
|
||||
@@ -54,8 +54,8 @@ NeedGles2=n
|
||||
# you need this option only if you're developing 3-d app (y) or (n)
|
||||
NeedGles3=
|
||||
|
||||
# Use glshim library for provide OpenGL 1.x functionality to OpenGL ES accelerated cards (y) or (n)
|
||||
UseGlshim=
|
||||
# Use gl4es library for provide OpenGL 1.x functionality to OpenGL ES accelerated cards (y) or (n)
|
||||
UseGl4es=
|
||||
|
||||
# Application uses software video buffer - you're calling SDL_SetVideoMode() without SDL_HWSURFACE and without SDL_OPENGL,
|
||||
# this will allow small speed optimization. Enable this even when you're using SDL_HWSURFACE. (y) or (n)
|
||||
@@ -177,15 +177,21 @@ AppUsesMultitouch=n
|
||||
# This option will add additional permission to Android manifest (y)/(n)
|
||||
AppRecordsAudio=n
|
||||
|
||||
# Application needs to access SD card. Always disable it, unless you want to access user photos and downloads. (y) / (n)
|
||||
# Application needs read/write access SD card. Always disable it, unless you want to access user photos and downloads. (y) / (n)
|
||||
AccessSdCard=n
|
||||
|
||||
# Application needs to read it's own OBB file. Enable this if you are using Play Store expansion files. (y) / (n)
|
||||
ReadObbFile=y
|
||||
|
||||
# Application needs Internet access. If you disable it, you'll have to bundle all your data files inside .apk (y) / (n)
|
||||
AccessInternet=y
|
||||
|
||||
# Immersive mode - Android will hide on-screen Home/Back keys. Looks bad if you invoke Android keyboard. (y) / (n)
|
||||
ImmersiveMode=y
|
||||
|
||||
# Hide Android system mouse cursor image when USB mouse is attached (y) or (n) - the app must draw it's own mouse cursor
|
||||
HideSystemMousePointer=
|
||||
|
||||
# Application implements Android-specific routines to put to background, and will not draw anything to screen
|
||||
# between SDL_ACTIVEEVENT lost / gained notifications - you should check for them
|
||||
# rigth after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n)
|
||||
@@ -222,9 +228,18 @@ RedefinedKeysScreenKbNames="Jump Action"
|
||||
TouchscreenKeysTheme=3
|
||||
|
||||
# Redefine gamepad keys to SDL keysyms, button order is:
|
||||
# A B X Y L1 R1 L2 R2 LThumb RThumb
|
||||
# A B X Y L1 R1 L2 R2 LThumb RThumb Start Select Up Down Left Right LThumbUp LThumbDown LThumbLeft LThumbRight RThumbUp RThumbDown RThumbLeft RThumbRight
|
||||
RedefinedKeysGamepad="SPACE LCTRL SPACE LCTRL SPACE LCTRL SPACE LCTRL SPACE LCTRL"
|
||||
|
||||
# Redefine keys for the second gamepad, same as the first gamepad if not set:
|
||||
RedefinedKeysSecondGamepad=""
|
||||
|
||||
# Redefine keys for the third gamepad, same as the first gamepad if not set:
|
||||
RedefinedKeysThirdGamepad=""
|
||||
|
||||
# Redefine keys for the fourth gamepad, same as the first gamepad if not set:
|
||||
RedefinedKeysFourthGamepad=""
|
||||
|
||||
# How long to show startup menu button, in msec, 0 to disable startup menu
|
||||
StartupMenuButtonTimeout=3000
|
||||
|
||||
@@ -251,7 +266,7 @@ NDK_TOOLCHAIN_VERSION=clang
|
||||
APP_PLATFORM=
|
||||
|
||||
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
||||
# Available architectures: armeabi armeabi-v7a x86 mips arm64-v8a
|
||||
# Available architectures: armeabi-v7a x86 mips arm64-v8a
|
||||
MultiABI='armeabi-v7a x86 x86_64 arm64-v8a'
|
||||
|
||||
# Optional shared libraries to compile - removing some of them will save space
|
||||
@@ -263,13 +278,13 @@ CompiledLibraries="sdl_image boost_filesystem boost_system crypto ssl curl opena
|
||||
CustomBuildScript=n
|
||||
|
||||
# Aditional CFLAGS for application
|
||||
AppCflags='-DSUPERTUX_GLES=1 -Ijni/openal/include/AL -Ijni/boost/include -frtti -fexceptions -DHAVE_SDL=1 -O3' # -flto=thin
|
||||
AppCflags='-DSUPERTUX_GLES=1 -Ijni/openal/include/AL -Ijni/boost/include -frtti -fexceptions -DHAVE_SDL=1 -O3'
|
||||
|
||||
# Aditional C++-specific compiler flags for application, added after AppCflags
|
||||
AppCppflags='-std=gnu++11 -include limits'
|
||||
|
||||
# Additional LDFLAGS for application
|
||||
AppLdflags='-frtti -fexceptions -O3' # -flto=thin -flto-jobs=8
|
||||
AppLdflags='-frtti -fexceptions -O3'
|
||||
|
||||
# If application has headers with the same name as system headers, this option tries to fix compiler flags to make it compilable
|
||||
AppOverlapsSystemHeaders=n
|
||||
@@ -299,3 +314,6 @@ AdmobBannerSize=
|
||||
# Google Play Game Services application ID, required for cloud saves to work
|
||||
GooglePlayGameServicesId=
|
||||
|
||||
# The app will open files with following extension, file path will be added to commandline params
|
||||
AppOpenFileExtension=''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user