| | |
| | | set { LocalSave.SetString("APKOutPutPath", value); }
|
| | | }
|
| | |
|
| | | public string AndroidExportPath
|
| | | {
|
| | | get { return LocalSave.GetString("AndroidExportPath"); }
|
| | | set { LocalSave.SetString("AndroidExportPath", value); }
|
| | | }
|
| | |
|
| | | string m_Publishers;
|
| | | public string publishers
|
| | | {
|
| | |
| | | var fromVersionConfig = ClientPackage.GetVersionConfig(_publisher, out versionName);
|
| | |
|
| | | var versionConfig = await VersionConfig.GetAsync();
|
| | |
|
| | | if (fromVersionConfig == null || versionConfig == null)
|
| | | {
|
| | | Debug.LogWarningFormat("SetVersionConfig failed: fromVersionConfig={0}, versionConfig={1}, publisher={2}",
|
| | | fromVersionConfig != null ? "ok" : "null",
|
| | | versionConfig != null ? "ok" : "null",
|
| | | _publisher);
|
| | | return;
|
| | | }
|
| | |
|
| | | VersionConfig.Copy(fromVersionConfig, versionConfig);
|
| | |
|
| | |
| | | #endif
|
| | |
|
| | | GUILayout.EndHorizontal();
|
| | |
|
| | | #if UNITY_ANDROID
|
| | | EditorGUILayout.Space();
|
| | | GUILayout.Label("Export Android Project", EditorStyles.boldLabel);
|
| | | GUILayout.BeginHorizontal();
|
| | | var newExportPath = EditorGUILayout.TextField("Export Path", AndroidExportPath);
|
| | | if (!string.IsNullOrEmpty(newExportPath) && newExportPath != AndroidExportPath)
|
| | | {
|
| | | AndroidExportPath = newExportPath;
|
| | | }
|
| | | if (GUILayout.Button("Browse", GUILayout.MaxWidth(75f)))
|
| | | {
|
| | | BrowseForAndroidExport();
|
| | | }
|
| | | GUILayout.EndHorizontal();
|
| | | GUILayout.BeginHorizontal();
|
| | | if (GUILayout.Button("Export Android Project"))
|
| | | {
|
| | | EditorApplication.delayCall += ExecuteExportAndroidProject;
|
| | | }
|
| | | if (GUILayout.Button("Export Android Dev"))
|
| | | {
|
| | | EditorApplication.delayCall += ExecuteExportAndroidProjectDev;
|
| | | }
|
| | | GUILayout.EndHorizontal();
|
| | | #endif
|
| | |
|
| | | // GUILayout.Space(20);
|
| | | // if (GUILayout.Button("SwitchVersionConfig"))
|
| | |
| | | ClientPackage.BuildPublishers(ClientPackage.SDK_PLUGIN_PROJECT, outputPath, ApkOutputPath, publishers, packageIndex, true, false);
|
| | | }
|
| | |
|
| | | private void ExecuteExportAndroidProject()
|
| | | {
|
| | | if (string.IsNullOrEmpty(AndroidExportPath))
|
| | | {
|
| | | EditorUtility.DisplayDialog("提示", "请先设置 Android Export Path", "确定");
|
| | | return;
|
| | | }
|
| | | packageIndex++;
|
| | | var assetBundlePath = Application.dataPath.Replace("Assets", m_UserData.m_OutputPath);
|
| | | ClientPackage.ExportAndroidProject(publishers, packageIndex, false, AndroidExportPath, assetBundlePath);
|
| | | }
|
| | |
|
| | | private void ExecuteExportAndroidProjectDev()
|
| | | {
|
| | | if (string.IsNullOrEmpty(AndroidExportPath))
|
| | | {
|
| | | EditorUtility.DisplayDialog("提示", "请先设置 Android Export Path", "确定");
|
| | | return;
|
| | | }
|
| | | packageIndex++;
|
| | | var assetBundlePath = Application.dataPath.Replace("Assets", m_UserData.m_OutputPath);
|
| | | ClientPackage.ExportAndroidProject(publishers, packageIndex, true, AndroidExportPath, assetBundlePath);
|
| | | }
|
| | |
|
| | | private void ExecuteBuildClientPackageStandalone()
|
| | | {
|
| | | packageIndex++;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void BrowseForAndroidExport()
|
| | | {
|
| | | var newPath = EditorUtility.OpenFolderPanel("Android Export Folder", AndroidExportPath, string.Empty);
|
| | | if (!string.IsNullOrEmpty(newPath))
|
| | | {
|
| | | AndroidExportPath = newPath;
|
| | | }
|
| | | }
|
| | |
|
| | | private void ResetPathToDefault()
|
| | | {
|
| | | m_UserData.m_UseDefaultPath = true;
|