Unity打包Android备忘

来源:互联网 发布:usb电流测试软件 编辑:程序博客网 时间:2024/05/18 15:25

TFS的Revert 与Update:

private void RevertFromTFS(string strLocalPath){string strCommand = "undo " + strLocalPath + " /recursive /login:" + m_strTfsAccount + "," + m_strTfsPassword;ExecuteCommand( m_txt_TfsPath.Text, strCommand );}


private void UpdateFromTFS(string strLocalPath, string strChangest){string strCommand = "get " + strLocalPath + " /recursive /noprompt /login:" + m_strTfsAccount + "," + m_strTfsPassword;if ( strChangest.Length > 0 ){strCommand += " /v:" + strChangest;}ExecuteCommand( m_txt_TfsPath.Text, strCommand );}

C#通过命令行调用进程:

private string[] ExecuteCommand(string exePath, string commandLine){System.Diagnostics.Process sysProcess = new System.Diagnostics.Process();sysProcess.StartInfo.FileName = exePath;sysProcess.StartInfo.Arguments = commandLine;sysProcess.StartInfo.UseShellExecute = false;//是否使用操作系统shell启动sysProcess.StartInfo.RedirectStandardInput = true;//是否接受调用程序的输入信息sysProcess.StartInfo.RedirectStandardOutput = true;//是否由调用程序获取输出信息sysProcess.StartInfo.RedirectStandardError = true;//是否重定向标准错误输出sysProcess.StartInfo.CreateNoWindow = true;//是否不显示程序窗口sysProcess.Start();string[] szExecuteInfo = new string[2];szExecuteInfo[0] = sysProcess.StandardOutput.ReadToEnd();szExecuteInfo[1] = sysProcess.StandardError.ReadToEnd();sysProcess.WaitForExit();sysProcess.Close();char[] szTrim = { ' ', '\r', '\n' };RecordLog( "--> processed: " + szExecuteInfo[1].Trim( szTrim ) );return szExecuteInfo;}


Unity打Android包的核心设置ProjectSettings/ProjectSettings.asset,配置里包括 iPhoneBundleIdentifier, iPhoneBundleVersion,  AndroidBundleVersionCode,  AndroidMinSdkVersion,  companyName, productName;     注意scriptDefineSymbols包含了宏定义,以7:开头


0 0
原创粉丝点击