diff --git a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.sln b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.sln index 724e6c607b..9f25febcdc 100644 --- a/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.sln +++ b/extras/Introjucer/Builds/VisualStudio2010/The Introjucer.sln @@ -1,4 +1,5 @@ Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 Project("{62DDBD62-D03F-FBCA-D85C-731B2D53653D}") = "The Introjucer", "The Introjucer.vcxproj", "{26ABE2A4-1F2F-8375-088D-D692A4408B5A}" EndProject Global diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h index 28fbd649c1..295777dd12 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h @@ -129,8 +129,7 @@ public: writeXmlOrThrow (*antBuildXml, target.getChildFile ("build.xml"), "UTF-8", 100); } - writeBuildPropertiesFile (target.getChildFile ("build.properties")); - writeDefaultPropertiesFile (target.getChildFile ("default.properties")); + writeProjectPropertiesFile (target.getChildFile ("project.properties")); writeLocalPropertiesFile (target.getChildFile ("local.properties")); writeIcon (target.getChildFile ("res/drawable-hdpi/icon.png"), 72); @@ -155,7 +154,7 @@ private: screens->setAttribute ("android:smallScreens", "true"); screens->setAttribute ("android:normalScreens", "true"); screens->setAttribute ("android:largeScreens", "true"); - screens->setAttribute ("android:xlargeScreens", "true"); + //screens->setAttribute ("android:xlargeScreens", "true"); screens->setAttribute ("android:anyDensity", "true"); if (getInternetNeeded().getValue()) @@ -202,7 +201,8 @@ private: << "# Don't edit this file! Your changes will be overwritten when you re-save the Introjucer project!" << newLine << newLine << "APP_STL := gnustl_static" << newLine - << "APP_CPPFLAGS += -fsigned-char -fexceptions -frtti" << newLine; + << "APP_CPPFLAGS += -fsigned-char -fexceptions -frtti" << newLine + << "APP_PLATFORM := android-7" << newLine; overwriteFileIfDifferentOrThrow (file, mo); } @@ -325,9 +325,8 @@ private: proj->setAttribute ("name", projectName); proj->setAttribute ("default", "debug"); - proj->createNewChildElement ("property")->setAttribute ("file", "local.properties"); - proj->createNewChildElement ("property")->setAttribute ("file", "build.properties"); - proj->createNewChildElement ("property")->setAttribute ("file", "default.properties"); + proj->createNewChildElement ("loadproperties")->setAttribute ("srcFile", "local.properties"); + proj->createNewChildElement ("loadproperties")->setAttribute ("srcFile", "project.properties"); XmlElement* path = proj->createNewChildElement ("path"); path->setAttribute ("id", "android.antlibs"); @@ -343,12 +342,12 @@ private: addNDKBuildStep (proj, "clean", "clean"); //addLinkStep (proj, "${basedir}/" + rebaseFromProjectFolderToBuildTarget (RelativePath()).toUnixStyle() + "/", "jni/app"); - addLinkStep (proj, "${basedir}/" + getJucePathFromTargetFolder().toUnixStyle() + "/src/native/android/java/", "src/com/juce"); + addLinkStep (proj, "${basedir}/" + getJucePathFromTargetFolder().toUnixStyle() + "/modules/juce_core/native/java/", "src/com/juce"); addNDKBuildStep (proj, "debug", "CONFIG=Debug"); addNDKBuildStep (proj, "release", "CONFIG=Release"); - proj->createNewChildElement ("setup"); + proj->createNewChildElement ("import")->setAttribute ("file", "${sdk.dir}/tools/ant/build.xml"); return proj; } @@ -379,20 +378,13 @@ private: executable->createNewChildElement ("arg")->setAttribute ("value", to); } - void writeBuildPropertiesFile (const File& file) - { - MemoryOutputStream mo; - mo << "# This file is used to override default values used by the Ant build system." << newLine; - overwriteFileIfDifferentOrThrow (file, mo); - } - - void writeDefaultPropertiesFile (const File& file) + void writeProjectPropertiesFile (const File& file) { MemoryOutputStream mo; mo << "# This file is used to override default values used by the Ant build system." << newLine << "# It is automatically generated - DO NOT EDIT IT or your changes will be lost!." << newLine << newLine - << "target=android-9" + << "target=Google Inc.:Google APIs:7" << newLine << newLine; overwriteFileIfDifferentOrThrow (file, mo); diff --git a/extras/JuceDemo/Builds/Android/build.properties b/extras/JuceDemo/Builds/Android/build.properties deleted file mode 100644 index d08980348c..0000000000 --- a/extras/JuceDemo/Builds/Android/build.properties +++ /dev/null @@ -1 +0,0 @@ -# This file is used to override default values used by the Ant build system. diff --git a/extras/JuceDemo/Builds/Android/build.xml b/extras/JuceDemo/Builds/Android/build.xml index 6bffadde89..8f4047f5a3 100644 --- a/extras/JuceDemo/Builds/Android/build.xml +++ b/extras/JuceDemo/Builds/Android/build.xml @@ -1,9 +1,8 @@ - - - + + @@ -18,7 +17,7 @@ - + @@ -33,5 +32,5 @@ - + diff --git a/extras/JuceDemo/Builds/Android/jni/Application.mk b/extras/JuceDemo/Builds/Android/jni/Application.mk index c23c57a17f..ae028cd907 100644 --- a/extras/JuceDemo/Builds/Android/jni/Application.mk +++ b/extras/JuceDemo/Builds/Android/jni/Application.mk @@ -3,3 +3,4 @@ APP_STL := gnustl_static APP_CPPFLAGS += -fsigned-char -fexceptions -frtti +APP_PLATFORM := android-7 diff --git a/extras/JuceDemo/Builds/Android/local.properties b/extras/JuceDemo/Builds/Android/local.properties index 77f7400469..cefd706cc8 100644 --- a/extras/JuceDemo/Builds/Android/local.properties +++ b/extras/JuceDemo/Builds/Android/local.properties @@ -2,5 +2,5 @@ # It is automatically generated by the Introjucer - DO NOT EDIT IT or your changes will be lost!. sdk.dir=${user.home}/SDKs/android-sdk-mac_x86 -ndk.dir=${user.home}/SDKs/android-ndk-r5c +ndk.dir=${user.home}/SDKs/android-ndk-r6b diff --git a/extras/JuceDemo/Builds/Android/default.properties b/extras/JuceDemo/Builds/Android/project.properties similarity index 80% rename from extras/JuceDemo/Builds/Android/default.properties rename to extras/JuceDemo/Builds/Android/project.properties index 1444d74911..9b259c744c 100644 --- a/extras/JuceDemo/Builds/Android/default.properties +++ b/extras/JuceDemo/Builds/Android/project.properties @@ -1,4 +1,5 @@ # This file is used to override default values used by the Ant build system. # It is automatically generated - DO NOT EDIT IT or your changes will be lost!. -target=android-9 +target=Google Inc.:Google APIs:7 + diff --git a/extras/JuceDemo/Juce Demo.jucer b/extras/JuceDemo/Juce Demo.jucer index 9ee5ed61c6..0256890289 100644 --- a/extras/JuceDemo/Juce Demo.jucer +++ b/extras/JuceDemo/Juce Demo.jucer @@ -22,7 +22,7 @@ diff --git a/modules/juce_core/native/juce_android_SystemStats.cpp b/modules/juce_core/native/juce_android_SystemStats.cpp index a88fe6546d..7516858d0b 100644 --- a/modules/juce_core/native/juce_android_SystemStats.cpp +++ b/modules/juce_core/native/juce_android_SystemStats.cpp @@ -178,10 +178,12 @@ int SystemStats::getCpuSpeedInMegaherz() int SystemStats::getMemorySizeInMegabytes() { + #if __ANDROID_API__ > 7 struct sysinfo sysi; if (sysinfo (&sysi) == 0) return (sysi.totalram * sysi.mem_unit / (1024 * 1024)); + #endif return 0; } @@ -264,9 +266,3 @@ bool Time::setSystemTimeToThisTime() const jassertfalse; return false; } - -//============================================================================== -// This is an unsatisfactory workaround for a linker warning that appeared in NDK5c. -// If anyone actually understands what this symbol is for and why the linker gets confused by it, -// please let me know! -extern "C" { void* __dso_handle = 0; }