Auto-publish WXSDK.

This commit is contained in:
M1Pro 2024-04-26 19:58:45 +08:00
parent 7d4bd55b5b
commit b283998d07
12 changed files with 52 additions and 17 deletions

View File

@ -6,6 +6,12 @@ Removed - 删除功能/接口
Fixed - 修复问题 Fixed - 修复问题
Others - 其他 Others - 其他
--> -->
## 2024-4-26 【普通更新】
### Fixed
* 普通修复Unity2018/2019的兼容
* 普通兼容Windows 1.0.4版本template问题
* 普通修复Android平台导出时的
## 2024-4-17 【普通更新】 ## 2024-4-17 【普通更新】
### Feature ### Feature
* 普通编译参数增加ERROR_ON_UNDEFINED_SYMBOLS * 普通编译参数增加ERROR_ON_UNDEFINED_SYMBOLS

View File

@ -18,12 +18,11 @@ namespace WeChatWASM
static WXConvertCore() static WXConvertCore()
{ {
Init(); // Init();
} }
public static void Init() public static void Init()
{ {
//config = UnityUtil.GetEditorConf();
SDKFilePath = Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default", "unity-sdk", "index.js"); SDKFilePath = Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default", "unity-sdk", "index.js");
string templateHeader = "PROJECT:"; string templateHeader = "PROJECT:";
#if TUANJIE_2022_3_OR_NEWER #if TUANJIE_2022_3_OR_NEWER

View File

@ -1,5 +1,6 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using UnityEngine; using UnityEngine;
using UnityEditor; using UnityEditor;
using UnityEditor.Build; using UnityEditor.Build;
@ -109,6 +110,36 @@ namespace WeChatWASM
{ {
return WXConvertCore.UseIL2CPP; return WXConvertCore.UseIL2CPP;
}); });
WXExtEnvDef.RegisterAction("UnityUtil.GetWxSDKRootPath", (args) => {
#if UNITY_2018
return Path.Combine(Application.dataPath, "WX-WASM-SDK-V2");
#else
var packageInfo = UnityEditor.PackageManager.PackageInfo.FindForAssembly(typeof(WXExtEnvDef).Assembly);
if (packageInfo == null)
{
return Path.Combine(Application.dataPath, "WX-WASM-SDK-V2");
}
string packagePath = packageInfo.assetPath;
if (packageInfo.name == "WXSDK")
{
packagePath += "/Resources";
}
DirectoryInfo dir = new DirectoryInfo(packagePath);
return dir.FullName;
#endif
});
WXExtEnvDef.RegisterAction("UnityUtil.IsAssets", (args) => {
#if UNITY_2018
return true;
#else
var packageInfo = UnityEditor.PackageManager.PackageInfo.FindForAssembly(typeof(WXExtEnvDef).Assembly);
if (packageInfo == null)
{
return true;
}
return false;
#endif
});
} }
} }
} }

View File

@ -2,7 +2,7 @@
{ {
public class WXPluginVersion public class WXPluginVersion
{ {
public static string pluginVersion = "202404171424"; // 这一行不要改他,导出的时候会自动替换 public static string pluginVersion = "202404261957"; // 这一行不要改他,导出的时候会自动替换
} }
public class WXPluginConf public class WXPluginConf

Binary file not shown.

View File

@ -12,7 +12,7 @@ PluginImporter:
validateReferences: 1 validateReferences: 1
platformData: platformData:
- first: - first:
: Any '': Any
second: second:
enabled: 0 enabled: 0
settings: settings:
@ -60,7 +60,7 @@ PluginImporter:
second: second:
enabled: 0 enabled: 0
settings: settings:
CPU: AnyCPU CPU: x86_64
- first: - first:
Standalone: LinuxUniversal Standalone: LinuxUniversal
second: second:

Binary file not shown.

View File

@ -12,7 +12,7 @@ PluginImporter:
validateReferences: 1 validateReferences: 1
platformData: platformData:
- first: - first:
: Any '': Any
second: second:
enabled: 0 enabled: 0
settings: settings:
@ -61,7 +61,7 @@ PluginImporter:
second: second:
enabled: 0 enabled: 0
settings: settings:
CPU: AnyCPU CPU: x86_64
- first: - first:
Standalone: LinuxUniversal Standalone: LinuxUniversal
second: second:
@ -91,11 +91,6 @@ PluginImporter:
second: second:
enabled: 1 enabled: 1
settings: {} settings: {}
- first:
WeixinMiniGame: WeixinMiniGame
second:
enabled: 1
settings: {}
- first: - first:
Windows Store Apps: WindowsStoreApps Windows Store Apps: WindowsStoreApps
second: second:

View File

@ -1,4 +1,5 @@
using System.Runtime.InteropServices; #if UNITY_WEBGL || WEIXINMINIGAME || UNITY_EDITOR
using System.Runtime.InteropServices;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
using AOT; using AOT;
@ -105,4 +106,5 @@ namespace WeChatWASM
return Encoding.UTF8.GetString(DecryptedBytes); return Encoding.UTF8.GetString(DecryptedBytes);
} }
} }
} }
#endif

View File

@ -1,4 +1,5 @@
using System; #if UNITY_WEBGL || WEIXINMINIGAME || UNITY_EDITOR
using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace WeChatWASM namespace WeChatWASM
@ -28,4 +29,5 @@ namespace WeChatWASM
return result; return result;
} }
} }
} }
#endif

View File

@ -1 +1 @@
{"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.8","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}} {"name":"com.qq.weixin.minigame","displayName":"WXSDK","description":"WeChat Mini Game Tuanjie Engine Adapter SDK Package.","version":"0.1.9","unity":"2019.4","unityRelease":"29f1","keywords":["Tuanjie","WX"],"dependencies":{}}