Merge branch 'sdl_android' of github.com:pelya/commandergenius into sdl_android
Conflicts: project/jni/application/commandergenius/commandergenius
This commit is contained in:
56
build.sh
56
build.sh
@@ -55,7 +55,8 @@ fi
|
||||
rm -f project/src/Globals.java
|
||||
}
|
||||
|
||||
[ -z "$GCCVER" ] && GCCVER=4.6
|
||||
NDK_TOOLCHAIN_VERSION=$GCCVER
|
||||
[ -z "$NDK_TOOLCHAIN_VERSION" ] && NDK_TOOLCHAIN_VERSION=4.6
|
||||
|
||||
# Set here your own NDK path if needed
|
||||
# export PATH=$PATH:~/src/endless_space/android-ndk-r7
|
||||
@@ -95,46 +96,67 @@ $quick_rebuild || rm -r -f project/bin/* # New Android SDK introduced some lame-
|
||||
cd ../../../..
|
||||
}
|
||||
|
||||
cd project && env PATH=$NDKBUILDPATH BUILD_NUM_CPUS=$NCPU nice -n19 ndk-build -j$NCPU V=1 && \
|
||||
{ grep "CustomBuildScript=y" ../AndroidAppSettings.cfg > /dev/null && \
|
||||
strip_libs() {
|
||||
grep "CustomBuildScript=y" ../AndroidAppSettings.cfg > /dev/null && \
|
||||
echo Stripping libapplication-armeabi.so by hand && \
|
||||
rm obj/local/armeabi/libapplication.so && \
|
||||
cp jni/application/src/libapplication-armeabi.so obj/local/armeabi/libapplication.so && \
|
||||
cp jni/application/src/libapplication-armeabi.so libs/armeabi/libapplication.so && \
|
||||
`which ndk-build | sed 's@/ndk-build@@'`/toolchains/arm-linux-androideabi-${GCCVER}/prebuilt/$MYARCH/bin/arm-linux-androideabi-strip --strip-unneeded libs/armeabi/libapplication.so \
|
||||
|| true ; } && \
|
||||
{ grep "CustomBuildScript=y" ../AndroidAppSettings.cfg > /dev/null && \
|
||||
`which ndk-build | sed 's@/ndk-build@@'`/toolchains/arm-linux-androideabi-${NDK_TOOLCHAIN_VERSION}/prebuilt/$MYARCH/bin/arm-linux-androideabi-strip --strip-unneeded libs/armeabi/libapplication.so
|
||||
grep "CustomBuildScript=y" ../AndroidAppSettings.cfg > /dev/null && \
|
||||
grep "MultiABI=" ../AndroidAppSettings.cfg | grep "y\\|all\\|armeabi-v7a" > /dev/null && \
|
||||
echo Stripping libapplication-armeabi-v7a.so by hand && \
|
||||
rm obj/local/armeabi-v7a/libapplication.so && \
|
||||
cp jni/application/src/libapplication-armeabi-v7a.so obj/local/armeabi-v7a/libapplication.so && \
|
||||
cp jni/application/src/libapplication-armeabi-v7a.so libs/armeabi-v7a/libapplication.so && \
|
||||
`which ndk-build | sed 's@/ndk-build@@'`/toolchains/arm-linux-androideabi-${GCCVER}/prebuilt/$MYARCH/bin/arm-linux-androideabi-strip --strip-unneeded libs/armeabi-v7a/libapplication.so \
|
||||
|| true ; } && \
|
||||
{ grep "CustomBuildScript=y" ../AndroidAppSettings.cfg > /dev/null && \
|
||||
`which ndk-build | sed 's@/ndk-build@@'`/toolchains/arm-linux-androideabi-${NDK_TOOLCHAIN_VERSION}/prebuilt/$MYARCH/bin/arm-linux-androideabi-strip --strip-unneeded libs/armeabi-v7a/libapplication.so
|
||||
grep "CustomBuildScript=y" ../AndroidAppSettings.cfg > /dev/null && \
|
||||
grep "MultiABI=" ../AndroidAppSettings.cfg | grep "armeabi-v7a-hard" > /dev/null && \
|
||||
echo Stripping libapplication-armeabi-v7a-hard.so by hand && \
|
||||
rm obj/local/armeabi-v7a-hard/libapplication.so && \
|
||||
cp jni/application/src/libapplication-armeabi-v7a-hard.so obj/local/armeabi-v7a-hard/libapplication.so && \
|
||||
cp jni/application/src/libapplication-armeabi-v7a-hard.so libs/armeabi-v7a/libapplication.so && \
|
||||
`which ndk-build | sed 's@/ndk-build@@'`/toolchains/arm-linux-androideabi-${GCCVER}/prebuilt/$MYARCH/bin/arm-linux-androideabi-strip --strip-unneeded libs/armeabi-v7a/libapplication.so \
|
||||
|| true ; } && \
|
||||
{ grep "CustomBuildScript=y" ../AndroidAppSettings.cfg > /dev/null && \
|
||||
`which ndk-build | sed 's@/ndk-build@@'`/toolchains/arm-linux-androideabi-${NDK_TOOLCHAIN_VERSION}/prebuilt/$MYARCH/bin/arm-linux-androideabi-strip --strip-unneeded libs/armeabi-v7a/libapplication.so
|
||||
grep "CustomBuildScript=y" ../AndroidAppSettings.cfg > /dev/null && \
|
||||
grep "MultiABI=" ../AndroidAppSettings.cfg | grep "all\\|mips" > /dev/null && \
|
||||
echo Stripping libapplication-mips.so by hand && \
|
||||
rm obj/local/mips/libapplication.so && \
|
||||
cp jni/application/src/libapplication-mips.so obj/local/mips/libapplication.so && \
|
||||
cp jni/application/src/libapplication-mips.so libs/mips/libapplication.so && \
|
||||
`which ndk-build | sed 's@/ndk-build@@'`/toolchains/mipsel-linux-android-${GCCVER}/prebuilt/$MYARCH/bin/mipsel-linux-android-strip --strip-unneeded libs/mips/libapplication.so \
|
||||
|| true ; } && \
|
||||
{ grep "CustomBuildScript=y" ../AndroidAppSettings.cfg > /dev/null && \
|
||||
`which ndk-build | sed 's@/ndk-build@@'`/toolchains/mipsel-linux-android-${NDK_TOOLCHAIN_VERSION}/prebuilt/$MYARCH/bin/mipsel-linux-android-strip --strip-unneeded libs/mips/libapplication.so
|
||||
grep "CustomBuildScript=y" ../AndroidAppSettings.cfg > /dev/null && \
|
||||
grep "MultiABI=" ../AndroidAppSettings.cfg | grep "all\\|x86" > /dev/null && \
|
||||
echo Stripping libapplication-x86.so by hand && \
|
||||
rm obj/local/x86/libapplication.so && \
|
||||
cp jni/application/src/libapplication-x86.so obj/local/x86/libapplication.so && \
|
||||
cp jni/application/src/libapplication-x86.so libs/x86/libapplication.so && \
|
||||
`which ndk-build | sed 's@/ndk-build@@'`/toolchains/x86-${GCCVER}/prebuilt/$MYARCH/bin/i686-linux-android-strip --strip-unneeded libs/x86/libapplication.so \
|
||||
|| true ; } && \
|
||||
`which ndk-build | sed 's@/ndk-build@@'`/toolchains/x86-${NDK_TOOLCHAIN_VERSION}/prebuilt/$MYARCH/bin/i686-linux-android-strip --strip-unneeded libs/x86/libapplication.so
|
||||
grep "CustomBuildScript=y" ../AndroidAppSettings.cfg > /dev/null && \
|
||||
grep "MultiABI=" ../AndroidAppSettings.cfg | grep "all\\|x86_64" > /dev/null && \
|
||||
echo Stripping libapplication-x86_64.so by hand && \
|
||||
rm obj/local/x86_64/libapplication.so && \
|
||||
cp jni/application/src/libapplication-x86_64.so obj/local/x86_64/libapplication.so && \
|
||||
cp jni/application/src/libapplication-x86_64.so libs/x86_64/libapplication.so && \
|
||||
`which ndk-build | sed 's@/ndk-build@@'`/toolchains/x86_64-4.9/prebuilt/$MYARCH/bin/x86_64-linux-android-strip --strip-unneeded libs/x86_64/libapplication.so
|
||||
grep "CustomBuildScript=y" ../AndroidAppSettings.cfg > /dev/null && \
|
||||
grep "MultiABI=" ../AndroidAppSettings.cfg | grep "all\\|arm64-v8a" > /dev/null && \
|
||||
echo Stripping libapplication-arm64-v8a.so by hand && \
|
||||
rm obj/local/arm64-v8a/libapplication.so && \
|
||||
cp jni/application/src/libapplication-arm64-v8a.so obj/local/arm64-v8a/libapplication.so && \
|
||||
cp jni/application/src/libapplication-arm64-v8a.so libs/arm64-v8a/libapplication.so && \
|
||||
`which ndk-build | sed 's@/ndk-build@@'`/toolchains/aarch64-linux-android-4.9/prebuilt/$MYARCH/bin/aarch64-linux-android-strip --strip-unneeded libs/arm64-v8a/libapplication.so
|
||||
grep "CustomBuildScript=y" ../AndroidAppSettings.cfg > /dev/null && \
|
||||
grep "MultiABI=" ../AndroidAppSettings.cfg | grep "all\\|mips64" > /dev/null && \
|
||||
echo Stripping libapplication-mips64.so by hand && \
|
||||
rm obj/local/mips64/libapplication.so && \
|
||||
cp jni/application/src/libapplication-mips64.so obj/local/mips64/libapplication.so && \
|
||||
cp jni/application/src/libapplication-mips64.so libs/mips64/libapplication.so && \
|
||||
`which ndk-build | sed 's@/ndk-build@@'`/toolchains/mips64el-linux-android-4.9/prebuilt/$MYARCH/bin/mips64el-linux-android-strip --strip-unneeded libs/mips64/libapplication.so
|
||||
return 0
|
||||
}
|
||||
|
||||
cd project && env PATH=$NDKBUILDPATH BUILD_NUM_CPUS=$NCPU nice -n19 ndk-build -j$NCPU V=1 && \
|
||||
strip_libs && \
|
||||
cd .. && ./copyAssets.sh && cd project && \
|
||||
{ if $build_release ; then \
|
||||
$quick_rebuild && { \
|
||||
|
||||
@@ -127,7 +127,7 @@ echo "# If you'll start Description with '!' symbol it will be enabled by defaul
|
||||
echo "# If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped" >> AndroidAppSettings.cfg
|
||||
echo "# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -" >> AndroidAppSettings.cfg
|
||||
echo "# these files are put inside .apk package by build system" >> AndroidAppSettings.cfg
|
||||
echo "# Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS" >> AndroidAppSettings.cfg
|
||||
echo "# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version, first associated with the file" >> AndroidAppSettings.cfg
|
||||
echo AppDataDownloadUrl=\"$AppDataDownloadUrl\" >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
echo "# Reset SDL config when updating application to the new version (y) / (n)" >> AndroidAppSettings.cfg
|
||||
@@ -321,13 +321,16 @@ echo "# Available menu items:" >> AndroidAppSettings.cfg
|
||||
echo "# $MenuOptionsAvailable" >> AndroidAppSettings.cfg
|
||||
echo FirstStartMenuOptions=\'$FirstStartMenuOptions\' >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
echo "# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower" >> AndroidAppSettings.cfg
|
||||
echo AppMinimumRAM=$AppMinimumRAM >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
echo "# GCC version, 4.6 (default) or 4.8, CLANG is not supported yet" >> AndroidAppSettings.cfg
|
||||
echo NDK_TOOLCHAIN_VERSION=$NDK_TOOLCHAIN_VERSION >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
echo "# Specify architectures to compile, 'all' or 'y' to compile for all architectures." >> AndroidAppSettings.cfg
|
||||
echo "# Available architectures: armeabi armeabi-v7a armeabi-v7a-hard x86 mips" >> AndroidAppSettings.cfg
|
||||
echo MultiABI=\'$MultiABI\' >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
echo "# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower" >> AndroidAppSettings.cfg
|
||||
echo AppMinimumRAM=$AppMinimumRAM >> AndroidAppSettings.cfg
|
||||
echo >> AndroidAppSettings.cfg
|
||||
echo "# Optional shared libraries to compile - removing some of them will save space" >> AndroidAppSettings.cfg
|
||||
echo "# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed" >> AndroidAppSettings.cfg
|
||||
grep 'Available' project/jni/SettingsTemplate.mk >> AndroidAppSettings.cfg
|
||||
@@ -837,7 +840,8 @@ cat project/jni/SettingsTemplate.mk | \
|
||||
sed "s^APPLICATION_SUBDIRS_BUILD :=.*^APPLICATION_SUBDIRS_BUILD := $AppSubdirsBuild^" | \
|
||||
sed "s^APPLICATION_BUILD_EXCLUDE :=.*^APPLICATION_BUILD_EXCLUDE := $AppBuildExclude^" | \
|
||||
sed "s^APPLICATION_CUSTOM_BUILD_SCRIPT :=.*^APPLICATION_CUSTOM_BUILD_SCRIPT := $CustomBuildScript^" | \
|
||||
sed "s^SDL_VERSION :=.*^SDL_VERSION := $LibSdlVersion^" >> \
|
||||
sed "s^SDL_VERSION :=.*^SDL_VERSION := $LibSdlVersion^" | \
|
||||
sed "s^NDK_TOOLCHAIN_VERSION :=.*^NDK_TOOLCHAIN_VERSION := $NDK_TOOLCHAIN_VERSION^" >> \
|
||||
project/jni/Settings.mk
|
||||
|
||||
echo Patching strings.xml
|
||||
@@ -856,6 +860,7 @@ if [ "$GooglePlayGameServicesId" = "n" -o -z "$GooglePlayGameServicesId" ] ; the
|
||||
GooglePlayGameServicesId=""
|
||||
grep 'google-play-services' project/local.properties > /dev/null && {
|
||||
$SEDI 's/.*google-play-services.*//g' project/local.properties
|
||||
rm -f project/libs/android-support-v4.jar
|
||||
}
|
||||
else
|
||||
for F in $JAVA_SRC_PATH/googleplaygameservices/*.java; do
|
||||
@@ -863,7 +868,6 @@ else
|
||||
echo Patching $F
|
||||
echo '// DO NOT EDIT THIS FILE - it is automatically generated, edit file under $JAVA_SRC_PATH dir' > project/src/$OUT
|
||||
cat $F | sed "s/^package .*;/package $AppFullName;/" >> project/src/$OUT
|
||||
rm -f project/libs/android-support-v4.jar
|
||||
done
|
||||
$SEDI "s/==GOOGLEPLAYGAMESERVICES_APP_ID==/$GooglePlayGameServicesId/g" project/res/values/strings.xml
|
||||
SDK_DIR=`grep '^sdk.dir' project/local.properties | sed 's/.*=//'`
|
||||
@@ -877,6 +881,8 @@ else
|
||||
android update project -p $SDK_DIR/extras/google/google_play_services/libproject/google-play-services_lib
|
||||
fi
|
||||
|
||||
if [ -e project/jni/application/src/project.patch ]; then patch -p1 --no-backup-if-mismatch < project/jni/application/src/project.patch || exit 1 ; fi
|
||||
|
||||
echo Cleaning up dependencies
|
||||
rm -rf project/libs/*/* project/gen
|
||||
for OUT in obj; do
|
||||
@@ -887,6 +893,8 @@ rm -rf project/$OUT/local/*/objs*/sdl-*/src/*/android
|
||||
rm -rf project/$OUT/local/*/objs*/sdl-*/src/video/SDL_video.o
|
||||
rm -rf project/$OUT/local/*/objs*/sdl-*/SDL_renderer_gles.o
|
||||
rm -rf project/$OUT/local/*/objs*/sdl_*
|
||||
rm -rf project/obj/local/*/objs*/lzma/src/XZInputStream.o
|
||||
rm -rf project/obj/local/*/objs*/liblzma.so
|
||||
# Do not rebuild several huge libraries that do not depend on SDL version
|
||||
for LIB in freetype intl jpeg png lua mad tremor xerces xml2 curl lua mikmod \
|
||||
boost boost_signals boost_thread boost_filesystem boost_date_time boost_system boost_regex boost_iostreams boost_program_options \
|
||||
@@ -901,15 +909,6 @@ done
|
||||
rm -rf project/bin/classes
|
||||
rm -rf project/bin/res
|
||||
|
||||
rm -rf project/res/drawable-xhdpi/ouya_icon.png project/res/drawable/app_icon.png
|
||||
if which convert > /dev/null; then
|
||||
mkdir -p project/res/drawable-xhdpi
|
||||
convert project/res/drawable/icon.png -resize '732x412!' project/res/drawable-xhdpi/ouya_icon.png
|
||||
convert project/res/drawable/icon.png -resize '96x96!' project/res/drawable/app_icon.png
|
||||
else
|
||||
echo "Install ImageMagick to auto-resize Ouya icon from icon.png"
|
||||
fi
|
||||
|
||||
./copyAssets.sh || exit 1
|
||||
|
||||
rm -rf project/jni/android-support
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<!-- ==GOOGLEPLAYGAMESERVICES== --> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
|
||||
</application>
|
||||
|
||||
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="19"/>
|
||||
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="21"/>
|
||||
<!-- ==INTERNET== --> <uses-permission android:name="android.permission.INTERNET"></uses-permission>
|
||||
<!-- ==EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
|
||||
<!-- ==EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>
|
||||
|
||||
@@ -55,13 +55,11 @@ import java.io.InputStream;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import java.lang.String;
|
||||
import java.util.Arrays;
|
||||
import android.text.SpannedString;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
|
||||
import org.tukaani.xz.XZInputStream;
|
||||
|
||||
|
||||
class CountingInputStream extends BufferedInputStream
|
||||
{
|
||||
@@ -284,22 +282,28 @@ class DataDownloader extends Thread
|
||||
catch( FileNotFoundException e ) {}
|
||||
catch( IOException e ) {};
|
||||
|
||||
HttpResponse response = null, responseError = null;
|
||||
HttpGet request;
|
||||
HttpResponse response = null, responseError = null;
|
||||
long totalLen = 0;
|
||||
long partialDownloadLen = 0;
|
||||
CountingInputStream stream;
|
||||
byte[] buf = new byte[16384];
|
||||
boolean DoNotUnzip = false;
|
||||
boolean FileInAssets = false;
|
||||
boolean FileInExpansion = false;
|
||||
String url = "";
|
||||
long partialDownloadLen = 0;
|
||||
|
||||
int downloadUrlIndex = 1;
|
||||
while( downloadUrlIndex < downloadUrls.length )
|
||||
{
|
||||
Log.i("SDL", "Processing download " + downloadUrls[downloadUrlIndex]);
|
||||
url = new String(downloadUrls[downloadUrlIndex]);
|
||||
|
||||
DoNotUnzip = false;
|
||||
FileInAssets = false;
|
||||
FileInExpansion = false;
|
||||
partialDownloadLen = 0;
|
||||
totalLen = 0;
|
||||
|
||||
url = new String(downloadUrls[downloadUrlIndex]);
|
||||
if(url.indexOf(":") == 0)
|
||||
{
|
||||
path = getOutFilePath(url.substring( 1, url.indexOf(":", 1) ));
|
||||
@@ -311,7 +315,26 @@ class DataDownloader extends Thread
|
||||
partialDownloadLen = partialDownload.length();
|
||||
}
|
||||
Status.setText( downloadCount + "/" + downloadTotal + ": " + res.getString(R.string.connecting_to, url) );
|
||||
if( url.indexOf("http://") == -1 && url.indexOf("https://") == -1 ) // File inside assets
|
||||
if( url.indexOf("obb:") == 0 ) // APK expansion file provided by Google Play
|
||||
{
|
||||
url = url.substring("obb:".length());
|
||||
url = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Android/obb/" +
|
||||
Parent.getPackageName() + "/" + url + "." + Parent.getPackageName() + ".obb";
|
||||
InputStream stream1 = null;
|
||||
try {
|
||||
stream1 = new FileInputStream(url);
|
||||
stream1.read();
|
||||
stream1.close();
|
||||
Log.i("SDL", "Fetching file from expansion: " + url);
|
||||
FileInExpansion = true;
|
||||
break;
|
||||
} catch( Exception e ) {
|
||||
Log.i("SDL", "Failed to open file: " + url);
|
||||
downloadUrlIndex++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if( url.indexOf("http://") == -1 && url.indexOf("https://") == -1 ) // File inside assets
|
||||
{
|
||||
InputStream stream1 = null;
|
||||
try {
|
||||
@@ -346,7 +369,6 @@ class DataDownloader extends Thread
|
||||
response = client.execute(request);
|
||||
} catch (IOException e) {
|
||||
Log.i("SDL", "Failed to connect to " + url);
|
||||
downloadUrlIndex++;
|
||||
};
|
||||
if( response != null )
|
||||
{
|
||||
@@ -356,13 +378,32 @@ class DataDownloader extends Thread
|
||||
responseError = response;
|
||||
response = null;
|
||||
downloadUrlIndex++;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
break;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
downloadUrlIndex++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( FileInAssets )
|
||||
|
||||
if( FileInExpansion )
|
||||
{
|
||||
Log.i("SDL", "Count file size: '" + url);
|
||||
try {
|
||||
totalLen = new File(url).length();
|
||||
stream = new CountingInputStream(new FileInputStream(url), 8192);
|
||||
Log.i("SDL", "Count file size: '" + url + " = " + totalLen);
|
||||
} catch( IOException e ) {
|
||||
Log.i("SDL", "Unpacking from filesystem '" + url + "' - error: " + e.toString());
|
||||
Status.setText( res.getString(R.string.error_dl_from, url) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if( FileInAssets )
|
||||
{
|
||||
int multipartCounter = 0;
|
||||
InputStream multipart = null;
|
||||
@@ -393,7 +434,7 @@ class DataDownloader extends Thread
|
||||
try {
|
||||
stream = new CountingInputStream(Parent.getAssets().open(url), 8192);
|
||||
while( stream.skip(65536) > 0 ) { };
|
||||
totalLen += stream.getBytesRead();
|
||||
totalLen = stream.getBytesRead();
|
||||
stream.close();
|
||||
stream = new CountingInputStream(Parent.getAssets().open(url), 8192);
|
||||
} catch( IOException e ) {
|
||||
@@ -421,9 +462,49 @@ class DataDownloader extends Thread
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( !copyUnpackFileStream(stream, path, url, DoNotUnzip, FileInAssets, FileInExpansion, totalLen, partialDownloadLen, response, downloadCount, downloadTotal) )
|
||||
return false;
|
||||
|
||||
OutputStream out = null;
|
||||
path = getOutFilePath(DownloadFlagFileName);
|
||||
try {
|
||||
out = new FileOutputStream( path );
|
||||
out.write(downloadUrls[downloadUrlIndex].getBytes("UTF-8"));
|
||||
out.flush();
|
||||
out.close();
|
||||
} catch( java.io.IOException e ) {
|
||||
Status.setText( res.getString(R.string.error_write, path) + ": " + e.getMessage() );
|
||||
return false;
|
||||
};
|
||||
Status.setText( downloadCount + "/" + downloadTotal + ": " + res.getString(R.string.dl_finished) );
|
||||
|
||||
try {
|
||||
stream.close();
|
||||
if( FileInExpansion )
|
||||
{
|
||||
Writer writer = new OutputStreamWriter(new FileOutputStream(url), "UTF-8");
|
||||
writer.write("Extracted and truncated\n");
|
||||
writer.close();
|
||||
Log.i("SDL", "Truncated file from expansion: " + url);
|
||||
}
|
||||
} catch( java.io.IOException e ) {
|
||||
Log.i("SDL", "Error truncating file from expansion: " + url);
|
||||
};
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
// Moved part of code to a separate method, because Android imposes a stupid limit on Java method size
|
||||
private boolean copyUnpackFileStream( CountingInputStream stream, String path, String url,
|
||||
boolean DoNotUnzip, boolean FileInAssets, boolean FileInExpansion,
|
||||
long totalLen, long partialDownloadLen, HttpResponse response,
|
||||
int downloadCount, int downloadTotal)
|
||||
{
|
||||
long updateStatusTime = 0;
|
||||
|
||||
byte[] buf = new byte[16384];
|
||||
Resources res = Parent.getResources();
|
||||
|
||||
if(DoNotUnzip)
|
||||
{
|
||||
Log.i("SDL", "Saving file '" + path + "'");
|
||||
@@ -504,6 +585,8 @@ class DataDownloader extends Thread
|
||||
if (url.endsWith(".zip.xz") || url.endsWith(".zip.xz/download"))
|
||||
try
|
||||
{
|
||||
if (!Arrays.asList(Globals.AppLibraries).contains("lzma"))
|
||||
throw new IOException("LZMA support not compiled in - add lzma to CompiledLibraries inside AndroidAppSettings.cfg");
|
||||
zip = new ZipInputStream(new XZInputStream(stream));
|
||||
}
|
||||
catch (Exception eeeee)
|
||||
@@ -651,30 +734,9 @@ class DataDownloader extends Thread
|
||||
Log.i("SDL", "Saving file '" + path + "' done");
|
||||
}
|
||||
};
|
||||
|
||||
OutputStream out = null;
|
||||
path = getOutFilePath(DownloadFlagFileName);
|
||||
try {
|
||||
out = new FileOutputStream( path );
|
||||
out.write(downloadUrls[downloadUrlIndex].getBytes("UTF-8"));
|
||||
out.flush();
|
||||
out.close();
|
||||
} catch( FileNotFoundException e ) {
|
||||
} catch( SecurityException e ) {
|
||||
} catch( java.io.IOException e ) {
|
||||
Status.setText( res.getString(R.string.error_write, path) + ": " + e.getMessage() );
|
||||
return false;
|
||||
};
|
||||
Status.setText( downloadCount + "/" + downloadTotal + ": " + res.getString(R.string.dl_finished) );
|
||||
|
||||
try {
|
||||
stream.close();
|
||||
} catch( java.io.IOException e ) {
|
||||
};
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
private void initParent()
|
||||
{
|
||||
class Callback implements Runnable
|
||||
|
||||
@@ -32,6 +32,8 @@ import javax.microedition.khronos.egl.EGLSurface;
|
||||
import javax.microedition.khronos.opengles.GL;
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
import android.opengl.EGL14; // Android 4.2 or newer
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
@@ -919,7 +921,6 @@ public class GLSurfaceView_SDL extends SurfaceView implements SurfaceHolder.Call
|
||||
mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
|
||||
mEglContext);
|
||||
|
||||
|
||||
GL gl = mEglContext.getGL();
|
||||
if (mGLWrapper != null) {
|
||||
gl = mGLWrapper.wrap(gl);
|
||||
|
||||
@@ -80,7 +80,6 @@ class Globals
|
||||
public static boolean HorizontalOrientation = true;
|
||||
public static boolean ImmersiveMode = true;
|
||||
public static boolean DownloadToSdcard = true;
|
||||
public static boolean PhoneHasTrackball = false;
|
||||
public static boolean PhoneHasArrowKeys = false;
|
||||
public static boolean UseAccelerometerAsArrowKeys = false;
|
||||
public static boolean UseTouchscreenKeyboard = true;
|
||||
@@ -92,7 +91,6 @@ class Globals
|
||||
public static boolean FloatingScreenJoystick = false;
|
||||
public static int AccelerometerSensitivity = 2;
|
||||
public static int AccelerometerCenterPos = 2;
|
||||
public static int TrackballDampening = 0;
|
||||
public static int AudioBufferConfig = 0;
|
||||
public static boolean OptionalDataDownload[] = null;
|
||||
public static int LeftClickMethod = ForceRelativeMouseMode ? Mouse.LEFT_CLICK_WITH_TAP_OR_TIMEOUT : Mouse.LEFT_CLICK_NORMAL;
|
||||
|
||||
@@ -92,13 +92,13 @@ class Settings
|
||||
out.writeInt(SETTINGS_FILE_VERSION);
|
||||
out.writeBoolean(Globals.DownloadToSdcard);
|
||||
out.writeBoolean(Globals.PhoneHasArrowKeys);
|
||||
out.writeBoolean(Globals.PhoneHasTrackball);
|
||||
out.writeBoolean(false);
|
||||
out.writeBoolean(Globals.UseAccelerometerAsArrowKeys);
|
||||
out.writeBoolean(Globals.UseTouchscreenKeyboard);
|
||||
out.writeInt(Globals.TouchscreenKeyboardSize);
|
||||
out.writeInt(Globals.AccelerometerSensitivity);
|
||||
out.writeInt(Globals.AccelerometerCenterPos);
|
||||
out.writeInt(Globals.TrackballDampening);
|
||||
out.writeInt(0);
|
||||
out.writeInt(Globals.AudioBufferConfig);
|
||||
out.writeInt(Globals.TouchscreenKeyboardTheme);
|
||||
out.writeInt(Globals.RightClickMethod);
|
||||
@@ -274,13 +274,13 @@ class Settings
|
||||
throw new IOException();
|
||||
Globals.DownloadToSdcard = settingsFile.readBoolean();
|
||||
Globals.PhoneHasArrowKeys = settingsFile.readBoolean();
|
||||
Globals.PhoneHasTrackball = settingsFile.readBoolean();
|
||||
settingsFile.readBoolean();
|
||||
Globals.UseAccelerometerAsArrowKeys = settingsFile.readBoolean();
|
||||
Globals.UseTouchscreenKeyboard = settingsFile.readBoolean();
|
||||
Globals.TouchscreenKeyboardSize = settingsFile.readInt();
|
||||
Globals.AccelerometerSensitivity = settingsFile.readInt();
|
||||
Globals.AccelerometerCenterPos = settingsFile.readInt();
|
||||
Globals.TrackballDampening = settingsFile.readInt();
|
||||
settingsFile.readInt();
|
||||
Globals.AudioBufferConfig = settingsFile.readInt();
|
||||
Globals.TouchscreenKeyboardTheme = settingsFile.readInt();
|
||||
Globals.RightClickMethod = settingsFile.readInt();
|
||||
@@ -546,8 +546,6 @@ class Settings
|
||||
nativeSetVideoForceSoftwareMode();
|
||||
if( Globals.SwVideoMode && Globals.MultiThreadedVideo )
|
||||
nativeSetVideoMultithreaded();
|
||||
if( Globals.PhoneHasTrackball )
|
||||
nativeSetTrackballUsed();
|
||||
applyMouseEmulationOptions();
|
||||
nativeSetJoystickUsed( Globals.AppUsesThirdJoystick ? 3 : (Globals.AppUsesSecondJoystick ? 2 : (Globals.AppUsesJoystick ? 1 : 0)) );
|
||||
if( Globals.AppUsesAccelerometer )
|
||||
@@ -555,7 +553,6 @@ class Settings
|
||||
if( Globals.AppUsesMultitouch )
|
||||
nativeSetMultitouchUsed();
|
||||
nativeSetAccelerometerSettings(Globals.AccelerometerSensitivity, Globals.AccelerometerCenterPos);
|
||||
nativeSetTrackballDampening(Globals.TrackballDampening);
|
||||
if( Globals.UseTouchscreenKeyboard )
|
||||
{
|
||||
boolean screenKbReallyUsed = false;
|
||||
@@ -856,8 +853,6 @@ class Settings
|
||||
return true;
|
||||
}
|
||||
|
||||
private static native void nativeSetTrackballUsed();
|
||||
private static native void nativeSetTrackballDampening(int value);
|
||||
private static native void nativeSetAccelerometerSettings(int sensitivity, int centerPos);
|
||||
private static native void nativeSetMouseUsed(int RightClickMethod, int ShowScreenUnderFinger, int LeftClickMethod,
|
||||
int MoveMouseWithJoystick, int ClickMouseWithDpad, int MaxForce, int MaxRadius,
|
||||
|
||||
@@ -123,8 +123,6 @@ abstract class DifferentTouchInput
|
||||
Log.i("SDL", "Device board: " + android.os.Build.BOARD);
|
||||
if( android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH )
|
||||
{
|
||||
if( DetectCrappyDragonRiseDatexGamepad() )
|
||||
return CrappyDragonRiseDatexGamepadInputWhichNeedsItsOwnHandlerBecauseImTooCheapAndStupidToBuyProperGamepad.Holder.sInstance;
|
||||
//return IcsTouchInput.Holder.sInstance;
|
||||
return AutoDetectTouchInput.Holder.sInstance;
|
||||
}
|
||||
@@ -145,12 +143,6 @@ abstract class DifferentTouchInput
|
||||
}
|
||||
}
|
||||
}
|
||||
private static boolean DetectCrappyDragonRiseDatexGamepad()
|
||||
{
|
||||
if( CrappyDragonRiseDatexGamepadInputWhichNeedsItsOwnHandlerBecauseImTooCheapAndStupidToBuyProperGamepad.Holder.sInstance == null )
|
||||
return false;
|
||||
return CrappyDragonRiseDatexGamepadInputWhichNeedsItsOwnHandlerBecauseImTooCheapAndStupidToBuyProperGamepad.Holder.sInstance.detect();
|
||||
}
|
||||
|
||||
private static class SingleTouchInput extends DifferentTouchInput
|
||||
{
|
||||
@@ -388,10 +380,6 @@ abstract class DifferentTouchInput
|
||||
// Joysticks are supported since Honeycomb, but I don't care about it, because very little devices have it
|
||||
if( (event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) == InputDevice.SOURCE_CLASS_JOYSTICK )
|
||||
{
|
||||
DemoGLSurfaceView.nativeGamepadAnalogJoystickInput(
|
||||
event.getAxisValue(MotionEvent.AXIS_X), event.getAxisValue(MotionEvent.AXIS_Y),
|
||||
event.getAxisValue(MotionEvent.AXIS_Z), event.getAxisValue(MotionEvent.AXIS_RZ),
|
||||
event.getAxisValue(MotionEvent.AXIS_RTRIGGER), event.getAxisValue(MotionEvent.AXIS_LTRIGGER) );
|
||||
// event.getAxisValue(AXIS_HAT_X) and event.getAxisValue(AXIS_HAT_Y) are joystick arrow keys, on Nvidia Shield and some other joysticks
|
||||
if( event.getAxisValue(MotionEvent.AXIS_HAT_X) != hatX )
|
||||
{
|
||||
@@ -415,6 +403,11 @@ abstract class DifferentTouchInput
|
||||
else
|
||||
DemoGLSurfaceView.nativeKey(hatY < 0.0f ? KeyEvent.KEYCODE_DPAD_UP : KeyEvent.KEYCODE_DPAD_DOWN, 1, 0);
|
||||
}
|
||||
DemoGLSurfaceView.nativeGamepadAnalogJoystickInput(
|
||||
event.getAxisValue(MotionEvent.AXIS_X), event.getAxisValue(MotionEvent.AXIS_Y),
|
||||
event.getAxisValue(MotionEvent.AXIS_Z), event.getAxisValue(MotionEvent.AXIS_RZ),
|
||||
event.getAxisValue(MotionEvent.AXIS_RTRIGGER), event.getAxisValue(MotionEvent.AXIS_LTRIGGER),
|
||||
(hatX == 0.0f && hatY == 0.0f) ? 0 : 1 );
|
||||
return;
|
||||
}
|
||||
// Process mousewheel
|
||||
@@ -454,36 +447,6 @@ abstract class DifferentTouchInput
|
||||
super.process(event);
|
||||
}
|
||||
}
|
||||
private static class CrappyDragonRiseDatexGamepadInputWhichNeedsItsOwnHandlerBecauseImTooCheapAndStupidToBuyProperGamepad extends IcsTouchInput
|
||||
{
|
||||
private static class Holder
|
||||
{
|
||||
private static final CrappyDragonRiseDatexGamepadInputWhichNeedsItsOwnHandlerBecauseImTooCheapAndStupidToBuyProperGamepad sInstance = new CrappyDragonRiseDatexGamepadInputWhichNeedsItsOwnHandlerBecauseImTooCheapAndStupidToBuyProperGamepad();
|
||||
}
|
||||
public void processGenericEvent(final MotionEvent event)
|
||||
{
|
||||
super.processGenericEvent(event);
|
||||
}
|
||||
public boolean detect()
|
||||
{
|
||||
int[] devIds = InputDevice.getDeviceIds();
|
||||
for( int id : devIds )
|
||||
{
|
||||
InputDevice device = InputDevice.getDevice(id);
|
||||
if( device == null )
|
||||
continue;
|
||||
System.out.println("libSDL: input device ID " + id + " type " + device.getSources() + " name " + device.getName() );
|
||||
if( (device.getSources() & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD &&
|
||||
(device.getSources() & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK &&
|
||||
device.getName().indexOf("DragonRise Inc") == 0 )
|
||||
{
|
||||
System.out.println("libSDL: Detected crappy DragonRise gamepad, enabling special hack for it. Please press button labeled 'Analog', otherwise it won't work, because it's cheap and crappy");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
private static class CrappyMtkTabletWithBrokenTouchDrivers extends IcsTouchInput
|
||||
{
|
||||
private static class Holder
|
||||
@@ -1073,7 +1036,7 @@ class DemoGLSurfaceView extends GLSurfaceView_SDL {
|
||||
public static native void nativeHardwareMouseDetected( int detected );
|
||||
public static native void nativeMouseButtonsPressed( int buttonId, int pressedState );
|
||||
public static native void nativeMouseWheel( int scrollX, int scrollY );
|
||||
public static native void nativeGamepadAnalogJoystickInput( float stick1x, float stick1y, float stick2x, float stick2y, float rtrigger, float ltrigger );
|
||||
public static native void nativeGamepadAnalogJoystickInput( float stick1x, float stick1y, float stick2x, float stick2y, float rtrigger, float ltrigger, int usingHat );
|
||||
}
|
||||
|
||||
|
||||
|
||||
160
project/java/XZInputStream.java
Normal file
160
project/java/XZInputStream.java
Normal file
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Java source code (C) 2009-2014 Sergii Pylypenko
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
package net.sourceforge.clonekeenplus;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.EOFException;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* Decompresses a .xz file in streamed mode (no seeking).
|
||||
* This is a copy of code from http://git.tukaani.org/xz-java.git
|
||||
* but using liblzma and JNI instead of Java, because Java heap
|
||||
* is very limited, and we're hitting memory limit on emulator.
|
||||
*/
|
||||
public class XZInputStream extends InputStream
|
||||
{
|
||||
private long nativeData = 0;
|
||||
private InputStream in = null;
|
||||
private final byte[] inBuf = new byte[8192];
|
||||
private int inOffset = 0;
|
||||
private int inAvailable = 0;
|
||||
private boolean outBufEof = false;
|
||||
private int offsets[] = new int[2];
|
||||
|
||||
private final byte[] tempBuf = new byte[1];
|
||||
|
||||
public XZInputStream(InputStream in) throws IOException
|
||||
{
|
||||
this.in = in;
|
||||
if (in == null)
|
||||
{
|
||||
throw new NullPointerException("InputStream == null");
|
||||
}
|
||||
nativeData = nativeInit();
|
||||
if (nativeData == 0)
|
||||
{
|
||||
throw new OutOfMemoryError("Cannot initialize JNI liblzma object");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int available() throws IOException
|
||||
{
|
||||
return 0; // Don't care
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws IOException
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (nativeData != 0)
|
||||
nativeClose(nativeData);
|
||||
nativeData = 0;
|
||||
if (in != null)
|
||||
{
|
||||
try {
|
||||
in.close();
|
||||
} finally {
|
||||
in = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void finalize() throws IOException
|
||||
{
|
||||
try {
|
||||
close();
|
||||
} finally {
|
||||
try {
|
||||
super.finalize();
|
||||
} catch (Throwable t) {
|
||||
throw new AssertionError(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read() throws IOException
|
||||
{
|
||||
return read(tempBuf, 0, 1) == -1 ? -1 : (tempBuf[0] & 0xFF);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int read(byte[] outBuf, int outOffset, int outCount) throws IOException
|
||||
{
|
||||
//Log.i("SDL", "XZInputStream.read: outOffset " + outOffset + " outCount " + outCount + " outBufEof " + outBufEof +
|
||||
// " inOffset " + inOffset + " inAvailable " + inAvailable);
|
||||
if (outBufEof)
|
||||
return -1;
|
||||
if (outCount <= 0)
|
||||
return 0;
|
||||
|
||||
int oldOutOffset = outOffset;
|
||||
|
||||
if (inOffset >= inAvailable && inAvailable != -1)
|
||||
{
|
||||
inAvailable = in.read(inBuf, 0, inBuf.length);
|
||||
inOffset = 0;
|
||||
//Log.i("SDL", "XZInputStream.read: in.read: inOffset " + inOffset + " inAvailable " + inAvailable);
|
||||
}
|
||||
|
||||
offsets[0] = inOffset;
|
||||
offsets[1] = outOffset;
|
||||
int ret = nativeRead(nativeData, inBuf, inAvailable, outBuf, outCount, offsets);
|
||||
inOffset = offsets[0];
|
||||
outOffset = offsets[1];
|
||||
//Log.i("SDL", "XZInputStream.read: nativeRead: outOffset " + outOffset + " outCount " + outCount + " outBufEof " + outBufEof +
|
||||
// " inOffset " + inOffset + " inAvailable " + inAvailable + " ret " + ret);
|
||||
|
||||
if (ret != 0)
|
||||
{
|
||||
if (ret == 1)
|
||||
{
|
||||
if (inOffset < inAvailable)
|
||||
throw new IOException("Garbage at the end of LZMA stream");
|
||||
if (inAvailable != -1)
|
||||
inAvailable = in.read(inBuf, 0, inBuf.length);
|
||||
if (inAvailable != -1)
|
||||
throw new IOException("Garbage at the end of LZMA stream");
|
||||
outBufEof = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new IOException("LZMA error " + ret);
|
||||
}
|
||||
}
|
||||
|
||||
//Log.i("SDL", "XZInputStream.read: returning " + (outOffset - oldOutOffset));
|
||||
return outOffset - oldOutOffset;
|
||||
}
|
||||
|
||||
private native long nativeInit();
|
||||
private native void nativeClose(long nativeData);
|
||||
private native int nativeRead(long nativeData, byte[] inBuf, int inAvailable, byte[] outBuf, int outCount, int[] offsets);
|
||||
}
|
||||
|
||||
@@ -6,13 +6,3 @@ APP_STL := gnustl_static
|
||||
APP_CFLAGS := -O3 -DNDEBUG -g # arm-linux-androideabi-4.4.3 crashes in -O0 mode on SDL sources
|
||||
APP_PLATFORM := android-14 # Android 4.0, it should be backward compatible to previous versions
|
||||
APP_PIE := false # This feature makes executables incompatible to Android API 15 or lower
|
||||
|
||||
# Global compiler flags
|
||||
ifneq ($(filter armeabi-v7a-hard, $(APP_ABI)),)
|
||||
# Link-time optimization enabled for optimization junkies. -O999 etc
|
||||
#APP_CFLAGS := -flto
|
||||
#APP_CXXFLAGS := -flto
|
||||
#APP_LDFLAGS := -flto
|
||||
# Latest GCC got better LTO support
|
||||
#NDK_TOOLCHAIN_VERSION := 4.8
|
||||
endif
|
||||
|
||||
@@ -46,3 +46,9 @@ SDL_ADDITIONAL_CFLAGS := -DSDL_ANDROID_KEYCODE_MOUSE=UNKNOWN -DSDL_ANDROID_KEYCO
|
||||
|
||||
SDL_VERSION := 1.2
|
||||
|
||||
# Link-time optimization enabled for optimization junkies. -O999 etc
|
||||
#APP_CFLAGS := -flto
|
||||
#APP_CXXFLAGS := -flto
|
||||
#APP_LDFLAGS := -flto
|
||||
# Latest GCC got better LTO support
|
||||
NDK_TOOLCHAIN_VERSION := 4.6
|
||||
|
||||
@@ -213,7 +213,7 @@ FirstStartMenuOptions='SettingsMenu.DummyMenu'
|
||||
|
||||
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
||||
# Available architectures: armeabi armeabi-v7a armeabi-v7a-hard x86 mips
|
||||
MultiABI='armeabi-v7a'
|
||||
MultiABI='armeabi-v7a armeabi'
|
||||
|
||||
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
|
||||
AppMinimumRAM=0
|
||||
@@ -221,7 +221,7 @@ AppMinimumRAM=0
|
||||
# Optional shared libraries to compile - removing some of them will save space
|
||||
# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed
|
||||
# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2
|
||||
CompiledLibraries="sdl_image android_support"
|
||||
CompiledLibraries="sdl_image"
|
||||
|
||||
# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n)
|
||||
CustomBuildScript=n
|
||||
|
||||
@@ -445,6 +445,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK);
|
||||
SDL_EnableUNICODE(1);
|
||||
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
|
||||
SDL_Joystick * joysticks[6];
|
||||
for( i = 0; i < 6; i++ )
|
||||
joysticks[i] = SDL_JoystickOpen(i);
|
||||
@@ -555,6 +556,7 @@ int main(int argc, char* argv[])
|
||||
memset(gamepads, 0, sizeof(gamepads));
|
||||
|
||||
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "sizeof(int) %d long %d long long %d size_t %d", sizeof(int), sizeof(long), sizeof(long long), sizeof(size_t));
|
||||
/*
|
||||
wchar_t ss[256];
|
||||
const wchar_t *ss2 = L"String 2 ЕНГ ---";
|
||||
swprintf(ss, 256, L"String ЙЦУК --- %ls", ss2);
|
||||
@@ -568,6 +570,7 @@ int main(int argc, char* argv[])
|
||||
sprintf(ss4, "%ls", ss);
|
||||
}
|
||||
__android_log_print(ANDROID_LOG_VERBOSE, "Ballfield", "swprintf: len %d data %s: %s", wcslen(ss), ss3, ss4);
|
||||
*/
|
||||
|
||||
__android_log_print(ANDROID_LOG_VERBOSE, "Ballfield", "On-screen buttons:");
|
||||
for(i = 0; i < SDL_ANDROID_SCREENKEYBOARD_BUTTON_NUM; i++)
|
||||
@@ -746,6 +749,14 @@ int main(int argc, char* argv[])
|
||||
x_speed = 500.0 * sin(t * 0.37);
|
||||
y_speed = 500.0 * sin(t * 0.53);
|
||||
z_speed = 400.0 * sin(t * 0.21);
|
||||
if( SDL_GetKeyState(NULL)[SDLK_LEFT] )
|
||||
x_speed -= 100000 * dt;
|
||||
if( SDL_GetKeyState(NULL)[SDLK_RIGHT] )
|
||||
x_speed += 100000 * dt;
|
||||
if( SDL_GetKeyState(NULL)[SDLK_UP] )
|
||||
y_speed -= 100000 * dt;
|
||||
if( SDL_GetKeyState(NULL)[SDLK_DOWN] )
|
||||
y_speed += 100000 * dt;
|
||||
|
||||
ballfield_move(balls, x_speed, y_speed, z_speed);
|
||||
x_offs -= x_speed;
|
||||
|
||||
@@ -23,7 +23,7 @@ InhibitSuspend=n
|
||||
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -
|
||||
# these files are put inside .apk package by build system
|
||||
# Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS
|
||||
AppDataDownloadUrl="data file|files.zip"
|
||||
AppDataDownloadUrl="!!data file|files.zip"
|
||||
|
||||
# Video color depth - 16 BPP is the fastest and supported for all modes, 24 bpp is supported only
|
||||
# with SwVideoMode=y, SDL_OPENGL mode supports everything. (16)/(24)/(32)
|
||||
@@ -161,7 +161,7 @@ StartupMenuButtonTimeout=3000
|
||||
|
||||
# Menu items to hide from startup menu, available menu items:
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout
|
||||
HiddenMenuOptions=''
|
||||
HiddenMenuOptions='SettingsMenuMisc.OptionalDownloadConfig'
|
||||
|
||||
# Menu items to show at startup - this is Java code snippet, leave empty for default
|
||||
# new SettingsMenuMisc.ShowReadme(), (AppUsesMouse \&\& \! ForceRelativeMouseMode \? new SettingsMenuMouse.DisplaySizeConfig(true) : new SettingsMenu.DummyMenu()), new SettingsMenuMisc.OptionalDownloadConfig(true), new SettingsMenuMisc.GyroscopeCalibration()
|
||||
@@ -171,7 +171,7 @@ FirstStartMenuOptions=''
|
||||
|
||||
# Enable multi-ABI binary, with hardware FPU support - it will also work on old devices,
|
||||
# but .apk size is 2x bigger (y) / (n) / (x86) / (all)
|
||||
MultiABI=all
|
||||
MultiABI='armeabi-v7a'
|
||||
|
||||
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
|
||||
AppMinimumRAM=256
|
||||
@@ -191,7 +191,7 @@ DeleteFilesOnUpgrade="%"
|
||||
# Optional shared libraries to compile - removing some of them will save space
|
||||
# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed
|
||||
# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2
|
||||
CompiledLibraries="sdl_image guichan"
|
||||
CompiledLibraries="sdl_image sdl_ttf guichan"
|
||||
|
||||
# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n)
|
||||
CustomBuildScript=n
|
||||
|
||||
Binary file not shown.
@@ -1,23 +1,23 @@
|
||||
<container name="top" width="640" height="480">
|
||||
<label name="logo_text" caption="Simple example of using XmlGui" />
|
||||
<button x="5" y="20" name="exit" caption="Please click to exit" />
|
||||
<icon name="logo" x="250" y="160" image="darkbitslogo_by_haiko.bmp" />
|
||||
<dropdown name="dp" x="100" y="100">
|
||||
<li>Item 1</li>
|
||||
<li>Item 2</li>
|
||||
<li>Item 3</li>
|
||||
</dropdown>
|
||||
<listbox name="lb" x="200" y="100">
|
||||
<li>Item 1</li>
|
||||
<li>Item 2</li>
|
||||
<li>Item 3</li>
|
||||
</listbox>
|
||||
<textfield name="tf" text="simple text" x="5" y="300" />
|
||||
<scrollarea name="sc" x="300" y="5" width="100" height="100">
|
||||
<textbox name="tb" text="simple textbox
|
||||
ddjdjd" />
|
||||
</scrollarea>
|
||||
<window name="wnd" caption="Drag me!" x="100" y="200">
|
||||
<icon name="logo_in_wnd" x="0" y="0" image="darkbitslogo_by_haiko.bmp" />
|
||||
</window>
|
||||
<container name="top" width="640" height="480">
|
||||
<label name="logo_text" caption="Simple example of using XmlGui АбВгЁ" />
|
||||
<button x="5" y="20" name="exit" caption="Please click to exit АбВгЁ" />
|
||||
<icon name="logo" x="250" y="160" image="darkbitslogo_by_haiko.bmp" />
|
||||
<dropdown name="dp" x="100" y="100">
|
||||
<li>Item 1</li>
|
||||
<li>Item 2</li>
|
||||
<li>Item 3</li>
|
||||
</dropdown>
|
||||
<listbox name="lb" x="200" y="100">
|
||||
<li>Item 1</li>
|
||||
<li>Item 2</li>
|
||||
<li>Item 3</li>
|
||||
</listbox>
|
||||
<textfield name="tf" text="simple text" x="5" y="300" />
|
||||
<scrollarea name="sc" x="300" y="5" width="100" height="100">
|
||||
<textbox name="tb" text="simple textbox
|
||||
ddjdjd" />
|
||||
</scrollarea>
|
||||
<window name="wnd" caption="Drag me!" x="100" y="200">
|
||||
<icon name="logo_in_wnd" x="0" y="0" image="darkbitslogo_by_haiko.bmp" />
|
||||
</window>
|
||||
</container>
|
||||
@@ -1,120 +1,122 @@
|
||||
/*
|
||||
* Code that sets up an SDL application with Guichan using the
|
||||
* Guichan SDL back end.
|
||||
*/
|
||||
|
||||
#include <guichan.hpp>
|
||||
#include <guichan/sdl.hpp>
|
||||
|
||||
namespace sdl
|
||||
{
|
||||
bool running = true;
|
||||
SDL_Surface* screen;
|
||||
|
||||
// All back ends contain objects to make Guichan work on a
|
||||
// specific target - in this case SDL - and they are a Graphics
|
||||
// object to make Guichan able to draw itself using SDL, an
|
||||
// input objec to make Guichan able to get user input using SDL
|
||||
// and an ImageLoader object to make Guichan able to load images
|
||||
// using SDL.
|
||||
gcn::SDLGraphics* graphics;
|
||||
gcn::SDLInput* input;
|
||||
gcn::SDLImageLoader* imageLoader;
|
||||
|
||||
/**
|
||||
* Initialises the SDL application. This function creates the global
|
||||
* Gui object that can be populated by various examples.
|
||||
*/
|
||||
void init()
|
||||
{
|
||||
// We simply initialise SDL as we would do with any SDL application.
|
||||
SDL_Init(SDL_INIT_VIDEO);
|
||||
screen = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE);
|
||||
// We want unicode for the SDLInput object to function properly.
|
||||
SDL_EnableUNICODE(1);
|
||||
// We also want to enable key repeat.
|
||||
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
|
||||
|
||||
// Now it's time to initialise the Guichan SDL back end.
|
||||
|
||||
imageLoader = new gcn::SDLImageLoader();
|
||||
// The ImageLoader Guichan should use needs to be passed to the Image object
|
||||
// using a static function.
|
||||
gcn::Image::setImageLoader(imageLoader);
|
||||
graphics = new gcn::SDLGraphics();
|
||||
// The Graphics object needs a target to draw to, in this case it's the
|
||||
// screen surface, but any surface will do, it doesn't have to be the screen.
|
||||
graphics->setTarget(screen);
|
||||
input = new gcn::SDLInput();
|
||||
|
||||
// Now we create the Gui object to be used with this SDL application.
|
||||
globals::gui = new gcn::Gui();
|
||||
// The Gui object needs a Graphics to be able to draw itself and an Input
|
||||
// object to be able to check for user input. In this case we provide the
|
||||
// Gui object with SDL implementations of these objects hence making Guichan
|
||||
// able to utilise SDL.
|
||||
globals::gui->setGraphics(graphics);
|
||||
globals::gui->setInput(input);
|
||||
}
|
||||
|
||||
/**
|
||||
* Halts the SDL application.
|
||||
*/
|
||||
void halt()
|
||||
{
|
||||
delete globals::gui;
|
||||
|
||||
delete imageLoader;
|
||||
delete input;
|
||||
delete graphics;
|
||||
|
||||
SDL_Quit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the SDL application.
|
||||
*/
|
||||
void run()
|
||||
{
|
||||
// The main loop
|
||||
while(running)
|
||||
{
|
||||
// Check user input
|
||||
SDL_Event event;
|
||||
while(SDL_PollEvent(&event))
|
||||
{
|
||||
if (event.type == SDL_KEYDOWN)
|
||||
{
|
||||
if (event.key.keysym.sym == SDLK_ESCAPE)
|
||||
{
|
||||
running = false;
|
||||
}
|
||||
if (event.key.keysym.sym == SDLK_f)
|
||||
{
|
||||
if (event.key.keysym.mod & KMOD_CTRL)
|
||||
{
|
||||
// Works with X11 only
|
||||
SDL_WM_ToggleFullScreen(screen);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(event.type == SDL_QUIT)
|
||||
{
|
||||
running = false;
|
||||
}
|
||||
|
||||
// After we have manually checked user input with SDL for
|
||||
// any attempt by the user to halt the application we feed
|
||||
// the input to Guichan by pushing the input to the Input
|
||||
// object.
|
||||
input->pushInput(event);
|
||||
}
|
||||
// Now we let the Gui object perform its logic.
|
||||
globals::gui->logic();
|
||||
// Now we let the Gui object draw itself.
|
||||
globals::gui->draw();
|
||||
// Finally we update the screen.
|
||||
SDL_Flip(screen);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Code that sets up an SDL application with Guichan using the
|
||||
* Guichan SDL back end.
|
||||
*/
|
||||
|
||||
#include <guichan.hpp>
|
||||
#include <guichan/sdl.hpp>
|
||||
#include <guichan/contrib/sdl/sdltruetypefont.hpp>
|
||||
|
||||
namespace sdl
|
||||
{
|
||||
bool running = true;
|
||||
SDL_Surface* screen;
|
||||
|
||||
// All back ends contain objects to make Guichan work on a
|
||||
// specific target - in this case SDL - and they are a Graphics
|
||||
// object to make Guichan able to draw itself using SDL, an
|
||||
// input objec to make Guichan able to get user input using SDL
|
||||
// and an ImageLoader object to make Guichan able to load images
|
||||
// using SDL.
|
||||
gcn::SDLGraphics* graphics;
|
||||
gcn::SDLInput* input;
|
||||
gcn::SDLImageLoader* imageLoader;
|
||||
|
||||
/**
|
||||
* Initialises the SDL application. This function creates the global
|
||||
* Gui object that can be populated by various examples.
|
||||
*/
|
||||
void init()
|
||||
{
|
||||
// We simply initialise SDL as we would do with any SDL application.
|
||||
SDL_Init(SDL_INIT_VIDEO);
|
||||
screen = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE);
|
||||
// We want unicode for the SDLInput object to function properly.
|
||||
SDL_EnableUNICODE(1);
|
||||
// We also want to enable key repeat.
|
||||
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
|
||||
TTF_Init();
|
||||
|
||||
// Now it's time to initialise the Guichan SDL back end.
|
||||
|
||||
imageLoader = new gcn::SDLImageLoader();
|
||||
// The ImageLoader Guichan should use needs to be passed to the Image object
|
||||
// using a static function.
|
||||
gcn::Image::setImageLoader(imageLoader);
|
||||
graphics = new gcn::SDLGraphics();
|
||||
// The Graphics object needs a target to draw to, in this case it's the
|
||||
// screen surface, but any surface will do, it doesn't have to be the screen.
|
||||
graphics->setTarget(screen);
|
||||
input = new gcn::SDLInput();
|
||||
|
||||
// Now we create the Gui object to be used with this SDL application.
|
||||
globals::gui = new gcn::Gui();
|
||||
// The Gui object needs a Graphics to be able to draw itself and an Input
|
||||
// object to be able to check for user input. In this case we provide the
|
||||
// Gui object with SDL implementations of these objects hence making Guichan
|
||||
// able to utilise SDL.
|
||||
globals::gui->setGraphics(graphics);
|
||||
globals::gui->setInput(input);
|
||||
}
|
||||
|
||||
/**
|
||||
* Halts the SDL application.
|
||||
*/
|
||||
void halt()
|
||||
{
|
||||
delete globals::gui;
|
||||
|
||||
delete imageLoader;
|
||||
delete input;
|
||||
delete graphics;
|
||||
|
||||
SDL_Quit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the SDL application.
|
||||
*/
|
||||
void run()
|
||||
{
|
||||
// The main loop
|
||||
while(running)
|
||||
{
|
||||
// Check user input
|
||||
SDL_Event event;
|
||||
while(SDL_PollEvent(&event))
|
||||
{
|
||||
if (event.type == SDL_KEYDOWN)
|
||||
{
|
||||
if (event.key.keysym.sym == SDLK_ESCAPE)
|
||||
{
|
||||
running = false;
|
||||
}
|
||||
if (event.key.keysym.sym == SDLK_f)
|
||||
{
|
||||
if (event.key.keysym.mod & KMOD_CTRL)
|
||||
{
|
||||
// Works with X11 only
|
||||
SDL_WM_ToggleFullScreen(screen);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(event.type == SDL_QUIT)
|
||||
{
|
||||
running = false;
|
||||
}
|
||||
|
||||
// After we have manually checked user input with SDL for
|
||||
// any attempt by the user to halt the application we feed
|
||||
// the input to Guichan by pushing the input to the Input
|
||||
// object.
|
||||
input->pushInput(event);
|
||||
}
|
||||
// Now we let the Gui object perform its logic.
|
||||
globals::gui->logic();
|
||||
// Now we let the Gui object draw itself.
|
||||
globals::gui->draw();
|
||||
// Finally we update the screen.
|
||||
SDL_Flip(screen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,182 +1,183 @@
|
||||
/**
|
||||
* Code to populate a global Gui object with all the widgets
|
||||
* of Guichan.
|
||||
*/
|
||||
|
||||
namespace widgets
|
||||
{
|
||||
gcn::ImageFont* font;
|
||||
gcn::Container* top;
|
||||
gcn::Label* label;
|
||||
gcn::Icon* icon;
|
||||
gcn::Button* button;
|
||||
gcn::TextField* textField;
|
||||
gcn::TextBox* textBox;
|
||||
gcn::ScrollArea* textBoxScrollArea;
|
||||
gcn::ListBox* listBox;
|
||||
gcn::DropDown* dropDown;
|
||||
gcn::CheckBox* checkBox1;
|
||||
gcn::CheckBox* checkBox2;
|
||||
gcn::RadioButton* radioButton1;
|
||||
gcn::RadioButton* radioButton2;
|
||||
gcn::RadioButton* radioButton3;
|
||||
gcn::Slider* slider;
|
||||
gcn::Image *image;
|
||||
gcn::Window *window;
|
||||
gcn::Image *darkbitsImage;
|
||||
gcn::Icon* darkbitsIcon;
|
||||
gcn::TabbedArea* tabbedArea;
|
||||
gcn::Button* tabOneButton;
|
||||
gcn::CheckBox* tabTwoCheckBox;
|
||||
|
||||
/*
|
||||
* List boxes and drop downs need an instance of a list model
|
||||
* in order to display a list.
|
||||
*/
|
||||
class DemoListModel : public gcn::ListModel
|
||||
{
|
||||
public:
|
||||
int getNumberOfElements()
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
std::string getElementAt(int i)
|
||||
{
|
||||
switch(i)
|
||||
{
|
||||
case 0:
|
||||
return std::string("zero");
|
||||
case 1:
|
||||
return std::string("one");
|
||||
case 2:
|
||||
return std::string("two");
|
||||
case 3:
|
||||
return std::string("three");
|
||||
case 4:
|
||||
return std::string("four");
|
||||
default: // Just to keep warnings away
|
||||
return std::string("");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
DemoListModel demoListModel;
|
||||
|
||||
/**
|
||||
* Initialises the widgets example by populating the global Gui
|
||||
* object.
|
||||
*/
|
||||
void init()
|
||||
{
|
||||
// We first create a container to be used as the top widget.
|
||||
// The top widget in Guichan can be any kind of widget, but
|
||||
// in order to make the Gui contain more than one widget we
|
||||
// make the top widget a container.
|
||||
top = new gcn::Container();
|
||||
// We set the dimension of the top container to match the screen.
|
||||
top->setDimension(gcn::Rectangle(0, 0, 640, 480));
|
||||
// Finally we pass the top widget to the Gui object.
|
||||
globals::gui->setTop(top);
|
||||
|
||||
// Now we load the font used in this example.
|
||||
font = new gcn::ImageFont("fixedfont.bmp", " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
|
||||
// Widgets may have a global font so we don't need to pass the
|
||||
// font object to every created widget. The global font is static.
|
||||
gcn::Widget::setGlobalFont(font);
|
||||
|
||||
// Now we create the widgets
|
||||
|
||||
label = new gcn::Label("Label");
|
||||
|
||||
image = gcn::Image::load("gui-chan.bmp");
|
||||
icon = new gcn::Icon(image);
|
||||
|
||||
button = new gcn::Button("Button");
|
||||
|
||||
textField = new gcn::TextField("Text field");
|
||||
|
||||
textBox = new gcn::TextBox("Multiline\nText box");
|
||||
textBoxScrollArea = new gcn::ScrollArea(textBox);
|
||||
textBoxScrollArea->setWidth(200);
|
||||
textBoxScrollArea->setHeight(100);
|
||||
textBoxScrollArea->setFrameSize(1);
|
||||
|
||||
listBox = new gcn::ListBox(&demoListModel);
|
||||
listBox->setFrameSize(1);
|
||||
dropDown = new gcn::DropDown(&demoListModel);
|
||||
|
||||
checkBox1 = new gcn::CheckBox("Checkbox 1");
|
||||
checkBox2 = new gcn::CheckBox("Checkbox 2");
|
||||
|
||||
radioButton1 = new gcn::RadioButton("RadioButton 1", "radiogroup", true);
|
||||
radioButton2 = new gcn::RadioButton("RadioButton 2", "radiogroup");
|
||||
radioButton3 = new gcn::RadioButton("RadioButton 3", "radiogroup");
|
||||
|
||||
slider = new gcn::Slider(0, 10);
|
||||
slider->setSize(100, 10);
|
||||
|
||||
window = new gcn::Window("I am a window Drag me");
|
||||
window->setBaseColor(gcn::Color(255, 150, 200, 190));
|
||||
|
||||
darkbitsImage = gcn::Image::load("darkbitslogo_by_haiko.bmp");
|
||||
darkbitsIcon = new gcn::Icon(darkbitsImage);
|
||||
window->add(darkbitsIcon);
|
||||
window->resizeToContent();
|
||||
|
||||
tabbedArea = new gcn::TabbedArea();
|
||||
tabbedArea->setSize(200, 100);
|
||||
tabOneButton = new gcn::Button("A button in tab 1");
|
||||
tabbedArea->addTab("Tab 1", tabOneButton);
|
||||
tabTwoCheckBox = new gcn::CheckBox("A check box in tab 2");
|
||||
tabbedArea->addTab("Tab 2", tabTwoCheckBox);
|
||||
|
||||
// Now it's time to add the widgets to the top container
|
||||
// so they will be conected to the GUI.
|
||||
|
||||
top->add(label, 10, 10);
|
||||
top->add(icon, 10, 30);
|
||||
top->add(button, 200, 10);
|
||||
top->add(textField, 250, 10);
|
||||
top->add(textBoxScrollArea, 200, 50);
|
||||
top->add(listBox, 200, 200);
|
||||
top->add(dropDown, 500, 10);
|
||||
top->add(checkBox1, 500, 130);
|
||||
top->add(checkBox2, 500, 150);
|
||||
top->add(radioButton1, 500, 200);
|
||||
top->add(radioButton2, 500, 220);
|
||||
top->add(radioButton3, 500, 240);
|
||||
top->add(slider, 500, 300);
|
||||
top->add(window, 50, 350);
|
||||
top->add(tabbedArea, 400, 350);
|
||||
}
|
||||
|
||||
/**
|
||||
* Halts the widgets example.
|
||||
*/
|
||||
void halt()
|
||||
{
|
||||
delete font;
|
||||
delete top;
|
||||
delete label;
|
||||
delete icon;
|
||||
delete button;
|
||||
delete textField;
|
||||
delete textBox;
|
||||
delete textBoxScrollArea;
|
||||
delete listBox;
|
||||
delete dropDown;
|
||||
delete checkBox1;
|
||||
delete checkBox2;
|
||||
delete radioButton1;
|
||||
delete radioButton2;
|
||||
delete radioButton3;
|
||||
delete slider;
|
||||
delete window;
|
||||
delete darkbitsIcon;
|
||||
delete darkbitsImage;
|
||||
delete tabbedArea;
|
||||
delete tabOneButton;
|
||||
delete tabTwoCheckBox;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Code to populate a global Gui object with all the widgets
|
||||
* of Guichan.
|
||||
*/
|
||||
|
||||
namespace widgets
|
||||
{
|
||||
gcn::Font* font;
|
||||
gcn::Container* top;
|
||||
gcn::Label* label;
|
||||
gcn::Icon* icon;
|
||||
gcn::Button* button;
|
||||
gcn::TextField* textField;
|
||||
gcn::TextBox* textBox;
|
||||
gcn::ScrollArea* textBoxScrollArea;
|
||||
gcn::ListBox* listBox;
|
||||
gcn::DropDown* dropDown;
|
||||
gcn::CheckBox* checkBox1;
|
||||
gcn::CheckBox* checkBox2;
|
||||
gcn::RadioButton* radioButton1;
|
||||
gcn::RadioButton* radioButton2;
|
||||
gcn::RadioButton* radioButton3;
|
||||
gcn::Slider* slider;
|
||||
gcn::Image *image;
|
||||
gcn::Window *window;
|
||||
gcn::Image *darkbitsImage;
|
||||
gcn::Icon* darkbitsIcon;
|
||||
gcn::TabbedArea* tabbedArea;
|
||||
gcn::Button* tabOneButton;
|
||||
gcn::CheckBox* tabTwoCheckBox;
|
||||
|
||||
/*
|
||||
* List boxes and drop downs need an instance of a list model
|
||||
* in order to display a list.
|
||||
*/
|
||||
class DemoListModel : public gcn::ListModel
|
||||
{
|
||||
public:
|
||||
int getNumberOfElements()
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
std::string getElementAt(int i)
|
||||
{
|
||||
switch(i)
|
||||
{
|
||||
case 0:
|
||||
return std::string("zero");
|
||||
case 1:
|
||||
return std::string("one");
|
||||
case 2:
|
||||
return std::string("two");
|
||||
case 3:
|
||||
return std::string("three");
|
||||
case 4:
|
||||
return std::string("four");
|
||||
default: // Just to keep warnings away
|
||||
return std::string("");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
DemoListModel demoListModel;
|
||||
|
||||
/**
|
||||
* Initialises the widgets example by populating the global Gui
|
||||
* object.
|
||||
*/
|
||||
void init()
|
||||
{
|
||||
// We first create a container to be used as the top widget.
|
||||
// The top widget in Guichan can be any kind of widget, but
|
||||
// in order to make the Gui contain more than one widget we
|
||||
// make the top widget a container.
|
||||
top = new gcn::Container();
|
||||
// We set the dimension of the top container to match the screen.
|
||||
top->setDimension(gcn::Rectangle(0, 0, 640, 480));
|
||||
// Finally we pass the top widget to the Gui object.
|
||||
globals::gui->setTop(top);
|
||||
|
||||
// Now we load the font used in this example.
|
||||
//font = new gcn::ImageFont("fixedfont.bmp", " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
|
||||
font = new gcn::contrib::SDLTrueTypeFont("Roboto-Bold.ttf", 10);
|
||||
// Widgets may have a global font so we don't need to pass the
|
||||
// font object to every created widget. The global font is static.
|
||||
gcn::Widget::setGlobalFont(font);
|
||||
|
||||
// Now we create the widgets
|
||||
|
||||
label = new gcn::Label("Label");
|
||||
|
||||
image = gcn::Image::load("gui-chan.bmp");
|
||||
icon = new gcn::Icon(image);
|
||||
|
||||
button = new gcn::Button("Button");
|
||||
|
||||
textField = new gcn::TextField("Text field АбВгЁ");
|
||||
|
||||
textBox = new gcn::TextBox("Multiline\nText box\nАбВгЁ");
|
||||
textBoxScrollArea = new gcn::ScrollArea(textBox);
|
||||
textBoxScrollArea->setWidth(200);
|
||||
textBoxScrollArea->setHeight(100);
|
||||
textBoxScrollArea->setFrameSize(1);
|
||||
|
||||
listBox = new gcn::ListBox(&demoListModel);
|
||||
listBox->setFrameSize(1);
|
||||
dropDown = new gcn::DropDown(&demoListModel);
|
||||
|
||||
checkBox1 = new gcn::CheckBox("Checkbox 1");
|
||||
checkBox2 = new gcn::CheckBox("Checkbox 2");
|
||||
|
||||
radioButton1 = new gcn::RadioButton("RadioButton 1 АбВгЁ", "radiogroup", true);
|
||||
radioButton2 = new gcn::RadioButton("RadioButton 2 АбВгЁ", "radiogroup");
|
||||
radioButton3 = new gcn::RadioButton("RadioButton 3 АбВгЁ", "radiogroup");
|
||||
|
||||
slider = new gcn::Slider(0, 10);
|
||||
slider->setSize(100, 10);
|
||||
|
||||
window = new gcn::Window("I am a window Drag me АбВгЁ");
|
||||
window->setBaseColor(gcn::Color(255, 150, 200, 190));
|
||||
|
||||
darkbitsImage = gcn::Image::load("darkbitslogo_by_haiko.bmp");
|
||||
darkbitsIcon = new gcn::Icon(darkbitsImage);
|
||||
window->add(darkbitsIcon);
|
||||
window->resizeToContent();
|
||||
|
||||
tabbedArea = new gcn::TabbedArea();
|
||||
tabbedArea->setSize(200, 100);
|
||||
tabOneButton = new gcn::Button("A button in tab 1 АбВгЁ");
|
||||
tabbedArea->addTab("Tab 1 АбВгЁ", tabOneButton);
|
||||
tabTwoCheckBox = new gcn::CheckBox("A check box in tab 2 АбВгЁ");
|
||||
tabbedArea->addTab("Tab 2 АбВгЁ", tabTwoCheckBox);
|
||||
|
||||
// Now it's time to add the widgets to the top container
|
||||
// so they will be conected to the GUI.
|
||||
|
||||
top->add(label, 10, 10);
|
||||
top->add(icon, 10, 30);
|
||||
top->add(button, 200, 10);
|
||||
top->add(textField, 250, 10);
|
||||
top->add(textBoxScrollArea, 200, 50);
|
||||
top->add(listBox, 200, 200);
|
||||
top->add(dropDown, 500, 10);
|
||||
top->add(checkBox1, 500, 130);
|
||||
top->add(checkBox2, 500, 150);
|
||||
top->add(radioButton1, 500, 200);
|
||||
top->add(radioButton2, 500, 220);
|
||||
top->add(radioButton3, 500, 240);
|
||||
top->add(slider, 500, 300);
|
||||
top->add(window, 50, 350);
|
||||
top->add(tabbedArea, 400, 350);
|
||||
}
|
||||
|
||||
/**
|
||||
* Halts the widgets example.
|
||||
*/
|
||||
void halt()
|
||||
{
|
||||
delete font;
|
||||
delete top;
|
||||
delete label;
|
||||
delete icon;
|
||||
delete button;
|
||||
delete textField;
|
||||
delete textBox;
|
||||
delete textBoxScrollArea;
|
||||
delete listBox;
|
||||
delete dropDown;
|
||||
delete checkBox1;
|
||||
delete checkBox2;
|
||||
delete radioButton1;
|
||||
delete radioButton2;
|
||||
delete radioButton3;
|
||||
delete slider;
|
||||
delete window;
|
||||
delete darkbitsIcon;
|
||||
delete darkbitsImage;
|
||||
delete tabbedArea;
|
||||
delete tabOneButton;
|
||||
delete tabTwoCheckBox;
|
||||
}
|
||||
}
|
||||
|
||||
11
project/jni/application/hid-pc-keyboard/project.patch
Normal file
11
project/jni/application/hid-pc-keyboard/project.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/project/AndroidManifest.xml 2014-11-24 19:30:31.003274516 +0200
|
||||
+++ b/project/AndroidManifest.xml 2014-11-24 19:30:33.547274398 +0200
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="21"/>
|
||||
<!-- ==INTERNET== --> <uses-permission android:name="android.permission.INTERNET"></uses-permission>
|
||||
-
|
||||
+ <uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
|
||||
<!-- <uses-permission android:name="android.permission.VIBRATE"></uses-permission> --> <!-- Vibrator not supported yet by SDL -->
|
||||
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false" /> <!-- Allow TV boxes -->
|
||||
Submodule project/jni/application/hid-pc-keyboard/src updated: df3a7ab02f...2f7672c980
@@ -1,30 +1,265 @@
|
||||
# The application settings for Android libSDL port
|
||||
AppSettingVersion=12
|
||||
LibSdlVersion=1.2
|
||||
|
||||
# Specify application name (e.x. My Application)
|
||||
AppName="Jooleem"
|
||||
|
||||
# Specify reversed site name of application (e.x. com.mysite.myapp)
|
||||
AppFullName=net.sourceforge.jooleem
|
||||
ScreenOrientation=h
|
||||
InhibitSuspend=n
|
||||
AppDataDownloadUrl="Data files are 10 Mb|http://sourceforge.net/projects/libsdl-android/files/Jooleem/jooleem_0.1.4_data.zip/download|http://sites.google.com/site/xpelyax/Home/jooleem_0.1.4_data.zip?attredirects=0&d=1|http://sitesproxy.goapk.com/site/xpelyax/Home/jooleem_0.1.4_data.zip"
|
||||
SdlVideoResize=y
|
||||
SdlVideoResizeKeepAspect=n
|
||||
NeedDepthBuffer=n
|
||||
AppUsesMouse=y
|
||||
AppNeedsArrowKeys=n
|
||||
AppUsesJoystick=n
|
||||
AppHandlesJoystickSensitivity=n
|
||||
AppUsesMultitouch=n
|
||||
NonBlockingSwapBuffers=n
|
||||
RedefinedKeys=""
|
||||
AppTouchscreenKeyboardKeysAmount=0
|
||||
AppTouchscreenKeyboardKeysAmountAutoFire=0
|
||||
MultiABI=n
|
||||
AppVersionCode=01404
|
||||
AppVersionName="0.1.4.04"
|
||||
CompiledLibraries="sdl_mixer sdl_image sdl_ttf"
|
||||
CustomBuildScript=n
|
||||
AppCflags='-finline-functions -O2'
|
||||
AppLdflags=''
|
||||
AppSubdirsBuild=''
|
||||
AppUseCrystaXToolchain=n
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=01405
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="0.1.4.05"
|
||||
|
||||
# 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
|
||||
# If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped
|
||||
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -
|
||||
# these files are put inside .apk package by build system
|
||||
# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version, first associated with the file
|
||||
AppDataDownloadUrl="!!Data files are 10 Mb|jooleem_0.1.4_data.zip|http://sourceforge.net/projects/libsdl-android/files/Jooleem/jooleem_0.1.4_data.zip/download"
|
||||
|
||||
# Reset SDL config when updating application to the new version (y) / (n)
|
||||
ResetSdlConfigForThisVersion=y
|
||||
|
||||
# Delete application data files when upgrading (specify file/dir paths separated by spaces)
|
||||
DeleteFilesOnUpgrade=""
|
||||
|
||||
# Here you may type readme text, which will be shown during startup. Format is:
|
||||
# Text in English, use \\\\n to separate lines (that's four backslashes)^de:Text in Deutsch^ru:Text in Russian^button:Button that will open some URL:http://url-to-open/
|
||||
ReadmeText='^You may press "Home" now - the data will be downloaded in background'
|
||||
|
||||
# libSDL version to use (1.2/1.3/2.0)
|
||||
LibSdlVersion=1.2
|
||||
|
||||
# Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape
|
||||
ScreenOrientation=h
|
||||
|
||||
# Video color depth - 16 BPP is the fastest and supported for all modes, 24 bpp is supported only
|
||||
# with SwVideoMode=y, SDL_OPENGL mode supports everything. (16)/(24)/(32)
|
||||
VideoDepthBpp=16
|
||||
|
||||
# Enable OpenGL depth buffer (needed only for 3-d applications, small speed decrease) (y) or (n)
|
||||
NeedDepthBuffer=n
|
||||
|
||||
# Enable OpenGL stencil buffer (needed only for 3-d applications, small speed decrease) (y) or (n)
|
||||
NeedStencilBuffer=n
|
||||
|
||||
# Try to use GLES 2.x context - will revert to GLES 1.X if unsupported by device
|
||||
# you need this option only if you're developing 3-d app (y) or (n)
|
||||
NeedGles2=n
|
||||
|
||||
# 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)
|
||||
SwVideoMode=y
|
||||
|
||||
# Application video output will be resized to fit into native device screen (y)/(n)
|
||||
SdlVideoResize=y
|
||||
|
||||
# Application resizing will keep 4:3 aspect ratio, with black bars at sides (y)/(n)
|
||||
SdlVideoResizeKeepAspect=n
|
||||
|
||||
# Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer
|
||||
InhibitSuspend=n
|
||||
|
||||
# Create Android service, so the app is less likely to be killed while in background
|
||||
CreateService=n
|
||||
|
||||
# Application does not call SDL_Flip() or SDL_UpdateRects() appropriately, or draws from non-main thread -
|
||||
# enabling the compatibility mode will force screen update every 100 milliseconds, which is laggy and inefficient (y) or (n)
|
||||
CompatibilityHacksForceScreenUpdate=
|
||||
|
||||
# Application does not call SDL_Flip() or SDL_UpdateRects() after mouse click (ScummVM and all Amiga emulators do that) -
|
||||
# force screen update by moving mouse cursor a little after each click (y) or (n)
|
||||
CompatibilityHacksForceScreenUpdateMouseClick=y
|
||||
|
||||
# Application initializes SDL audio/video inside static constructors (which is bad, you won't be able to run ndk-gdb) (y)/(n)
|
||||
CompatibilityHacksStaticInit=
|
||||
|
||||
# On-screen Android soft text input emulates hardware keyboard, this will only work with Hackers Keyboard app (y)/(n)
|
||||
CompatibilityHacksTextInputEmulatesHwKeyboard=
|
||||
|
||||
# Hack for broken devices: prevent audio chopping, by sleeping a bit after pushing each audio chunk (y)/(n)
|
||||
CompatibilityHacksPreventAudioChopping=
|
||||
|
||||
# Hack for broken apps: application ignores audio buffer size returned by SDL (y)/(n)
|
||||
CompatibilityHacksAppIgnoresAudioBufferSize=
|
||||
|
||||
# Hack for VCMI: preload additional shared libraries before aplication start
|
||||
CompatibilityHacksAdditionalPreloadedSharedLibraries=""
|
||||
|
||||
# Hack for Free Heroes 2, which redraws the screen inside SDL_PumpEvents(): slow and compatible SDL event queue -
|
||||
# do not use it with accelerometer/gyroscope, or your app may freeze at random (y)/(n)
|
||||
CompatibilityHacksSlowCompatibleEventQueue=
|
||||
|
||||
# Save and restore OpenGL state when drawing on-screen keyboard for apps that use SDL_OPENGL
|
||||
CompatibilityHacksTouchscreenKeyboardSaveRestoreOpenGLState=
|
||||
|
||||
# Application uses SDL_UpdateRects() properly, and does not draw in any region outside those rects.
|
||||
# This improves drawing speed, but I know only one application that does that, and it's written by me (y)/(n)
|
||||
CompatibilityHacksProperUsageOfSDL_UpdateRects=
|
||||
|
||||
# Application uses mouse (y) or (n), this will show mouse emulation dialog to the user
|
||||
AppUsesMouse=y
|
||||
|
||||
# Application needs two-button mouse, will also enable advanced point-and-click features (y) or (n)
|
||||
AppNeedsTwoButtonMouse=n
|
||||
|
||||
# Right mouse button can do long-press/drag&drop action, necessary for some games (y) or (n)
|
||||
# If you disable it, swiping with two fingers will send mouse wheel events
|
||||
RightMouseButtonLongPress=n
|
||||
|
||||
# Show SDL mouse cursor, for applications that do not draw cursor at all (y) or (n)
|
||||
ShowMouseCursor=n
|
||||
|
||||
# Generate more touch events, by default SDL generates one event per one video frame, this is useful for drawing apps (y) or (n)
|
||||
GenerateSubframeTouchEvents=n
|
||||
|
||||
# Force relative (laptop) mouse movement mode, useful when both on-screen keyboard and mouse are needed (y) or (n)
|
||||
ForceRelativeMouseMode=n
|
||||
|
||||
# Show on-screen dpad/joystick, that will act as arrow keys (y) or (n)
|
||||
AppNeedsArrowKeys=n
|
||||
|
||||
# On-screen dpad/joystick will appear under finger when it touches the screen (y) or (n)
|
||||
# Joystick always follows finger, so moving mouse requires touching the screen with other finger
|
||||
FloatingScreenJoystick=
|
||||
|
||||
# Application needs text input (y) or (n), enables button for text input on screen
|
||||
AppNeedsTextInput=
|
||||
|
||||
# Application uses joystick (y) or (n), the on-screen DPAD will be used as joystick 0 axes 0-1
|
||||
# This will disable AppNeedsArrowKeys option
|
||||
AppUsesJoystick=n
|
||||
|
||||
# Application uses second on-screen joystick, as SDL joystick 0 axes 2-3 (y)/(n)
|
||||
AppUsesSecondJoystick=n
|
||||
|
||||
# Application uses third on-screen joystick, as SDL joystick 0 axes 20-21 (y)/(n)
|
||||
AppUsesThirdJoystick=
|
||||
|
||||
# Application uses accelerometer (y) or (n), the accelerometer will be used as joystick 1 axes 0-1 and 5-7
|
||||
AppUsesAccelerometer=
|
||||
|
||||
# Application uses gyroscope (y) or (n), the gyroscope will be used as joystick 1 axes 2-4
|
||||
AppUsesGyroscope=
|
||||
|
||||
# Use gyroscope to move mouse cursor (y) or (n), it eats battery, and can be disabled in settings, do not use with AppUsesGyroscope setting
|
||||
MoveMouseWithGyroscope=
|
||||
|
||||
# Application uses multitouch (y) or (n), multitouch events are passed as SDL_JOYBALLMOTION events for the joystick 0
|
||||
AppUsesMultitouch=n
|
||||
|
||||
# Application records audio (it will use any available source, such a s microphone)
|
||||
# API is defined in file SDL_android.h: int SDL_ANDROID_OpenAudioRecording(SDL_AudioSpec *spec); void SDL_ANDROID_CloseAudioRecording(void);
|
||||
# This option will add additional permission to Android manifest (y)/(n)
|
||||
AppRecordsAudio=
|
||||
|
||||
# Application needs to access SD card. If your data files are bigger than 5 Mb, enable it. (y) / (n)
|
||||
AccessSdCard=
|
||||
|
||||
# Application needs Internet access. If you disable it, you'll have to bundle all your data files inside .apk (y) / (n)
|
||||
AccessInternet=
|
||||
|
||||
# Immersive mode - Android will hide on-screen Home/Back keys. Looks bad if you invoke Android keyboard. (y) / (n)
|
||||
ImmersiveMode=
|
||||
|
||||
# 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)
|
||||
# This option is reported to be buggy, sometimes failing to restore video state
|
||||
NonBlockingSwapBuffers=n
|
||||
|
||||
# Redefine common hardware keys to SDL keysyms
|
||||
# BACK hardware key is available on all devices, MENU is available on pre-ICS devices, other keys may be absent
|
||||
# SEARCH and CALL by default return same keycode as DPAD_CENTER - one of those keys is available on most devices
|
||||
# Use word NO_REMAP if you want to preserve native functionality for certain key (volume keys are 3-rd and 4-th)
|
||||
# Keys: TOUCHSCREEN (works only when AppUsesMouse=n), DPAD_CENTER/SEARCH, VOLUMEUP, VOLUMEDOWN, MENU, BACK, CAMERA
|
||||
RedefinedKeys=""
|
||||
|
||||
# Number of virtual keyboard keys (currently 6 is maximum)
|
||||
AppTouchscreenKeyboardKeysAmount=0
|
||||
|
||||
# Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right)
|
||||
RedefinedKeysScreenKb=""
|
||||
|
||||
# Names for on-screen keyboard keys, such as Fire, Jump, Run etc, separated by spaces, they are used in SDL config menu
|
||||
RedefinedKeysScreenKbNames=""
|
||||
|
||||
# On-screen keys theme
|
||||
# 0 = Ultimate Droid by Sean Stieber (green, with gamepad joystick)
|
||||
# 1 = Simple Theme by Beholder (white, with gamepad joystick)
|
||||
# 2 = Sun by Sirea (yellow, with round joystick)
|
||||
# 3 = Keen by Gerstrong (multicolor, with round joystick)
|
||||
TouchscreenKeysTheme=2
|
||||
|
||||
# Redefine gamepad keys to SDL keysyms, button order is:
|
||||
# A B X Y L1 R1 L2 R2 LThumb RThumb
|
||||
RedefinedKeysGamepad=""
|
||||
|
||||
# How long to show startup menu button, in msec, 0 to disable startup menu
|
||||
StartupMenuButtonTimeout=0
|
||||
|
||||
# Menu items to hide from startup menu, available menu items:
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced
|
||||
HiddenMenuOptions=''
|
||||
|
||||
# Menu items to show at startup - this is Java code snippet, leave empty for default
|
||||
# new SettingsMenuMisc.ShowReadme(), (AppUsesMouse \&\& \! ForceRelativeMouseMode \? new SettingsMenuMouse.DisplaySizeConfig(true) : new SettingsMenu.DummyMenu()), new SettingsMenuMisc.OptionalDownloadConfig(true), new SettingsMenuMisc.GyroscopeCalibration()
|
||||
# Available menu items:
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced
|
||||
FirstStartMenuOptions='SettingsMenu.DummyMenu'
|
||||
|
||||
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
|
||||
AppMinimumRAM=0
|
||||
|
||||
# GCC version, 4.6 (default) or 4.8, CLANG is not supported yet
|
||||
NDK_TOOLCHAIN_VERSION=
|
||||
|
||||
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
||||
# Available architectures: armeabi armeabi-v7a armeabi-v7a-hard x86 mips
|
||||
MultiABI='armeabi armeabi-v7a x86 mips'
|
||||
|
||||
# Optional shared libraries to compile - removing some of them will save space
|
||||
# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed
|
||||
# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2
|
||||
CompiledLibraries="sdl_mixer sdl_image sdl_ttf"
|
||||
|
||||
# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n)
|
||||
CustomBuildScript=n
|
||||
|
||||
# Aditional CFLAGS for application
|
||||
AppCflags='-finline-functions -O2'
|
||||
|
||||
# Additional LDFLAGS for application
|
||||
AppLdflags=''
|
||||
|
||||
# If application has headers with the same name as system headers, this option tries to fix compiler flags to make it compilable
|
||||
AppOverlapsSystemHeaders=
|
||||
|
||||
# Build only following subdirs (empty will build all dirs, ignored with custom script)
|
||||
AppSubdirsBuild=''
|
||||
|
||||
# Exclude these files from build
|
||||
AppBuildExclude=''
|
||||
|
||||
# Application command line parameters, including app name as 0-th param
|
||||
AppCmdline=''
|
||||
|
||||
# Screen size is used by Google Play to prevent an app to be installed on devices with smaller screens
|
||||
# Minimum screen size that application supports: (s)mall / (m)edium / (l)arge
|
||||
MinimumScreenSize=
|
||||
|
||||
# Your AdMob Publisher ID, (n) if you don't want advertisements
|
||||
AdmobPublisherId=
|
||||
|
||||
# Your AdMob test device ID, to receive a test ad
|
||||
AdmobTestDeviceId=
|
||||
|
||||
# Your AdMob banner size (BANNER/FULL_BANNER/LEADERBOARD/MEDIUM_RECTANGLE/SMART_BANNER/WIDE_SKYSCRAPER/FULL_WIDTH:Height/Width:AUTO_HEIGHT/Width:Height)
|
||||
AdmobBannerSize=
|
||||
|
||||
# Google Play Game Services application ID, required for cloud saves to work
|
||||
GooglePlayGameServicesId=
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ FirstStartMenuOptions=''
|
||||
|
||||
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
||||
# Available architectures: armeabi armeabi-v7a armeabi-v7a-hard x86 mips
|
||||
MultiABI='armeabi-v7a'
|
||||
MultiABI='armeabi-v7a x86 mips'
|
||||
|
||||
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
|
||||
AppMinimumRAM=300
|
||||
|
||||
@@ -5,7 +5,6 @@ LOCAL_PATH=`cd $LOCAL_PATH && pwd`
|
||||
|
||||
if [ "$1" = "armeabi-v7a" ]; then (
|
||||
mkdir -p AndroidData
|
||||
[ -e libapplication.so ] || ln -s libapplication-armeabi.so libapplication.so
|
||||
make -j8 -C vm BUILD_MISSIONPACK=0 || exit 1
|
||||
cd vm/build/release-linux-`uname -m`/baseq3
|
||||
#rm -f ../../../../AndroidData/binaries.zip ../../../../AndroidData/pak7-android.pk3
|
||||
|
||||
@@ -7,10 +7,10 @@ AppName="OpenTTD"
|
||||
AppFullName=org.openttd.sdl
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=14334
|
||||
AppVersionCode=14436
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="1.4.3.34"
|
||||
AppVersionName="1.4.4.36"
|
||||
|
||||
# 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
|
||||
@@ -18,7 +18,7 @@ AppVersionName="1.4.3.34"
|
||||
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -
|
||||
# these files are put inside .apk package by build system
|
||||
# Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS
|
||||
AppDataDownloadUrl="!!Data files - 20 Mb|openttd-data-1.4.3.zip.xz|http://sourceforge.net/projects/libsdl-android/files/OpenTTD/openttd-data-1.4.3.zip.xz^!!Config file|:.openttd/openttd.cfg:openttd-1.4.0.30.cfg^!MIDI music support (18 Mb)|timidity.zip.xz|http://sourceforge.net/projects/libsdl-android/files/timidity.zip.xz^!!Internationalization files|icudt52l.zip.xz|http://sourceforge.net/projects/libsdl-android/files/icudt52l.zip.xz"
|
||||
AppDataDownloadUrl="!!Data files - 20 Mb|openttd-data-1.4.4.zip.xz|http://sourceforge.net/projects/libsdl-android/files/OpenTTD/openttd-data-1.4.4.zip.xz^!!Config file|:.openttd/openttd.cfg:openttd-1.4.0.30.cfg^!MIDI music support (18 Mb)|timidity.zip.xz|http://sourceforge.net/projects/libsdl-android/files/timidity.zip.xz^!!Internationalization files|icudt52l.zip.xz|http://sourceforge.net/projects/libsdl-android/files/icudt52l.zip.xz"
|
||||
|
||||
# Reset SDL config when updating application to the new version (y) / (n)
|
||||
ResetSdlConfigForThisVersion=n
|
||||
@@ -213,7 +213,7 @@ FirstStartMenuOptions=''
|
||||
|
||||
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
||||
# Available architectures: armeabi armeabi-v7a armeabi-v7a-hard x86 mips
|
||||
MultiABI='armeabi-v7a x86'
|
||||
MultiABI='armeabi-v7a x86' #armeabi-v7a x86
|
||||
|
||||
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
|
||||
AppMinimumRAM=0
|
||||
|
||||
@@ -7,7 +7,11 @@ mkdir -p openttd-pc openttd-pc/baseset
|
||||
cd openttd-pc
|
||||
[ -e bin/baseset ] || cp -a ../src/bin .
|
||||
|
||||
export CFLAGS=-O0
|
||||
export CXXFLAGS=-O0
|
||||
|
||||
[ -e Makefile ] || ../src/configure --enable-debug || exit 1
|
||||
make -j8 || exit 1
|
||||
make -j8 VERBOSE=1 || exit 1
|
||||
cd bin
|
||||
gdb -ex run ./openttd
|
||||
#gdb -ex run --args ./openttd
|
||||
./openttd -d 1 -r 854x480 -g opntitle.sav
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
VER=1.4.3
|
||||
VER=1.4.4
|
||||
|
||||
cd data
|
||||
rm -f ../AndroidData/openttd-data-*.zip.xz ../AndroidData/openttd-data-*.zip
|
||||
|
||||
Submodule project/jni/application/openttd/src updated: 394ab0d648...c0c98b562a
@@ -22,7 +22,7 @@ grep "64.bit" "$NDK/RELEASE.TXT" >/dev/null 2>&1 && MYARCH="${MYARCH}_64"
|
||||
|
||||
#echo NDK $NDK
|
||||
GCCPREFIX=arm-linux-androideabi
|
||||
[ -z "$GCCVER" ] && GCCVER=4.6
|
||||
[ -z "$NDK_TOOLCHAIN_VERSION" ] && NDK_TOOLCHAIN_VERSION=4.6
|
||||
[ -z "$PLATFORMVER" ] && PLATFORMVER=android-14
|
||||
LOCAL_PATH=`dirname $0`
|
||||
if which realpath > /dev/null ; then
|
||||
@@ -55,9 +55,9 @@ CFLAGS="\
|
||||
-fomit-frame-pointer -fno-strict-aliasing -finline-limit=300 \
|
||||
-DANDROID -Wall -Wno-unused -Wa,--noexecstack -Wformat -Werror=format-security \
|
||||
-isystem$NDK/platforms/$PLATFORMVER/arch-arm/usr/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/libs/$ARCH/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/include/backward \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/libs/$ARCH/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/include/backward \
|
||||
-isystem$LOCAL_PATH/../sdl-1.2/include \
|
||||
`echo $APP_MODULES | sed \"s@\([-a-zA-Z0-9_.]\+\)@-isystem$LOCAL_PATH/../\1/include@g\"` \
|
||||
$MISSING_INCLUDE $CFLAGS"
|
||||
@@ -85,7 +85,7 @@ $SHARED \
|
||||
-L$NDK/platforms/$PLATFORMVER/arch-arm/usr/lib \
|
||||
-lc -lGLESv1_CM -ldl -llog -lz \
|
||||
-Wl,--no-warn-mismatch -lm_hard \
|
||||
-L$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/libs/$ARCH \
|
||||
-L$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/libs/$ARCH \
|
||||
-lgnustl_static \
|
||||
-no-canonical-prefixes -march=armv7-a -Wl,--fix-cortex-a8 $UNRESOLVED -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now \
|
||||
-lsupc++ \
|
||||
@@ -93,17 +93,17 @@ $MISSING_LIB $LDFLAGS"
|
||||
|
||||
#echo env CFLAGS=\""$CFLAGS"\" LDFLAGS=\""$LDFLAGS"\" "$@"
|
||||
|
||||
env PATH=$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \
|
||||
env PATH=$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \
|
||||
CFLAGS="$CFLAGS" \
|
||||
CXXFLAGS="$CXXFLAGS $CFLAGS -frtti -fexceptions" \
|
||||
LDFLAGS="$LDFLAGS" \
|
||||
CC="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-gcc" \
|
||||
CXX="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
RANLIB="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \
|
||||
LD="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
AR="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \
|
||||
CPP="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-cpp $CFLAGS" \
|
||||
NM="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \
|
||||
AS="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \
|
||||
STRIP="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \
|
||||
CC="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-gcc" \
|
||||
CXX="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
RANLIB="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \
|
||||
LD="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
AR="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \
|
||||
CPP="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-cpp $CFLAGS" \
|
||||
NM="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \
|
||||
AS="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \
|
||||
STRIP="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \
|
||||
"$@"
|
||||
|
||||
@@ -22,7 +22,7 @@ grep "64.bit" "$NDK/RELEASE.TXT" >/dev/null 2>&1 && MYARCH="${MYARCH}_64"
|
||||
|
||||
#echo NDK $NDK
|
||||
GCCPREFIX=arm-linux-androideabi
|
||||
[ -z "$GCCVER" ] && GCCVER=4.6
|
||||
[ -z "$NDK_TOOLCHAIN_VERSION" ] && NDK_TOOLCHAIN_VERSION=4.6
|
||||
[ -z "$PLATFORMVER" ] && PLATFORMVER=android-14
|
||||
LOCAL_PATH=`dirname $0`
|
||||
if which realpath > /dev/null ; then
|
||||
@@ -55,9 +55,9 @@ CFLAGS="\
|
||||
-fomit-frame-pointer -fno-strict-aliasing -finline-limit=300 \
|
||||
-DANDROID -Wall -Wno-unused -Wa,--noexecstack -Wformat -Werror=format-security \
|
||||
-isystem$NDK/platforms/$PLATFORMVER/arch-arm/usr/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/libs/$ARCH/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/include/backward \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/libs/$ARCH/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/include/backward \
|
||||
-isystem$LOCAL_PATH/../sdl-1.2/include \
|
||||
`echo $APP_MODULES | sed \"s@\([-a-zA-Z0-9_.]\+\)@-isystem$LOCAL_PATH/../\1/include@g\"` \
|
||||
$MISSING_INCLUDE $CFLAGS"
|
||||
@@ -84,7 +84,7 @@ $SHARED \
|
||||
`echo $APP_SHARED_LIBS | sed \"s@\([-a-zA-Z0-9_.]\+\)@$LOCAL_PATH/../../obj/local/$ARCH/lib\1.so@g\"` \
|
||||
-L$NDK/platforms/$PLATFORMVER/arch-arm/usr/lib \
|
||||
-lc -lm -lGLESv1_CM -ldl -llog -lz \
|
||||
-L$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/libs/$ARCH \
|
||||
-L$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/libs/$ARCH \
|
||||
-lgnustl_static \
|
||||
-no-canonical-prefixes -march=armv7-a -Wl,--fix-cortex-a8 $UNRESOLVED -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now \
|
||||
-lsupc++ \
|
||||
@@ -92,17 +92,17 @@ $MISSING_LIB $LDFLAGS"
|
||||
|
||||
#echo env CFLAGS=\""$CFLAGS"\" LDFLAGS=\""$LDFLAGS"\" "$@"
|
||||
|
||||
env PATH=$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \
|
||||
env PATH=$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \
|
||||
CFLAGS="$CFLAGS" \
|
||||
CXXFLAGS="$CXXFLAGS $CFLAGS -frtti -fexceptions" \
|
||||
LDFLAGS="$LDFLAGS" \
|
||||
CC="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-gcc" \
|
||||
CXX="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
RANLIB="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \
|
||||
LD="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
AR="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \
|
||||
CPP="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-cpp $CFLAGS" \
|
||||
NM="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \
|
||||
AS="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \
|
||||
STRIP="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \
|
||||
CC="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-gcc" \
|
||||
CXX="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
RANLIB="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \
|
||||
LD="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
AR="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \
|
||||
CPP="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-cpp $CFLAGS" \
|
||||
NM="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \
|
||||
AS="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \
|
||||
STRIP="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \
|
||||
"$@"
|
||||
|
||||
@@ -22,7 +22,7 @@ grep "64.bit" "$NDK/RELEASE.TXT" >/dev/null 2>&1 && MYARCH="${MYARCH}_64"
|
||||
|
||||
#echo NDK $NDK
|
||||
GCCPREFIX=mipsel-linux-android
|
||||
[ -z "$GCCVER" ] && GCCVER=4.6
|
||||
[ -z "$NDK_TOOLCHAIN_VERSION" ] && NDK_TOOLCHAIN_VERSION=4.6
|
||||
[ -z "$PLATFORMVER" ] && PLATFORMVER=android-14
|
||||
LOCAL_PATH=`dirname $0`
|
||||
if which realpath > /dev/null ; then
|
||||
@@ -56,9 +56,9 @@ CFLAGS="\
|
||||
-funswitch-loops -finline-limit=300 \
|
||||
-DANDROID -Wall -Wno-unused -Wa,--noexecstack -Wformat -Werror=format-security \
|
||||
-isystem$NDK/platforms/$PLATFORMVER/arch-mips/usr/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/libs/$ARCH/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/include/backward \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/libs/$ARCH/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/include/backward \
|
||||
-isystem$LOCAL_PATH/../sdl-1.2/include \
|
||||
`echo $APP_MODULES | sed \"s@\([-a-zA-Z0-9_.]\+\)@-isystem$LOCAL_PATH/../\1/include@g\"` \
|
||||
$MISSING_INCLUDE $CFLAGS"
|
||||
@@ -85,7 +85,7 @@ $SHARED \
|
||||
`echo $APP_SHARED_LIBS | sed \"s@\([-a-zA-Z0-9_.]\+\)@$LOCAL_PATH/../../obj/local/$ARCH/lib\1.so@g\"` \
|
||||
-L$NDK/platforms/$PLATFORMVER/arch-mips/usr/lib \
|
||||
-lc -lm -lGLESv1_CM -ldl -llog -lz \
|
||||
-L$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/libs/$ARCH \
|
||||
-L$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/libs/$ARCH \
|
||||
-lgnustl_static \
|
||||
-no-canonical-prefixes $UNRESOLVED -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now \
|
||||
-lsupc++ \
|
||||
@@ -93,17 +93,17 @@ $MISSING_LIB $LDFLAGS"
|
||||
|
||||
#echo env CFLAGS=\""$CFLAGS"\" LDFLAGS=\""$LDFLAGS"\" "$@"
|
||||
|
||||
env PATH=$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \
|
||||
env PATH=$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \
|
||||
CFLAGS="$CFLAGS" \
|
||||
CXXFLAGS="$CXXFLAGS $CFLAGS -frtti -fexceptions" \
|
||||
LDFLAGS="$LDFLAGS" \
|
||||
CC="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-gcc" \
|
||||
CXX="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
RANLIB="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \
|
||||
LD="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
AR="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \
|
||||
CPP="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-cpp $CFLAGS" \
|
||||
NM="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \
|
||||
AS="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \
|
||||
STRIP="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \
|
||||
CC="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-gcc" \
|
||||
CXX="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
RANLIB="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \
|
||||
LD="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
AR="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \
|
||||
CPP="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-cpp $CFLAGS" \
|
||||
NM="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \
|
||||
AS="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \
|
||||
STRIP="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \
|
||||
"$@"
|
||||
|
||||
@@ -22,7 +22,7 @@ grep "64.bit" "$NDK/RELEASE.TXT" >/dev/null 2>&1 && MYARCH="${MYARCH}_64"
|
||||
|
||||
#echo NDK $NDK
|
||||
GCCPREFIX=i686-linux-android
|
||||
[ -z "$GCCVER" ] && GCCVER=4.6
|
||||
[ -z "$NDK_TOOLCHAIN_VERSION" ] && NDK_TOOLCHAIN_VERSION=4.6
|
||||
[ -z "$PLATFORMVER" ] && PLATFORMVER=android-14
|
||||
LOCAL_PATH=`dirname $0`
|
||||
if which realpath > /dev/null ; then
|
||||
@@ -49,15 +49,15 @@ MISSING_INCLUDE=
|
||||
MISSING_LIB=
|
||||
|
||||
CFLAGS="\
|
||||
-ffunction-sections -funwind-tables -no-canonical-prefixes \
|
||||
-fpic -ffunction-sections -funwind-tables -no-canonical-prefixes \
|
||||
-fstack-protector -O2 -g -DNDEBUG \
|
||||
-fomit-frame-pointer -fstrict-aliasing -funswitch-loops \
|
||||
-finline-limit=300 \
|
||||
-DANDROID -Wall -Wno-unused -Wa,--noexecstack -Wformat -Werror=format-security \
|
||||
-isystem$NDK/platforms/$PLATFORMVER/arch-x86/usr/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/libs/$ARCH/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/include/backward \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/libs/$ARCH/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/include/backward \
|
||||
-isystem$LOCAL_PATH/../sdl-1.2/include \
|
||||
`echo $APP_MODULES | sed \"s@\([-a-zA-Z0-9_.]\+\)@-isystem$LOCAL_PATH/../\1/include@g\"` \
|
||||
$MISSING_INCLUDE $CFLAGS"
|
||||
@@ -84,7 +84,7 @@ $SHARED \
|
||||
`echo $APP_SHARED_LIBS | sed \"s@\([-a-zA-Z0-9_.]\+\)@$LOCAL_PATH/../../obj/local/$ARCH/lib\1.so@g\"` \
|
||||
-L$NDK/platforms/$PLATFORMVER/arch-x86/usr/lib \
|
||||
-lc -lm -lGLESv1_CM -ldl -llog -lz \
|
||||
-L$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/libs/$ARCH \
|
||||
-L$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/libs/$ARCH \
|
||||
-lgnustl_static \
|
||||
-no-canonical-prefixes $UNRESOLVED -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now \
|
||||
-lsupc++ \
|
||||
@@ -92,17 +92,17 @@ $MISSING_LIB $LDFLAGS"
|
||||
|
||||
#echo env CFLAGS=\""$CFLAGS"\" LDFLAGS=\""$LDFLAGS"\" "$@"
|
||||
|
||||
env PATH=$NDK/toolchains/$ARCH-$GCCVER/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \
|
||||
env PATH=$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \
|
||||
CFLAGS="$CFLAGS" \
|
||||
CXXFLAGS="$CXXFLAGS $CFLAGS -frtti -fexceptions" \
|
||||
LDFLAGS="$LDFLAGS" \
|
||||
CC="$NDK/toolchains/$ARCH-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-gcc" \
|
||||
CXX="$NDK/toolchains/$ARCH-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
RANLIB="$NDK/toolchains/$ARCH-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \
|
||||
LD="$NDK/toolchains/$ARCH-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
AR="$NDK/toolchains/$ARCH-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \
|
||||
CPP="$NDK/toolchains/$ARCH-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-cpp $CFLAGS" \
|
||||
NM="$NDK/toolchains/$ARCH-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \
|
||||
AS="$NDK/toolchains/$ARCH-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \
|
||||
STRIP="$NDK/toolchains/$ARCH-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \
|
||||
CC="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-gcc" \
|
||||
CXX="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
RANLIB="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \
|
||||
LD="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
AR="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \
|
||||
CPP="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-cpp $CFLAGS" \
|
||||
NM="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \
|
||||
AS="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \
|
||||
STRIP="$NDK/toolchains/$ARCH-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \
|
||||
"$@"
|
||||
|
||||
@@ -22,7 +22,7 @@ grep "64.bit" "$NDK/RELEASE.TXT" >/dev/null 2>&1 && MYARCH="${MYARCH}_64"
|
||||
|
||||
#echo NDK $NDK
|
||||
GCCPREFIX=arm-linux-androideabi
|
||||
[ -z "$GCCVER" ] && GCCVER=4.6
|
||||
[ -z "$NDK_TOOLCHAIN_VERSION" ] && NDK_TOOLCHAIN_VERSION=4.6
|
||||
PLATFORMVER=android-14
|
||||
LOCAL_PATH=`dirname $0`
|
||||
if which realpath > /dev/null ; then
|
||||
@@ -55,9 +55,9 @@ CFLAGS="\
|
||||
-fomit-frame-pointer -fno-strict-aliasing -finline-limit=300 \
|
||||
-DANDROID -Wall -Wno-unused -Wa,--noexecstack -Wformat -Werror=format-security \
|
||||
-isystem$NDK/platforms/$PLATFORMVER/arch-arm/usr/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/libs/$ARCH/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/include/backward \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/libs/$ARCH/include \
|
||||
-isystem$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/include/backward \
|
||||
-isystem$LOCAL_PATH/../sdl-1.2/include \
|
||||
`echo $APP_MODULES | sed \"s@\([-a-zA-Z0-9_.]\+\)@-isystem$LOCAL_PATH/../\1/include@g\"` \
|
||||
$MISSING_INCLUDE $CFLAGS"
|
||||
@@ -84,7 +84,7 @@ $SHARED \
|
||||
`echo $APP_SHARED_LIBS | sed \"s@\([-a-zA-Z0-9_.]\+\)@$LOCAL_PATH/../../obj/local/$ARCH/lib\1.so@g\"` \
|
||||
-L$NDK/platforms/$PLATFORMVER/arch-arm/usr/lib \
|
||||
-lc -lm -lGLESv1_CM -ldl -llog -lz \
|
||||
-L$NDK/sources/cxx-stl/gnu-libstdc++/$GCCVER/libs/$ARCH \
|
||||
-L$NDK/sources/cxx-stl/gnu-libstdc++/$NDK_TOOLCHAIN_VERSION/libs/$ARCH \
|
||||
-lgnustl_static \
|
||||
-no-canonical-prefixes $UNRESOLVED -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now \
|
||||
-lsupc++ \
|
||||
@@ -92,17 +92,17 @@ $MISSING_LIB $LDFLAGS"
|
||||
|
||||
#echo env CFLAGS=\""$CFLAGS"\" LDFLAGS=\""$LDFLAGS"\" "$@"
|
||||
|
||||
env PATH=$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \
|
||||
env PATH=$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin:$LOCAL_PATH:$PATH \
|
||||
CFLAGS="$CFLAGS" \
|
||||
CXXFLAGS="$CXXFLAGS $CFLAGS -frtti -fexceptions" \
|
||||
LDFLAGS="$LDFLAGS" \
|
||||
CC="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-gcc" \
|
||||
CXX="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
RANLIB="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \
|
||||
LD="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
AR="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \
|
||||
CPP="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-cpp $CFLAGS" \
|
||||
NM="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \
|
||||
AS="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \
|
||||
STRIP="$NDK/toolchains/$GCCPREFIX-$GCCVER/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \
|
||||
CC="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-gcc" \
|
||||
CXX="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
RANLIB="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ranlib" \
|
||||
LD="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-g++" \
|
||||
AR="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-ar" \
|
||||
CPP="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-cpp $CFLAGS" \
|
||||
NM="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-nm" \
|
||||
AS="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-as" \
|
||||
STRIP="$NDK/toolchains/$GCCPREFIX-$NDK_TOOLCHAIN_VERSION/prebuilt/$MYARCH/bin/$GCCPREFIX-strip" \
|
||||
"$@"
|
||||
|
||||
@@ -1,33 +1,44 @@
|
||||
# The application settings for Android libSDL port
|
||||
|
||||
AppSettingVersion=19
|
||||
|
||||
# libSDL version to use (1.2 or 1.3, specify 1.3 for SDL2)
|
||||
LibSdlVersion=1.2
|
||||
|
||||
# Specify application name (e.x. My Application)
|
||||
AppName="SuperTux"
|
||||
|
||||
# Specify reversed site name of application (e.x. com.mysite.myapp)
|
||||
AppFullName=org.lethargik.supertux2
|
||||
|
||||
# Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape
|
||||
ScreenOrientation=h
|
||||
# Application version code (integer)
|
||||
AppVersionCode=3408
|
||||
|
||||
# Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer
|
||||
InhibitSuspend=n
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="0.3.4.08"
|
||||
|
||||
# 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
|
||||
# If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped
|
||||
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -
|
||||
# these files are put inside .apk package by build system
|
||||
# Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS
|
||||
AppDataDownloadUrl="!Data files|http://sourceforge.net/projects/libsdl-android/files/SuperTux/data-2.zip"
|
||||
# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version, first associated with the file
|
||||
AppDataDownloadUrl="!Data files|:data.zip:obb:main.3406|:data.zip:http://sourceforge.net/projects/libsdl-android/files/SuperTux/data-3.zip"
|
||||
|
||||
# Reset SDL config when updating application to the new version (y) / (n)
|
||||
ResetSdlConfigForThisVersion=y
|
||||
|
||||
# Delete application data files when upgrading (specify file/dir paths separated by spaces)
|
||||
DeleteFilesOnUpgrade="data data.zip"
|
||||
|
||||
# Here you may type readme text, which will be shown during startup. Format is:
|
||||
# Text in English, use \\\\n to separate lines (that's four backslashes)^de:Text in Deutsch^ru:Text in Russian^button:Button that will open some URL:http://url-to-open/
|
||||
ReadmeText='^You may press "Home" now - the data will be downloaded in background'
|
||||
|
||||
# libSDL version to use (1.2/1.3/2.0)
|
||||
LibSdlVersion=1.2
|
||||
|
||||
# Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape
|
||||
ScreenOrientation=h
|
||||
|
||||
# Video color depth - 16 BPP is the fastest and supported for all modes, 24 bpp is supported only
|
||||
# with SwVideoMode=y, SDL_OPENGL mode supports everything. (16)/(24)/(32)
|
||||
VideoDepthBpp=24
|
||||
VideoDepthBpp=16
|
||||
|
||||
# Enable OpenGL depth buffer (needed only for 3-d applications, small speed decrease) (y) or (n)
|
||||
NeedDepthBuffer=n
|
||||
@@ -41,7 +52,7 @@ NeedGles2=n
|
||||
|
||||
# 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)
|
||||
SwVideoMode=y
|
||||
SwVideoMode=n
|
||||
|
||||
# Application video output will be resized to fit into native device screen (y)/(n)
|
||||
SdlVideoResize=y
|
||||
@@ -49,9 +60,19 @@ SdlVideoResize=y
|
||||
# Application resizing will keep 4:3 aspect ratio, with black bars at sides (y)/(n)
|
||||
SdlVideoResizeKeepAspect=n
|
||||
|
||||
# Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer
|
||||
InhibitSuspend=n
|
||||
|
||||
# Create Android service, so the app is less likely to be killed while in background
|
||||
CreateService=n
|
||||
|
||||
# Application does not call SDL_Flip() or SDL_UpdateRects() appropriately, or draws from non-main thread -
|
||||
# enabling the compatibility mode will force screen update every 100 milliseconds, which is laggy and inefficient (y) or (n)
|
||||
CompatibilityHacks=n
|
||||
CompatibilityHacksForceScreenUpdate=n
|
||||
|
||||
# Application does not call SDL_Flip() or SDL_UpdateRects() after mouse click (ScummVM and all Amiga emulators do that) -
|
||||
# force screen update by moving mouse cursor a little after each click (y) or (n)
|
||||
CompatibilityHacksForceScreenUpdateMouseClick=y
|
||||
|
||||
# Application initializes SDL audio/video inside static constructors (which is bad, you won't be able to run ndk-gdb) (y)/(n)
|
||||
CompatibilityHacksStaticInit=n
|
||||
@@ -73,7 +94,11 @@ CompatibilityHacksAdditionalPreloadedSharedLibraries=""
|
||||
CompatibilityHacksSlowCompatibleEventQueue=n
|
||||
|
||||
# Save and restore OpenGL state when drawing on-screen keyboard for apps that use SDL_OPENGL
|
||||
CompatibilityHacksTouchscreenKeyboardSaveRestoreOpenGLState=
|
||||
CompatibilityHacksTouchscreenKeyboardSaveRestoreOpenGLState=n
|
||||
|
||||
# Application uses SDL_UpdateRects() properly, and does not draw in any region outside those rects.
|
||||
# This improves drawing speed, but I know only one application that does that, and it's written by me (y)/(n)
|
||||
CompatibilityHacksProperUsageOfSDL_UpdateRects=n
|
||||
|
||||
# Application uses mouse (y) or (n), this will show mouse emulation dialog to the user
|
||||
AppUsesMouse=y
|
||||
@@ -81,30 +106,48 @@ AppUsesMouse=y
|
||||
# Application needs two-button mouse, will also enable advanced point-and-click features (y) or (n)
|
||||
AppNeedsTwoButtonMouse=n
|
||||
|
||||
# Right mouse button can do long-press/drag&drop action, necessary for some games (y) or (n)
|
||||
# If you disable it, swiping with two fingers will send mouse wheel events
|
||||
RightMouseButtonLongPress=n
|
||||
|
||||
# Show SDL mouse cursor, for applications that do not draw cursor at all (y) or (n)
|
||||
ShowMouseCursor=n
|
||||
|
||||
# Generate more touch events, by default SDL generates one event per one video frame, this is useful for drawing apps (y) or (n)
|
||||
GenerateSubframeTouchEvents=n
|
||||
|
||||
# Force relative (laptop) mouse movement mode, useful when both on-screen keyboard and mouse are needed (y) or (n)
|
||||
ForceRelativeMouseMode=n
|
||||
|
||||
# Application needs arrow keys (y) or (n), will show on-screen dpad/joystick (y) or (n)
|
||||
# Show on-screen dpad/joystick, that will act as arrow keys (y) or (n)
|
||||
AppNeedsArrowKeys=y
|
||||
|
||||
# On-screen dpad/joystick will appear under finger when it touches the screen (y) or (n)
|
||||
# Joystick always follows finger, so moving mouse requires touching the screen with other finger
|
||||
FloatingScreenJoystick=n
|
||||
|
||||
# Application needs text input (y) or (n), enables button for text input on screen
|
||||
AppNeedsTextInput=y
|
||||
|
||||
# Application uses joystick (y) or (n), the on-screen DPAD will be used as joystick 0 axes 0-1
|
||||
# This will disable AppNeedsArrowKeys option
|
||||
AppUsesJoystick=n
|
||||
|
||||
# Application uses second on-screen joystick, as SDL joystick 0 axes 2-3 (y)/(n)
|
||||
AppUsesSecondJoystick=n
|
||||
|
||||
# Application uses third on-screen joystick, as SDL joystick 0 axes 20-21 (y)/(n)
|
||||
AppUsesThirdJoystick=n
|
||||
|
||||
# Application uses accelerometer (y) or (n), the accelerometer will be used as joystick 1 axes 0-1 and 5-7
|
||||
AppUsesAccelerometer=n
|
||||
|
||||
# Application uses gyroscope (y) or (n), the gyroscope will be used as joystick 1 axes 2-4
|
||||
AppUsesGyroscope=n
|
||||
|
||||
# Use gyroscope to move mouse cursor (y) or (n), it eats battery, and can be disabled in settings, do not use with AppUsesGyroscope setting
|
||||
MoveMouseWithGyroscope=n
|
||||
|
||||
# Application uses multitouch (y) or (n), multitouch events are passed as SDL_JOYBALLMOTION events for the joystick 0
|
||||
AppUsesMultitouch=n
|
||||
|
||||
@@ -113,6 +156,15 @@ AppUsesMultitouch=n
|
||||
# This option will add additional permission to Android manifest (y)/(n)
|
||||
AppRecordsAudio=n
|
||||
|
||||
# Application needs to access SD card. If your data files are bigger than 5 Mb, enable it. (y) / (n)
|
||||
AccessSdCard=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
|
||||
|
||||
# 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)
|
||||
@@ -124,81 +176,76 @@ NonBlockingSwapBuffers=n
|
||||
# SEARCH and CALL by default return same keycode as DPAD_CENTER - one of those keys is available on most devices
|
||||
# Use word NO_REMAP if you want to preserve native functionality for certain key (volume keys are 3-rd and 4-th)
|
||||
# Keys: TOUCHSCREEN (works only when AppUsesMouse=n), DPAD_CENTER/SEARCH, VOLUMEUP, VOLUMEDOWN, MENU, BACK, CAMERA
|
||||
RedefinedKeys="LALT RETURN NO_REMAP NO_REMAP SPACE"
|
||||
RedefinedKeys="LALT RETURN NO_REMAP NO_REMAP NO_REMAP"
|
||||
|
||||
# Number of virtual keyboard keys (currently 6 is maximum)
|
||||
AppTouchscreenKeyboardKeysAmount=2
|
||||
|
||||
# Number of virtual keyboard keys that support autofire (currently 2 is maximum)
|
||||
AppTouchscreenKeyboardKeysAmountAutoFire=0
|
||||
|
||||
# Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right)
|
||||
RedefinedKeysScreenKb="SPACE LCTRL"
|
||||
|
||||
# Names for on-screen keyboard keys, such as Fire, Jump, Run etc, separated by spaces, they are used in SDL config menu
|
||||
RedefinedKeysScreenKbNames="Jump Action"
|
||||
|
||||
# On-screen keys theme
|
||||
# 0 = Ultimate Droid by Sean Stieber (green, with gamepad joystick)
|
||||
# 1 = Simple Theme by Beholder (white, with gamepad joystick)
|
||||
# 2 = Sun by Sirea (yellow, with round joystick)
|
||||
# 3 = Keen by Gerstrong (multicolor, with round joystick)
|
||||
TouchscreenKeysTheme=3
|
||||
|
||||
# Redefine gamepad keys to SDL keysyms, button order is:
|
||||
# A B X Y L1 R1 L2 R2 LThumb RThumb
|
||||
RedefinedKeysGamepad="SPACE LCTRL SPACE LCTRL SPACE LCTRL SPACE LCTRL SPACE LCTRL"
|
||||
|
||||
# How long to show startup menu button, in msec, 0 to disable startup menu
|
||||
StartupMenuButtonTimeout=3000
|
||||
|
||||
# Menu items to hide from startup menu, available menu items:
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced
|
||||
HiddenMenuOptions='SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMouse.DisplaySizeConfig'
|
||||
|
||||
# Menu items to show at startup - this is Java code snippet, leave empty for default
|
||||
# new SettingsMenuMisc.ShowReadme(), (AppUsesMouse \&\& \! ForceRelativeMouseMode \? new SettingsMenuMouse.DisplaySizeConfig(true) : new SettingsMenu.DummyMenu()), new SettingsMenuMisc.OptionalDownloadConfig(true), new SettingsMenuMisc.GyroscopeCalibration()
|
||||
# Available menu items:
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced
|
||||
FirstStartMenuOptions=''
|
||||
|
||||
# Enable multi-ABI binary, with hardware FPU support - it will also work on old devices,
|
||||
# but .apk size is 2x bigger (y) / (n) / (x86) / (all)
|
||||
MultiABI=y
|
||||
|
||||
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
|
||||
AppMinimumRAM=0
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=03305
|
||||
# GCC version, 4.6 (default) or 4.8, CLANG is not supported yet
|
||||
NDK_TOOLCHAIN_VERSION=4.8
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="0.3.3.05"
|
||||
|
||||
# Reset SDL config when updating application to the new version (y) / (n)
|
||||
ResetSdlConfigForThisVersion=y
|
||||
|
||||
# Delete application data files when upgrading (specify file/dir paths separated by spaces)
|
||||
DeleteFilesOnUpgrade="data"
|
||||
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
||||
# Available architectures: armeabi armeabi-v7a armeabi-v7a-hard x86 mips
|
||||
MultiABI='armeabi-v7a x86 mips'
|
||||
|
||||
# Optional shared libraries to compile - removing some of them will save space
|
||||
# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed
|
||||
# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2
|
||||
CompiledLibraries="sdl_image physfs boost_system curl openal jpeg png vorbis ogg"
|
||||
CompiledLibraries="sdl_image physfs curl openal vorbis ogg"
|
||||
|
||||
# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n)
|
||||
CustomBuildScript=n
|
||||
|
||||
# Aditional CFLAGS for application
|
||||
AppCflags='-include GLES/gl.h -Ijni/openal/include/AL -DHAVE_SDL=1 -frtti -fexceptions'
|
||||
AppCflags='-DGL_VERSION_ES_CM_1_0=1 -Ijni/openal/include/AL -Ijni/boost/include -DHAVE_SDL=1 -frtti -fexceptions -std=gnu++11'
|
||||
|
||||
# Additional LDFLAGS for application
|
||||
AppLdflags='-frtti -fexceptions'
|
||||
|
||||
# If application has headers with the same name as system headers, this option tries to fix compiler flags to make it compilable
|
||||
AppOverlapsSystemHeaders=
|
||||
AppOverlapsSystemHeaders=n
|
||||
|
||||
# Build only following subdirs (empty will build all dirs, ignored with custom script)
|
||||
AppSubdirsBuild='. supertux/src/* supertux/external/tinygettext/tinygettext supertux/external/tinygettext supertux/external/findlocale supertux/external/obstack supertux/external/squirrel/include supertux/external/squirrel/squirrel supertux/external/squirrel/sqstdlib'
|
||||
AppSubdirsBuild='. supertux/src/* supertux/external/tinygettext/src supertux/external/tinygettext/include supertux/external/findlocale supertux/external/obstack supertux/external/squirrel/include supertux/external/squirrel/squirrel supertux/external/squirrel/sqstdlib'
|
||||
|
||||
# Exclude these files from build
|
||||
AppBuildExclude='supertux/external/findlocale/example.c'
|
||||
AppBuildExclude='supertux/external/findlocale/example.c supertux/src/video/sdl/sdl_lightmap.cpp supertux/src/video/sdl/sdl_painter.cpp supertux/src/video/sdl/sdl_renderer.cpp supertux/src/video/sdl/sdl_texture.cpp supertux/src/video/sdl/sdl_video_system.cpp supertux/src/control/game_controller_manager.cpp supertux/src/control/joystick_manager.cpp'
|
||||
|
||||
# Application command line parameters, including app name as 0-th param
|
||||
AppCmdline=''
|
||||
|
||||
# Here you may type readme text, which will be shown during startup. Format is:
|
||||
# Text in English, use \\\\n to separate lines^de:Text in Deutsch^ru:Text in Russian, and so on (that's four backslashes, nice isn't it?)
|
||||
ReadmeText='^You may press "Home" now - the data will be downloaded in background'
|
||||
AppCmdline='./supertux2'
|
||||
|
||||
# Screen size is used by Google Play to prevent an app to be installed on devices with smaller screens
|
||||
# Minimum screen size that application supports: (s)mall / (m)edium / (l)arge
|
||||
@@ -210,6 +257,9 @@ AdmobPublisherId=n
|
||||
# Your AdMob test device ID, to receive a test ad
|
||||
AdmobTestDeviceId=
|
||||
|
||||
# Your AdMob banner size (BANNER/IAB_BANNER/IAB_LEADERBOARD/IAB_MRECT/IAB_WIDE_SKYSCRAPER/SMART_BANNER)
|
||||
# Your AdMob banner size (BANNER/FULL_BANNER/LEADERBOARD/MEDIUM_RECTANGLE/SMART_BANNER/WIDE_SKYSCRAPER/FULL_WIDTH:Height/Width:AUTO_HEIGHT/Width:Height)
|
||||
AdmobBannerSize=
|
||||
|
||||
# Google Play Game Services application ID, required for cloud saves to work
|
||||
GooglePlayGameServicesId=
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,11 @@
|
||||
#define INSTALL_SUBDIR_BIN "games"
|
||||
#define INSTALL_SUBDIR_SHARE "share/games/supertux2"
|
||||
|
||||
#define SIZEOF_VOID_P 4
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
#if SIZEOF_VOID_P == 8
|
||||
#define _SQ64
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#ifndef VERSION_H
|
||||
#define VERSION_H
|
||||
#define PACKAGE_VERSION "0.3.3-GIT rexported"
|
||||
#define PACKAGE_VERSION "0.3.4-GIT commit '5e32f9729857c1322c2cf7d627f6e1692e15020b' "
|
||||
#endif
|
||||
|
||||
@@ -7,17 +7,17 @@ AppName="TeeWorlds"
|
||||
AppFullName=com.teeworlds
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=06219
|
||||
AppVersionCode=06220
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="0.6.2.19"
|
||||
AppVersionName="0.6.2.20"
|
||||
|
||||
# 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
|
||||
# If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped
|
||||
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -
|
||||
# these files are put inside .apk package by build system
|
||||
# Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS
|
||||
# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version, first associated with the file
|
||||
AppDataDownloadUrl="Game data|data.zip"
|
||||
|
||||
# Reset SDL config when updating application to the new version (y) / (n)
|
||||
@@ -28,7 +28,7 @@ DeleteFilesOnUpgrade="%"
|
||||
|
||||
# Here you may type readme text, which will be shown during startup. Format is:
|
||||
# Text in English, use \\\\n to separate lines (that's four backslashes)^de:Text in Deutsch^ru:Text in Russian^button:Button that will open some URL:http://url-to-open/
|
||||
ReadmeText='Tap left joystick to jump'
|
||||
ReadmeText=''
|
||||
|
||||
# libSDL version to use (1.2/1.3/2.0)
|
||||
LibSdlVersion=1.2
|
||||
@@ -68,7 +68,11 @@ CreateService=
|
||||
|
||||
# Application does not call SDL_Flip() or SDL_UpdateRects() appropriately, or draws from non-main thread -
|
||||
# enabling the compatibility mode will force screen update every 100 milliseconds, which is laggy and inefficient (y) or (n)
|
||||
CompatibilityHacks=n
|
||||
CompatibilityHacksForceScreenUpdate=n
|
||||
|
||||
# Application does not call SDL_Flip() or SDL_UpdateRects() after mouse click (ScummVM and all Amiga emulators do that) -
|
||||
# force screen update by moving mouse cursor a little after each click (y) or (n)
|
||||
CompatibilityHacksForceScreenUpdateMouseClick=y
|
||||
|
||||
# Application initializes SDL audio/video inside static constructors (which is bad, you won't be able to run ndk-gdb) (y)/(n)
|
||||
CompatibilityHacksStaticInit=n
|
||||
@@ -115,13 +119,18 @@ GenerateSubframeTouchEvents=
|
||||
# Force relative (laptop) mouse movement mode, useful when both on-screen keyboard and mouse are needed (y) or (n)
|
||||
ForceRelativeMouseMode=n
|
||||
|
||||
# Application needs arrow keys (y) or (n), will show on-screen dpad/joystick (y) or (n)
|
||||
# Show on-screen dpad/joystick, that will act as arrow keys (y) or (n)
|
||||
AppNeedsArrowKeys=n
|
||||
|
||||
# On-screen dpad/joystick will appear under finger when it touches the screen (y) or (n)
|
||||
# Joystick always follows finger, so moving mouse requires touching the screen with other finger
|
||||
FloatingScreenJoystick=
|
||||
|
||||
# Application needs text input (y) or (n), enables button for text input on screen
|
||||
AppNeedsTextInput=y
|
||||
|
||||
# Application uses joystick (y) or (n), the on-screen DPAD will be used as joystick 0 axes 0-1
|
||||
# This will disable AppNeedsArrowKeys option
|
||||
AppUsesJoystick=y
|
||||
|
||||
# Application uses second on-screen joystick, as SDL joystick 0 axes 2-3 (y)/(n)
|
||||
@@ -136,6 +145,9 @@ AppUsesAccelerometer=n
|
||||
# Application uses gyroscope (y) or (n), the gyroscope will be used as joystick 1 axes 2-4
|
||||
AppUsesGyroscope=n
|
||||
|
||||
# Use gyroscope to move mouse cursor (y) or (n), it eats battery, and can be disabled in settings, do not use with AppUsesGyroscope setting
|
||||
MoveMouseWithGyroscope=
|
||||
|
||||
# Application uses multitouch (y) or (n), multitouch events are passed as SDL_JOYBALLMOTION events for the joystick 0
|
||||
AppUsesMultitouch=n
|
||||
|
||||
@@ -190,22 +202,25 @@ RedefinedKeysGamepad="RETURN PAGEDOWN TAB T SPACE RCTRL RETURN RCTRL SPACE PAGED
|
||||
StartupMenuButtonTimeout=3000
|
||||
|
||||
# Menu items to hide from startup menu, available menu items:
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced
|
||||
HiddenMenuOptions='SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMouse.DisplaySizeConfig'
|
||||
|
||||
# Menu items to show at startup - this is Java code snippet, leave empty for default
|
||||
# new SettingsMenuMisc.ShowReadme(), (AppUsesMouse \&\& \! ForceRelativeMouseMode \? new SettingsMenuMouse.DisplaySizeConfig(true) : new SettingsMenu.DummyMenu()), new SettingsMenuMisc.OptionalDownloadConfig(true), new SettingsMenuMisc.GyroscopeCalibration()
|
||||
# Available menu items:
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced
|
||||
FirstStartMenuOptions=''
|
||||
|
||||
# Enable multi-ABI binary, with hardware FPU support - it will also work on old devices,
|
||||
# but .apk size is 2x bigger (y) / (n) / (x86) / (all)
|
||||
MultiABI='all'
|
||||
|
||||
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
|
||||
AppMinimumRAM=0
|
||||
|
||||
# GCC version, 4.6 (default) or 4.8, CLANG is not supported yet
|
||||
NDK_TOOLCHAIN_VERSION=
|
||||
|
||||
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
||||
# Available architectures: armeabi armeabi-v7a armeabi-v7a-hard x86 mips
|
||||
MultiABI='armeabi-v7a' # armeabi armeabi-v7a x86 mips
|
||||
|
||||
# Optional shared libraries to compile - removing some of them will save space
|
||||
# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed
|
||||
# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2
|
||||
@@ -242,6 +257,9 @@ AdmobPublisherId=n
|
||||
# Your AdMob test device ID, to receive a test ad
|
||||
AdmobTestDeviceId=
|
||||
|
||||
# Your AdMob banner size (BANNER/IAB_BANNER/IAB_LEADERBOARD/IAB_MRECT/IAB_WIDE_SKYSCRAPER/SMART_BANNER)
|
||||
# Your AdMob banner size (BANNER/FULL_BANNER/LEADERBOARD/MEDIUM_RECTANGLE/SMART_BANNER/WIDE_SKYSCRAPER/FULL_WIDTH:Height/Width:AUTO_HEIGHT/Width:Height)
|
||||
AdmobBannerSize=
|
||||
|
||||
# Google Play Game Services application ID, required for cloud saves to work
|
||||
GooglePlayGameServicesId=
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 21 KiB |
Submodule project/jni/application/teeworlds/src updated: ffebe73245...18e0e9942e
@@ -7,10 +7,10 @@ AppName="XRick"
|
||||
AppFullName=net.xrick.sdl
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=102121208
|
||||
AppVersionCode=102121209
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="021212.08"
|
||||
AppVersionName="021212.09"
|
||||
|
||||
# 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
|
||||
|
||||
@@ -71,8 +71,8 @@ endif
|
||||
|
||||
all:
|
||||
@echo "ROOTDIR=$(ROOTDIR)" > Makefile.global
|
||||
@echo "XOBJ=$(XOBJ)" >> Makefile.global
|
||||
@echo "CFLAGS=-g -ansi -pedantic -Wall -W -O2 -I $(ROOTDIR)/include $(shell sdl-config --cflags)" >> Makefile.global
|
||||
@echo "XOBJ=$(XOBJ)" >> Makefile.global
|
||||
@echo "CFLAGS=-g -ansi -pedantic -Wall -W -O0 -I $(ROOTDIR)/include $(shell sdl-config --cflags) -g" >> Makefile.global
|
||||
@echo "LDFLAGS=-lz $(shell sdl-config --libs) -g" >> Makefile.global
|
||||
@echo "CC=gcc" >> Makefile.global
|
||||
@echo "CPP=gcc -E" >> Makefile.global
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
#undef GFXPC
|
||||
|
||||
/* joystick support */
|
||||
#ifdef __ANDROID__
|
||||
#define ENABLE_JOYSTICK
|
||||
#endif
|
||||
|
||||
/* sound support */
|
||||
#define ENABLE_SOUND
|
||||
|
||||
@@ -568,7 +568,7 @@ e_them_t3_action2(U8 e)
|
||||
U8 i;
|
||||
S16 x, y;
|
||||
|
||||
while (1) {
|
||||
/*while (1)*/ {
|
||||
|
||||
/* calc new sprite */
|
||||
i = ent_sprseq[ent_ents[e].sprbase + ent_ents[e].sproffs];
|
||||
|
||||
@@ -158,7 +158,7 @@ sysarg_init(int argc, char **argv)
|
||||
else if (!strcmp(argv[i], "-speed")) {
|
||||
if (++i == argc) sysarg_fail("missing speed value");
|
||||
sysarg_args_period = atoi(argv[i]) - 1;
|
||||
if (sysarg_args_period < 0 || sysarg_args_period > 99)
|
||||
if (sysarg_args_period < 0 || sysarg_args_period > 250)
|
||||
sysarg_fail("invalid speed value");
|
||||
}
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ AppName="Debian"
|
||||
AppFullName=com.cuntubuntu
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=141008
|
||||
AppVersionCode=141129
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="14.10.08"
|
||||
AppVersionName="14.11.29"
|
||||
|
||||
# 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
|
||||
@@ -18,7 +18,7 @@ AppVersionName="14.10.08"
|
||||
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -
|
||||
# these files are put inside .apk package by build system
|
||||
# Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS
|
||||
AppDataDownloadUrl="!!System image|:data.tar.gz:http://sourceforge.net/projects/libsdl-android/files/ubuntu/14.05.01/dist-debug-wheezy-proot-<ARCH>.tar.gz/download^!!XSDL data files|:data-1.tar.gz:data-1.tgz^!!XSDL fonts|:DroidSansMono.ttf:DroidSansMono.ttf^!!Postinstall script|:postinstall.sh:postinstall2.sh^!!Update|:update1.tar.gz:update1.tgz^!!Update|:update2.tar.gz:update2-<ARCH>.tgz^!!Update|:update3.tar.gz:update3.tgz^!!Update|:update4.tar.gz:update4.tgz"
|
||||
AppDataDownloadUrl="!!System image|:data.tar.gz:http://sourceforge.net/projects/libsdl-android/files/ubuntu/14.05.01/dist-debug-wheezy-proot-<ARCH>.tar.gz/download^!!XSDL data files|:data-1.tar.gz:data-1.tgz^!!XSDL fonts|:DroidSansMono.ttf:DroidSansMono.ttf^!!Postinstall script|:postinstall.sh:postinstall2.sh^!!Update|:update1.tar.gz:update1.tgz^!!Update|:update2.tar.gz:update2-<ARCH>.tgz^!!Update|:update3.tar.gz:update3.tgz^!!Update|:update4.tar.gz:update4.tgz^!!Update|:update5.tar.gz:update5-<ARCH>.tgz"
|
||||
|
||||
# Reset SDL config when updating application to the new version (y) / (n)
|
||||
ResetSdlConfigForThisVersion=n
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -15,7 +15,7 @@ x11proto-video-dev x11proto-xcmisc-dev \
|
||||
x11proto-xext-dev x11proto-xf86bigfont-dev \
|
||||
x11proto-xf86dga-dev x11proto-xf86dri-dev \
|
||||
x11proto-xf86vidmode-dev x11proto-xinerama-dev \
|
||||
libxmuu-dev libxt-dev libsm-dev libice-dev \
|
||||
libxmuu-dev libxt-dev libsm-dev libice-dev libudev-dev \
|
||||
libxrender-dev libxrandr-dev curl autoconf automake libtool
|
||||
|
||||
You will need both xcb-proto and python-xcbgen packages
|
||||
|
||||
Submodule project/jni/application/xserver-debian/xserver updated: 38269b6980...58c205cd11
@@ -7,18 +7,18 @@ AppName="GIMP Inkscape"
|
||||
AppFullName=org.gimp.inkscape
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=28215
|
||||
AppVersionCode=28218
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="2.8.2.15"
|
||||
AppVersionName="2.8.2.18"
|
||||
|
||||
# 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
|
||||
# If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped
|
||||
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -
|
||||
# these files are put inside .apk package by build system
|
||||
# Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS
|
||||
AppDataDownloadUrl="!!Data files|:data.tar.gz:http://sourceforge.net/projects/libsdl-android/files/ubuntu/14.05.01/dist-gimp-wheezy-<ARCH>.tar.gz/download^!!XSDL data files|:data-1.tar.gz:data-1.tgz^!!XSDL fonts|:DroidSansMono.ttf:DroidSansMono.ttf^!!Postinstall script|:postinstall.sh:postinstall2.sh^!!Update|:update1.tar.gz:update1.tgz"
|
||||
# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version, first associated with the file
|
||||
AppDataDownloadUrl="!!Data files|:data.tar.gz:http://sourceforge.net/projects/libsdl-android/files/ubuntu/14.05.01/dist-gimp-wheezy-<ARCH>.tar.gz/download^!!XSDL data files|:data-1.tar.gz:data-1.tgz^!!XSDL fonts|:DroidSansMono.ttf:DroidSansMono.ttf^!!Postinstall script|:postinstall.sh:postinstall2.sh^!!Update|:update1.tar.gz:update1.tgz^!!Update|:update2.tar.gz:update2-<ARCH>.tgz^!!Update|:update3.tar.gz:update3-<ARCH>.tgz^!!Update|:update4.tar.gz:update4.tgz"
|
||||
|
||||
# Reset SDL config when updating application to the new version (y) / (n)
|
||||
ResetSdlConfigForThisVersion=y
|
||||
@@ -36,12 +36,6 @@ LibSdlVersion=1.2
|
||||
# Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape
|
||||
ScreenOrientation=h
|
||||
|
||||
# Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer
|
||||
InhibitSuspend=n
|
||||
|
||||
# Create Android service, so the app is less likely to be killed while in background
|
||||
CreateService=n
|
||||
|
||||
# Video color depth - 16 BPP is the fastest and supported for all modes, 24 bpp is supported only
|
||||
# with SwVideoMode=y, SDL_OPENGL mode supports everything. (16)/(24)/(32)
|
||||
VideoDepthBpp=16
|
||||
@@ -66,9 +60,19 @@ SdlVideoResize=y
|
||||
# Application resizing will keep 4:3 aspect ratio, with black bars at sides (y)/(n)
|
||||
SdlVideoResizeKeepAspect=n
|
||||
|
||||
# Do not allow device to sleep when the application is in foreground, set this for video players or apps which use accelerometer
|
||||
InhibitSuspend=y
|
||||
|
||||
# Create Android service, so the app is less likely to be killed while in background
|
||||
CreateService=y
|
||||
|
||||
# Application does not call SDL_Flip() or SDL_UpdateRects() appropriately, or draws from non-main thread -
|
||||
# enabling the compatibility mode will force screen update every 100 milliseconds, which is laggy and inefficient (y) or (n)
|
||||
CompatibilityHacks=n
|
||||
CompatibilityHacksForceScreenUpdate=n
|
||||
|
||||
# Application does not call SDL_Flip() or SDL_UpdateRects() after mouse click (ScummVM and all Amiga emulators do that) -
|
||||
# force screen update by moving mouse cursor a little after each click (y) or (n)
|
||||
CompatibilityHacksForceScreenUpdateMouseClick=y
|
||||
|
||||
# Application initializes SDL audio/video inside static constructors (which is bad, you won't be able to run ndk-gdb) (y)/(n)
|
||||
CompatibilityHacksStaticInit=n
|
||||
@@ -102,6 +106,10 @@ AppUsesMouse=y
|
||||
# Application needs two-button mouse, will also enable advanced point-and-click features (y) or (n)
|
||||
AppNeedsTwoButtonMouse=y
|
||||
|
||||
# Right mouse button can do long-press/drag&drop action, necessary for some games (y) or (n)
|
||||
# If you disable it, swiping with two fingers will send mouse wheel events
|
||||
RightMouseButtonLongPress=n
|
||||
|
||||
# Show SDL mouse cursor, for applications that do not draw cursor at all (y) or (n)
|
||||
ShowMouseCursor=n
|
||||
|
||||
@@ -111,18 +119,26 @@ GenerateSubframeTouchEvents=y
|
||||
# Force relative (laptop) mouse movement mode, useful when both on-screen keyboard and mouse are needed (y) or (n)
|
||||
ForceRelativeMouseMode=y
|
||||
|
||||
# Application needs arrow keys (y) or (n), will show on-screen dpad/joystick (y) or (n)
|
||||
# Show on-screen dpad/joystick, that will act as arrow keys (y) or (n)
|
||||
AppNeedsArrowKeys=n
|
||||
|
||||
# On-screen dpad/joystick will appear under finger when it touches the screen (y) or (n)
|
||||
# Joystick always follows finger, so moving mouse requires touching the screen with other finger
|
||||
FloatingScreenJoystick=
|
||||
|
||||
# Application needs text input (y) or (n), enables button for text input on screen
|
||||
AppNeedsTextInput=n
|
||||
|
||||
# Application uses joystick (y) or (n), the on-screen DPAD will be used as joystick 0 axes 0-1
|
||||
# This will disable AppNeedsArrowKeys option
|
||||
AppUsesJoystick=n
|
||||
|
||||
# Application uses second on-screen joystick, as SDL joystick 0 axes 2-3 (y)/(n)
|
||||
AppUsesSecondJoystick=n
|
||||
|
||||
# Application uses third on-screen joystick, as SDL joystick 0 axes 20-21 (y)/(n)
|
||||
AppUsesThirdJoystick=
|
||||
|
||||
# Application uses accelerometer (y) or (n), the accelerometer will be used as joystick 1 axes 0-1 and 5-7
|
||||
AppUsesAccelerometer=n
|
||||
|
||||
@@ -186,22 +202,25 @@ RedefinedKeysGamepad="LCTRL LALT LSHIFT RETURN SPACE DELETE KP_PLUS KP_MINUS 1 2
|
||||
StartupMenuButtonTimeout=3000
|
||||
|
||||
# Menu items to hide from startup menu, available menu items:
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced
|
||||
HiddenMenuOptions='SettingsMenuMisc.OptionalDownloadConfig'
|
||||
|
||||
# Menu items to show at startup - this is Java code snippet, leave empty for default
|
||||
# new SettingsMenuMisc.ShowReadme(), (AppUsesMouse \&\& \! ForceRelativeMouseMode \? new SettingsMenuMouse.DisplaySizeConfig(true) : new SettingsMenu.DummyMenu()), new SettingsMenuMisc.OptionalDownloadConfig(true), new SettingsMenuMisc.GyroscopeCalibration()
|
||||
# Available menu items:
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced
|
||||
FirstStartMenuOptions=''
|
||||
|
||||
# Enable multi-ABI binary, with hardware FPU support - it will also work on old devices,
|
||||
# but .apk size is 2x bigger (y) / (n) / (x86) / (all)
|
||||
MultiABI='armeabi-v7a x86'
|
||||
|
||||
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
|
||||
AppMinimumRAM=0
|
||||
|
||||
# GCC version, 4.6 (default) or 4.8, CLANG is not supported yet
|
||||
NDK_TOOLCHAIN_VERSION=
|
||||
|
||||
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
||||
# Available architectures: armeabi armeabi-v7a armeabi-v7a-hard x86 mips
|
||||
MultiABI='armeabi-v7a x86'
|
||||
|
||||
# Optional shared libraries to compile - removing some of them will save space
|
||||
# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed
|
||||
# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2
|
||||
@@ -226,7 +245,7 @@ AppSubdirsBuild=''
|
||||
AppBuildExclude=''
|
||||
|
||||
# Application command line parameters, including app name as 0-th param
|
||||
AppCmdline='XSDL -nohelp -screenbuttons -exec $SECURE_STORAGE_DIR/img/proot.sh ./start-gimp.sh'
|
||||
AppCmdline='XSDL -nohelp -screenbuttons -exec $SECURE_STORAGE_DIR/usr/bin/xli -onroot -border black -center $SECURE_STORAGE_DIR/loading.gif ; $SECURE_STORAGE_DIR/img/proot.sh ./startx.sh'
|
||||
|
||||
# Screen size is used by Google Play to prevent an app to be installed on devices with smaller screens
|
||||
# Minimum screen size that application supports: (s)mall / (m)edium / (l)arge
|
||||
@@ -238,9 +257,9 @@ AdmobPublisherId=n
|
||||
# Your AdMob test device ID, to receive a test ad
|
||||
AdmobTestDeviceId=
|
||||
|
||||
# Your AdMob banner size (BANNER/IAB_BANNER/IAB_LEADERBOARD/IAB_MRECT/IAB_WIDE_SKYSCRAPER/SMART_BANNER)
|
||||
# Your AdMob banner size (BANNER/FULL_BANNER/LEADERBOARD/MEDIUM_RECTANGLE/SMART_BANNER/WIDE_SKYSCRAPER/FULL_WIDTH:Height/Width:AUTO_HEIGHT/Width:Height)
|
||||
AdmobBannerSize=
|
||||
|
||||
# Right mouse button can do long-press/drag&drop action, necessary for some games (y) or (n)
|
||||
# If you disable it, swiping with two fingers will send mouse wheel events
|
||||
RightMouseButtonLongPress=n
|
||||
# Google Play Game Services application ID, required for cloud saves to work
|
||||
GooglePlayGameServicesId=
|
||||
|
||||
|
||||
1
project/jni/application/xserver-gimp/AndroidData/data-1.tgz
Symbolic link
1
project/jni/application/xserver-gimp/AndroidData/data-1.tgz
Symbolic link
@@ -0,0 +1 @@
|
||||
../xserver/data/data-1.tgz
|
||||
1
project/jni/application/xserver-gimp/AndroidData/postinstall2.sh
Symbolic link
1
project/jni/application/xserver-gimp/AndroidData/postinstall2.sh
Symbolic link
@@ -0,0 +1 @@
|
||||
../../xserver-debian/AndroidData/postinstall2.sh
|
||||
@@ -0,0 +1 @@
|
||||
../../xserver-debian/AndroidData/update2-armeabi-v7a.tgz
|
||||
1
project/jni/application/xserver-gimp/AndroidData/update2-x86.tgz
Symbolic link
1
project/jni/application/xserver-gimp/AndroidData/update2-x86.tgz
Symbolic link
@@ -0,0 +1 @@
|
||||
../../xserver-debian/AndroidData/update2-x86.tgz
|
||||
@@ -0,0 +1 @@
|
||||
../../xserver-debian/AndroidData/update5-armeabi-v7a.tgz
|
||||
1
project/jni/application/xserver-gimp/AndroidData/update3-x86.tgz
Symbolic link
1
project/jni/application/xserver-gimp/AndroidData/update3-x86.tgz
Symbolic link
@@ -0,0 +1 @@
|
||||
../../xserver-debian/AndroidData/update5-x86.tgz
|
||||
BIN
project/jni/application/xserver-gimp/AndroidData/update4.tgz
Normal file
BIN
project/jni/application/xserver-gimp/AndroidData/update4.tgz
Normal file
Binary file not shown.
Submodule project/jni/application/xserver-gimp/xserver updated: 3cce1acc1f...58c205cd11
@@ -7,17 +7,17 @@ AppName="XServer XSDL"
|
||||
AppFullName=x.org.server
|
||||
|
||||
# Application version code (integer)
|
||||
AppVersionCode=11116
|
||||
AppVersionCode=11118
|
||||
|
||||
# Application user-visible version name (string)
|
||||
AppVersionName="1.11.16"
|
||||
AppVersionName="1.11.18"
|
||||
|
||||
# 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
|
||||
# If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped
|
||||
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -
|
||||
# these files are put inside .apk package by build system
|
||||
# Also please avoid 'https://' URLs, many Android devices do not have trust certificates and will fail to connect to SF.net over HTTPS
|
||||
# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version, first associated with the file
|
||||
AppDataDownloadUrl="!!Data files|:data.tar.gz:data-1.tgz^!!Data files|:DroidSansMono.ttf:DroidSansMono.ttf^Additional fonts (90Mb)|:xfonts.tar.gz:http://sourceforge.net/projects/libsdl-android/files/apk/XServer-XSDL/xfonts.tgz/download"
|
||||
|
||||
# Reset SDL config when updating application to the new version (y) / (n)
|
||||
@@ -68,7 +68,11 @@ CreateService=y
|
||||
|
||||
# Application does not call SDL_Flip() or SDL_UpdateRects() appropriately, or draws from non-main thread -
|
||||
# enabling the compatibility mode will force screen update every 100 milliseconds, which is laggy and inefficient (y) or (n)
|
||||
CompatibilityHacks=n
|
||||
CompatibilityHacksForceScreenUpdate=n
|
||||
|
||||
# Application does not call SDL_Flip() or SDL_UpdateRects() after mouse click (ScummVM and all Amiga emulators do that) -
|
||||
# force screen update by moving mouse cursor a little after each click (y) or (n)
|
||||
CompatibilityHacksForceScreenUpdateMouseClick=y
|
||||
|
||||
# Application initializes SDL audio/video inside static constructors (which is bad, you won't be able to run ndk-gdb) (y)/(n)
|
||||
CompatibilityHacksStaticInit=n
|
||||
@@ -115,18 +119,26 @@ GenerateSubframeTouchEvents=n
|
||||
# Force relative (laptop) mouse movement mode, useful when both on-screen keyboard and mouse are needed (y) or (n)
|
||||
ForceRelativeMouseMode=y
|
||||
|
||||
# Application needs arrow keys (y) or (n), will show on-screen dpad/joystick (y) or (n)
|
||||
# Show on-screen dpad/joystick, that will act as arrow keys (y) or (n)
|
||||
AppNeedsArrowKeys=n
|
||||
|
||||
# On-screen dpad/joystick will appear under finger when it touches the screen (y) or (n)
|
||||
# Joystick always follows finger, so moving mouse requires touching the screen with other finger
|
||||
FloatingScreenJoystick=
|
||||
|
||||
# Application needs text input (y) or (n), enables button for text input on screen
|
||||
AppNeedsTextInput=n
|
||||
|
||||
# Application uses joystick (y) or (n), the on-screen DPAD will be used as joystick 0 axes 0-1
|
||||
# This will disable AppNeedsArrowKeys option
|
||||
AppUsesJoystick=n
|
||||
|
||||
# Application uses second on-screen joystick, as SDL joystick 0 axes 2-3 (y)/(n)
|
||||
AppUsesSecondJoystick=n
|
||||
|
||||
# Application uses third on-screen joystick, as SDL joystick 0 axes 20-21 (y)/(n)
|
||||
AppUsesThirdJoystick=
|
||||
|
||||
# Application uses accelerometer (y) or (n), the accelerometer will be used as joystick 1 axes 0-1 and 5-7
|
||||
AppUsesAccelerometer=n
|
||||
|
||||
@@ -169,9 +181,6 @@ RedefinedKeys="LALT UNDO NO_REMAP NO_REMAP UNDO HELP"
|
||||
# Number of virtual keyboard keys (currently 6 is maximum)
|
||||
AppTouchscreenKeyboardKeysAmount=0
|
||||
|
||||
# Number of virtual keyboard keys that support autofire (currently 2 is maximum)
|
||||
AppTouchscreenKeyboardKeysAmountAutoFire=0
|
||||
|
||||
# Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right)
|
||||
RedefinedKeysScreenKb="LALT RETURN KP_PLUS KP_MINUS SPACE DELETE KP_PLUS KP_MINUS UNDO HELP"
|
||||
|
||||
@@ -193,22 +202,25 @@ RedefinedKeysGamepad="LALT RETURN KP_PLUS KP_MINUS SPACE DELETE KP_PLUS KP_MINUS
|
||||
StartupMenuButtonTimeout=3000
|
||||
|
||||
# Menu items to hide from startup menu, available menu items:
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced
|
||||
HiddenMenuOptions=''
|
||||
|
||||
# Menu items to show at startup - this is Java code snippet, leave empty for default
|
||||
# new SettingsMenuMisc.ShowReadme(), (AppUsesMouse \&\& \! ForceRelativeMouseMode \? new SettingsMenuMouse.DisplaySizeConfig(true) : new SettingsMenu.DummyMenu()), new SettingsMenuMisc.OptionalDownloadConfig(true), new SettingsMenuMisc.GyroscopeCalibration()
|
||||
# Available menu items:
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout
|
||||
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced
|
||||
FirstStartMenuOptions='SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.OptionalDownloadConfig'
|
||||
|
||||
# Enable multi-ABI binary, with hardware FPU support - it will also work on old devices,
|
||||
# but .apk size is 2x bigger (y) / (n) / (x86) / (all)
|
||||
MultiABI=all
|
||||
|
||||
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
|
||||
AppMinimumRAM=0
|
||||
|
||||
# GCC version, 4.6 (default) or 4.8, CLANG is not supported yet
|
||||
NDK_TOOLCHAIN_VERSION=
|
||||
|
||||
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
|
||||
# Available architectures: armeabi armeabi-v7a armeabi-v7a-hard x86 mips
|
||||
MultiABI='armeabi-v7a x86 mips'
|
||||
|
||||
# Optional shared libraries to compile - removing some of them will save space
|
||||
# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed
|
||||
# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2
|
||||
@@ -245,6 +257,9 @@ AdmobPublisherId=n
|
||||
# Your AdMob test device ID, to receive a test ad
|
||||
AdmobTestDeviceId=
|
||||
|
||||
# Your AdMob banner size (BANNER/IAB_BANNER/IAB_LEADERBOARD/IAB_MRECT/IAB_WIDE_SKYSCRAPER/SMART_BANNER)
|
||||
# Your AdMob banner size (BANNER/FULL_BANNER/LEADERBOARD/MEDIUM_RECTANGLE/SMART_BANNER/WIDE_SKYSCRAPER/FULL_WIDTH:Height/Width:AUTO_HEIGHT/Width:Height)
|
||||
AdmobBannerSize=
|
||||
|
||||
# Google Play Game Services application ID, required for cloud saves to work
|
||||
GooglePlayGameServicesId=
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <pthread.h>
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL/SDL_ttf.h>
|
||||
#include <SDL/SDL_screenkeyboard.h>
|
||||
#include <android/log.h>
|
||||
|
||||
#include "gfx.h"
|
||||
@@ -298,7 +299,10 @@ void XSDL_showConfigMenu(int * resolutionW, int * displayW, int * resolutionH, i
|
||||
int x = 0, y = 0, i, ii;
|
||||
SDL_Event event;
|
||||
int res = -1, dpi = -1;
|
||||
int customX = 1000, customY = 1000;
|
||||
enum { MODE_CUSTOM = 11 };
|
||||
char native[32] = "0x0", native56[32], native46[32], native36[32], native26[32];
|
||||
char custom[32] = "1000x1000";
|
||||
int vertical = SDL_ListModes(NULL, 0)[0]->w < SDL_ListModes(NULL, 0)[0]->h;
|
||||
char cfgpath[PATH_MAX];
|
||||
FILE * cfgfile;
|
||||
@@ -317,7 +321,7 @@ void XSDL_showConfigMenu(int * resolutionW, int * displayW, int * resolutionH, i
|
||||
{
|
||||
native, native56, native46, native36,
|
||||
native26, "1280x1024", "1280x960", "1280x720",
|
||||
"1024x768", "800x600", "800x480", "640x480"
|
||||
"1024x768", "800x600", "800x480", custom
|
||||
};
|
||||
const int resVal[][2] = {
|
||||
{*resolutionW, *resolutionH},
|
||||
@@ -326,7 +330,7 @@ void XSDL_showConfigMenu(int * resolutionW, int * displayW, int * resolutionH, i
|
||||
{(*resolutionW * 3 / 6) & ~0x3, (*resolutionH * 3 / 6) & ~0x3},
|
||||
{(*resolutionW * 2 / 6) & ~0x3, (*resolutionH * 2 / 6) & ~0x3},
|
||||
{1280,1024}, {1280,960}, {1280,720},
|
||||
{1024,768}, {800,600}, {800,480}, {640,480}
|
||||
{1024,768}, {800,600}, {800,480}, {customX,customY}
|
||||
};
|
||||
|
||||
const char * fontsStr[] = {
|
||||
@@ -355,9 +359,10 @@ void XSDL_showConfigMenu(int * resolutionW, int * displayW, int * resolutionH, i
|
||||
cfgfile = fopen(cfgpath, "r");
|
||||
if( cfgfile )
|
||||
{
|
||||
fscanf(cfgfile, "%d %d", &savedRes, &savedDpi);
|
||||
fscanf(cfgfile, "%d %d %d %d", &savedRes, &savedDpi, &customX, &customY);
|
||||
fclose(cfgfile);
|
||||
}
|
||||
sprintf(custom, "%dx%d", customX, customY);
|
||||
|
||||
int counter = 3000, config = 0;
|
||||
Uint32 curtime = SDL_GetTicks();
|
||||
@@ -424,7 +429,7 @@ void XSDL_showConfigMenu(int * resolutionW, int * displayW, int * resolutionH, i
|
||||
x = y;
|
||||
y = z;
|
||||
}
|
||||
i = (y / (VID_Y/2));
|
||||
i = (y / (VID_Y/3));
|
||||
ii = (x / (VID_X/4));
|
||||
res = i * 4 + ii;
|
||||
__android_log_print(ANDROID_LOG_INFO, "XSDL", "Screen coords %d %d res %d\n", x, y, res);
|
||||
@@ -448,15 +453,71 @@ void XSDL_showConfigMenu(int * resolutionW, int * displayW, int * resolutionH, i
|
||||
else
|
||||
renderString(resStr[i*4+ii], VID_X/8 + (ii*VID_X/4), VID_Y/6 + (i*VID_Y/3));
|
||||
if( i == 0 && ii == 0 && !vertical )
|
||||
renderString("native", VID_X/8, VID_Y/6 + VID_Y/12);
|
||||
renderString("native", VID_X/8, VID_Y/6 - VID_Y/12);
|
||||
if( i == 2 && ii == 3 && !vertical )
|
||||
renderString("custom", VID_X/8 + (ii*VID_X/4), VID_Y/6 - VID_Y/12 + (i*VID_Y/3));
|
||||
}
|
||||
//SDL_GetMouseState(&x, &y);
|
||||
//renderString("X", x, y);
|
||||
SDL_Delay(100);
|
||||
SDL_Flip(SDL_GetVideoSurface());
|
||||
if (res == MODE_CUSTOM)
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_INFO, "XSDL", "Selected custom display resolution");
|
||||
SDL_ANDROID_ToggleScreenKeyboardWithoutTextInput();
|
||||
customX = 0;
|
||||
customY = 0;
|
||||
custom[0] = 0;
|
||||
while (customX == 0 || customY == 0)
|
||||
{
|
||||
while (SDL_PollEvent(&event))
|
||||
{
|
||||
if (event.type == SDL_KEYDOWN)
|
||||
{
|
||||
switch (event.key.keysym.sym)
|
||||
{
|
||||
case SDLK_HELP:
|
||||
return;
|
||||
case SDLK_RETURN:
|
||||
if (customX == 0)
|
||||
customX = atoi(custom);
|
||||
else
|
||||
customY = atoi(custom);
|
||||
custom[0] = 0;
|
||||
break;
|
||||
case SDLK_BACKSPACE:
|
||||
if (strlen(custom) > 0)
|
||||
custom[strlen(custom) - 1] = 0;
|
||||
break;
|
||||
case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
|
||||
custom[strlen(custom) + 1] = 0;
|
||||
custom[strlen(custom)] = event.key.keysym.sym;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
SDL_FillRect(SDL_GetVideoSurface(), NULL, 0);
|
||||
if (customX == 0)
|
||||
renderString("Enter width:", VID_X/8, VID_Y/6);
|
||||
else
|
||||
renderString("Enter height:", VID_X/8, VID_Y/6);
|
||||
renderString("Press Enter when done", VID_X*3/4, VID_Y/6);
|
||||
renderString(custom, VID_X/8 + VID_X/4, VID_Y/6);
|
||||
SDL_Delay(100);
|
||||
SDL_Flip(SDL_GetVideoSurface());
|
||||
}
|
||||
__android_log_print(ANDROID_LOG_INFO, "XSDL", "Selected custom display resolution: %s = %d %d", custom, customX, customY);
|
||||
}
|
||||
}
|
||||
*resolutionW = resVal[res][0];
|
||||
*resolutionH = resVal[res][1];
|
||||
if (res == MODE_CUSTOM)
|
||||
{
|
||||
*resolutionW = customX;
|
||||
*resolutionH = customY;
|
||||
}
|
||||
while ( dpi < 0 )
|
||||
{
|
||||
while (SDL_PollEvent(&event))
|
||||
@@ -514,7 +575,7 @@ void XSDL_showConfigMenu(int * resolutionW, int * displayW, int * resolutionH, i
|
||||
cfgfile = fopen(cfgpath, "w");
|
||||
if( cfgfile )
|
||||
{
|
||||
fprintf(cfgfile, "%d %d\n", res, dpi);
|
||||
fprintf(cfgfile, "%d %d %d %d\n", res, dpi, customX, customY);
|
||||
fclose(cfgfile);
|
||||
}
|
||||
}
|
||||
@@ -598,10 +659,10 @@ void XSDL_generateBackground(const char * port, int showHelp, int resolutionW, i
|
||||
|
||||
void XSDL_showServerLaunchErrorMessage()
|
||||
{
|
||||
showErrorMessage( "Error: X server failed to launch,\n"
|
||||
"because of stale Unix socket with non-existing path.\n\n"
|
||||
"Power off your device and power it on,\n"
|
||||
"and everything will work again.");
|
||||
showErrorMessage( "Error: X server failed to launch.\n\n"
|
||||
"This may happen because of SELinux,\n"
|
||||
"or because installation was corrupted.\n"
|
||||
"Either way, this app will not work, which is sad.");
|
||||
}
|
||||
|
||||
void showErrorMessage(const char *msg)
|
||||
|
||||
Submodule project/jni/application/xserver/xserver updated: 3cce1acc1f...58c205cd11
@@ -113,7 +113,11 @@
|
||||
#define PACKAGE_VERSION ""
|
||||
|
||||
/* The size of a `void*', as computed by sizeof. */
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
@@ -121,11 +121,11 @@ namespace gcn
|
||||
SDL_Surface *textSurface;
|
||||
if (mAntiAlias)
|
||||
{
|
||||
textSurface = TTF_RenderText_Blended(mFont, text.c_str(), sdlCol);
|
||||
textSurface = TTF_RenderUTF8_Blended(mFont, text.c_str(), sdlCol);
|
||||
}
|
||||
else
|
||||
{
|
||||
textSurface = TTF_RenderText_Solid(mFont, text.c_str(), sdlCol);
|
||||
textSurface = TTF_RenderUTF8_Solid(mFont, text.c_str(), sdlCol);
|
||||
}
|
||||
|
||||
SDL_Rect dst, src;
|
||||
|
||||
@@ -52,6 +52,10 @@
|
||||
#include "guichan/key.hpp"
|
||||
#include "guichan/mouseinput.hpp"
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <SDL_screenkeyboard.h>
|
||||
#endif
|
||||
|
||||
namespace gcn
|
||||
{
|
||||
TextField::TextField()
|
||||
@@ -147,6 +151,9 @@ namespace gcn
|
||||
|
||||
void TextField::mousePressed(MouseEvent& mouseEvent)
|
||||
{
|
||||
#ifdef ANDROID
|
||||
SDL_ANDROID_ToggleScreenKeyboardTextInput(getText().c_str());
|
||||
#endif
|
||||
if (mouseEvent.getButton() == MouseEvent::LEFT)
|
||||
{
|
||||
mCaretPosition = getFont()->getStringIndexAt(mText, mouseEvent.getX() + mXScroll);
|
||||
|
||||
@@ -2,7 +2,10 @@ LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
ifeq ($(filter armeabi-v7a-hard, $(APP_ABI)),) # Pre-compiled lib disabled for armhf ABI
|
||||
ifneq ($(TARGET_ARCH_ABI),armeabi-v7a-hard) # Pre-compiled lib disabled for armhf ABI
|
||||
ifneq ($(TARGET_ARCH_ABI),arm64-v8a) # Not supported yet
|
||||
ifneq ($(TARGET_ARCH_ABI),x86_64) # Not supported yet
|
||||
ifneq ($(TARGET_ARCH_ABI),mips64) # Not supported yet
|
||||
|
||||
LOCAL_MODULE := $(notdir $(LOCAL_PATH))
|
||||
|
||||
@@ -13,3 +16,6 @@ LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).so
|
||||
include $(PREBUILT_SHARED_LIBRARY)
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -2,7 +2,10 @@ LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
ifeq ($(filter armeabi-v7a-hard, $(APP_ABI)),) # Pre-compiled lib disabled for armhf ABI
|
||||
ifneq ($(TARGET_ARCH_ABI),armeabi-v7a-hard) # Pre-compiled lib disabled for armhf ABI
|
||||
ifneq ($(TARGET_ARCH_ABI),arm64-v8a) # Not supported yet
|
||||
ifneq ($(TARGET_ARCH_ABI),x86_64) # Not supported yet
|
||||
ifneq ($(TARGET_ARCH_ABI),mips64) # Not supported yet
|
||||
|
||||
LOCAL_MODULE := $(notdir $(LOCAL_PATH))
|
||||
|
||||
@@ -17,3 +20,6 @@ obj/local/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a: $(LOCAL_PATH)/$(LOCAL_SRC_FIL
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -30,7 +30,7 @@ LOCAL_SRC_FILES += jidctint.c jidctfst.S
|
||||
endif
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
LOCAL_CFLAGS += -DAVOID_TABLES -DANDROID_RGB
|
||||
LOCAL_CFLAGS += -DAVOID_TABLES
|
||||
LOCAL_CFLAGS += -O3 -fstrict-aliasing -fprefetch-loop-arrays
|
||||
|
||||
LOCAL_MODULE:= jpeg
|
||||
|
||||
@@ -7,8 +7,7 @@ LOCAL_MODULE := lzma
|
||||
APP_SUBDIRS := $(patsubst $(LOCAL_PATH)/%, %, $(shell find $(LOCAL_PATH)/src -type d))
|
||||
|
||||
LOCAL_C_INCLUDES := $(foreach D, $(APP_SUBDIRS), $(LOCAL_PATH)/$(D)) $(LOCAL_PATH)/include
|
||||
LOCAL_CFLAGS := -O3 -DHAVE_CONFIG_H -DTUKLIB_SYMBOL_PREFIX=lzma_ -std=c99 # Enable "restrict" keyword
|
||||
|
||||
LOCAL_CFLAGS := -O3 -DHAVE_CONFIG_H -DTUKLIB_SYMBOL_PREFIX=lzma_ -std=c99 -DSDL_JAVA_PACKAGE_PATH=$(SDL_JAVA_PACKAGE_PATH)
|
||||
|
||||
LOCAL_CPP_EXTENSION := .cpp
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/* #undef AC_APPLE_UNIVERSAL_BUILD */
|
||||
|
||||
/* How many MiB of RAM to assume if the real amount cannot be determined. */
|
||||
#define ASSUME_RAM 16
|
||||
#define ASSUME_RAM 64
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
@@ -255,7 +255,7 @@
|
||||
#define PACKAGE_NAME "XZ Utils"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "XZ Utils 5.0.0"
|
||||
#define PACKAGE_STRING "XZ Utils 5.0.7"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "xz"
|
||||
@@ -264,14 +264,18 @@
|
||||
#define PACKAGE_URL "http://tukaani.org/xz/"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "5.0.0"
|
||||
#define PACKAGE_VERSION "5.0.7"
|
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on
|
||||
your system. */
|
||||
/* #undef PTHREAD_CREATE_JOINABLE */
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#ifdef __LP64__
|
||||
#define SIZEOF_SIZE_T 8
|
||||
#else
|
||||
#define SIZEOF_SIZE_T 4
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
@@ -318,6 +318,9 @@ extern LZMA_API(lzma_ret) lzma_block_header_encode(
|
||||
* The size of the Block Header must have already been decoded with
|
||||
* lzma_block_header_size_decode() macro and stored to block->header_size.
|
||||
*
|
||||
* The integrity check type from Stream Header must have been stored
|
||||
* to block->check.
|
||||
*
|
||||
* block->filters must have been allocated, but they don't need to be
|
||||
* initialized (possible existing filter options are not freed).
|
||||
*
|
||||
@@ -483,6 +486,7 @@ extern LZMA_API(size_t) lzma_block_buffer_bound(size_t uncompressed_size)
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful.
|
||||
* - LZMA_BUF_ERROR: Not enough output buffer space.
|
||||
* - LZMA_UNSUPPORTED_CHECK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_DATA_ERROR
|
||||
|
||||
@@ -66,6 +66,10 @@
|
||||
* This function is a wrapper for lzma_raw_encoder_memusage().
|
||||
*
|
||||
* \param preset Compression preset (level and possible flags)
|
||||
*
|
||||
* \return Number of bytes of memory required for the given
|
||||
* preset when encoding. If an error occurs, for example
|
||||
* due to unsupported preset, UINT64_MAX is returned.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@@ -77,6 +81,11 @@ extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset)
|
||||
* This function is a wrapper for lzma_raw_decoder_memusage().
|
||||
*
|
||||
* \param preset Compression preset (level and possible flags)
|
||||
*
|
||||
* \return Number of bytes of memory required to decompress a file
|
||||
* that was compressed using the given preset. If an error
|
||||
* occurs, for example due to unsupported preset, UINT64_MAX
|
||||
* is returned.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@@ -148,6 +157,7 @@ extern LZMA_API(lzma_ret) lzma_easy_encoder(
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful.
|
||||
* - LZMA_BUF_ERROR: Not enough output buffer space.
|
||||
* - LZMA_UNSUPPORTED_CHECK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_DATA_ERROR
|
||||
@@ -171,6 +181,7 @@ extern LZMA_API(lzma_ret) lzma_easy_buffer_encode(
|
||||
*
|
||||
* \return - LZMA_OK: Initialization was successful.
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_UNSUPPORTED_CHECK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_PROG_ERROR
|
||||
*/
|
||||
@@ -250,6 +261,7 @@ extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size)
|
||||
*
|
||||
* \return - LZMA_OK: Encoding was successful.
|
||||
* - LZMA_BUF_ERROR: Not enough output buffer space.
|
||||
* - LZMA_UNSUPPORTED_CHECK
|
||||
* - LZMA_OPTIONS_ERROR
|
||||
* - LZMA_MEM_ERROR
|
||||
* - LZMA_DATA_ERROR
|
||||
|
||||
@@ -131,7 +131,9 @@ extern LZMA_API(lzma_ret) lzma_filters_copy(const lzma_filter *src,
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
*
|
||||
* \return Number of bytes of memory required for the given
|
||||
* filter chain when encoding.
|
||||
* filter chain when encoding. If an error occurs,
|
||||
* for example due to unsupported filter chain,
|
||||
* UINT64_MAX is returned.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_raw_encoder_memusage(const lzma_filter *filters)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
@@ -148,7 +150,9 @@ extern LZMA_API(uint64_t) lzma_raw_encoder_memusage(const lzma_filter *filters)
|
||||
* .id == LZMA_VLI_UNKNOWN.
|
||||
*
|
||||
* \return Number of bytes of memory required for the given
|
||||
* filter chain when decoding.
|
||||
* filter chain when decoding. If an error occurs,
|
||||
* for example due to unsupported filter chain,
|
||||
* UINT64_MAX is returned.
|
||||
*/
|
||||
extern LZMA_API(uint64_t) lzma_raw_decoder_memusage(const lzma_filter *filters)
|
||||
lzma_nothrow lzma_attr_pure;
|
||||
|
||||
@@ -412,6 +412,9 @@ typedef struct {
|
||||
*
|
||||
* This function is available only if LZMA1 or LZMA2 encoder has been enabled
|
||||
* when building liblzma.
|
||||
*
|
||||
* \return On success, false is returned. If the preset is not
|
||||
* supported, true is returned.
|
||||
*/
|
||||
extern LZMA_API(lzma_bool) lzma_lzma_preset(
|
||||
lzma_options_lzma *options, uint32_t preset) lzma_nothrow;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
*/
|
||||
#define LZMA_VERSION_MAJOR 5
|
||||
#define LZMA_VERSION_MINOR 0
|
||||
#define LZMA_VERSION_PATCH 0
|
||||
#define LZMA_VERSION_PATCH 7
|
||||
#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
|
||||
|
||||
#ifndef LZMA_VERSION_COMMIT
|
||||
|
||||
65
project/jni/lzma/src/XZInputStream.c
Normal file
65
project/jni/lzma/src/XZInputStream.c
Normal file
@@ -0,0 +1,65 @@
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include "lzma.h"
|
||||
|
||||
#include "jniwrapperstuff.h"
|
||||
|
||||
JNIEXPORT jlong JNICALL
|
||||
JAVA_EXPORT_NAME(XZInputStream_nativeInit) (JNIEnv* env, jobject thiz)
|
||||
{
|
||||
lzma_stream * stream = (lzma_stream *) malloc(sizeof(lzma_stream));
|
||||
lzma_stream tmp = LZMA_STREAM_INIT;
|
||||
*stream = tmp;
|
||||
int ret = lzma_stream_decoder(stream, UINT64_MAX, LZMA_CONCATENATED);
|
||||
if (ret != LZMA_OK)
|
||||
{
|
||||
free(stream);
|
||||
return 0;
|
||||
}
|
||||
return (jlong) (intptr_t) stream;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
JAVA_EXPORT_NAME(XZInputStream_nativeClose) (JNIEnv* env, jobject thiz, jlong nativeData)
|
||||
{
|
||||
lzma_stream * stream = (lzma_stream *) (intptr_t) nativeData;
|
||||
lzma_end(stream);
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL
|
||||
JAVA_EXPORT_NAME(XZInputStream_nativeRead) (JNIEnv* env, jobject thiz, jlong nativeData,
|
||||
jobject inBuf, jint inAvailable, jobject outBuf,
|
||||
jint outCount, jobject offsets)
|
||||
{
|
||||
lzma_stream * stream = (lzma_stream *) (intptr_t) nativeData;
|
||||
uint8_t *inBufNative = (uint8_t *) (*env)->GetPrimitiveArrayCritical(env, inBuf, NULL);
|
||||
uint8_t *outBufNative = (uint8_t *) (*env)->GetPrimitiveArrayCritical(env, outBuf, NULL);
|
||||
jint *offsetsNative = (jint *) (*env)->GetPrimitiveArrayCritical(env, offsets, NULL);
|
||||
jint inOffset = offsetsNative[0];
|
||||
jint outOffset = offsetsNative[1];
|
||||
int ret;
|
||||
|
||||
stream->avail_in = inAvailable - inOffset;
|
||||
stream->next_in = inBufNative + inOffset;
|
||||
stream->avail_out = outCount;
|
||||
stream->next_out = outBufNative + outOffset;
|
||||
ret = lzma_code(stream, inAvailable == -1 ? LZMA_FINISH : LZMA_RUN);
|
||||
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, offsets, offsetsNative, 0);
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, outBuf, outBufNative, 0);
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, inBuf, inBufNative, 0);
|
||||
|
||||
inOffset = inAvailable - stream->avail_in;
|
||||
outOffset += outCount - stream->avail_out;
|
||||
|
||||
offsetsNative[0] = inOffset;
|
||||
offsetsNative[1] = outOffset;
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -65,6 +65,9 @@
|
||||
#ifndef PRIu32
|
||||
# define PRIu32 "u"
|
||||
#endif
|
||||
#ifndef PRIx32
|
||||
# define PRIx32 "x"
|
||||
#endif
|
||||
#ifndef PRIX32
|
||||
# define PRIX32 "X"
|
||||
#endif
|
||||
@@ -76,6 +79,9 @@
|
||||
# ifndef PRIu64
|
||||
# define PRIu64 "llu"
|
||||
# endif
|
||||
# ifndef PRIx64
|
||||
# define PRIx64 "llx"
|
||||
# endif
|
||||
# ifndef PRIX64
|
||||
# define PRIX64 "llX"
|
||||
# endif
|
||||
@@ -86,6 +92,9 @@
|
||||
# ifndef PRIu64
|
||||
# define PRIu64 "lu"
|
||||
# endif
|
||||
# ifndef PRIx64
|
||||
# define PRIx64 "lx"
|
||||
# endif
|
||||
# ifndef PRIX64
|
||||
# define PRIX64 "lX"
|
||||
# endif
|
||||
@@ -94,9 +103,12 @@
|
||||
# define UINT64_MAX UINT64_C(18446744073709551615)
|
||||
#endif
|
||||
|
||||
// Interix has broken header files, which typedef size_t to unsigned long,
|
||||
// but a few lines later define SIZE_MAX to INT32_MAX.
|
||||
#ifdef __INTERIX
|
||||
// Incorrect(?) SIZE_MAX:
|
||||
// - Interix headers typedef size_t to unsigned long,
|
||||
// but a few lines later define SIZE_MAX to INT32_MAX.
|
||||
// - SCO OpenServer (x86) headers typedef size_t to unsigned int
|
||||
// but define SIZE_MAX to INT32_MAX.
|
||||
#if defined(__INTERIX) || defined(_SCO_DS)
|
||||
# undef SIZE_MAX
|
||||
#endif
|
||||
|
||||
@@ -171,4 +183,10 @@ typedef unsigned char _Bool;
|
||||
# define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
||||
#endif
|
||||
|
||||
#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4
|
||||
# define lzma_attr_alloc_size(x) __attribute__((__alloc_size__(x)))
|
||||
#else
|
||||
# define lzma_attr_alloc_size(x)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,12 +39,14 @@ tuklib_open_stdxxx(int err_status)
|
||||
| (i == 0 ? O_WRONLY : O_RDONLY));
|
||||
|
||||
if (fd != i) {
|
||||
if (fd != -1)
|
||||
(void)close(fd);
|
||||
|
||||
// Something went wrong. Exit with the
|
||||
// exit status we were given. Don't try
|
||||
// to print an error message, since stderr
|
||||
// may very well be non-existent. This
|
||||
// error should be extremely rare.
|
||||
(void)close(fd);
|
||||
exit(err_status);
|
||||
}
|
||||
}
|
||||
|
||||
14
project/jni/lzma/src/jniwrapperstuff.h
Normal file
14
project/jni/lzma/src/jniwrapperstuff.h
Normal file
@@ -0,0 +1,14 @@
|
||||
/* The license of this source code is public domain */
|
||||
|
||||
/* JNI-C++ wrapper stuff */
|
||||
#ifndef _JNI_WRAPPER_STUFF_H_
|
||||
#define _JNI_WRAPPER_STUFF_H_
|
||||
|
||||
#ifndef SDL_JAVA_PACKAGE_PATH
|
||||
#error You have to define SDL_JAVA_PACKAGE_PATH to your package path with dots replaced with underscores, for example "com_example_SanAngeles"
|
||||
#endif
|
||||
#define JAVA_EXPORT_NAME2(name,package) Java_##package##_##name
|
||||
#define JAVA_EXPORT_NAME1(name,package) JAVA_EXPORT_NAME2(name,package)
|
||||
#define JAVA_EXPORT_NAME(name) JAVA_EXPORT_NAME1(name,SDL_JAVA_PACKAGE_PATH)
|
||||
|
||||
#endif
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "crc_macros.h"
|
||||
|
||||
|
||||
// If you make any changes, do some bench marking! Seemingly unrelated
|
||||
// If you make any changes, do some benchmarking! Seemingly unrelated
|
||||
// changes can very easily ruin the performance (and very probably is
|
||||
// very compiler dependent).
|
||||
extern LZMA_API(uint32_t)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
/// \todo Crypto++ has x86 ASM optimizations. They use SSE so if they
|
||||
/// are imported to liblzma, SSE instructions need to be used
|
||||
/// conditionally to keep the code working on older boxes.
|
||||
/// We could also support using some external libary for SHA-256.
|
||||
//
|
||||
// This code is based on the code found from 7-Zip, which has a modified
|
||||
// version of the SHA-256 found from Crypto++ <http://www.cryptopp.com/>.
|
||||
@@ -81,7 +80,7 @@ static const uint32_t SHA256_K[64] = {
|
||||
|
||||
|
||||
static void
|
||||
transform(uint32_t state[static 8], const uint32_t data[static 16])
|
||||
transform(uint32_t state[8], const uint32_t data[16])
|
||||
{
|
||||
uint32_t W[16];
|
||||
uint32_t T[8];
|
||||
|
||||
@@ -26,6 +26,11 @@ struct lzma_coder_s {
|
||||
SEQ_CODE,
|
||||
} sequence;
|
||||
|
||||
/// If true, reject files that are unlikely to be .lzma files.
|
||||
/// If false, more non-.lzma files get accepted and will give
|
||||
/// LZMA_DATA_ERROR either immediately or after a few output bytes.
|
||||
bool picky;
|
||||
|
||||
/// Position in the header fields
|
||||
size_t pos;
|
||||
|
||||
@@ -46,7 +51,7 @@ struct lzma_coder_s {
|
||||
|
||||
static lzma_ret
|
||||
alone_decode(lzma_coder *coder,
|
||||
lzma_allocator *allocator lzma_attribute((unused)),
|
||||
lzma_allocator *allocator lzma_attribute((__unused__)),
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size, uint8_t *restrict out,
|
||||
size_t *restrict out_pos, size_t out_size,
|
||||
@@ -68,13 +73,13 @@ alone_decode(lzma_coder *coder,
|
||||
|= (size_t)(in[*in_pos]) << (coder->pos * 8);
|
||||
|
||||
if (++coder->pos == 4) {
|
||||
if (coder->options.dict_size != UINT32_MAX) {
|
||||
if (coder->picky && coder->options.dict_size
|
||||
!= UINT32_MAX) {
|
||||
// A hack to ditch tons of false positives:
|
||||
// We allow only dictionary sizes that are
|
||||
// 2^n or 2^n + 2^(n-1). LZMA_Alone created
|
||||
// only files with 2^n, but accepts any
|
||||
// dictionary size. If someone complains, this
|
||||
// will be reconsidered.
|
||||
// dictionary size.
|
||||
uint32_t d = coder->options.dict_size - 1;
|
||||
d |= d >> 2;
|
||||
d |= d >> 3;
|
||||
@@ -103,9 +108,9 @@ alone_decode(lzma_coder *coder,
|
||||
|
||||
// Another hack to ditch false positives: Assume that
|
||||
// if the uncompressed size is known, it must be less
|
||||
// than 256 GiB. Again, if someone complains, this
|
||||
// will be reconsidered.
|
||||
if (coder->uncompressed_size != LZMA_VLI_UNKNOWN
|
||||
// than 256 GiB.
|
||||
if (coder->picky
|
||||
&& coder->uncompressed_size != LZMA_VLI_UNKNOWN
|
||||
&& coder->uncompressed_size
|
||||
>= (LZMA_VLI_C(1) << 38))
|
||||
return LZMA_FORMAT_ERROR;
|
||||
@@ -189,7 +194,7 @@ alone_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
|
||||
|
||||
extern lzma_ret
|
||||
lzma_alone_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
uint64_t memlimit)
|
||||
uint64_t memlimit, bool picky)
|
||||
{
|
||||
lzma_next_coder_init(&lzma_alone_decoder_init, next, allocator);
|
||||
|
||||
@@ -208,6 +213,7 @@ lzma_alone_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
}
|
||||
|
||||
next->coder->sequence = SEQ_PROPERTIES;
|
||||
next->coder->picky = picky;
|
||||
next->coder->pos = 0;
|
||||
next->coder->options.dict_size = 0;
|
||||
next->coder->options.preset_dict = NULL;
|
||||
@@ -223,7 +229,7 @@ lzma_alone_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
extern LZMA_API(lzma_ret)
|
||||
lzma_alone_decoder(lzma_stream *strm, uint64_t memlimit)
|
||||
{
|
||||
lzma_next_strm_init(lzma_alone_decoder_init, strm, memlimit);
|
||||
lzma_next_strm_init(lzma_alone_decoder_init, strm, memlimit, false);
|
||||
|
||||
strm->internal->supported_actions[LZMA_RUN] = true;
|
||||
strm->internal->supported_actions[LZMA_FINISH] = true;
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
#include "common.h"
|
||||
|
||||
|
||||
extern lzma_ret lzma_alone_decoder_init(lzma_next_coder *next,
|
||||
lzma_allocator *allocator, uint64_t memlimit);
|
||||
extern lzma_ret lzma_alone_decoder_init(
|
||||
lzma_next_coder *next, lzma_allocator *allocator,
|
||||
uint64_t memlimit, bool picky);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,7 +32,7 @@ struct lzma_coder_s {
|
||||
|
||||
static lzma_ret
|
||||
alone_encode(lzma_coder *coder,
|
||||
lzma_allocator *allocator lzma_attribute((unused)),
|
||||
lzma_allocator *allocator lzma_attribute((__unused__)),
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size, uint8_t *restrict out,
|
||||
size_t *restrict out_pos, size_t out_size,
|
||||
@@ -103,7 +103,7 @@ alone_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
if (options->dict_size < LZMA_DICT_SIZE_MIN)
|
||||
return LZMA_OPTIONS_ERROR;
|
||||
|
||||
// Round up to to the next 2^n or 2^n + 2^(n - 1) depending on which
|
||||
// Round up to the next 2^n or 2^n + 2^(n - 1) depending on which
|
||||
// one is the next unless it is UINT32_MAX. While the header would
|
||||
// allow any 32-bit integer, we do this to keep the decoder of liblzma
|
||||
// accepting the resulting files.
|
||||
|
||||
@@ -54,7 +54,7 @@ auto_decode(lzma_coder *coder, lzma_allocator *allocator,
|
||||
coder->memlimit, coder->flags));
|
||||
} else {
|
||||
return_if_error(lzma_alone_decoder_init(&coder->next,
|
||||
allocator, coder->memlimit));
|
||||
allocator, coder->memlimit, true));
|
||||
|
||||
// If the application wants to know about missing
|
||||
// integrity check or about the check in general, we
|
||||
|
||||
@@ -226,16 +226,23 @@ lzma_block_buffer_encode(lzma_block *block, lzma_allocator *allocator,
|
||||
const uint8_t *in, size_t in_size,
|
||||
uint8_t *out, size_t *out_pos, size_t out_size)
|
||||
{
|
||||
// Sanity checks
|
||||
if (block == NULL || block->filters == NULL
|
||||
|| (in == NULL && in_size != 0) || out == NULL
|
||||
// Validate the arguments.
|
||||
if (block == NULL || (in == NULL && in_size != 0) || out == NULL
|
||||
|| out_pos == NULL || *out_pos > out_size)
|
||||
return LZMA_PROG_ERROR;
|
||||
|
||||
// Check the version field.
|
||||
// The contents of the structure may depend on the version so
|
||||
// check the version before validating the contents of *block.
|
||||
if (block->version != 0)
|
||||
return LZMA_OPTIONS_ERROR;
|
||||
|
||||
if ((unsigned int)(block->check) > LZMA_CHECK_ID_MAX
|
||||
|| block->filters == NULL)
|
||||
return LZMA_PROG_ERROR;
|
||||
|
||||
if (!lzma_check_is_supported(block->check))
|
||||
return LZMA_UNSUPPORTED_CHECK;
|
||||
|
||||
// Size of a Block has to be a multiple of four, so limit the size
|
||||
// here already. This way we don't need to check it again when adding
|
||||
// Block Padding.
|
||||
@@ -243,8 +250,7 @@ lzma_block_buffer_encode(lzma_block *block, lzma_allocator *allocator,
|
||||
|
||||
// Get the size of the Check field.
|
||||
const size_t check_size = lzma_check_size(block->check);
|
||||
if (check_size == UINT32_MAX)
|
||||
return LZMA_PROG_ERROR;
|
||||
assert(check_size != UINT32_MAX);
|
||||
|
||||
// Reserve space for the Check field.
|
||||
if (out_size - *out_pos <= check_size)
|
||||
|
||||
@@ -144,7 +144,7 @@ block_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
|
||||
|
||||
static lzma_ret
|
||||
block_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const lzma_filter *filters lzma_attribute((unused)),
|
||||
const lzma_filter *filters lzma_attribute((__unused__)),
|
||||
const lzma_filter *reversed_filters)
|
||||
{
|
||||
if (coder->sequence != SEQ_CODE)
|
||||
@@ -161,6 +161,11 @@ lzma_block_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
{
|
||||
lzma_next_coder_init(&lzma_block_encoder_init, next, allocator);
|
||||
|
||||
if (block == NULL)
|
||||
return LZMA_PROG_ERROR;
|
||||
|
||||
// The contents of the structure may depend on the version so
|
||||
// check the version first.
|
||||
if (block->version != 0)
|
||||
return LZMA_OPTIONS_ERROR;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ lzma_version_string(void)
|
||||
// Memory allocation //
|
||||
///////////////////////
|
||||
|
||||
extern void * lzma_attribute((malloc))
|
||||
extern void * lzma_attribute((__malloc__)) lzma_attr_alloc_size(1)
|
||||
lzma_alloc(size_t size, lzma_allocator *allocator)
|
||||
{
|
||||
// Some malloc() variants return NULL if called with size == 0.
|
||||
|
||||
@@ -205,7 +205,7 @@ struct lzma_internal_s {
|
||||
|
||||
/// Allocates memory
|
||||
extern void *lzma_alloc(size_t size, lzma_allocator *allocator)
|
||||
lzma_attribute((malloc));
|
||||
lzma_attribute((__malloc__)) lzma_attr_alloc_size(1);
|
||||
|
||||
/// Frees memory
|
||||
extern void lzma_free(void *ptr, lzma_allocator *allocator);
|
||||
|
||||
@@ -43,7 +43,7 @@ static const struct {
|
||||
.changes_size = true,
|
||||
},
|
||||
#endif
|
||||
#ifdef HAVE_DECODER_LZMA2
|
||||
#if defined(HAVE_ENCODER_LZMA2) || defined(HAVE_DECODER_LZMA2)
|
||||
{
|
||||
.id = LZMA_FILTER_LZMA2,
|
||||
.options_size = sizeof(lzma_options_lzma),
|
||||
@@ -52,7 +52,7 @@ static const struct {
|
||||
.changes_size = true,
|
||||
},
|
||||
#endif
|
||||
#ifdef HAVE_DECODER_X86
|
||||
#if defined(HAVE_ENCODER_X86) || defined(HAVE_DECODER_X86)
|
||||
{
|
||||
.id = LZMA_FILTER_X86,
|
||||
.options_size = sizeof(lzma_options_bcj),
|
||||
@@ -70,7 +70,7 @@ static const struct {
|
||||
.changes_size = false,
|
||||
},
|
||||
#endif
|
||||
#ifdef HAVE_DECODER_IA64
|
||||
#if defined(HAVE_ENCODER_IA64) || defined(HAVE_DECODER_IA64)
|
||||
{
|
||||
.id = LZMA_FILTER_IA64,
|
||||
.options_size = sizeof(lzma_options_bcj),
|
||||
|
||||
@@ -398,10 +398,13 @@ extern LZMA_API(lzma_index *)
|
||||
lzma_index_init(lzma_allocator *allocator)
|
||||
{
|
||||
lzma_index *i = index_init_plain(allocator);
|
||||
if (i == NULL)
|
||||
return NULL;
|
||||
|
||||
index_stream *s = index_stream_init(0, 0, 1, 0, allocator);
|
||||
if (i == NULL || s == NULL) {
|
||||
index_stream_end(s, allocator);
|
||||
if (s == NULL) {
|
||||
lzma_free(i, allocator);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
index_tree_append(&i->streams, &s->node);
|
||||
|
||||
@@ -56,10 +56,11 @@ struct lzma_coder_s {
|
||||
static lzma_ret
|
||||
index_decode(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size, uint8_t *restrict out lzma_attribute((unused)),
|
||||
size_t *restrict out_pos lzma_attribute((unused)),
|
||||
size_t out_size lzma_attribute((unused)),
|
||||
lzma_action action lzma_attribute((unused)))
|
||||
size_t in_size,
|
||||
uint8_t *restrict out lzma_attribute((__unused__)),
|
||||
size_t *restrict out_pos lzma_attribute((__unused__)),
|
||||
size_t out_size lzma_attribute((__unused__)),
|
||||
lzma_action action lzma_attribute((__unused__)))
|
||||
{
|
||||
// Similar optimization as in index_encoder.c
|
||||
const size_t in_start = *in_pos;
|
||||
|
||||
@@ -42,12 +42,13 @@ struct lzma_coder_s {
|
||||
|
||||
static lzma_ret
|
||||
index_encode(lzma_coder *coder,
|
||||
lzma_allocator *allocator lzma_attribute((unused)),
|
||||
const uint8_t *restrict in lzma_attribute((unused)),
|
||||
size_t *restrict in_pos lzma_attribute((unused)),
|
||||
size_t in_size lzma_attribute((unused)),
|
||||
lzma_allocator *allocator lzma_attribute((__unused__)),
|
||||
const uint8_t *restrict in lzma_attribute((__unused__)),
|
||||
size_t *restrict in_pos lzma_attribute((__unused__)),
|
||||
size_t in_size lzma_attribute((__unused__)),
|
||||
uint8_t *restrict out, size_t *restrict out_pos,
|
||||
size_t out_size, lzma_action action lzma_attribute((unused)))
|
||||
size_t out_size,
|
||||
lzma_action action lzma_attribute((__unused__)))
|
||||
{
|
||||
// Position where to start calculating CRC32. The idea is that we
|
||||
// need to call lzma_crc32() only once per call to index_encode().
|
||||
|
||||
@@ -51,6 +51,9 @@ lzma_stream_buffer_encode(lzma_filter *filters, lzma_check check,
|
||||
|| out_pos_ptr == NULL || *out_pos_ptr > out_size)
|
||||
return LZMA_PROG_ERROR;
|
||||
|
||||
if (!lzma_check_is_supported(check))
|
||||
return LZMA_UNSUPPORTED_CHECK;
|
||||
|
||||
// Note for the paranoids: Index encoder prevents the Stream from
|
||||
// getting too big and still being accepted with LZMA_OK, and Block
|
||||
// encoder catches if the input is too big. So we don't need to
|
||||
@@ -81,26 +84,32 @@ lzma_stream_buffer_encode(lzma_filter *filters, lzma_check check,
|
||||
|
||||
out_pos += LZMA_STREAM_HEADER_SIZE;
|
||||
|
||||
// Block
|
||||
// Encode a Block but only if there is at least one byte of input.
|
||||
lzma_block block = {
|
||||
.version = 0,
|
||||
.check = check,
|
||||
.filters = filters,
|
||||
};
|
||||
|
||||
return_if_error(lzma_block_buffer_encode(&block, allocator,
|
||||
in, in_size, out, &out_pos, out_size));
|
||||
if (in_size > 0)
|
||||
return_if_error(lzma_block_buffer_encode(&block, allocator,
|
||||
in, in_size, out, &out_pos, out_size));
|
||||
|
||||
// Index
|
||||
{
|
||||
// Create an Index with one Record.
|
||||
// Create an Index. It will have one Record if there was
|
||||
// at least one byte of input to encode. Otherwise the
|
||||
// Index will be empty.
|
||||
lzma_index *i = lzma_index_init(allocator);
|
||||
if (i == NULL)
|
||||
return LZMA_MEM_ERROR;
|
||||
|
||||
lzma_ret ret = lzma_index_append(i, allocator,
|
||||
lzma_block_unpadded_size(&block),
|
||||
block.uncompressed_size);
|
||||
lzma_ret ret = LZMA_OK;
|
||||
|
||||
if (in_size > 0)
|
||||
ret = lzma_index_append(i, allocator,
|
||||
lzma_block_unpadded_size(&block),
|
||||
block.uncompressed_size);
|
||||
|
||||
// If adding the Record was successful, encode the Index
|
||||
// and get its size which will be stored into Stream Footer.
|
||||
|
||||
@@ -280,6 +280,7 @@ lzma_stream_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
next->end = &stream_encoder_end;
|
||||
next->update = &stream_encoder_update;
|
||||
|
||||
next->coder->filters[0].id = LZMA_VLI_UNKNOWN;
|
||||
next->coder->block_encoder = LZMA_NEXT_CODER_INIT;
|
||||
next->coder->index_encoder = LZMA_NEXT_CODER_INIT;
|
||||
next->coder->index = NULL;
|
||||
@@ -289,7 +290,6 @@ lzma_stream_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
|
||||
next->coder->sequence = SEQ_STREAM_HEADER;
|
||||
next->coder->block_options.version = 0;
|
||||
next->coder->block_options.check = check;
|
||||
next->coder->filters[0].id = LZMA_VLI_UNKNOWN;
|
||||
|
||||
// Initialize the Index
|
||||
lzma_index_end(next->coder->index, allocator);
|
||||
|
||||
@@ -85,7 +85,7 @@ delta_encode(lzma_coder *coder, lzma_allocator *allocator,
|
||||
|
||||
static lzma_ret
|
||||
delta_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const lzma_filter *filters_null lzma_attribute((unused)),
|
||||
const lzma_filter *filters_null lzma_attribute((__unused__)),
|
||||
const lzma_filter *reversed_filters)
|
||||
{
|
||||
// Delta doesn't and will never support changing the options in
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#
|
||||
# Author: Lasse Collin
|
||||
#
|
||||
# This file has been put into the public domain.
|
||||
# You can do whatever you want with this file.
|
||||
#
|
||||
|
||||
prefix=/usr/local
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: liblzma
|
||||
Description: General purpose data compression library
|
||||
URL: http://tukaani.org/xz/
|
||||
Version: 5.0.0
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -llzma
|
||||
Libs.private:
|
||||
@@ -126,7 +126,7 @@ decode_buffer(lzma_coder *coder,
|
||||
|
||||
static lzma_ret
|
||||
lz_decode(lzma_coder *coder,
|
||||
lzma_allocator *allocator lzma_attribute((unused)),
|
||||
lzma_allocator *allocator lzma_attribute((__unused__)),
|
||||
const uint8_t *restrict in, size_t *restrict in_pos,
|
||||
size_t in_size, uint8_t *restrict out,
|
||||
size_t *restrict out_pos, size_t out_size,
|
||||
|
||||
@@ -480,7 +480,7 @@ lz_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
|
||||
|
||||
static lzma_ret
|
||||
lz_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
|
||||
const lzma_filter *filters_null lzma_attribute((unused)),
|
||||
const lzma_filter *filters_null lzma_attribute((__unused__)),
|
||||
const lzma_filter *reversed_filters)
|
||||
{
|
||||
if (coder->lz.options_update == NULL)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user