mirror of
https://gitee.com/handyorg/HandyControl.git
synced 2024-11-29 18:38:30 +08:00
enhance: simplify the build process.
This commit is contained in:
parent
f6c7d7a72b
commit
dc77110813
33
.github/workflows/bump-up-version.yml
vendored
Normal file
33
.github/workflows/bump-up-version.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
name: Bump up version
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
pre_release:
|
||||
description: 'is preview'
|
||||
type: boolean
|
||||
required: true
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
bump-up-version:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Setup .NET Core SDK
|
||||
uses: actions/setup-dotnet@master
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
include-prerelease: true
|
||||
|
||||
- name: Build
|
||||
working-directory: ./build
|
||||
run: |
|
||||
dotnet new tool-manifest
|
||||
dotnet tool install cake.tool --version 4.0.0
|
||||
dotnet tool install minver-cli --version 3.0.0
|
||||
dotnet cake --username="${{ github.actor }}" --email="836904362@qq.com" --pre-release=${{ inputs.pre_release }}
|
17
.gitignore
vendored
17
.gitignore
vendored
@ -1,19 +1,8 @@
|
||||
.vs
|
||||
.config
|
||||
*.user
|
||||
*.xml
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
packages/
|
||||
build/*
|
||||
!build/build.cake
|
||||
!build/build.Lang.template
|
||||
!build/create_lang_nuspec_file.py
|
||||
!build/create_nupkg_file.ps1
|
||||
!build/build.ps1
|
||||
!build/version-bump-up-manual.md
|
||||
!build/LICENSE
|
||||
!build/icon.png
|
||||
!build/tools/
|
||||
build/tools/*
|
||||
!build/tools/packages.config
|
||||
!build/tools/VisualStudioToolsManifest.xml
|
||||
build/outputs
|
||||
build/tools
|
||||
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018-2024 HandyOrg
|
||||
Copyright © HandyOrg 2018-2024
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018-2024 HandyOrg
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -1,279 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>HandyControl</id>
|
||||
<version>3.5.2</version>
|
||||
<title>HandyOrg</title>
|
||||
<authors>HandyOrg</authors>
|
||||
<owners>HandyOrg</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<license type="file">LICENSE</license>
|
||||
<icon>icon.png</icon>
|
||||
<projectUrl>https://github.com/NaBian/HandyControl</projectUrl>
|
||||
<description>Contains some simple and commonly used WPF controls</description>
|
||||
<copyright>Copyright © HandyOrg 2018-2024</copyright>
|
||||
<tags>WPF C# Control</tags>
|
||||
<dependencies>
|
||||
<group targetFramework=".NETFramework4.0" />
|
||||
<group targetFramework=".NETFramework4.5" />
|
||||
<group targetFramework=".NETFramework4.5.1" />
|
||||
<group targetFramework=".NETFramework4.5.2" />
|
||||
<group targetFramework=".NETFramework4.6" />
|
||||
<group targetFramework=".NETFramework4.6.1" />
|
||||
<group targetFramework=".NETFramework4.6.2" />
|
||||
<group targetFramework=".NETFramework4.7" />
|
||||
<group targetFramework=".NETFramework4.7.1" />
|
||||
<group targetFramework=".NETFramework4.7.2" />
|
||||
<group targetFramework=".NETFramework4.8" />
|
||||
<group targetFramework=".NETFramework4.8.1" />
|
||||
<group targetFramework=".NETCoreApp3.0" />
|
||||
<group targetFramework=".NETCoreApp3.1" />
|
||||
<group targetFramework="net5.0" />
|
||||
<group targetFramework="net6.0" />
|
||||
<group targetFramework="net7.0" />
|
||||
<group targetFramework="net8.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="lib\net40\ca-ES\HandyControl.resources.dll" target="lib\net40\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net40\en\HandyControl.resources.dll" target="lib\net40\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net40\fa\HandyControl.resources.dll" target="lib\net40\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net40\fr\HandyControl.resources.dll" target="lib\net40\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net40\ja\HandyControl.resources.dll" target="lib\net40\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net40\ko-KR\HandyControl.resources.dll" target="lib\net40\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net40\pl\HandyControl.resources.dll" target="lib\net40\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net40\pt-BR\HandyControl.resources.dll" target="lib\net40\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net40\ru\HandyControl.resources.dll" target="lib\net40\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net40\tr\HandyControl.resources.dll" target="lib\net40\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net40\HandyControl.dll" target="lib\net40\HandyControl.dll" />
|
||||
<file src="lib\net40\HandyControl.pdb" target="lib\net40\HandyControl.pdb" />
|
||||
<file src="lib\net40\HandyControl.xml" target="lib\net40\HandyControl.xml" />
|
||||
<file src="lib\net45\ca-ES\HandyControl.resources.dll" target="lib\net45\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net45\en\HandyControl.resources.dll" target="lib\net45\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net45\fa\HandyControl.resources.dll" target="lib\net45\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net45\fr\HandyControl.resources.dll" target="lib\net45\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net45\ja\HandyControl.resources.dll" target="lib\net45\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net45\ko-KR\HandyControl.resources.dll" target="lib\net45\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net45\pl\HandyControl.resources.dll" target="lib\net45\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net45\pt-BR\HandyControl.resources.dll" target="lib\net45\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net45\ru\HandyControl.resources.dll" target="lib\net45\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net45\tr\HandyControl.resources.dll" target="lib\net45\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net45\HandyControl.dll" target="lib\net45\HandyControl.dll" />
|
||||
<file src="lib\net45\HandyControl.pdb" target="lib\net45\HandyControl.pdb" />
|
||||
<file src="lib\net45\HandyControl.xml" target="lib\net45\HandyControl.xml" />
|
||||
<file src="lib\net451\ca-ES\HandyControl.resources.dll" target="lib\net451\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net451\en\HandyControl.resources.dll" target="lib\net451\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net451\fa\HandyControl.resources.dll" target="lib\net451\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net451\fr\HandyControl.resources.dll" target="lib\net451\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net451\ja\HandyControl.resources.dll" target="lib\net451\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net451\ko-KR\HandyControl.resources.dll" target="lib\net451\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net451\pl\HandyControl.resources.dll" target="lib\net451\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net451\pt-BR\HandyControl.resources.dll" target="lib\net451\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net451\ru\HandyControl.resources.dll" target="lib\net451\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net451\tr\HandyControl.resources.dll" target="lib\net451\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net451\HandyControl.dll" target="lib\net451\HandyControl.dll" />
|
||||
<file src="lib\net451\HandyControl.pdb" target="lib\net451\HandyControl.pdb" />
|
||||
<file src="lib\net451\HandyControl.xml" target="lib\net451\HandyControl.xml" />
|
||||
<file src="lib\net452\ca-ES\HandyControl.resources.dll" target="lib\net452\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net452\en\HandyControl.resources.dll" target="lib\net452\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net452\fa\HandyControl.resources.dll" target="lib\net452\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net452\fr\HandyControl.resources.dll" target="lib\net452\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net452\ja\HandyControl.resources.dll" target="lib\net452\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net452\ko-KR\HandyControl.resources.dll" target="lib\net452\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net452\pl\HandyControl.resources.dll" target="lib\net452\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net452\pt-BR\HandyControl.resources.dll" target="lib\net452\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net452\ru\HandyControl.resources.dll" target="lib\net452\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net452\tr\HandyControl.resources.dll" target="lib\net452\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net452\HandyControl.dll" target="lib\net452\HandyControl.dll" />
|
||||
<file src="lib\net452\HandyControl.pdb" target="lib\net452\HandyControl.pdb" />
|
||||
<file src="lib\net452\HandyControl.xml" target="lib\net452\HandyControl.xml" />
|
||||
<file src="lib\net46\ca-ES\HandyControl.resources.dll" target="lib\net46\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net46\en\HandyControl.resources.dll" target="lib\net46\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net46\fa\HandyControl.resources.dll" target="lib\net46\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net46\fr\HandyControl.resources.dll" target="lib\net46\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net46\ja\HandyControl.resources.dll" target="lib\net46\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net46\ko-KR\HandyControl.resources.dll" target="lib\net46\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net46\pl\HandyControl.resources.dll" target="lib\net46\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net46\pt-BR\HandyControl.resources.dll" target="lib\net46\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net46\ru\HandyControl.resources.dll" target="lib\net46\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net46\tr\HandyControl.resources.dll" target="lib\net46\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net46\HandyControl.dll" target="lib\net46\HandyControl.dll" />
|
||||
<file src="lib\net46\HandyControl.pdb" target="lib\net46\HandyControl.pdb" />
|
||||
<file src="lib\net46\HandyControl.xml" target="lib\net46\HandyControl.xml" />
|
||||
<file src="lib\net461\ca-ES\HandyControl.resources.dll" target="lib\net461\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net461\en\HandyControl.resources.dll" target="lib\net461\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net461\fa\HandyControl.resources.dll" target="lib\net461\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net461\fr\HandyControl.resources.dll" target="lib\net461\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net461\ja\HandyControl.resources.dll" target="lib\net461\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net461\ko-KR\HandyControl.resources.dll" target="lib\net461\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net461\pl\HandyControl.resources.dll" target="lib\net461\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net461\pt-BR\HandyControl.resources.dll" target="lib\net461\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net461\ru\HandyControl.resources.dll" target="lib\net461\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net461\tr\HandyControl.resources.dll" target="lib\net461\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net461\HandyControl.dll" target="lib\net461\HandyControl.dll" />
|
||||
<file src="lib\net461\HandyControl.pdb" target="lib\net461\HandyControl.pdb" />
|
||||
<file src="lib\net461\HandyControl.xml" target="lib\net461\HandyControl.xml" />
|
||||
<file src="lib\net462\ca-ES\HandyControl.resources.dll" target="lib\net462\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net462\en\HandyControl.resources.dll" target="lib\net462\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net462\fa\HandyControl.resources.dll" target="lib\net462\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net462\fr\HandyControl.resources.dll" target="lib\net462\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net462\ja\HandyControl.resources.dll" target="lib\net462\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net462\ko-KR\HandyControl.resources.dll" target="lib\net462\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net462\pl\HandyControl.resources.dll" target="lib\net462\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net462\pt-BR\HandyControl.resources.dll" target="lib\net462\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net462\ru\HandyControl.resources.dll" target="lib\net462\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net462\tr\HandyControl.resources.dll" target="lib\net462\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net462\HandyControl.dll" target="lib\net462\HandyControl.dll" />
|
||||
<file src="lib\net462\HandyControl.pdb" target="lib\net462\HandyControl.pdb" />
|
||||
<file src="lib\net462\HandyControl.xml" target="lib\net462\HandyControl.xml" />
|
||||
<file src="lib\net47\ca-ES\HandyControl.resources.dll" target="lib\net47\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net47\en\HandyControl.resources.dll" target="lib\net47\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net47\fa\HandyControl.resources.dll" target="lib\net47\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net47\fr\HandyControl.resources.dll" target="lib\net47\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net47\ja\HandyControl.resources.dll" target="lib\net47\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net47\ko-KR\HandyControl.resources.dll" target="lib\net47\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net47\pl\HandyControl.resources.dll" target="lib\net47\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net47\pt-BR\HandyControl.resources.dll" target="lib\net47\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net47\ru\HandyControl.resources.dll" target="lib\net47\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net47\tr\HandyControl.resources.dll" target="lib\net47\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net47\HandyControl.dll" target="lib\net47\HandyControl.dll" />
|
||||
<file src="lib\net47\HandyControl.pdb" target="lib\net47\HandyControl.pdb" />
|
||||
<file src="lib\net47\HandyControl.xml" target="lib\net47\HandyControl.xml" />
|
||||
<file src="lib\net471\ca-ES\HandyControl.resources.dll" target="lib\net471\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net471\en\HandyControl.resources.dll" target="lib\net471\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net471\fa\HandyControl.resources.dll" target="lib\net471\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net471\fr\HandyControl.resources.dll" target="lib\net471\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net471\ja\HandyControl.resources.dll" target="lib\net471\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net471\ko-KR\HandyControl.resources.dll" target="lib\net471\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net471\pl\HandyControl.resources.dll" target="lib\net471\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net471\pt-BR\HandyControl.resources.dll" target="lib\net471\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net471\ru\HandyControl.resources.dll" target="lib\net471\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net471\tr\HandyControl.resources.dll" target="lib\net471\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net471\HandyControl.dll" target="lib\net471\HandyControl.dll" />
|
||||
<file src="lib\net471\HandyControl.pdb" target="lib\net471\HandyControl.pdb" />
|
||||
<file src="lib\net471\HandyControl.xml" target="lib\net471\HandyControl.xml" />
|
||||
<file src="lib\net472\ca-ES\HandyControl.resources.dll" target="lib\net472\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net472\en\HandyControl.resources.dll" target="lib\net472\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net472\fa\HandyControl.resources.dll" target="lib\net472\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net472\fr\HandyControl.resources.dll" target="lib\net472\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net472\ja\HandyControl.resources.dll" target="lib\net472\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net472\ko-KR\HandyControl.resources.dll" target="lib\net472\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net472\pl\HandyControl.resources.dll" target="lib\net472\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net472\pt-BR\HandyControl.resources.dll" target="lib\net472\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net472\ru\HandyControl.resources.dll" target="lib\net472\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net472\tr\HandyControl.resources.dll" target="lib\net472\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net472\HandyControl.dll" target="lib\net472\HandyControl.dll" />
|
||||
<file src="lib\net472\HandyControl.pdb" target="lib\net472\HandyControl.pdb" />
|
||||
<file src="lib\net472\HandyControl.xml" target="lib\net472\HandyControl.xml" />
|
||||
<file src="lib\net48\ca-ES\HandyControl.resources.dll" target="lib\net48\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net48\en\HandyControl.resources.dll" target="lib\net48\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net48\fa\HandyControl.resources.dll" target="lib\net48\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net48\fr\HandyControl.resources.dll" target="lib\net48\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net48\ja\HandyControl.resources.dll" target="lib\net48\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net48\ko-KR\HandyControl.resources.dll" target="lib\net48\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net48\pl\HandyControl.resources.dll" target="lib\net48\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net48\pt-BR\HandyControl.resources.dll" target="lib\net48\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net48\ru\HandyControl.resources.dll" target="lib\net48\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net48\tr\HandyControl.resources.dll" target="lib\net48\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net48\HandyControl.dll" target="lib\net48\HandyControl.dll" />
|
||||
<file src="lib\net48\HandyControl.pdb" target="lib\net48\HandyControl.pdb" />
|
||||
<file src="lib\net48\HandyControl.xml" target="lib\net48\HandyControl.xml" />
|
||||
<file src="lib\net481\ca-ES\HandyControl.resources.dll" target="lib\net481\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net481\en\HandyControl.resources.dll" target="lib\net481\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net481\fa\HandyControl.resources.dll" target="lib\net481\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net481\fr\HandyControl.resources.dll" target="lib\net481\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net481\ja\HandyControl.resources.dll" target="lib\net481\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net481\ko-KR\HandyControl.resources.dll" target="lib\net481\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net481\pl\HandyControl.resources.dll" target="lib\net481\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net481\pt-BR\HandyControl.resources.dll" target="lib\net481\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net481\ru\HandyControl.resources.dll" target="lib\net481\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net481\tr\HandyControl.resources.dll" target="lib\net481\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net481\HandyControl.dll" target="lib\net481\HandyControl.dll" />
|
||||
<file src="lib\net481\HandyControl.pdb" target="lib\net481\HandyControl.pdb" />
|
||||
<file src="lib\net481\HandyControl.xml" target="lib\net481\HandyControl.xml" />
|
||||
<file src="lib\net5.0\ca-ES\HandyControl.resources.dll" target="lib\net5.0\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net5.0\en\HandyControl.resources.dll" target="lib\net5.0\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net5.0\fa\HandyControl.resources.dll" target="lib\net5.0\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net5.0\fr\HandyControl.resources.dll" target="lib\net5.0\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net5.0\ja\HandyControl.resources.dll" target="lib\net5.0\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net5.0\ko-KR\HandyControl.resources.dll" target="lib\net5.0\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net5.0\pl\HandyControl.resources.dll" target="lib\net5.0\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net5.0\pt-BR\HandyControl.resources.dll" target="lib\net5.0\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net5.0\ru\HandyControl.resources.dll" target="lib\net5.0\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net5.0\tr\HandyControl.resources.dll" target="lib\net5.0\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net5.0\HandyControl.deps.json" target="lib\net5.0\HandyControl.deps.json" />
|
||||
<file src="lib\net5.0\HandyControl.dll" target="lib\net5.0\HandyControl.dll" />
|
||||
<file src="lib\net5.0\HandyControl.pdb" target="lib\net5.0\HandyControl.pdb" />
|
||||
<file src="lib\net5.0\HandyControl.xml" target="lib\net5.0\HandyControl.xml" />
|
||||
<file src="lib\net6.0\ca-ES\HandyControl.resources.dll" target="lib\net6.0\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net6.0\en\HandyControl.resources.dll" target="lib\net6.0\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net6.0\fa\HandyControl.resources.dll" target="lib\net6.0\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net6.0\fr\HandyControl.resources.dll" target="lib\net6.0\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net6.0\ja\HandyControl.resources.dll" target="lib\net6.0\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net6.0\ko-KR\HandyControl.resources.dll" target="lib\net6.0\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net6.0\pl\HandyControl.resources.dll" target="lib\net6.0\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net6.0\pt-BR\HandyControl.resources.dll" target="lib\net6.0\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net6.0\ru\HandyControl.resources.dll" target="lib\net6.0\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net6.0\tr\HandyControl.resources.dll" target="lib\net6.0\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net6.0\HandyControl.deps.json" target="lib\net6.0\HandyControl.deps.json" />
|
||||
<file src="lib\net6.0\HandyControl.dll" target="lib\net6.0\HandyControl.dll" />
|
||||
<file src="lib\net6.0\HandyControl.pdb" target="lib\net6.0\HandyControl.pdb" />
|
||||
<file src="lib\net6.0\HandyControl.xml" target="lib\net6.0\HandyControl.xml" />
|
||||
<file src="lib\net7.0\ca-ES\HandyControl.resources.dll" target="lib\net7.0\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net7.0\en\HandyControl.resources.dll" target="lib\net7.0\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net7.0\fa\HandyControl.resources.dll" target="lib\net7.0\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net7.0\fr\HandyControl.resources.dll" target="lib\net7.0\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net7.0\ja\HandyControl.resources.dll" target="lib\net7.0\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net7.0\ko-KR\HandyControl.resources.dll" target="lib\net7.0\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net7.0\pl\HandyControl.resources.dll" target="lib\net7.0\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net7.0\pt-BR\HandyControl.resources.dll" target="lib\net7.0\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net7.0\ru\HandyControl.resources.dll" target="lib\net7.0\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net7.0\tr\HandyControl.resources.dll" target="lib\net7.0\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net7.0\HandyControl.deps.json" target="lib\net7.0\HandyControl.deps.json" />
|
||||
<file src="lib\net7.0\HandyControl.dll" target="lib\net7.0\HandyControl.dll" />
|
||||
<file src="lib\net7.0\HandyControl.pdb" target="lib\net7.0\HandyControl.pdb" />
|
||||
<file src="lib\net7.0\HandyControl.xml" target="lib\net7.0\HandyControl.xml" />
|
||||
<file src="lib\net8.0\ca-ES\HandyControl.resources.dll" target="lib\net8.0\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\net8.0\en\HandyControl.resources.dll" target="lib\net8.0\en\HandyControl.resources.dll" />
|
||||
<file src="lib\net8.0\fa\HandyControl.resources.dll" target="lib\net8.0\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\net8.0\fr\HandyControl.resources.dll" target="lib\net8.0\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\net8.0\ja\HandyControl.resources.dll" target="lib\net8.0\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\net8.0\ko-KR\HandyControl.resources.dll" target="lib\net8.0\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\net8.0\pl\HandyControl.resources.dll" target="lib\net8.0\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\net8.0\pt-BR\HandyControl.resources.dll" target="lib\net8.0\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\net8.0\ru\HandyControl.resources.dll" target="lib\net8.0\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\net8.0\tr\HandyControl.resources.dll" target="lib\net8.0\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\net8.0\HandyControl.deps.json" target="lib\net8.0\HandyControl.deps.json" />
|
||||
<file src="lib\net8.0\HandyControl.dll" target="lib\net8.0\HandyControl.dll" />
|
||||
<file src="lib\net8.0\HandyControl.pdb" target="lib\net8.0\HandyControl.pdb" />
|
||||
<file src="lib\net8.0\HandyControl.xml" target="lib\net8.0\HandyControl.xml" />
|
||||
<file src="lib\netcoreapp3.0\ca-ES\HandyControl.resources.dll" target="lib\netcoreapp3.0\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.0\en\HandyControl.resources.dll" target="lib\netcoreapp3.0\en\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.0\fa\HandyControl.resources.dll" target="lib\netcoreapp3.0\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.0\fr\HandyControl.resources.dll" target="lib\netcoreapp3.0\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.0\ja\HandyControl.resources.dll" target="lib\netcoreapp3.0\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.0\ko-KR\HandyControl.resources.dll" target="lib\netcoreapp3.0\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.0\pl\HandyControl.resources.dll" target="lib\netcoreapp3.0\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.0\pt-BR\HandyControl.resources.dll" target="lib\netcoreapp3.0\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.0\ru\HandyControl.resources.dll" target="lib\netcoreapp3.0\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.0\tr\HandyControl.resources.dll" target="lib\netcoreapp3.0\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.0\HandyControl.deps.json" target="lib\netcoreapp3.0\HandyControl.deps.json" />
|
||||
<file src="lib\netcoreapp3.0\HandyControl.dll" target="lib\netcoreapp3.0\HandyControl.dll" />
|
||||
<file src="lib\netcoreapp3.0\HandyControl.pdb" target="lib\netcoreapp3.0\HandyControl.pdb" />
|
||||
<file src="lib\netcoreapp3.0\HandyControl.xml" target="lib\netcoreapp3.0\HandyControl.xml" />
|
||||
<file src="lib\netcoreapp3.1\ca-ES\HandyControl.resources.dll" target="lib\netcoreapp3.1\ca-ES\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.1\en\HandyControl.resources.dll" target="lib\netcoreapp3.1\en\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.1\fa\HandyControl.resources.dll" target="lib\netcoreapp3.1\fa\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.1\fr\HandyControl.resources.dll" target="lib\netcoreapp3.1\fr\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.1\ja\HandyControl.resources.dll" target="lib\netcoreapp3.1\ja\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.1\ko-KR\HandyControl.resources.dll" target="lib\netcoreapp3.1\ko-KR\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.1\pl\HandyControl.resources.dll" target="lib\netcoreapp3.1\pl\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.1\pt-BR\HandyControl.resources.dll" target="lib\netcoreapp3.1\pt-BR\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.1\ru\HandyControl.resources.dll" target="lib\netcoreapp3.1\ru\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.1\tr\HandyControl.resources.dll" target="lib\netcoreapp3.1\tr\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.1\HandyControl.deps.json" target="lib\netcoreapp3.1\HandyControl.deps.json" />
|
||||
<file src="lib\netcoreapp3.1\HandyControl.dll" target="lib\netcoreapp3.1\HandyControl.dll" />
|
||||
<file src="lib\netcoreapp3.1\HandyControl.pdb" target="lib\netcoreapp3.1\HandyControl.pdb" />
|
||||
<file src="lib\netcoreapp3.1\HandyControl.xml" target="lib\netcoreapp3.1\HandyControl.xml" />
|
||||
</files>
|
||||
</package>
|
@ -1,61 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>HandyControl.Lang.{lang}</id>
|
||||
<version>3.5.2</version>
|
||||
<title>HandyOrg</title>
|
||||
<authors>HandyOrg</authors>
|
||||
<owners>HandyOrg</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<license type="file">LICENSE</license>
|
||||
<icon>icon.png</icon>
|
||||
<projectUrl>https://github.com/HandyOrg/HandyControl</projectUrl>
|
||||
<description>Contains some simple and commonly used WPF controls</description>
|
||||
<releaseNotes>Changes are detailed at https://github.com/HandyOrg/HandyControl/releases</releaseNotes>
|
||||
<copyright>Copyright © HandyOrg 2018-2024</copyright>
|
||||
<tags>WPF C# Control</tags>
|
||||
<repository type="git" url="https://github.com/HandyOrg/HandyControl" commit="66ad32f52a18c4b6a22aed711042eac8a6e9bf92" />
|
||||
<dependencies>
|
||||
<group targetFramework=".NETFramework4.0" />
|
||||
<group targetFramework=".NETFramework4.5" />
|
||||
<group targetFramework=".NETFramework4.5.1" />
|
||||
<group targetFramework=".NETFramework4.5.2" />
|
||||
<group targetFramework=".NETFramework4.6" />
|
||||
<group targetFramework=".NETFramework4.6.1" />
|
||||
<group targetFramework=".NETFramework4.6.2" />
|
||||
<group targetFramework=".NETFramework4.7" />
|
||||
<group targetFramework=".NETFramework4.7.1" />
|
||||
<group targetFramework=".NETFramework4.7.2" />
|
||||
<group targetFramework=".NETFramework4.8" />
|
||||
<group targetFramework=".NETFramework4.8.1" />
|
||||
<group targetFramework=".NETCoreApp3.0" />
|
||||
<group targetFramework=".NETCoreApp3.1" />
|
||||
<group targetFramework="net5.0" />
|
||||
<group targetFramework="net6.0" />
|
||||
<group targetFramework="net7.0" />
|
||||
<group targetFramework="net8.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="lib\net40\{lang}\HandyControl.resources.dll" target="lib\net40\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net45\{lang}\HandyControl.resources.dll" target="lib\net45\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net451\{lang}\HandyControl.resources.dll" target="lib\net451\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net452\{lang}\HandyControl.resources.dll" target="lib\net452\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net46\{lang}\HandyControl.resources.dll" target="lib\net46\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net461\{lang}\HandyControl.resources.dll" target="lib\net461\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net462\{lang}\HandyControl.resources.dll" target="lib\net462\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net47\{lang}\HandyControl.resources.dll" target="lib\net47\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net471\{lang}\HandyControl.resources.dll" target="lib\net471\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net472\{lang}\HandyControl.resources.dll" target="lib\net472\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net48\{lang}\HandyControl.resources.dll" target="lib\net48\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net481\{lang}\HandyControl.resources.dll" target="lib\net481\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net5.0\{lang}\HandyControl.resources.dll" target="lib\net5.0\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net6.0\{lang}\HandyControl.resources.dll" target="lib\net6.0\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net7.0\{lang}\HandyControl.resources.dll" target="lib\net7.0\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\net8.0\{lang}\HandyControl.resources.dll" target="lib\net8.0\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.0\{lang}\HandyControl.resources.dll" target="lib\netcoreapp3.0\{lang}\HandyControl.resources.dll" />
|
||||
<file src="lib\netcoreapp3.1\{lang}\HandyControl.resources.dll" target="lib\netcoreapp3.1\{lang}\HandyControl.resources.dll" />
|
||||
<file src="icon.png" target="icon.png" />
|
||||
<file src="LICENSE" target="LICENSE" />
|
||||
</files>
|
||||
</package>
|
438
build/build.cake
438
build/build.cake
@ -1,55 +1,409 @@
|
||||
var target = Argument("target", "Build");
|
||||
#addin nuget:?package=Cake.Git&version=4.0.0
|
||||
#addin nuget:?package=Cake.MinVer&version=3.0.0
|
||||
#tool nuget:?package=NuGet.CommandLine&version=6.9.1
|
||||
|
||||
Task("Clean")
|
||||
.Does(() =>
|
||||
using System;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using static System.IO.Directory;
|
||||
using static System.IO.File;
|
||||
using static System.IO.Path;
|
||||
|
||||
const string HandyControlBirthYear = "2018";
|
||||
const string TagPrefix = "v";
|
||||
const string RepositoryFolder = "..";
|
||||
const string PropsFilePath = $"{RepositoryFolder}/src/Directory.Build.Props";
|
||||
const string LicenseFilePath = $"{RepositoryFolder}/LICENSE";
|
||||
const string LibNuspecTemplateFilePath = "lib.nuspec.template";
|
||||
const string LangNuspecTemplateFilePath = "lang.nuspec.template";
|
||||
const string ResxFileFolder = $"{RepositoryFolder}/src/Shared/HandyControl_Shared/Properties/Langs";
|
||||
const string ConfigFilePath = "build.config.xml";
|
||||
|
||||
var target = Argument("target", "build");
|
||||
var preReleasePhase = Argument("pre-release-phase", "rc");
|
||||
var preRelease = Argument("pre-release", false);
|
||||
var username = Argument("username", "NaBian");
|
||||
var email = Argument("email, "836904362@qq.com");
|
||||
|
||||
var libVersion = "";
|
||||
var nugetVersion = "";
|
||||
var nugetFolder = "";
|
||||
var year = $"{DateTime.Now.Year}";
|
||||
var copyright = $"Copyright © HandyOrg {HandyControlBirthYear}-{year}";
|
||||
var libNuspecFilePath = "";
|
||||
var langNuspecFilePath = "";
|
||||
var buildConfig = new BuildConfig();
|
||||
|
||||
Setup(context =>
|
||||
{
|
||||
CleanDirectory("lib");
|
||||
buildConfig = LoadBuildConfig();
|
||||
CleanDirectory(buildConfig.OutputsFolder);
|
||||
CreateDirectory(nugetFolder);
|
||||
|
||||
context.Information($"preReleasePhase: {preReleasePhase}");
|
||||
context.Information($"preRelease: {preRelease}");
|
||||
FillVersions(GetAutoIncrement());
|
||||
context.Information($"libVersion: {libVersion}");
|
||||
context.Information($"nugetVersion: {nugetVersion}");
|
||||
|
||||
Copy(LibNuspecTemplateFilePath, libNuspecFilePath, true);
|
||||
Copy(LangNuspecTemplateFilePath, langNuspecFilePath, true);
|
||||
});
|
||||
|
||||
Task("Build")
|
||||
.IsDependentOn("Clean")
|
||||
#region TASKS
|
||||
|
||||
Task("update license")
|
||||
.Does(() =>
|
||||
{
|
||||
var settingsNet40 = new DotNetCoreBuildSettings
|
||||
const int copyrightIndex = 2;
|
||||
|
||||
string[] lines = ReadAllLines(LicenseFilePath, Encoding.UTF8);
|
||||
lines[copyrightIndex] = copyright;
|
||||
WriteAllLines(LicenseFilePath, lines);
|
||||
});
|
||||
|
||||
Task("update version")
|
||||
.Does(() =>
|
||||
{
|
||||
if (libVersion != "")
|
||||
{
|
||||
Configuration = "Release-Net40",
|
||||
OutputDirectory = "lib/net40"
|
||||
};
|
||||
var document = LoadXmlDocument(PropsFilePath);
|
||||
document.DocumentElement.SelectSingleNode("//PropertyGroup/Version").InnerText = libVersion;
|
||||
document.DocumentElement.SelectSingleNode("//PropertyGroup/FileVersion").InnerText = libVersion;
|
||||
document.DocumentElement.SelectSingleNode("//PropertyGroup/AssemblyVersion").InnerText = libVersion;
|
||||
SaveXmlDocument(document, PropsFilePath);
|
||||
}
|
||||
|
||||
DotNetCoreBuild("../src/Net_40/HandyControl_Net_40/HandyControl_Net_40.csproj", settingsNet40);
|
||||
|
||||
var frameworkList = new List<string>
|
||||
if (nugetVersion != "")
|
||||
{
|
||||
"net45",
|
||||
"net451",
|
||||
"net452",
|
||||
"net46",
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481",
|
||||
"netcoreapp3.0",
|
||||
"netcoreapp3.1",
|
||||
"net5.0-windows",
|
||||
"net6.0-windows",
|
||||
"net7.0-windows",
|
||||
"net8.0-windows"
|
||||
};
|
||||
|
||||
foreach (var framework in frameworkList)
|
||||
{
|
||||
var settings = new DotNetCoreBuildSettings
|
||||
{
|
||||
Configuration = "Release",
|
||||
Framework = framework,
|
||||
OutputDirectory = $"lib/{framework.Split('-')[0]}"
|
||||
};
|
||||
|
||||
DotNetCoreBuild("../src/Net_GE45/HandyControl_Net_GE45/HandyControl_Net_GE45.csproj", settings);
|
||||
ReplaceFileText(libNuspecFilePath, "version", nugetVersion);
|
||||
ReplaceFileText(langNuspecFilePath, "version", nugetVersion);
|
||||
}
|
||||
});
|
||||
|
||||
Task("update copyright")
|
||||
.Does(() =>
|
||||
{
|
||||
var document = LoadXmlDocument(PropsFilePath);
|
||||
document.DocumentElement.SelectSingleNode("//PropertyGroup/Copyright").InnerText = copyright;
|
||||
SaveXmlDocument(document, PropsFilePath);
|
||||
|
||||
ReplaceFileText(libNuspecFilePath, "year", year);
|
||||
ReplaceFileText(langNuspecFilePath, "year", year);
|
||||
});
|
||||
|
||||
Task("commit files")
|
||||
.Does(() =>
|
||||
{
|
||||
GitAddAll(RepositoryFolder);
|
||||
GitCommit(RepositoryFolder, username, email, $"chore: [AUTO] bump up version to {nugetVersion}.");
|
||||
});
|
||||
|
||||
Task("create tag")
|
||||
.Does(() =>
|
||||
{
|
||||
GitTag(RepositoryFolder, $"{TagPrefix}{nugetVersion}");
|
||||
});
|
||||
|
||||
Task("update nuget sha")
|
||||
.Does(() =>
|
||||
{
|
||||
var lastCommit = GitLogTip(RepositoryFolder);
|
||||
|
||||
ReplaceFileText(libNuspecFilePath, "commit", lastCommit.Sha);
|
||||
ReplaceFileText(langNuspecFilePath, "commit", lastCommit.Sha);
|
||||
});
|
||||
|
||||
Task("add nuget dependencies")
|
||||
.Does(() =>
|
||||
{
|
||||
AddDependenciesItem(libNuspecFilePath);
|
||||
AddDependenciesItem(langNuspecFilePath);
|
||||
|
||||
void AddDependenciesItem(string xmlFilePath)
|
||||
{
|
||||
XmlDocument document = LoadXmlDocument(xmlFilePath);
|
||||
foreach (BuildTask task in buildConfig.BuildTasks)
|
||||
{
|
||||
var frameworkItem = document.CreateElement("group");
|
||||
frameworkItem.SetAttribute("targetFramework", task.Target);
|
||||
document.DocumentElement.SelectSingleNode("//metadata/dependencies").AppendChild(frameworkItem);
|
||||
SaveXmlDocument(document, xmlFilePath, indentation: 2);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Task("add nuget files")
|
||||
.Does(() =>
|
||||
{
|
||||
XmlDocument libDocument = LoadXmlDocument(libNuspecFilePath);
|
||||
XmlDocument langDocument = LoadXmlDocument(langNuspecFilePath);
|
||||
|
||||
foreach (BuildTask task in buildConfig.BuildTasks)
|
||||
{
|
||||
var frameworkFolder = $@"lib\{task.OutputsFolder}";
|
||||
|
||||
if (!IsFramework(task.Framework))
|
||||
{
|
||||
AddFile(libDocument, $@"{frameworkFolder}\HandyControl.deps.json");
|
||||
}
|
||||
AddFile(libDocument, $@"{frameworkFolder}\HandyControl.dll");
|
||||
AddFile(libDocument, $@"{frameworkFolder}\HandyControl.pdb");
|
||||
AddFile(libDocument, $@"{frameworkFolder}\HandyControl.xml");
|
||||
AddFile(langDocument, $@"{frameworkFolder}\{{lang}}\HandyControl.resources.dll");
|
||||
}
|
||||
|
||||
SaveXmlDocument(libDocument, libNuspecFilePath, indentation: 2);
|
||||
SaveXmlDocument(langDocument, langNuspecFilePath, indentation: 2);
|
||||
|
||||
void AddFile(XmlDocument document, string filePath)
|
||||
{
|
||||
var fileItem = document.CreateElement("file");
|
||||
fileItem.SetAttribute("src", $@"..\{filePath}");
|
||||
fileItem.SetAttribute("target", filePath);
|
||||
document.DocumentElement.SelectSingleNode("//files").AppendChild(fileItem);
|
||||
}
|
||||
});
|
||||
|
||||
Task("build lib")
|
||||
.Does(() =>
|
||||
{
|
||||
foreach (var task in buildConfig.BuildTasks)
|
||||
{
|
||||
if (!task.BuildLib)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
DotNetBuild
|
||||
(
|
||||
$"{RepositoryFolder}/src/{task.Domain}/HandyControl_{task.Domain}/HandyControl_{task.Domain}.csproj",
|
||||
new DotNetBuildSettings
|
||||
{
|
||||
Configuration = task.Configuration,
|
||||
Framework = task.Framework,
|
||||
OutputDirectory = $"{buildConfig.OutputsFolder}/lib/{task.OutputsFolder}",
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Task("build demo")
|
||||
.Does(() =>
|
||||
{
|
||||
foreach (var task in buildConfig.BuildTasks)
|
||||
{
|
||||
if (!task.BuildDemo)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
DotNetBuild
|
||||
(
|
||||
$"{RepositoryFolder}/src/{task.Domain}/HandyControlDemo_{task.Domain}/HandyControlDemo_{task.Domain}.csproj",
|
||||
new DotNetBuildSettings
|
||||
{
|
||||
Configuration = task.Configuration,
|
||||
Framework = task.Framework,
|
||||
OutputDirectory = $"{buildConfig.OutputsFolder}/demo/{task.OutputsFolder}",
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Task("create lang nuspec files")
|
||||
.Does(() =>
|
||||
{
|
||||
string templateContent = ReadAllText(langNuspecFilePath, Encoding.UTF8);
|
||||
|
||||
foreach (string lang in GetAllLangs())
|
||||
{
|
||||
string langFilePath = Combine(nugetFolder, $"lang.{lang}.nuspec");
|
||||
WriteAllText(langFilePath, templateContent.Replace("{lang}", lang));
|
||||
}
|
||||
});
|
||||
|
||||
Task("pack nuspec files")
|
||||
.Does(() =>
|
||||
{
|
||||
string nugetExePath = Context.Tools.Resolve("nuget.exe").FullPath;
|
||||
StartProcess(nugetExePath, $"pack {nugetFolder}/lib.nuspec -Symbols -SymbolPackageFormat snupkg -OutputDirectory {nugetFolder}");
|
||||
foreach (string nuspecFilePath in EnumerateFiles(nugetFolder, "lang.*.nuspec"))
|
||||
{
|
||||
StartProcess(nugetExePath, $"pack {nuspecFilePath} -OutputDirectory {nugetFolder}");
|
||||
}
|
||||
});
|
||||
|
||||
Task("build")
|
||||
.IsDependentOn("update license")
|
||||
.IsDependentOn("update version")
|
||||
.IsDependentOn("update copyright")
|
||||
.IsDependentOn("commit files")
|
||||
.IsDependentOn("create tag")
|
||||
.IsDependentOn("update nuget sha")
|
||||
.IsDependentOn("add nuget dependencies")
|
||||
.IsDependentOn("add nuget files")
|
||||
.IsDependentOn("build lib")
|
||||
.IsDependentOn("build demo")
|
||||
.IsDependentOn("create lang nuspec files")
|
||||
.IsDependentOn("pack nuspec files")
|
||||
;
|
||||
|
||||
RunTarget(target);
|
||||
|
||||
#endregion
|
||||
|
||||
#region HELP FUNCTIONS
|
||||
|
||||
private XmlDocument LoadXmlDocument(string xmlFilePath)
|
||||
{
|
||||
var document = new XmlDocument();
|
||||
|
||||
using (var reader = new XmlTextReader(xmlFilePath))
|
||||
{
|
||||
reader.Namespaces = false;
|
||||
document.Load(reader);
|
||||
}
|
||||
|
||||
return document;
|
||||
}
|
||||
|
||||
private void SaveXmlDocument(XmlDocument document, string xmlFilePath, int indentation = 4)
|
||||
{
|
||||
using (var writer = new XmlTextWriter(xmlFilePath, Encoding.UTF8))
|
||||
{
|
||||
writer.Formatting = Formatting.Indented;
|
||||
writer.Indentation = indentation;
|
||||
writer.Namespaces = false;
|
||||
document.WriteContentTo(writer);
|
||||
}
|
||||
}
|
||||
|
||||
private void ReplaceFileText(string filePath, string key, string value)
|
||||
{
|
||||
WriteAllText(
|
||||
filePath,
|
||||
ReadAllText(filePath, Encoding.UTF8).Replace($"{{{key}}}", value)
|
||||
);
|
||||
}
|
||||
|
||||
private void FillVersions(MinVerAutoIncrement? autoIncrement)
|
||||
{
|
||||
if (autoIncrement is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var settings = new MinVerSettings
|
||||
{
|
||||
TagPrefix = TagPrefix,
|
||||
DefaultPreReleasePhase = preReleasePhase,
|
||||
AutoIncrement = autoIncrement,
|
||||
};
|
||||
var minVer = MinVer(settings);
|
||||
|
||||
libVersion = minVer.FileVersion;
|
||||
nugetVersion = preRelease
|
||||
? $"{minVer.Major}.{minVer.Minor}.{minVer.Patch}-{minVer.PreRelease}"
|
||||
: $"{minVer.Major}.{minVer.Minor}.{minVer.Patch}";
|
||||
}
|
||||
|
||||
private MinVerAutoIncrement? GetAutoIncrement()
|
||||
{
|
||||
const string minorKey = "feat:";
|
||||
|
||||
var lastTag = GitTags(RepositoryFolder, true).Last();
|
||||
var sha = lastTag.Target.ToString();
|
||||
var logs = GitLog(RepositoryFolder, sha);
|
||||
|
||||
if (logs.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
foreach (var log in logs.Take(logs.Count - 1))
|
||||
{
|
||||
if (log.Message.StartsWith(minorKey))
|
||||
{
|
||||
return MinVerAutoIncrement.Minor;
|
||||
}
|
||||
}
|
||||
|
||||
return MinVerAutoIncrement.Patch;
|
||||
}
|
||||
|
||||
private bool IsFramework(string framework) => !framework.Contains(".");
|
||||
|
||||
private IEnumerable<string> GetAllLangs()
|
||||
{
|
||||
foreach (string resxFilePath in EnumerateFiles(ResxFileFolder, "Lang.*.resx"))
|
||||
{
|
||||
yield return GetFileNameWithoutExtension(resxFilePath.Replace("Lang.", ""));
|
||||
}
|
||||
}
|
||||
|
||||
private BuildConfig LoadBuildConfig()
|
||||
{
|
||||
var buildConfig = new BuildConfig();
|
||||
var configDocument = LoadXmlDocument(ConfigFilePath);
|
||||
|
||||
var outputsItem = configDocument.DocumentElement.SelectSingleNode("//config/outputsFolder");
|
||||
buildConfig.OutputsFolder = outputsItem.InnerText;
|
||||
nugetFolder = $"{buildConfig.OutputsFolder}/nuget";
|
||||
libNuspecFilePath = $"{nugetFolder}/{GetFileNameWithoutExtension(LibNuspecTemplateFilePath)}";
|
||||
langNuspecFilePath = $"{nugetFolder}/{LangNuspecTemplateFilePath}";
|
||||
|
||||
var tasksItem = configDocument.DocumentElement.SelectSingleNode("//config/tasks");
|
||||
foreach (XmlNode node in tasksItem.ChildNodes)
|
||||
{
|
||||
try
|
||||
{
|
||||
buildConfig.BuildTasks.Add(new BuildTask
|
||||
{
|
||||
Framework = node.Attributes["framework"].Value,
|
||||
Target = node.Attributes["target"].Value,
|
||||
OutputsFolder = node.Attributes["outputsFolder"].Value,
|
||||
Configuration = node.Attributes["configuration"].Value,
|
||||
Domain = node.Attributes["domain"].Value,
|
||||
BuildLib = bool.Parse(node.Attributes["buildLib"].Value),
|
||||
BuildDemo = bool.Parse(node.Attributes["buildDemo"].Value),
|
||||
});
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
return buildConfig;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region INNER TYPES
|
||||
|
||||
public class BuildConfig
|
||||
{
|
||||
public string OutputsFolder { get; set; }
|
||||
|
||||
public List<BuildTask> BuildTasks { get; set; } = new();
|
||||
}
|
||||
|
||||
public class BuildTask
|
||||
{
|
||||
public string Framework { get; set; }
|
||||
|
||||
public string Target { get; set; }
|
||||
|
||||
public string OutputsFolder { get; set; }
|
||||
|
||||
public string Configuration { get; set; }
|
||||
|
||||
public string Domain { get; set; }
|
||||
|
||||
public bool BuildLib { get; set; }
|
||||
|
||||
public bool BuildDemo { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
23
build/build.config.xml
Normal file
23
build/build.config.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<config>
|
||||
<outputsFolder>outputs</outputsFolder>
|
||||
<tasks>
|
||||
<task framework="net40" target=".NETFramework4.0" outputsFolder="net40" configuration="Release-Net40" domain="Net_40" buildLib="true" buildDemo="true"/>
|
||||
<!-- <task framework="net45" target=".NETFramework4.5" outputsFolder="net45" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="net451" target=".NETFramework4.5.1" outputsFolder="net451" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="net452" target=".NETFramework4.5.2" outputsFolder="net452" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="net46" target=".NETFramework4.6" outputsFolder="net46" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="net461" target=".NETFramework4.6.1" outputsFolder="net461" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="net462" target=".NETFramework4.6.2" outputsFolder="net462" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="net47" target=".NETFramework4.7" outputsFolder="net47" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="net471" target=".NETFramework4.7.1" outputsFolder="net471" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="net472" target=".NETFramework4.7.2" outputsFolder="net472" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="net48" target=".NETFramework4.8" outputsFolder="net48" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="net481" target=".NETFramework4.8.1" outputsFolder="net481" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="netcoreapp3.0" target=".NETCoreApp3.0" outputsFolder="netcoreapp3.0" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="netcoreapp3.1" target=".NETCoreApp3.1" outputsFolder="netcoreapp3.1" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="net5.0-windows" target="net5.0" outputsFolder="net5.0" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="net6.0-windows" target="net6.0" outputsFolder="net6.0" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="net7.0-windows" target="net7.0" outputsFolder="net7.0" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/>
|
||||
<task framework="net8.0-windows" target="net8.0" outputsFolder="net8.0" configuration="Release" domain="Net_GE45" buildLib="true" buildDemo="true"/> -->
|
||||
</tasks>
|
||||
</config>
|
@ -1,104 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>HandyControl</id>
|
||||
<version>3.5.2</version>
|
||||
<title>HandyOrg</title>
|
||||
<authors>HandyOrg</authors>
|
||||
<owners>HandyOrg</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<license type="file">LICENSE</license>
|
||||
<icon>icon.png</icon>
|
||||
<projectUrl>https://github.com/HandyOrg/HandyControl</projectUrl>
|
||||
<description>Contains some simple and commonly used WPF controls</description>
|
||||
<releaseNotes>Changes are detailed at https://github.com/HandyOrg/HandyControl/releases</releaseNotes>
|
||||
<copyright>Copyright © HandyOrg 2018-2024</copyright>
|
||||
<tags>WPF C# Control</tags>
|
||||
<repository type="git" url="https://github.com/HandyOrg/HandyControl" commit="66ad32f52a18c4b6a22aed711042eac8a6e9bf92" />
|
||||
<dependencies>
|
||||
<group targetFramework=".NETFramework4.0" />
|
||||
<group targetFramework=".NETFramework4.5" />
|
||||
<group targetFramework=".NETFramework4.5.1" />
|
||||
<group targetFramework=".NETFramework4.5.2" />
|
||||
<group targetFramework=".NETFramework4.6" />
|
||||
<group targetFramework=".NETFramework4.6.1" />
|
||||
<group targetFramework=".NETFramework4.6.2" />
|
||||
<group targetFramework=".NETFramework4.7" />
|
||||
<group targetFramework=".NETFramework4.7.1" />
|
||||
<group targetFramework=".NETFramework4.7.2" />
|
||||
<group targetFramework=".NETFramework4.8" />
|
||||
<group targetFramework=".NETFramework4.8.1" />
|
||||
<group targetFramework=".NETCoreApp3.0" />
|
||||
<group targetFramework=".NETCoreApp3.1" />
|
||||
<group targetFramework="net5.0" />
|
||||
<group targetFramework="net6.0" />
|
||||
<group targetFramework="net7.0" />
|
||||
<group targetFramework="net8.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="lib\net40\HandyControl.dll" target="lib\net40\HandyControl.dll" />
|
||||
<file src="lib\net40\HandyControl.pdb" target="lib\net40\HandyControl.pdb" />
|
||||
<file src="lib\net40\HandyControl.xml" target="lib\net40\HandyControl.xml" />
|
||||
<file src="lib\net45\HandyControl.dll" target="lib\net45\HandyControl.dll" />
|
||||
<file src="lib\net45\HandyControl.pdb" target="lib\net45\HandyControl.pdb" />
|
||||
<file src="lib\net45\HandyControl.xml" target="lib\net45\HandyControl.xml" />
|
||||
<file src="lib\net451\HandyControl.dll" target="lib\net451\HandyControl.dll" />
|
||||
<file src="lib\net451\HandyControl.pdb" target="lib\net451\HandyControl.pdb" />
|
||||
<file src="lib\net451\HandyControl.xml" target="lib\net451\HandyControl.xml" />
|
||||
<file src="lib\net452\HandyControl.dll" target="lib\net452\HandyControl.dll" />
|
||||
<file src="lib\net452\HandyControl.pdb" target="lib\net452\HandyControl.pdb" />
|
||||
<file src="lib\net452\HandyControl.xml" target="lib\net452\HandyControl.xml" />
|
||||
<file src="lib\net46\HandyControl.dll" target="lib\net46\HandyControl.dll" />
|
||||
<file src="lib\net46\HandyControl.pdb" target="lib\net46\HandyControl.pdb" />
|
||||
<file src="lib\net46\HandyControl.xml" target="lib\net46\HandyControl.xml" />
|
||||
<file src="lib\net461\HandyControl.dll" target="lib\net461\HandyControl.dll" />
|
||||
<file src="lib\net461\HandyControl.pdb" target="lib\net461\HandyControl.pdb" />
|
||||
<file src="lib\net461\HandyControl.xml" target="lib\net461\HandyControl.xml" />
|
||||
<file src="lib\net462\HandyControl.dll" target="lib\net462\HandyControl.dll" />
|
||||
<file src="lib\net462\HandyControl.pdb" target="lib\net462\HandyControl.pdb" />
|
||||
<file src="lib\net462\HandyControl.xml" target="lib\net462\HandyControl.xml" />
|
||||
<file src="lib\net47\HandyControl.dll" target="lib\net47\HandyControl.dll" />
|
||||
<file src="lib\net47\HandyControl.pdb" target="lib\net47\HandyControl.pdb" />
|
||||
<file src="lib\net47\HandyControl.xml" target="lib\net47\HandyControl.xml" />
|
||||
<file src="lib\net471\HandyControl.dll" target="lib\net471\HandyControl.dll" />
|
||||
<file src="lib\net471\HandyControl.pdb" target="lib\net471\HandyControl.pdb" />
|
||||
<file src="lib\net471\HandyControl.xml" target="lib\net471\HandyControl.xml" />
|
||||
<file src="lib\net472\HandyControl.dll" target="lib\net472\HandyControl.dll" />
|
||||
<file src="lib\net472\HandyControl.pdb" target="lib\net472\HandyControl.pdb" />
|
||||
<file src="lib\net472\HandyControl.xml" target="lib\net472\HandyControl.xml" />
|
||||
<file src="lib\net48\HandyControl.dll" target="lib\net48\HandyControl.dll" />
|
||||
<file src="lib\net48\HandyControl.pdb" target="lib\net48\HandyControl.pdb" />
|
||||
<file src="lib\net48\HandyControl.xml" target="lib\net48\HandyControl.xml" />
|
||||
<file src="lib\net481\HandyControl.dll" target="lib\net481\HandyControl.dll" />
|
||||
<file src="lib\net481\HandyControl.pdb" target="lib\net481\HandyControl.pdb" />
|
||||
<file src="lib\net481\HandyControl.xml" target="lib\net481\HandyControl.xml" />
|
||||
<file src="lib\net5.0\HandyControl.deps.json" target="lib\net5.0\HandyControl.deps.json" />
|
||||
<file src="lib\net5.0\HandyControl.dll" target="lib\net5.0\HandyControl.dll" />
|
||||
<file src="lib\net5.0\HandyControl.pdb" target="lib\net5.0\HandyControl.pdb" />
|
||||
<file src="lib\net5.0\HandyControl.xml" target="lib\net5.0\HandyControl.xml" />
|
||||
<file src="lib\net6.0\HandyControl.deps.json" target="lib\net6.0\HandyControl.deps.json" />
|
||||
<file src="lib\net6.0\HandyControl.dll" target="lib\net6.0\HandyControl.dll" />
|
||||
<file src="lib\net6.0\HandyControl.pdb" target="lib\net6.0\HandyControl.pdb" />
|
||||
<file src="lib\net6.0\HandyControl.xml" target="lib\net6.0\HandyControl.xml" />
|
||||
<file src="lib\net7.0\HandyControl.deps.json" target="lib\net7.0\HandyControl.deps.json" />
|
||||
<file src="lib\net7.0\HandyControl.dll" target="lib\net7.0\HandyControl.dll" />
|
||||
<file src="lib\net7.0\HandyControl.pdb" target="lib\net7.0\HandyControl.pdb" />
|
||||
<file src="lib\net7.0\HandyControl.xml" target="lib\net7.0\HandyControl.xml" />
|
||||
<file src="lib\net8.0\HandyControl.deps.json" target="lib\net8.0\HandyControl.deps.json" />
|
||||
<file src="lib\net8.0\HandyControl.dll" target="lib\net8.0\HandyControl.dll" />
|
||||
<file src="lib\net8.0\HandyControl.pdb" target="lib\net8.0\HandyControl.pdb" />
|
||||
<file src="lib\net8.0\HandyControl.xml" target="lib\net8.0\HandyControl.xml" />
|
||||
<file src="lib\netcoreapp3.0\HandyControl.deps.json" target="lib\netcoreapp3.0\HandyControl.deps.json" />
|
||||
<file src="lib\netcoreapp3.0\HandyControl.dll" target="lib\netcoreapp3.0\HandyControl.dll" />
|
||||
<file src="lib\netcoreapp3.0\HandyControl.pdb" target="lib\netcoreapp3.0\HandyControl.pdb" />
|
||||
<file src="lib\netcoreapp3.0\HandyControl.xml" target="lib\netcoreapp3.0\HandyControl.xml" />
|
||||
<file src="lib\netcoreapp3.1\HandyControl.deps.json" target="lib\netcoreapp3.1\HandyControl.deps.json" />
|
||||
<file src="lib\netcoreapp3.1\HandyControl.dll" target="lib\netcoreapp3.1\HandyControl.dll" />
|
||||
<file src="lib\netcoreapp3.1\HandyControl.pdb" target="lib\netcoreapp3.1\HandyControl.pdb" />
|
||||
<file src="lib\netcoreapp3.1\HandyControl.xml" target="lib\netcoreapp3.1\HandyControl.xml" />
|
||||
<file src="tools\VisualStudioToolsManifest.xml" target="tools\VisualStudioToolsManifest.xml" />
|
||||
<file src="icon.png" target="icon.png" />
|
||||
<file src="LICENSE" target="LICENSE" />
|
||||
</files>
|
||||
</package>
|
256
build/build.ps1
256
build/build.ps1
@ -1,256 +0,0 @@
|
||||
##########################################################################
|
||||
# This is the Cake bootstrapper script for PowerShell.
|
||||
# This file was downloaded from https://github.com/cake-build/resources
|
||||
# Feel free to change this file to fit your needs.
|
||||
##########################################################################
|
||||
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
This is a Powershell script to bootstrap a Cake build.
|
||||
|
||||
.DESCRIPTION
|
||||
This Powershell script will download NuGet if missing, restore NuGet tools (including Cake)
|
||||
and execute your Cake build script with the parameters you provide.
|
||||
|
||||
.PARAMETER Script
|
||||
The build script to execute.
|
||||
.PARAMETER Target
|
||||
The build script target to run.
|
||||
.PARAMETER Configuration
|
||||
The build configuration to use.
|
||||
.PARAMETER Verbosity
|
||||
Specifies the amount of information to be displayed.
|
||||
.PARAMETER ShowDescription
|
||||
Shows description about tasks.
|
||||
.PARAMETER DryRun
|
||||
Performs a dry run.
|
||||
.PARAMETER SkipToolPackageRestore
|
||||
Skips restoring of packages.
|
||||
.PARAMETER ScriptArgs
|
||||
Remaining arguments are added here.
|
||||
|
||||
.LINK
|
||||
https://cakebuild.net
|
||||
|
||||
#>
|
||||
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[string]$Script = "build.cake",
|
||||
[string]$Target,
|
||||
[string]$Configuration,
|
||||
[ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
|
||||
[string]$Verbosity,
|
||||
[switch]$ShowDescription,
|
||||
[Alias("WhatIf", "Noop")]
|
||||
[switch]$DryRun,
|
||||
[switch]$SkipToolPackageRestore,
|
||||
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
|
||||
[string[]]$ScriptArgs
|
||||
)
|
||||
|
||||
# Attempt to set highest encryption available for SecurityProtocol.
|
||||
# PowerShell will not set this by default (until maybe .NET 4.6.x). This
|
||||
# will typically produce a message for PowerShell v2 (just an info
|
||||
# message though)
|
||||
try {
|
||||
# Set TLS 1.2 (3072), then TLS 1.1 (768), then TLS 1.0 (192), finally SSL 3.0 (48)
|
||||
# Use integers because the enumeration values for TLS 1.2 and TLS 1.1 won't
|
||||
# exist in .NET 4.0, even though they are addressable if .NET 4.5+ is
|
||||
# installed (.NET 4.5 is an in-place upgrade).
|
||||
# PowerShell Core already has support for TLS 1.2 so we can skip this if running in that.
|
||||
if (-not $IsCoreCLR) {
|
||||
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48
|
||||
}
|
||||
} catch {
|
||||
Write-Output 'Unable to set PowerShell to use TLS 1.2 and TLS 1.1 due to old .NET Framework installed. If you see underlying connection closed or trust errors, you may need to upgrade to .NET Framework 4.5+ and PowerShell v3'
|
||||
}
|
||||
|
||||
[Reflection.Assembly]::LoadWithPartialName("System.Security") | Out-Null
|
||||
function MD5HashFile([string] $filePath)
|
||||
{
|
||||
if ([string]::IsNullOrEmpty($filePath) -or !(Test-Path $filePath -PathType Leaf))
|
||||
{
|
||||
return $null
|
||||
}
|
||||
|
||||
[System.IO.Stream] $file = $null;
|
||||
[System.Security.Cryptography.MD5] $md5 = $null;
|
||||
try
|
||||
{
|
||||
$md5 = [System.Security.Cryptography.MD5]::Create()
|
||||
$file = [System.IO.File]::OpenRead($filePath)
|
||||
return [System.BitConverter]::ToString($md5.ComputeHash($file))
|
||||
}
|
||||
finally
|
||||
{
|
||||
if ($file -ne $null)
|
||||
{
|
||||
$file.Dispose()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function GetProxyEnabledWebClient
|
||||
{
|
||||
$wc = New-Object System.Net.WebClient
|
||||
$proxy = [System.Net.WebRequest]::GetSystemWebProxy()
|
||||
$proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
|
||||
$wc.Proxy = $proxy
|
||||
return $wc
|
||||
}
|
||||
|
||||
Write-Host "Preparing to run build script..."
|
||||
|
||||
if(!$PSScriptRoot){
|
||||
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
|
||||
}
|
||||
|
||||
$TOOLS_DIR = Join-Path $PSScriptRoot "tools"
|
||||
$ADDINS_DIR = Join-Path $TOOLS_DIR "Addins"
|
||||
$MODULES_DIR = Join-Path $TOOLS_DIR "Modules"
|
||||
$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe"
|
||||
$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe"
|
||||
$NUGET_URL = "https://github.com/HandyOrg/HandyOrgResource/blob/master/Tools/nuget.exe?raw=true"
|
||||
$PACKAGES_CONFIG = Join-Path $TOOLS_DIR "packages.config"
|
||||
$PACKAGES_CONFIG_MD5 = Join-Path $TOOLS_DIR "packages.config.md5sum"
|
||||
$ADDINS_PACKAGES_CONFIG = Join-Path $ADDINS_DIR "packages.config"
|
||||
$MODULES_PACKAGES_CONFIG = Join-Path $MODULES_DIR "packages.config"
|
||||
|
||||
# Make sure tools folder exists
|
||||
if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) {
|
||||
Write-Verbose -Message "Creating tools directory..."
|
||||
New-Item -Path $TOOLS_DIR -Type Directory | Out-Null
|
||||
}
|
||||
|
||||
# Make sure that packages.config exist.
|
||||
if (!(Test-Path $PACKAGES_CONFIG)) {
|
||||
Write-Verbose -Message "Downloading packages.config..."
|
||||
try {
|
||||
$wc = GetProxyEnabledWebClient
|
||||
$wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG)
|
||||
} catch {
|
||||
Throw "Could not download packages.config."
|
||||
}
|
||||
}
|
||||
|
||||
# Try find NuGet.exe in path if not exists
|
||||
if (!(Test-Path $NUGET_EXE)) {
|
||||
Write-Verbose -Message "Trying to find nuget.exe in PATH..."
|
||||
$existingPaths = $Env:Path -Split ';' | Where-Object { (![string]::IsNullOrEmpty($_)) -and (Test-Path $_ -PathType Container) }
|
||||
$NUGET_EXE_IN_PATH = Get-ChildItem -Path $existingPaths -Filter "nuget.exe" | Select -First 1
|
||||
if ($NUGET_EXE_IN_PATH -ne $null -and (Test-Path $NUGET_EXE_IN_PATH.FullName)) {
|
||||
Write-Verbose -Message "Found in PATH at $($NUGET_EXE_IN_PATH.FullName)."
|
||||
$NUGET_EXE = $NUGET_EXE_IN_PATH.FullName
|
||||
}
|
||||
}
|
||||
|
||||
# Try download NuGet.exe if not exists
|
||||
if (!(Test-Path $NUGET_EXE)) {
|
||||
Write-Verbose -Message "Downloading NuGet.exe..."
|
||||
try {
|
||||
$wc = GetProxyEnabledWebClient
|
||||
$wc.DownloadFile($NUGET_URL, $NUGET_EXE)
|
||||
} catch {
|
||||
Throw "Could not download NuGet.exe."
|
||||
}
|
||||
}
|
||||
|
||||
# Save nuget.exe path to environment to be available to child processed
|
||||
$env:NUGET_EXE = $NUGET_EXE
|
||||
$env:NUGET_EXE_INVOCATION = if ($IsLinux -or $IsMacOS) {
|
||||
"mono `"$NUGET_EXE`""
|
||||
} else {
|
||||
"`"$NUGET_EXE`""
|
||||
}
|
||||
|
||||
# Restore tools from NuGet?
|
||||
if(-Not $SkipToolPackageRestore.IsPresent) {
|
||||
Push-Location
|
||||
Set-Location $TOOLS_DIR
|
||||
|
||||
# Check for changes in packages.config and remove installed tools if true.
|
||||
[string] $md5Hash = MD5HashFile $PACKAGES_CONFIG
|
||||
if((!(Test-Path $PACKAGES_CONFIG_MD5)) -Or
|
||||
($md5Hash -ne (Get-Content $PACKAGES_CONFIG_MD5 ))) {
|
||||
Write-Verbose -Message "Missing or changed package.config hash..."
|
||||
Get-ChildItem -Exclude packages.config,nuget.exe,Cake.Bakery |
|
||||
Remove-Item -Recurse -Force
|
||||
}
|
||||
|
||||
Write-Verbose -Message "Restoring tools from NuGet..."
|
||||
|
||||
$NuGetOutput = Invoke-Expression "& $env:NUGET_EXE_INVOCATION install -ExcludeVersion -OutputDirectory `"$TOOLS_DIR`""
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Throw "An error occurred while restoring NuGet tools."
|
||||
}
|
||||
else
|
||||
{
|
||||
$md5Hash | Out-File $PACKAGES_CONFIG_MD5 -Encoding "ASCII"
|
||||
}
|
||||
Write-Verbose -Message ($NuGetOutput | Out-String)
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# Restore addins from NuGet
|
||||
if (Test-Path $ADDINS_PACKAGES_CONFIG) {
|
||||
Push-Location
|
||||
Set-Location $ADDINS_DIR
|
||||
|
||||
Write-Verbose -Message "Restoring addins from NuGet..."
|
||||
$NuGetOutput = Invoke-Expression "& $env:NUGET_EXE_INVOCATION install -ExcludeVersion -OutputDirectory `"$ADDINS_DIR`""
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Throw "An error occurred while restoring NuGet addins."
|
||||
}
|
||||
|
||||
Write-Verbose -Message ($NuGetOutput | Out-String)
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# Restore modules from NuGet
|
||||
if (Test-Path $MODULES_PACKAGES_CONFIG) {
|
||||
Push-Location
|
||||
Set-Location $MODULES_DIR
|
||||
|
||||
Write-Verbose -Message "Restoring modules from NuGet..."
|
||||
$NuGetOutput = Invoke-Expression "& $env:NUGET_EXE_INVOCATION install -ExcludeVersion -OutputDirectory `"$MODULES_DIR`""
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Throw "An error occurred while restoring NuGet modules."
|
||||
}
|
||||
|
||||
Write-Verbose -Message ($NuGetOutput | Out-String)
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
# Make sure that Cake has been installed.
|
||||
if (!(Test-Path $CAKE_EXE)) {
|
||||
Throw "Could not find Cake.exe at $CAKE_EXE"
|
||||
}
|
||||
|
||||
$CAKE_EXE_INVOCATION = if ($IsLinux -or $IsMacOS) {
|
||||
"mono `"$CAKE_EXE`""
|
||||
} else {
|
||||
"`"$CAKE_EXE`""
|
||||
}
|
||||
|
||||
# Build an array (not a string) of Cake arguments to be joined later
|
||||
$cakeArguments = @()
|
||||
if ($Script) { $cakeArguments += "`"$Script`"" }
|
||||
if ($Target) { $cakeArguments += "-target=`"$Target`"" }
|
||||
if ($Configuration) { $cakeArguments += "-configuration=$Configuration" }
|
||||
if ($Verbosity) { $cakeArguments += "-verbosity=$Verbosity" }
|
||||
if ($ShowDescription) { $cakeArguments += "-showdescription" }
|
||||
if ($DryRun) { $cakeArguments += "-dryrun" }
|
||||
$cakeArguments += $ScriptArgs
|
||||
|
||||
# Start Cake
|
||||
Write-Host "Running build script..."
|
||||
Invoke-Expression "& $CAKE_EXE_INVOCATION $($cakeArguments -join " ")"
|
||||
exit $LASTEXITCODE
|
@ -1,15 +0,0 @@
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def main():
|
||||
with open('build.Lang.template', 'r', encoding='utf-8') as template_file:
|
||||
template_content = template_file.read()
|
||||
|
||||
resx_file_folder = Path('../src/Shared/HandyControl_Shared/Properties/Langs')
|
||||
for lang in [path.stem.lstrip('Lang.') for path in resx_file_folder.glob('Lang.*.resx')]:
|
||||
with open(f'build.Lang.{lang}.nuspec', 'w', encoding='utf-8') as nuspec_file:
|
||||
nuspec_file.write(template_content.format(lang=lang))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
@ -1,4 +0,0 @@
|
||||
./tools/nuget pack build.nuspec -Symbols -SymbolPackageFormat snupkg
|
||||
Get-ChildItem -Path ./build.Lang.*.nuspec | ForEach-Object {
|
||||
./tools/nuget pack $_
|
||||
}
|
24
build/lang.nuspec.template
Normal file
24
build/lang.nuspec.template
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>HandyControl.Lang.{lang}</id>
|
||||
<version>{version}</version>
|
||||
<title>HandyOrg</title>
|
||||
<authors>HandyOrg</authors>
|
||||
<owners>HandyOrg</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<license type="file">LICENSE</license>
|
||||
<icon>icon.png</icon>
|
||||
<projectUrl>https://github.com/HandyOrg/HandyControl</projectUrl>
|
||||
<description>Contains some simple and commonly used WPF controls</description>
|
||||
<releaseNotes>Changes are detailed at https://github.com/HandyOrg/HandyControl/releases</releaseNotes>
|
||||
<copyright>Copyright © HandyOrg 2018-{year}</copyright>
|
||||
<tags>WPF C# Control</tags>
|
||||
<repository type="git" url="https://github.com/HandyOrg/HandyControl" commit="{commit}" />
|
||||
<dependencies />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\..\icon.png" target="icon.png" />
|
||||
<file src="..\..\..\LICENSE" target="LICENSE" />
|
||||
</files>
|
||||
</package>
|
25
build/lib.nuspec.template
Normal file
25
build/lib.nuspec.template
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>HandyControl</id>
|
||||
<version>{version}</version>
|
||||
<title>HandyOrg</title>
|
||||
<authors>HandyOrg</authors>
|
||||
<owners>HandyOrg</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<license type="file">LICENSE</license>
|
||||
<icon>icon.png</icon>
|
||||
<projectUrl>https://github.com/HandyOrg/HandyControl</projectUrl>
|
||||
<description>Contains some simple and commonly used WPF controls</description>
|
||||
<releaseNotes>Changes are detailed at https://github.com/HandyOrg/HandyControl/releases</releaseNotes>
|
||||
<copyright>Copyright © HandyOrg 2018-{year}</copyright>
|
||||
<tags>WPF C# Control</tags>
|
||||
<repository type="git" url="https://github.com/HandyOrg/HandyControl" commit="{commit}" />
|
||||
<dependencies />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\..\VisualStudioToolsManifest.xml" target="tools\VisualStudioToolsManifest.xml" />
|
||||
<file src="..\..\icon.png" target="icon.png" />
|
||||
<file src="..\..\..\LICENSE" target="LICENSE" />
|
||||
</files>
|
||||
</package>
|
23
build/myget.nuspec.template
Normal file
23
build/myget.nuspec.template
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>HandyControl</id>
|
||||
<version>{version}</version>
|
||||
<title>HandyOrg</title>
|
||||
<authors>HandyOrg</authors>
|
||||
<owners>HandyOrg</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<license type="file">LICENSE</license>
|
||||
<icon>icon.png</icon>
|
||||
<projectUrl>https://github.com/HandyOrg/HandyControl</projectUrl>
|
||||
<description>Contains some simple and commonly used WPF controls</description>
|
||||
<copyright>Copyright © HandyOrg 2018-{year}</copyright>
|
||||
<tags>WPF C# Control</tags>
|
||||
<dependencies />
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\..\VisualStudioToolsManifest.xml" target="tools\VisualStudioToolsManifest.xml" />
|
||||
<file src="..\..\icon.png" target="icon.png" />
|
||||
<file src="..\..\..\LICENSE" target="LICENSE" />
|
||||
</files>
|
||||
</package>
|
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Cake" version="0.35.0" />
|
||||
</packages>
|
@ -1,11 +0,0 @@
|
||||
- modify copyright of LICENSE
|
||||
- modify copyright of build/LICENSE
|
||||
- modify version and copyright of src/Directory.Build.Props
|
||||
- modify version, copyright and repository of build/build.nuspec
|
||||
- modify version, copyright and repository of build/build.Lang.template
|
||||
- modify version and copyright of build/build-for-myget.nuspec
|
||||
- run build/build.ps1
|
||||
- run create_lang_nuspec_file.py
|
||||
- run create_nupkg_file.ps1
|
||||
- upload nupkg and snupkg to nuget
|
||||
- draft and publish a new release on github.
|
Loading…
Reference in New Issue
Block a user