Наследование: Microsoft.Build.Utilities.Task
Пример #1
0
        private bool ExecuteIos32()
        {
            var command = string.Format(@"-quit -batchmode -projectPath {0} -executeMethod BuildTools.IosMono -logFile {1}", ProjectPath, string.Format(@"{0}{1}{2}{1}{3}{1}log-ios-mono.txt", DeploymentPath, Path.DirectorySeparatorChar, @"unity", @"build"));

            UnityPackage.ExecuteUnityCommand(UnityExe, command);
            return(true);
        }
Пример #2
0
        private bool ExecuteAndroid(bool retry = false)
        {
            int  tryCount = 0;
            bool success;

            do
            {
                var command = string.Format(@"-quit -batchmode -projectPath {0} -executeMethod BuildTools.Android -logFile {1}", ProjectPath, string.Format(@"{0}{1}{2}{1}{3}{1}log-android.txt", DeploymentPath, Path.DirectorySeparatorChar, @"unity", @"build"));
                UnityPackage.ExecuteUnityCommand(UnityExe, command);
                success = File.Exists(APKLocation);
                tryCount++;
            }while (retry && !success && tryCount <= MaxTries);
            return(success);
        }
Пример #3
0
        private bool ExecuteIos64(bool retry = false)
        {
            int  tryCount = 0;
            bool success;

            do
            {
                var command = string.Format(@"-quit -batchmode -projectPath {0} -executeMethod BuildTools.Ios64 -logFile {1}", ProjectPath, string.Format(@"{0}{1}{2}{1}{3}{1}log-ios64.txt", DeploymentPath, Path.DirectorySeparatorChar, @"unity", @"build"));
                UnityPackage.ExecuteUnityCommand(UnityExe, command);
                // Approximation of knowing if the app was created is checking
                // if the build directory exists and some subdirectories exist.
                success = Directory.Exists(IOS64BuildLocation) && (Directory.GetDirectories(IOS64BuildLocation).Length > 0);
                tryCount++;
            }while (retry && !success && tryCount <= MaxTries);
            return(success);
        }