Skip to content

Commit 947e902

Browse files
M1ProM1Pro
authored andcommitted
Auto-publish WXSDK.
1 parent fe8d29e commit 947e902

File tree

8 files changed

+18
-12
lines changed

8 files changed

+18
-12
lines changed

Editor/WXConvertCore.cs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@ public static void Init()
3030
PlayerSettings.WeixinMiniGame.threadsSupport = false;
3131
PlayerSettings.runInBackground = false;
3232
PlayerSettings.WeixinMiniGame.compressionFormat = WeixinMiniGameCompressionFormat.Disabled;
33-
PlayerSettings.WeixinMiniGame.template = $"{templateHeader}WXTemplate2022TJ";
33+
if(UnityUtil.GetEngineVersion() == UnityUtil.EngineVersion.Tuanjie)
34+
{
35+
var absolutePath = Path.GetFullPath("Packages/com.qq.weixin.minigame/WebGLTemplates/WXTemplate2022TJ");
36+
PlayerSettings.WeixinMiniGame.template = $"PATH:{absolutePath}";
37+
}
38+
else
39+
{
40+
PlayerSettings.WeixinMiniGame.template = $"{templateHeader}WXTemplate2022TJ";
41+
}
3442
PlayerSettings.WeixinMiniGame.linkerTarget = WeixinMiniGameLinkerTarget.Wasm;
3543
PlayerSettings.WeixinMiniGame.dataCaching = false;
3644
PlayerSettings.WeixinMiniGame.debugSymbolMode = WeixinMiniGameDebugSymbolMode.External;
@@ -497,7 +505,7 @@ function pathToFileURL(path) {
497505

498506
private static void ConvertCode()
499507
{
500-
UnityEngine.Debug.LogFormat("[Converter] Starting to adapt framewor. Dst: " + config.ProjectConf.DST);
508+
UnityEngine.Debug.LogFormat("[Converter] Starting to adapt framework. Dst: " + config.ProjectConf.DST);
501509

502510
UnityUtil.DelectDir(Path.Combine(config.ProjectConf.DST, miniGameDir));
503511
string text = String.Empty;
@@ -611,8 +619,11 @@ private static void ConvertCode()
611619
}
612620

613621
text = header + text;
622+
623+
var targetPath = Path.Combine(config.ProjectConf.DST, miniGameDir, target);
614624
if (!UseIL2CPP)
615625
{
626+
targetPath = Path.Combine(config.ProjectConf.DST, miniGameDir, frameworkDir, target);
616627
Rule[] nativeRules =
617628
{
618629
new Rule()
@@ -654,7 +665,7 @@ private static void ConvertCode()
654665
}
655666
}
656667

657-
File.WriteAllText(Path.Combine(config.ProjectConf.DST, miniGameDir, target), text, new UTF8Encoding(false));
668+
File.WriteAllText(targetPath, text, new UTF8Encoding(false));
658669

659670
UnityEngine.Debug.LogFormat("[Converter] adapt framework done! ");
660671
}
@@ -1572,4 +1583,4 @@ public static bool ShowMatchFailedWarning(string text, string rule, string file)
15721583
}
15731584
}
15741585

1575-
}
1586+
}

Editor/WXEditorSettingHelper.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ public class WXSettingsHelper
2121
public WXSettingsHelper()
2222
{
2323
Type weixinMiniGamePackageHelpersType = Type.GetType("UnityEditor.WeixinPackageHelpers,UnityEditor");
24-
if (weixinMiniGamePackageHelpersType == null)
25-
{
26-
weixinMiniGamePackageHelpersType = Type.GetType("UnityEditor.WeixinMiniGamePackageHelpers,UnityEditor");
27-
}
2824
if (weixinMiniGamePackageHelpersType != null)
2925
{
3026
EventInfo onSettingsGUIEvent = weixinMiniGamePackageHelpersType.GetEvent("OnPackageSettingsGUI");
@@ -77,6 +73,7 @@ public void OnDisable()
7773
public Texture tex;
7874
public void OnSettingsGUI(EditorWindow window)
7975
{
76+
PluginUpdateManager.CheckUpdateOnce();
8077
scrollRoot = EditorGUILayout.BeginScrollView(scrollRoot);
8178

8279
GUIStyle linkStyle = new GUIStyle(GUI.skin.label);

Editor/WXEditorWindow.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ public static void Open()
1414
win.minSize = new Vector2(350, 400);
1515
win.position = new Rect(100, 100, 600, 700);
1616
win.Show();
17-
// 打开面板时自动检查更新
18-
PluginUpdateManager.CheckUpdte();
1917
}
2018

2119
// 向前兼容,请使用 WXConvertCore.cs

Editor/WXPluginVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public class WXPluginVersion
44
{
5-
public static string pluginVersion = "202403281934"; // 这一行不要改他,导出的时候会自动替换
5+
public static string pluginVersion = "202403291954"; // 这一行不要改他,导出的时候会自动替换
66
}
77

88
public class WXPluginConf

Editor/wx-editor.dll

512 Bytes
Binary file not shown.

Runtime/Plugins/wx-runtime-editor.dll

0 Bytes
Binary file not shown.

Runtime/Plugins/wx-runtime.dll

0 Bytes
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.5","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}}
1+
{"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.6","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}}

0 commit comments

Comments
 (0)