blob: b31bec9852ab9048875b2ba7e20b1619610d1bf4 [file] [log] [blame]
// Copyright 2015 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto2";
package devtools.xcode;
option java_outer_classname = "BundleMergeProtos";
option java_package = "com.google.devtools.build.xcode.bundlemerge.proto";
// Contains all the arguments necessary to drive the BundleMerge tool,
// including the path to the output file and extra files to include in the
// bundle.
message Control {
// Paths to the plist files to merge into the final Plist.info file. These
// can be binary, XML, or ASCII format.
repeated string source_plist_file = 1;
// Path to the .ipa file to write. This is the final application bundle. Note
// this is ignored for nested bundles.
optional string out_file = 2;
// Which devices the app targets, which corresponds to the UIDeviceFamily
// setting. Should be one or more of the symbols in the
// com.google.devtools.build.xcode.common.TargetDeviceFamily enum (e.g.
// "IPAD", "IPHONE").
repeated string target_device_family = 3;
// One of the symbols in the com.google.devtools.build.xcode.common.Platform
// (e.g. "DEVICE", "SIMULATOR").
optional string platform = 4;
// The version of the SDK used to build the app.
optional string sdk_version = 5;
// Earliest iOS version on which the app will run.
optional string minimum_os_version = 6;
// The directory inside which all files are placed in the final bundle.
// For the top-most bundle, this is generally "Payload/{app_name}.app". If
// this bundle is nested, then this bundle_root is relative to to the parent's
// bundle_root.
optional string bundle_root = 7;
// All files to put in the bundle besides automatically-generated files such
// as Info.plist and PkgInfo. This should include the application binary.
repeated BundleFile bundle_file = 8;
repeated string merge_without_name_prefix_zip = 9 [deprecated=true];
// Zip files to merge with the final zip. Note that bundle_root is ignored
// when merging zips, so to place items in the bundle root, you should do one
// of the following:
// 1. make the merge_zips have entries that are named "{bundle_root}/foo"
// rather than just "foo"
// 2. set the root property on the MergeZip protobuf to {bundle_root}
// Note that the paths of these zips are always relative to the zip file root
// - they are not relative to the containing bundle.
repeated MergeZip merge_zip = 10;
// Variable substitutions to perform on property values in the merged
// .plist file.
repeated VariableSubstitution variable_substitution = 11;
// Bundles that are nested within this one. bundle_root in these bundles is
// relative to the containing bundle's bundle_root.
repeated Control nested_bundle = 12;
// Name of the executable for this bundle or unset if no such executable
// exists.
optional string executable_name = 13;
// A reverse-DNS string identifier for this bundle.
optional string primary_bundle_identifier = 14;
// A fallback bundle identifier used when primary is not filled.
optional string fallback_bundle_identifier = 15;
}
// Represents a zip file to merge with the final zip.
message MergeZip {
// The prefix to prepend to every entry name before putting it in the final
// zip. For instance, "Payload/Foo.app/" (notice the final slash).
optional string entry_name_prefix = 1 [default = ""];
// The path to the source file to merge.
optional string source_path = 2;
}
message BundleFile {
// The path of the file to put in the bundle.
optional string source_file = 1;
// The path of the file in the bundle, relative to the bundle root.
optional string bundle_path = 2;
// The external file attribute field in the central directory record in the
// .zip file. If omitted, the ZipInputEntry.DEFAULT_EXTERNAL_FILE_ATTRIBUTE
// constant is used.
optional int32 external_file_attribute = 3;
}
message VariableSubstitution {
// The name of the varaible to substitute.
required string name = 1;
// The substitution value.
required string value = 2;
}