更新包,增加默认依赖库
This commit is contained in:
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.1.2")]
|
||||
[assembly: AssemblyFileVersion("1.0.1.2")]
|
||||
[assembly: AssemblyVersion("1.0.1.3")]
|
||||
[assembly: AssemblyFileVersion("1.0.1.5")]
|
||||
|
||||
@@ -209,16 +209,19 @@ $nuspecContent = @"
|
||||
<!-- </group> -->
|
||||
<!-- </dependencies> -->
|
||||
</metadata>
|
||||
<!-- 移除WebSocketSharp依赖项,因为已将其直接包含在包中 -->
|
||||
<dependencies>
|
||||
<group targetFramework=".NETFramework4.0">
|
||||
<dependency id="Newtonsoft.Json" version="8.0.3" />
|
||||
<dependency id="WebSocketSharp" version="1.0.3-rc11" />
|
||||
</group>
|
||||
</dependencies>
|
||||
<files>
|
||||
<file src="$targetDllName" target="lib\net40\" />
|
||||
<file src="$([System.IO.Path]::ChangeExtension($targetDllName, ".pdb"))" target="lib\net40\" />
|
||||
<file src="$([System.IO.Path]::ChangeExtension($targetDllName, ".xml"))" target="lib\net40\" />
|
||||
<file src="websocket-sharp.dll" target="lib\net40\" />
|
||||
<file src="websocket-sharp.pdb" target="lib\net40\" />
|
||||
<file src="websocket-sharp.xml" target="lib\net40\" />
|
||||
<file src="$iconFileName" target="\" />
|
||||
</files>
|
||||
</package>
|
||||
@@ -257,13 +260,88 @@ if (Test-Path $sourcePdbPath) {
|
||||
Write-Host "已复制$sourcePdbPath 到$destPdbPath"
|
||||
}
|
||||
|
||||
# 复制xml文件到包结构中
|
||||
# 生成XML文档文件
|
||||
$targetXmlName = [System.IO.Path]::ChangeExtension($targetDllName, ".xml")
|
||||
$sourceXmlPath = Join-Path $output $targetXmlName
|
||||
|
||||
# 初始化binDir变量
|
||||
$binDir = Join-Path $scriptDir "CubeLib\bin\$configuration"
|
||||
|
||||
# 尝试从bin目录复制XML文件
|
||||
$binXmlPath = Join-Path $binDir $targetXmlName
|
||||
if (Test-Path $binXmlPath) {
|
||||
Copy-Item -Path $binXmlPath -Destination $sourceXmlPath -Force
|
||||
Write-Host "Copied $binXmlPath to $sourceXmlPath"
|
||||
}
|
||||
else {
|
||||
# 如果bin目录中没有xml文件,尝试生成一个包含文档注释的xml文件
|
||||
$xmlContent = @'
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>JoyD.Windows.CS.CubeLib</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:JoyD.Windows.CS.CubeLib.WebSocket.IWebSocketClient">
|
||||
<summary>
|
||||
WebSocket客户端接口
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:JoyD.Windows.CS.CubeLib.WebSocket.WebSocketClient">
|
||||
<summary>
|
||||
WebSocket客户端实现
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:JoyD.Windows.CS.CubeLib.WebSocket.IWebSocketServer">
|
||||
<summary>
|
||||
WebSocket服务器接口
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:JoyD.Windows.CS.CubeLib.WebSocket.WebSocketServer">
|
||||
<summary>
|
||||
WebSocket服务器实现
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
'@
|
||||
Set-Content -Path $sourceXmlPath -Value $xmlContent -Encoding UTF8
|
||||
Write-Host "Created XML documentation file with basic comments at $sourceXmlPath"
|
||||
}
|
||||
|
||||
# 移除重复的复制逻辑
|
||||
|
||||
$destXmlPath = Join-Path $libDir $targetXmlName
|
||||
if (Test-Path $sourceXmlPath) {
|
||||
Copy-Item -Path $sourceXmlPath -Destination $destXmlPath -Force
|
||||
Write-Host "已复制$sourceXmlPath 到$destXmlPath"
|
||||
Write-Host "已复制 $sourceXmlPath 到 $destXmlPath"
|
||||
}
|
||||
|
||||
# 复制websocket-sharp.dll到包结构中
|
||||
$webSocketSharpDll = "websocket-sharp.dll"
|
||||
$sourceWebSocketSharpPath = Join-Path $output $webSocketSharpDll
|
||||
$destWebSocketSharpPath = Join-Path $libDir $webSocketSharpDll
|
||||
if (Test-Path $sourceWebSocketSharpPath) {
|
||||
Copy-Item -Path $sourceWebSocketSharpPath -Destination $destWebSocketSharpPath -Force
|
||||
Write-Host "已复制$sourceWebSocketSharpPath 到$destWebSocketSharpPath"
|
||||
}
|
||||
|
||||
# 复制websocket-sharp.pdb到包结构中
|
||||
$webSocketSharpPdb = "websocket-sharp.pdb"
|
||||
$sourceWebSocketSharpPdbPath = Join-Path $output $webSocketSharpPdb
|
||||
$destWebSocketSharpPdbPath = Join-Path $libDir $webSocketSharpPdb
|
||||
if (Test-Path $sourceWebSocketSharpPdbPath) {
|
||||
Copy-Item -Path $sourceWebSocketSharpPdbPath -Destination $destWebSocketSharpPdbPath -Force
|
||||
Write-Host "已复制$sourceWebSocketSharpPdbPath 到$destWebSocketSharpPdbPath"
|
||||
}
|
||||
|
||||
# 复制websocket-sharp.xml到包结构中
|
||||
$webSocketSharpXml = "websocket-sharp.xml"
|
||||
$sourceWebSocketSharpXmlPath = Join-Path $output $webSocketSharpXml
|
||||
$destWebSocketSharpXmlPath = Join-Path $libDir $webSocketSharpXml
|
||||
if (Test-Path $sourceWebSocketSharpXmlPath) {
|
||||
Copy-Item -Path $sourceWebSocketSharpXmlPath -Destination $destWebSocketSharpXmlPath -Force
|
||||
Write-Host "已复制$sourceWebSocketSharpXmlPath 到$destWebSocketSharpXmlPath"
|
||||
}
|
||||
|
||||
# 复制图标文件到包结构根目录
|
||||
|
||||
Reference in New Issue
Block a user