三国卡牌客户端基础资源仓库
hch
3 天以前 cdac25a8e4f91a4663bf5f80994538dd263b757c
Assets/Editor/Tool/ClientPackage.cs
@@ -194,7 +194,7 @@
            var excludeFileFullNames = new List<string>();
            var tempFiles = new List<FileInfo>();
            FileExtersion.GetAllDirectoryFileInfos(StringUtility.Contact(_assetBundlePath, "/gmodels"), tempFiles);
            FileExtersion.GetAllDirectoryFileInfos(StringUtility.Contact(_assetBundlePath, "/hero"), tempFiles);
            foreach (var file in tempFiles)
            {
                var extersion = Path.GetExtension(file.FullName);
@@ -233,7 +233,7 @@
            }
            tempFiles.Clear();
            FileExtersion.GetAllDirectoryFileInfos(StringUtility.Contact(_assetBundlePath, "/effect"), tempFiles);
            FileExtersion.GetAllDirectoryFileInfos(StringUtility.Contact(_assetBundlePath, "/uieffect"), tempFiles);
            foreach (var file in tempFiles)
            {
                var extersion = Path.GetExtension(file.FullName);
@@ -405,23 +405,23 @@
        var versionName = string.Empty;
        var versionConfig = GetVersionConfig(_publisher, out versionName);
        var versionConfigCSpath = Application.dataPath + "/Scripts/System/ClientVersion/VersionConfig.cs";
        var text = File.ReadAllText(versionConfigCSpath);
        // var versionConfigCSpath = Application.dataPath + "/Scripts/System/ClientVersion/VersionConfig.cs";
        // var text = File.ReadAllText(versionConfigCSpath);
        if (text.Contains("VERSION_ALTERNATIVE"))
        {
            var pattern = "VERSION_ALTERNATIVE = \".*\"";
            text = Regex.Replace(text, pattern, StringUtility.Contact("VERSION_ALTERNATIVE = ", "\"", versionConfig.m_Version, "\""));
        // if (text.Contains("VERSION_ALTERNATIVE"))
        // {
        //     var pattern = "VERSION_ALTERNATIVE = \".*\"";
        //     text = Regex.Replace(text, pattern, StringUtility.Contact("VERSION_ALTERNATIVE = ", "\"", versionConfig.m_Version, "\""));
            bool encoderShouldEmitUTF8Identifier = true;
            bool throwOnInvalidBytes = false;
            UTF8Encoding encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier, throwOnInvalidBytes);
            bool append = false;
            StreamWriter streamWriter = new StreamWriter(versionConfigCSpath, append, encoding);
            streamWriter.Write(text);
            streamWriter.Close();
            AssetDatabase.ImportAsset(versionConfigCSpath);
        }
        //     bool encoderShouldEmitUTF8Identifier = true;
        //     bool throwOnInvalidBytes = false;
        //     UTF8Encoding encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier, throwOnInvalidBytes);
        //     bool append = false;
        //     StreamWriter streamWriter = new StreamWriter(versionConfigCSpath, append, encoding);
        //     streamWriter.Write(text);
        //     streamWriter.Close();
        //     AssetDatabase.ImportAsset(versionConfigCSpath);
        // }
        // 针对某一些打包的特殊性, 这里特指依赖的第三方库含有资源的问题
        // 这里对有这种特型的渠道的sdk在打包的时候差异化gradle文件
@@ -669,7 +669,7 @@
        PlayerSettings.companyName = "xmsw";
        PlayerSettings.productName = newVersionConfig.productName;
        PlayerSettings.applicationIdentifier = newVersionConfig.bundleIdentifier;
        PlayerSettings.defaultInterfaceOrientation = UIOrientation.AutoRotation;
        PlayerSettings.defaultInterfaceOrientation = UIOrientation.Portrait;
        PlayerSettings.allowedAutorotateToLandscapeLeft = true;
        PlayerSettings.allowedAutorotateToLandscapeRight = true;
        PlayerSettings.allowedAutorotateToPortrait = false;