增加nuget图标
This commit is contained in:
Binary file not shown.
@@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
|
||||||
<metadata>
|
|
||||||
<id>com.joyd.toprie</id>
|
|
||||||
<version>1.0.0.0</version>
|
|
||||||
<title>Toprie Thermal Camera Control</title>
|
|
||||||
<authors>JoyD</authors>
|
|
||||||
<description>Thermal camera control library</description>
|
|
||||||
<copyright>Copyright 2025</copyright>
|
|
||||||
</metadata>
|
|
||||||
<files>
|
|
||||||
<file src="Toprie.dll" target="lib\net40\" />
|
|
||||||
</files>
|
|
||||||
</package>
|
|
||||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB |
@@ -1,28 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
|
||||||
<metadata>
|
|
||||||
<id>com.joyd.toprie</id>
|
|
||||||
<version>1.0.0.0</version>
|
|
||||||
<title>托普瑞热像仪控制库</title>
|
|
||||||
<authors>曾庆明</authors>
|
|
||||||
<owners>JoyD Technology</owners>
|
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
|
||||||
<description>托普瑞热像仪控制库,提供热像仪设备的连接、配置和数据获取功能</description>
|
|
||||||
<releaseNotes>初始版本发布</releaseNotes>
|
|
||||||
<copyright>Copyright 2025 JoyD Technology</copyright>
|
|
||||||
<tags>thermal camera toprie 红外 热像仪 控制</tags>
|
|
||||||
<projectUrl>https://github.com/joyd/toprie-library</projectUrl>
|
|
||||||
<licenseUrl>https://opensource.org/licenses/MIT</licenseUrl>
|
|
||||||
<icon>Toprie.png</icon>
|
|
||||||
<!-- 可以根据需要添加更多元数据,如依赖项、框架引用等 -->
|
|
||||||
<!-- <dependencies> -->
|
|
||||||
<!-- <group targetFramework=".NETFramework4.0"> -->
|
|
||||||
<!-- <dependency id="Newtonsoft.Json" version="13.0.1" /> -->
|
|
||||||
<!-- </group> -->
|
|
||||||
<!-- </dependencies> -->
|
|
||||||
</metadata>
|
|
||||||
<files>
|
|
||||||
<file src="Toprie.dll" target="lib\net40\" />
|
|
||||||
<file src="Toprie.png" target="" />
|
|
||||||
</files>
|
|
||||||
</package>
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
@echo off
|
|
||||||
|
|
||||||
echo 开始打包和发布NuGet包...
|
|
||||||
|
|
||||||
REM 设置参数
|
|
||||||
set VERSION=1.0.0.0
|
|
||||||
set PACKAGE_ID=com.joyd.toprie
|
|
||||||
set DLL_PATH=Toprie.dll
|
|
||||||
set NUGET_SERVER=http://47.111.181.23:8081/repository/nuget-releases/
|
|
||||||
set API_KEY=admin:admin
|
|
||||||
|
|
||||||
REM 创建临时项目文件
|
|
||||||
(echo <Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
echo <PropertyGroup>
|
|
||||||
echo <TargetFramework>net40</TargetFramework>
|
|
||||||
echo <PackageId>%PACKAGE_ID%</PackageId>
|
|
||||||
echo <Version>%VERSION%</Version>
|
|
||||||
echo <Title>Toprie Thermal Camera Control</Title>
|
|
||||||
echo <Authors>JoyD</Authors>
|
|
||||||
echo <Description>Thermal camera control library</Description>
|
|
||||||
echo <Copyright>Copyright 2025</Copyright>
|
|
||||||
echo <PackageOutputPath>.</PackageOutputPath>
|
|
||||||
echo </PropertyGroup>
|
|
||||||
echo <ItemGroup>
|
|
||||||
echo <Content Include="%DLL_PATH%" Pack="true" PackagePath="lib\net40\%DLL_PATH%" />
|
|
||||||
echo </ItemGroup>
|
|
||||||
echo </Project>) > Temp.csproj
|
|
||||||
|
|
||||||
REM 打包
|
|
||||||
nuget pack Temp.csproj -Build -Properties Configuration=Release
|
|
||||||
|
|
||||||
REM 发布
|
|
||||||
for %%f in (*.nupkg) do (
|
|
||||||
echo 发布包: %%f
|
|
||||||
nuget push %%f %API_KEY% -Source %NUGET_SERVER%
|
|
||||||
if not errorlevel 1 (
|
|
||||||
echo 发布成功!
|
|
||||||
exit /b 0
|
|
||||||
) else (
|
|
||||||
echo 发布失败,但包已创建: %%f
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
echo 清理临时文件
|
|
||||||
if exist Temp.csproj del Temp.csproj
|
|
||||||
|
|
||||||
echo 发布脚本执行完成。
|
|
||||||
pause
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<configuration>
|
|
||||||
<config>
|
|
||||||
<add key="allowInsecureConnections" value="true" />
|
|
||||||
</config>
|
|
||||||
<packageSources>
|
|
||||||
<add key="JoyD-Private" value="http://47.111.181.23:8081/repository/nuget-hosted/" />
|
|
||||||
</packageSources>
|
|
||||||
<packageSourceCredentials>
|
|
||||||
<JoyD-Private>
|
|
||||||
<add key="Username" value="admin" />
|
|
||||||
<add key="Password" value="YWRtaW46YWRtaW4=" />
|
|
||||||
</JoyD-Private>
|
|
||||||
</packageSourceCredentials>
|
|
||||||
</configuration>
|
|
||||||
@@ -21,7 +21,7 @@ $projectUrl = "https://github.com/joyd/toprie-library"
|
|||||||
$licenseUrl = "https://opensource.org/licenses/MIT"
|
$licenseUrl = "https://opensource.org/licenses/MIT"
|
||||||
$iconFileName = "Toprie.png"
|
$iconFileName = "Toprie.png"
|
||||||
$iconSourcePath = Join-Path $scriptDir $iconFileName
|
$iconSourcePath = Join-Path $scriptDir $iconFileName
|
||||||
$iconUrl = $iconFileName
|
$iconUrl = "http://47.111.181.23:8081/repository/gradle/main/Toprie.png"
|
||||||
$releaseNotes = "初始版本发布"
|
$releaseNotes = "初始版本发布"
|
||||||
|
|
||||||
# 其他设置
|
# 其他设置
|
||||||
@@ -122,7 +122,8 @@ $tempProjContent = @"
|
|||||||
<PackageTags>$tagsString</PackageTags>
|
<PackageTags>$tagsString</PackageTags>
|
||||||
<PackageProjectUrl>$projectUrl</PackageProjectUrl>
|
<PackageProjectUrl>$projectUrl</PackageProjectUrl>
|
||||||
<PackageLicenseUrl>$licenseUrl</PackageLicenseUrl>
|
<PackageLicenseUrl>$licenseUrl</PackageLicenseUrl>
|
||||||
<PackageIcon>$iconUrl</PackageIcon>
|
<PackageIcon>$iconFileName</PackageIcon>
|
||||||
|
<PackageIconUrl></PackageIconUrl>
|
||||||
<PackageReleaseNotes>$releaseNotes</PackageReleaseNotes>
|
<PackageReleaseNotes>$releaseNotes</PackageReleaseNotes>
|
||||||
<PackageOutputPath>.</PackageOutputPath>
|
<PackageOutputPath>.</PackageOutputPath>
|
||||||
<RestorePackagesConfig>true</RestorePackagesConfig>
|
<RestorePackagesConfig>true</RestorePackagesConfig>
|
||||||
@@ -132,6 +133,7 @@ $tempProjContent = @"
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="$targetDllName" Pack="true" PackagePath="lib\net40\$targetDllName" />
|
<Content Include="$targetDllName" Pack="true" PackagePath="lib\net40\$targetDllName" />
|
||||||
|
<Content Include="$iconFileName" Pack="true" PackagePath="$iconFileName" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
"@
|
"@
|
||||||
@@ -164,7 +166,8 @@ $nuspecContent = @"
|
|||||||
<tags>$tagsString</tags>
|
<tags>$tagsString</tags>
|
||||||
<projectUrl>$projectUrl</projectUrl>
|
<projectUrl>$projectUrl</projectUrl>
|
||||||
<licenseUrl>$licenseUrl</licenseUrl>
|
<licenseUrl>$licenseUrl</licenseUrl>
|
||||||
<icon>$iconUrl</icon>
|
<icon>$iconFileName</icon>
|
||||||
|
<iconUrl>$iconUrl</iconUrl>
|
||||||
<!-- 可以根据需要添加更多元数据,如依赖项、框架引用等 -->
|
<!-- 可以根据需要添加更多元数据,如依赖项、框架引用等 -->
|
||||||
<!-- <dependencies> -->
|
<!-- <dependencies> -->
|
||||||
<!-- <group targetFramework=".NETFramework4.0"> -->
|
<!-- <group targetFramework=".NETFramework4.0"> -->
|
||||||
@@ -174,7 +177,7 @@ $nuspecContent = @"
|
|||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
<file src="$targetDllName" target="lib\net40\" />
|
<file src="$targetDllName" target="lib\net40\" />
|
||||||
<file src="$iconFileName" target="" />
|
<file src="$iconFileName" target="\" />
|
||||||
</files>
|
</files>
|
||||||
</package>
|
</package>
|
||||||
"@
|
"@
|
||||||
@@ -216,7 +219,7 @@ if (Test-Path $sourceIconPath) {
|
|||||||
# 创建[Content_Types].xml文件(有效nupkg必需)
|
# 创建[Content_Types].xml文件(有效nupkg必需)
|
||||||
$contentTypesPath = Join-Path $tempDir "[Content_Types].xml"
|
$contentTypesPath = Join-Path $tempDir "[Content_Types].xml"
|
||||||
# 使用-LiteralPath参数避免方括号被解释为通配符
|
# 使用-LiteralPath参数避免方括号被解释为通配符
|
||||||
Set-Content -LiteralPath $contentTypesPath -Value "<?xml version='1.0' encoding='utf-8'?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='dll' ContentType='application/octet-stream'/><Default Extension='xml' ContentType='application/xml'/></Types>"
|
Set-Content -LiteralPath $contentTypesPath -Value "<?xml version='1.0' encoding='utf-8'?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='dll' ContentType='application/octet-stream'/><Default Extension='xml' ContentType='application/xml'/><Default Extension='png' ContentType='image/png'/></Types>"
|
||||||
Write-Host "已在 $contentTypesPath 创建[Content_Types].xml"
|
Write-Host "已在 $contentTypesPath 创建[Content_Types].xml"
|
||||||
|
|
||||||
# 复制nuspec文件到包结构根目录
|
# 复制nuspec文件到包结构根目录
|
||||||
|
|||||||
Reference in New Issue
Block a user