mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Updates to keep android builds compatible with NDK6b and the latest SDK.
This commit is contained in:
parent
9eb2e337d3
commit
7c1e4dc0db
9 changed files with 22 additions and 33 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
# This file is used to override default values used by the Ant build system.
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="Juce Demo" default="debug">
|
||||
<property file="local.properties"/>
|
||||
<property file="build.properties"/>
|
||||
<property file="default.properties"/>
|
||||
<loadproperties srcFile="local.properties"/>
|
||||
<loadproperties srcFile="project.properties"/>
|
||||
<path id="android.antlibs">
|
||||
<pathelement path="${sdk.dir}/tools/lib/anttasks.jar"/>
|
||||
<pathelement path="${sdk.dir}/tools/lib/sdklib.jar"/>
|
||||
|
|
@ -18,7 +17,7 @@
|
|||
</target>
|
||||
<exec executable="ln" dir="${basedir}" failonerror="false">
|
||||
<arg value="-s"/>
|
||||
<arg value="${basedir}/../../../../../juce/src/native/android/java/"/>
|
||||
<arg value="${basedir}/../../../../../juce/modules/juce_core/native/java/"/>
|
||||
<arg value="src/com/juce"/>
|
||||
</exec>
|
||||
<target name="debug">
|
||||
|
|
@ -33,5 +32,5 @@
|
|||
<arg value="CONFIG=Release"/>
|
||||
</exec>
|
||||
</target>
|
||||
<setup/>
|
||||
<import file="${sdk.dir}/tools/ant/build.xml"/>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -3,3 +3,4 @@
|
|||
|
||||
APP_STL := gnustl_static
|
||||
APP_CPPFLAGS += -fsigned-char -fexceptions -frtti
|
||||
APP_PLATFORM := android-7
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
<VS2010 targetFolder="Builds/VisualStudio2010" vstFolder="c:\SDKs\vstsdk2.4"
|
||||
rtasFolder="c:\SDKs\PT_80_SDK" libraryType="1" juceFolder="../../../juce"/>
|
||||
<ANDROID targetFolder="Builds/Android" androidSDKPath="${user.home}/SDKs/android-sdk-mac_x86"
|
||||
androidNDKPath="${user.home}/SDKs/android-ndk-r5c" juceFolder="../../../juce"
|
||||
androidNDKPath="${user.home}/SDKs/android-ndk-r6b" juceFolder="../../../juce"
|
||||
androidInternetNeeded="1"/>
|
||||
</EXPORTFORMATS>
|
||||
<CONFIGURATIONS>
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue