static public void BuildForWindows(HS_EditDefine.HS_ChannelDefine channelDefine) { LoadConfig(); ChannelConfig channelConfig = S_AllChannelConfig[channelDefine.ToString()]; //string channel = channelConfig.channel; string packerName = channelConfig.packerName; string rootPath = S_RootPath; PlayerSettings.bundleIdentifier = packerName; PlayerSettings.defaultInterfaceOrientation = UIOrientation.LandscapeLeft; string path = rootPath + "/Client/Windows"; HS_Directory.CreateDirectory(path); try { HS_Base.SystemDeleteFolder(path); } catch (System.Exception _e) { D.LogForce("Ignore: " + _e.ToString()); } string lastDefineSymbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone); if (!string.IsNullOrEmpty(channelConfig.defineSymbols)) { PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone, channelConfig.defineSymbols); } else { PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone, ""); } if (!string.IsNullOrEmpty(lastDefineSymbols)) { PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Android, lastDefineSymbols); } path += "/" + packerName + ".exe"; //FilterEditorDLL(FilterEditorDLLModel.Assets2Backups); //更新SVN并且拷贝到streamingAssets SVNUpdate(RuntimePlatform.WindowsPlayer); BuildPipeline.BuildPlayer(GetBuildScenes(), path, BuildTarget.StandaloneWindows64, BuildOptions.None); //FilterEditorDLL(FilterEditorDLLModel.Backups2Assets); RemoveSVNResources(); AssetDatabase.Refresh(); System.Diagnostics.Process.Start(HS_Path.GetDirectoryName(path)); }
public void BuildAndroid(HS_EditDefine.HS_ChannelDefine channel) { HS_CMDParameter.projectName = (int)channel + ""; HS_ProjectBuild.BuildForAndroid(HS_EditDefine.HS_ChannelDefine.Android); }