const Component &comp = *manifest.get_component();
const SourcePackage &pkg = comp.get_package();
+ BuildInfo binfo;
+ manifest.collect_build_info(binfo);
+
IO::BufferedFile out(manifest.get_path().str(), IO::M_WRITE);
out.write("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
IO::print(out, "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" package=\"%s\">\n", comp.get_name());
out.write("\t<uses-sdk android:minSdkVersion=\"9\" />\n");
// TODO Make the icon name configurable
- IO::print(out, "\t<application android:icon=\"@drawable/icon\" android:label=\"%s\" android:hasCode=\"false\">\n", pkg.get_label());
+ bool debuggable = binfo.debug;
+ IO::print(out, "\t<application android:icon=\"@drawable/icon\" android:label=\"%s\" android:hasCode=\"false\" android:debuggable=\"%s\">\n", pkg.get_label(), debuggable);
if(SharedLibrary *native_lib = manifest.get_native_library())
{
- out.write("\t\t<activity android:name=\"android.app.NativeActivity\">\n");
+ out.write("\t\t<activity android:name=\"android.app.NativeActivity\"");
+ const string &orientation = manifest.get_orientation();
+ if(!orientation.empty())
+ IO::print(out, " android:screenOrientation=\"%s\"", orientation);
+ out.write(">\n");
IO::print(out, "\t\t\t<meta-data android:name=\"android.app.lib_name\" android:value=\"%s\" />\n", native_lib->get_libname());
out.write("\t\t\t<intent-filter>\n");
out.write("\t\t\t\t<action android:name=\"android.intent.action.MAIN\" />\n");
out.write("\t\t</activity>\n");
}
out.write("\t</application>\n");
+ const set<string> &permissions = manifest.get_permissions();
+ for(set<string>::const_iterator i=permissions.begin(); i!=permissions.end(); ++i)
+ IO::print(out, "\t<uses-permission android:name=\"%s\" />\n", *i);
out.write("</manifest>\n");
status = Task::SUCCESS;