Skip to content

Commit 07a2805

Browse files
committed
updated to v3.5.5
1 parent d608770 commit 07a2805

12 files changed

Lines changed: 58 additions & 41 deletions

File tree

Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/BundleHelper.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static void ExportAppConfig(string productName, string appVersion, string
3838
string jsonCfg = JsonConvert.SerializeObject(cfg, Formatting.Indented);
3939

4040
// 寫入配置文件
41-
string appCfgFileName = $"{PatchSettings.settings.appCfgName}{PatchSettings.APP_CFG_EXTENSION}";
41+
string appCfgFileName = $"{PatchSettings.settings.appCfgName}{PatchSettings.settings.appCfgExtension}";
4242
string writePath = Path.Combine(outputPath, appCfgFileName);
4343
WriteTxt(jsonCfg, writePath);
4444

@@ -78,7 +78,7 @@ public static void ExportConfigsAndAppBundles(string inputPath, string outputPat
7878
string jsonCfg = JsonConvert.SerializeObject(appCfg, Formatting.Indented);
7979

8080
// 寫入配置文件
81-
string appCfgFileName = $"{PatchSettings.settings.appCfgName}{PatchSettings.APP_CFG_EXTENSION}";
81+
string appCfgFileName = $"{PatchSettings.settings.appCfgName}{PatchSettings.settings.appCfgExtension}";
8282
string writePath = Path.Combine(outputPath + $@"/{productName}" + $@"/{appCfg.PLATFORM}", appCfgFileName);
8383
WriteTxt(jsonCfg, writePath);
8484

@@ -93,7 +93,7 @@ public static void ExportConfigsAndAppBundles(string inputPath, string outputPat
9393
jsonCfg = JsonConvert.SerializeObject(patchCfg, Formatting.Indented);
9494

9595
// 寫入配置文件
96-
string patchCfgFileName = $"{PatchSettings.settings.patchCfgName}{PatchSettings.PATCH_CFG_EXTENSION}";
96+
string patchCfgFileName = $"{PatchSettings.settings.patchCfgName}{PatchSettings.settings.patchCfgExtension}";
9797
writePath = Path.Combine(outputPath + $@"/{productName}" + $@"/{appCfg.PLATFORM}", patchCfgFileName);
9898
WriteTxt(jsonCfg, writePath);
9999

@@ -188,7 +188,7 @@ public static void ExportBundleUrlConfig(string bundleIp, string bundleFallbackI
188188
$"{PatchSettings.STORE_LINK} {storeLink}",
189189
};
190190

191-
string bundleUrlFileName = $"{PatchSettings.settings.bundleUrlCfgName}{PatchSettings.BUNDLE_URL_CFG_EXTENSION}";
191+
string bundleUrlFileName = $"{PatchSettings.settings.bundleUrlCfgName}{PatchSettings.settings.bundleUrlCfgExtension}";
192192
string fullOutputPath = Path.Combine(outputPath, bundleUrlFileName);
193193

194194
string content = string.Empty;
@@ -496,7 +496,7 @@ internal static AppConfig GenerateAppConfig(string productName, SemanticRule sem
496496
// 版號規則
497497
cfg.SEMANTIC_RULE = semanticRule;
498498

499-
Debug.Log($"【Generate】{PatchSettings.settings.appCfgName}{PatchSettings.APP_CFG_EXTENSION} Completes.");
499+
Debug.Log($"【Generate】{PatchSettings.settings.appCfgName}{PatchSettings.settings.appCfgExtension} Completes.");
500500

501501
return cfg;
502502
}

Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/EditorWindow/BundleConfigGeneratorWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ private void _DrawProcessButtonView(OperationType operationType)
644644
BundleHelper.ExportAppConfig(this.productName, this.appVersion, outputPath, this.activeBuildTarget, this.buildTarget);
645645
EditorUtility.DisplayDialog("Process Message", "Export AppConfig To StreamingAssets.", "OK");
646646
AssetDatabase.Refresh();
647-
string appCfgFileName = $"{PatchSettings.settings.appCfgName}{PatchSettings.APP_CFG_EXTENSION}";
647+
string appCfgFileName = $"{PatchSettings.settings.appCfgName}{PatchSettings.settings.appCfgExtension}";
648648
if (this.autoReveal) EditorUtility.RevealInFinder($"{outputPath}/{appCfgFileName}");
649649
break;
650650
case OperationType.ExportConfigsAndAppBundlesForCDN:

Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/EditorWindow/BundleUrlConfigGeneratorWindow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ private void _DrawProcessButtonView()
167167
BundleHelper.ExportBundleUrlConfig(this.bundleIp, this.bundleFallbackIp, this.storeLink, outputPath, true);
168168
EditorUtility.DisplayDialog("Process Message", "Export [Cipher] BundleUrlConfig To StreamingAssets.", "OK");
169169
AssetDatabase.Refresh();
170-
string bundleUrlFileName = $"{PatchSettings.settings.bundleUrlCfgName}{PatchSettings.BUNDLE_URL_CFG_EXTENSION}";
170+
string bundleUrlFileName = $"{PatchSettings.settings.bundleUrlCfgName}{PatchSettings.settings.bundleUrlCfgExtension}";
171171
if (this.autoReveal) EditorUtility.RevealInFinder($"{outputPath}/{bundleUrlFileName}");
172172
}
173173
GUI.backgroundColor = bc;
@@ -178,7 +178,7 @@ private void _DrawProcessButtonView()
178178
BundleHelper.ExportBundleUrlConfig(this.bundleIp, this.bundleFallbackIp, this.storeLink, outputPath, false);
179179
EditorUtility.DisplayDialog("Process Message", "Export [Plaintext] BundleUrlConfig To StreamingAssets.", "OK");
180180
AssetDatabase.Refresh();
181-
string bundleUrlFileName = $"{PatchSettings.settings.bundleUrlCfgName}{PatchSettings.BUNDLE_URL_CFG_EXTENSION}";
181+
string bundleUrlFileName = $"{PatchSettings.settings.bundleUrlCfgName}{PatchSettings.settings.bundleUrlCfgExtension}";
182182
if (this.autoReveal) EditorUtility.RevealInFinder($"{outputPath}/{bundleUrlFileName}");
183183
}
184184
GUI.backgroundColor = bc;

Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/BundleConfig.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ public static async UniTask<string> GetValueFromUrlCfg(string key)
299299
{
300300
if (_urlCfgFileMap == null)
301301
{
302-
string bundleUrlFileName = $"{PatchSettings.settings.bundleUrlCfgName}{PatchSettings.BUNDLE_URL_CFG_EXTENSION}";
302+
string bundleUrlFileName = $"{PatchSettings.settings.bundleUrlCfgName}{PatchSettings.settings.bundleUrlCfgExtension}";
303303
string pathName = Path.Combine(GetRequestStreamingAssetsPath(), bundleUrlFileName);
304304
var data = await Requester.RequestBytes(pathName);
305305
if (data.Length == 0)
@@ -526,7 +526,7 @@ public static string GetBuiltinPackagePath(string packageName)
526526
/// <returns></returns>
527527
public static string GetLocalSandboxAppConfigPath()
528528
{
529-
string appCfgFileName = $"{PatchSettings.settings.appCfgName}{PatchSettings.APP_CFG_EXTENSION}";
529+
string appCfgFileName = $"{PatchSettings.settings.appCfgName}{PatchSettings.settings.appCfgExtension}";
530530
return Path.Combine(GetLocalSandboxRootPath(), appCfgFileName);
531531
}
532532

@@ -536,7 +536,7 @@ public static string GetLocalSandboxAppConfigPath()
536536
/// <returns></returns>
537537
public static string GetStreamingAssetsAppConfigPath()
538538
{
539-
string appCfgFileName = $"{PatchSettings.settings.appCfgName}{PatchSettings.APP_CFG_EXTENSION}";
539+
string appCfgFileName = $"{PatchSettings.settings.appCfgName}{PatchSettings.settings.appCfgExtension}";
540540
return Path.Combine(GetRequestStreamingAssetsPath(), appCfgFileName);
541541
}
542542

@@ -552,7 +552,7 @@ public static async UniTask<string> GetHostServerAppConfigPath()
552552
string productName = appConfig.PRODUCT_NAME;
553553
string platform = appConfig.PLATFORM;
554554
string rootFolderName = PatchSettings.settings.rootFolderName;
555-
string appCfgFileName = $"{PatchSettings.settings.appCfgName}{PatchSettings.APP_CFG_EXTENSION}";
555+
string appCfgFileName = $"{PatchSettings.settings.appCfgName}{PatchSettings.settings.appCfgExtension}";
556556

557557
return Path.Combine($"{host}/{rootFolderName}/{productName}/{platform}", appCfgFileName);
558558
}
@@ -569,7 +569,7 @@ public static async UniTask<string> GetHostServerPatchConfigPath()
569569
string productName = appConfig.PRODUCT_NAME;
570570
string platform = appConfig.PLATFORM;
571571
string rootFolderName = PatchSettings.settings.rootFolderName;
572-
string patchCfgFileName = $"{PatchSettings.settings.patchCfgName}{PatchSettings.PATCH_CFG_EXTENSION}";
572+
string patchCfgFileName = $"{PatchSettings.settings.patchCfgName}{PatchSettings.settings.patchCfgExtension}";
573573

574574
return Path.Combine($"{host}/{rootFolderName}/{productName}/{platform}", patchCfgFileName);
575575
}

Assets/OxGFrame/AssetLoader/Scripts/Runtime/Settings/PatchSettings.cs

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@ public class PatchSettings : ScriptableObject
2525
/// </summary>
2626
public const string APP_CFG_BAK_EXTENSION = ".bak";
2727

28-
/// <summary>
29-
/// APP 配置文件擴展名
30-
/// </summary>
31-
public const string APP_CFG_EXTENSION = ".json";
32-
3328
[Header("App Config Settings")]
3429
/// <summary>
3530
/// APP 配置文件的名稱
3631
/// </summary>
3732
public string appCfgName = "appconfig";
33+
34+
/// <summary>
35+
/// APP 配置文件擴展名
36+
/// </summary>
37+
[Tooltip("The file extension must include the dot (e.g., .conf, .json). Please ensure you enter it with the dot.")]
38+
public string appCfgExtension = ".json";
3839
#endregion
3940

4041
#region PatchConfig 配置文件
@@ -43,16 +44,17 @@ public class PatchSettings : ScriptableObject
4344
/// </summary>
4445
public const string PATCH_CFG_BAK_EXTENSION = ".bak";
4546

46-
/// <summary>
47-
/// 補丁配置文件擴展名
48-
/// </summary>
49-
public const string PATCH_CFG_EXTENSION = ".json";
50-
5147
[Header("Patch Config Settings")]
5248
/// <summary>
5349
/// 補丁配置文件的名稱
5450
/// </summary>
5551
public string patchCfgName = "patchconfig";
52+
53+
/// <summary>
54+
/// 補丁配置文件擴展名
55+
/// </summary>
56+
[Tooltip("The file extension must include the dot (e.g., .conf, .json). Please ensure you enter it with the dot.")]
57+
public string patchCfgExtension = ".json";
5658
#endregion
5759

5860
#region 佈署配置文件中的 KEY
@@ -80,14 +82,15 @@ public class PatchSettings : ScriptableObject
8082
public byte bundleUrlCfgCipher = 0x4D;
8183

8284
/// <summary>
83-
/// 資源請求端點的配置文件擴展名
85+
/// 資源請求端點的配置文件名稱
8486
/// </summary>
85-
public const string BUNDLE_URL_CFG_EXTENSION = ".conf";
87+
public string bundleUrlCfgName = "burlconfig";
8688

8789
/// <summary>
88-
/// 資源請求端點的配置文件名稱
90+
/// 資源請求端點的配置文件擴展名
8991
/// </summary>
90-
public string bundleUrlCfgName = "burlconfig";
92+
[Tooltip("The file extension must include the dot (e.g., .conf, .json). Please ensure you enter it with the dot.")]
93+
public string bundleUrlCfgExtension = ".conf";
9194
#endregion
9295

9396
#region Bundle 輸出歸類名稱

Assets/OxGFrame/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# CHANGELOG
22

3+
## [3.5.5] - 2025-11-21
4+
5+
# English
6+
- Hotfixer
7+
- Added **HotfixSettings**, allowing custom file extensions to avoid issues where some WebGL environments restrict certain extension names.
8+
- AssetLoader
9+
- Added **PatchSettings**, allowing custom file extensions to avoid issues where some WebGL environments restrict certain extension names.
10+
11+
# 中文
12+
- Hotfixer
13+
- 新增 HotfixSettings 可以自定義擴展名稱,避免有些 WebGL 有限制擴展名稱的請求。
14+
- AssetLoader
15+
- 新增 PatchSettings 可以自定義擴展名稱,避免有些 WebGL 有限制擴展名稱的請求。
16+
317
## [3.5.4] - 2025-11-06
418

519
# English

Assets/OxGFrame/Hotfixer/Scripts/Editor/EditorWindow/HotfixDllConfigGeneratorWindow.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ private void _DrawProcessButtonView()
175175
// file name label
176176
{
177177
var style = new GUIStyle(EditorStyles.label) { richText = true };
178-
string fileName = $"{HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.HOTFIX_DLL_CFG_EXTENSION}";
178+
string fileName = $"{HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.settings.hotfixDllCfgExtension}";
179179
GUILayout.Label($"Config Name: <b><color=#ffed29>{fileName}</color></b>", style);
180180
}
181181

@@ -190,7 +190,7 @@ private void _DrawProcessButtonView()
190190
GUI.backgroundColor = new Color32(255, 185, 83, 255);
191191
if (GUILayout.Button("Cipher Process", GUILayout.MaxWidth(110f)))
192192
{
193-
string fileName = $"{HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.HOTFIX_DLL_CFG_EXTENSION}";
193+
string fileName = $"{HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.settings.hotfixDllCfgExtension}";
194194
string outputPath = Application.streamingAssetsPath;
195195
HotfixHelper.ExportHotfixDllConfig(this.aotDlls, this.hotfixDlls, true);
196196
EditorUtility.DisplayDialog("Process Message", $"Export [Cipher] {fileName} To StreamingAssets.", "OK");
@@ -201,7 +201,7 @@ private void _DrawProcessButtonView()
201201
GUI.backgroundColor = new Color32(255, 185, 83, 255);
202202
if (GUILayout.Button("Plaintext Process", GUILayout.MaxWidth(125f)))
203203
{
204-
string fileName = $"{HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.HOTFIX_DLL_CFG_EXTENSION}";
204+
string fileName = $"{HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.settings.hotfixDllCfgExtension}";
205205
string outputPath = Application.streamingAssetsPath;
206206
HotfixHelper.ExportHotfixDllConfig(this.aotDlls, this.hotfixDlls, false);
207207
EditorUtility.DisplayDialog("Process Message", $"Export [Plaintext] {fileName} To StreamingAssets.", "OK");

Assets/OxGFrame/Hotfixer/Scripts/Editor/HotfixHelper.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public static void ExportHotfixDllConfig(List<string> aotDlls, List<string> hotf
140140
// 寫入配置文件
141141
WriteConfig(config, cipher ? ConfigFileType.Bytes : ConfigFileType.Json);
142142

143-
Debug.Log($"【Export {HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.HOTFIX_DLL_CFG_EXTENSION} Completes】");
143+
Debug.Log($"【Export {HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.settings.hotfixDllCfgExtension} Completes】");
144144
}
145145

146146
[MenuItem("Assets/OxGFrame/Hotfixer/Convert hotfixdllconfig.conf (BYTES [Cipher] <-> JSON [Plaintext])", false, -99)]
@@ -162,7 +162,7 @@ private static void _ConvertConfigFile()
162162
// 確保文件存在
163163
if (File.Exists(fullPath))
164164
{
165-
string fileName = $"{HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.HOTFIX_DLL_CFG_EXTENSION}";
165+
string fileName = $"{HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.settings.hotfixDllCfgExtension}";
166166
if (fullPath.IndexOf(fileName) == -1)
167167
{
168168
Debug.LogWarning($"Incorrect file selected. Please select the {fileName} file.");
@@ -225,7 +225,7 @@ private static void _ConvertConfigFile()
225225
/// <param name="configFileType"></param>
226226
internal static void WriteConfig(HotfixDllConfig hotfixDllConfig, ConfigFileType configFileType = ConfigFileType.Bytes)
227227
{
228-
string fileName = $"{HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.HOTFIX_DLL_CFG_EXTENSION}";
228+
string fileName = $"{HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.settings.hotfixDllCfgExtension}";
229229
string savePath = Path.Combine(Application.streamingAssetsPath, fileName);
230230

231231
// 獲取文件夾路徑

Assets/OxGFrame/Hotfixer/Scripts/Runtime/Helpers/BinaryHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ public static ConfigInfo DecryptToString(byte[] data)
5555

5656
// To string
5757
info.content = Encoding.UTF8.GetString(dataWithoutHeader);
58-
Debug.Log($"[Source is Cipher] Check -> {HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.HOTFIX_DLL_CFG_EXTENSION}");
58+
Debug.Log($"[Source is Cipher] Check -> {HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.settings.hotfixDllCfgExtension}");
5959
}
6060
else
6161
{
6262
info.type = ConfigFileType.Json;
6363

6464
// To string
6565
info.content = Encoding.UTF8.GetString(data);
66-
Debug.Log($"[Source is Plaintext] Check -> {HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.HOTFIX_DLL_CFG_EXTENSION}");
66+
Debug.Log($"[Source is Plaintext] Check -> {HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.settings.hotfixDllCfgExtension}");
6767
}
6868

6969
return info;

Assets/OxGFrame/Hotfixer/Scripts/Runtime/Hotfix/Config/HotfixConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static class HotfixConfig
1010
/// <returns></returns>
1111
internal static string GetStreamingAssetsConfigRequestPath()
1212
{
13-
return Path.Combine(WebRequester.GetRequestStreamingAssetsPath(), $"{HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.HOTFIX_DLL_CFG_EXTENSION}");
13+
return Path.Combine(WebRequester.GetRequestStreamingAssetsPath(), $"{HotfixSettings.settings.hotfixDllCfgName}{HotfixSettings.settings.hotfixDllCfgExtension}");
1414
}
1515
}
1616
}

0 commit comments

Comments
 (0)