少年修仙传客户端基础资源
client_Hale
2019-04-09 1e57b414040d566fbb42300c34947bdc9fff4e2b
Assets/Editor/Tool/ClientPackage.cs
@@ -438,17 +438,6 @@
            var apkName = StringUtility.Contact(_output, "/", versionName, "_", versionConfig.clientPackageFlag, "_v", versionConfig.m_Version, "_", _buildIndex, ".apk");
            BuildPipeline.BuildPlayer(baseLevels, apkName, BuildTarget.Android, BuildOptions.None);
        }
        FileUtil.MoveFileOrDirectory(Application.dataPath + "/Scripts/PocoSDK",
                                     Application.dataPath + "/Editor/PocoSDK");
        var _content = File.ReadAllText(Application.dataPath + "/Scripts/Core/GameEngine/Login/Launch.cs");
        int _start = _content.IndexOf("// ## PocoManager Start") + "// ## PocoManager Start".Length;
        int _end = _content.IndexOf("// ## PocoManager End");
        var _front = _content.Substring(0, _start);
        var _back = _content.Substring(_end);
        _content = _front + "\r\n// ## PocoManager\r\n" + _back;
        File.WriteAllText(Application.dataPath + "/Scripts/Core/GameEngine/Login/Launch.cs", _content);
    }
    public static void BuildIpa(string _sdkPath, string _publisher, int _buildIndex, bool _replace)
@@ -532,36 +521,6 @@
            PlayerSettings.allowedAutorotateToPortrait = false;
            PlayerSettings.allowedAutorotateToPortraitUpsideDown = false;
            PlayerSettings.bundleVersion = VersionConfig.GetVersionNumber(newVersionConfig.version).ToString();
            if (VersionConfig.Get().appId.Equals("test"))
            {
                if (Directory.Exists(Application.dataPath + "/Editor/PocoSDK")
                && !Directory.Exists(Application.dataPath + "/Scripts/PocoSDK"))
                {
                    FileUtil.MoveFileOrDirectory(Application.dataPath + "/Editor/PocoSDK",
                                                 Application.dataPath + "/Scripts/PocoSDK");
                }
                var _launchScript = File.ReadAllText(Application.dataPath + "/Scripts/Core/GameEngine/Login/Launch.cs");
                if (_launchScript != null)
                {
                    if (_launchScript.IndexOf("// ## PocoManager") == -1)
                    {
                        Debug.LogError("找不到替代字符串");
                    }
                    else
                    {
                        _launchScript.Replace("// ## PocoManager",
                        "if (VersionConfig.Get().appId.Equals(\"test\"))" +
                        "{" +
                            "SnxxzGame.Instance.gameObject.AddComponent<PocoManager>();" +
                        "}");
                        File.WriteAllText(Application.dataPath + "/Scripts/Core/GameEngine/Login/Launch.cs",
                                          _launchScript);
                    }
                }
            }
            CSObjectWrapEditor.Generator.ClearAll();
            CSObjectWrapEditor.Generator.GenAll();