using UnityEditor; using System; using System.Collections.Generic; using System.Diagnostics; using System.Text; public partial class BuildScript { /*--------------------------------------------------------------------------------*/ const string standartDefinedSymbols = "NO_GPGS;CROSS_PLATFORM_INPUT;UNITY;DEBUG_HUD"; const string slackSymbol = "SLACK"; const string realserverSymbol = "REALSERVER"; const string nameProduct = "ANTM"; const string bundleId_Android = "com.Emortal.AntmFullGame"; const string bundleId_iOS_Stable = "com.Emortal.ANTMGAME"; const string bundleId_iOS_Unstable = "com.Emortal.ANTMGAME_Unstable"; //const string DISPLAYED_VERISON_FILE = projectPath + @"\Assets\Resources\versionDisplayed.txt"; //const string GLOBAL_VERISON_FILE = projectPath + @"version.txt"; const string KEY_STORE_PASS = "ANTM123"; static string[] commandLineArgs = null; static string revisionAsString = ""; static int revisionAsInt; static string pathProject = ""; static string pathTarget = ""; static string SVN_LOGIN_ARGS = "--username BotUser --password Viewsonica"; /*--------------------------------------------------------------------------------*/ static BuildTarget buildTarget = BuildTarget.NoTarget; // will be changed to Android or iOS static bool isUnstable; static bool isRelease; static readonly BuildOptions RELEASE_MODE = BuildOptions.None; static readonly BuildOptions DEVELOPMENT_MODE = BuildOptions.Development | BuildOptions.AllowDebugging; static UnityEngine.StackTraceLogType stackTraceOriginal; static void SetCommonSettings(BuildTarget _target) { stackTraceOriginal = UnityEngine.Application.stackTraceLogType; UnityEngine.Application.stackTraceLogType = UnityEngine.StackTraceLogType.None; // disable stack trace as it's meaningless and annoying for our build logs //UnityEngine.Application.logMessageReceivedThreaded += OnLogDuringBuild; // for ANTM Facebook.Unity.Settings.FacebookSettings.SelectedAppIndex = _target == BuildTarget.iOS ? 1 : 0; SetCommonSettings_ForAnyProject(_target); } static void OnBuildDone(bool successfulBuild) { UnityEngine.Application.stackTraceLogType = stackTraceOriginal; // restore original setting // this is always true: if(!UnityEngine.Application.isEditor) { //EditorApplication.Exit(successfulBuild ? 0 : 1); // this ensures java.exe is killed (which unity spawns for android builds) so that gitlab runner understands the job is done } } }