Ejemplo n.º 1
0
        /// <summary>
        /// 加载打包配置文件
        /// </summary>
        /// <param name="settingPath">打包配置路径</param>
        private static BuildSetting LoadSetting(string settingPath)
        {
            buildSetting = XmlUtility.Read <BuildSetting>(settingPath);
            (buildSetting as ISupportInitialize).EndInit();

            buildPath = Path.GetFullPath(buildSetting.buildRoot).Replace("\\", "/");
            if (buildPath.Length > 0 && buildPath[buildPath.Length - 1] != '/')
            {
                buildPath += "/";
            }
            buildPath += $"{PLATFORM}/{BUNDLE_FOLDER}/";

            return(buildSetting);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 加载打包配置文件
        /// </summary>
        /// <param name="settingPath">打包配置路径</param>
        private static BuildSetting LoadSetting(string settingPath)
        {
            buildSetting = XmlUtility.Read <BuildSetting>(settingPath);
            if (buildSetting == null)
            {
                throw new Exception($"Load buildSetting failed,SettingPath:{settingPath}.");
            }
            (buildSetting as ISupportInitialize)?.EndInit();

            buildPath = Path.GetFullPath(buildSetting.buildRoot).Replace("\\", "/");
            if (buildPath.Length > 0 && buildPath[buildPath.Length - 1] != '/')
            {
                buildPath += "/";
            }
            buildPath += $"{PLATFORM}/";

            return(buildSetting);
        }