Skip to content

Commit

Permalink
Merge remote-tracking branch 'CustomWpf/dev' into t/lindexi/CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lindexi committed Dec 6, 2023
2 parents 5f6b8ca + dbda429 commit e1d2cfe
Show file tree
Hide file tree
Showing 219 changed files with 1,644 additions and 1,126 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: WPF_Release
path: ./artifacts/packages/Release/NonShipping
path: ./artifacts/packages/Release/NonShipping
65 changes: 65 additions & 0 deletions .github/workflows/NuGet-Tag-Publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Publish Custom WPF

on:
push:
tags:
- '*'

jobs:
# BuildDebug:

# runs-on: windows-latest

# steps:
# - uses: actions/checkout@v1
# # - name: Install Nuget
# # uses: nuget/setup-nuget@v1
# # with:
# # nuget-version: '5.x'
# - name: Build
# run: .\build.cmd -pack -ci -configuration Debug -prepareMachine /p:Platform=x86
# - name: Push
# uses: actions/upload-artifact@v1
# with:
# name: WPF_Debug
# path: ./artifacts/packages/Debug/NonShipping

Build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v1
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
5.0.x
6.0.101
- name: Install Tools
run: dotnet tool install -g dotnetCampus.TagToVersion --add-source https://api.nuget.org/v3/index.json
- name: Set Package TagToVersion
run: dotnet tagtoversion -t ${{ github.ref }} -f CustomWpf\build\Version.props
- name: Build WPF
run: .\build.cmd -pack -ci -configuration Release -prepareMachine /p:Platform=x86
- name: Pack NuGet
run: dotnet pack CustomWpf -c release

- name: Install Nuget
uses: nuget/setup-nuget@v1
with:
nuget-version: '5.x'
- name: Add private GitHub registry to NuGet
run: |
nuget sources add -name github -Source https://nuget.pkg.github.com/dotnet-campus/index.json -Username dotnet-campus -Password ${{ secrets.GITHUB_TOKEN }}
- name: Push NuGet Package
run: |
nuget push .\CustomWpf\bin\Release\*.nupkg -Source github -SkipDuplicate
nuget push .\CustomWpf\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }}
# - name: Push
# uses: actions/upload-artifact@v1
# with:
# name: WPF_Release
# path: ./artifacts/packages/Release/NonShipping
81 changes: 81 additions & 0 deletions CustomWpf/CustomWpf.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32014.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.WPF", "Lib\dotnetCampus.CustomWpf.Lib\dotnetCampus.WPF.csproj", "{39764FE3-C2F9-4772-9BF6-B66923ABEC4C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{FE032A91-A790-4274-A194-02E161D1F14B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Packaging", "Packaging", "{27886E90-E328-4AE9-86DA-1F596554D26B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.WPF.NuGet", "Packaging\dotnetCampus.WPF.NuGet\dotnetCampus.WPF.NuGet.csproj", "{FDC9151F-3544-4C68-9D05-D8E4935F1A9F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.WPF.Resource", "Lib\dotnetCampus.CustomWpf.Resource\dotnetCampus.WPF.Resource.csproj", "{D73CB485-6290-4E37-B441-8068E60CBF7E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{315B416C-6CDA-4CD5-9666-69C8272CD80E}"
ProjectSection(SolutionItems) = preProject
build\Version.props = build\Version.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnetCampus.WPF.Dependencies", "Lib\dotnetCampus.CustomWpf.Dependencies\dotnetCampus.WPF.Dependencies.csproj", "{39E01A9E-C352-4B7E-96CA-612A07937470}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demo", "Demo", "{1FCB5593-B06F-4DC3-B63F-315CF6DCF2BA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoApp", "Demo\DemoApp\DemoApp.csproj", "{3C3A4FD6-333B-480B-8354-3BB209FA89DB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoLib1", "Demo\DemoLib1\DemoLib1.csproj", "{B892B53C-752A-4700-8845-CD095F3AC08B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoLib2", "Demo\DemoLib2\DemoLib2.csproj", "{17CCDE40-5335-479A-8B67-E7B0A1332EA9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{39764FE3-C2F9-4772-9BF6-B66923ABEC4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39764FE3-C2F9-4772-9BF6-B66923ABEC4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39764FE3-C2F9-4772-9BF6-B66923ABEC4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39764FE3-C2F9-4772-9BF6-B66923ABEC4C}.Release|Any CPU.Build.0 = Release|Any CPU
{FDC9151F-3544-4C68-9D05-D8E4935F1A9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FDC9151F-3544-4C68-9D05-D8E4935F1A9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDC9151F-3544-4C68-9D05-D8E4935F1A9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FDC9151F-3544-4C68-9D05-D8E4935F1A9F}.Release|Any CPU.Build.0 = Release|Any CPU
{D73CB485-6290-4E37-B441-8068E60CBF7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D73CB485-6290-4E37-B441-8068E60CBF7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D73CB485-6290-4E37-B441-8068E60CBF7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D73CB485-6290-4E37-B441-8068E60CBF7E}.Release|Any CPU.Build.0 = Release|Any CPU
{39E01A9E-C352-4B7E-96CA-612A07937470}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39E01A9E-C352-4B7E-96CA-612A07937470}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39E01A9E-C352-4B7E-96CA-612A07937470}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39E01A9E-C352-4B7E-96CA-612A07937470}.Release|Any CPU.Build.0 = Release|Any CPU
{3C3A4FD6-333B-480B-8354-3BB209FA89DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C3A4FD6-333B-480B-8354-3BB209FA89DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C3A4FD6-333B-480B-8354-3BB209FA89DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3C3A4FD6-333B-480B-8354-3BB209FA89DB}.Release|Any CPU.Build.0 = Release|Any CPU
{B892B53C-752A-4700-8845-CD095F3AC08B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B892B53C-752A-4700-8845-CD095F3AC08B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B892B53C-752A-4700-8845-CD095F3AC08B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B892B53C-752A-4700-8845-CD095F3AC08B}.Release|Any CPU.Build.0 = Release|Any CPU
{17CCDE40-5335-479A-8B67-E7B0A1332EA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17CCDE40-5335-479A-8B67-E7B0A1332EA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17CCDE40-5335-479A-8B67-E7B0A1332EA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17CCDE40-5335-479A-8B67-E7B0A1332EA9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{39764FE3-C2F9-4772-9BF6-B66923ABEC4C} = {FE032A91-A790-4274-A194-02E161D1F14B}
{FDC9151F-3544-4C68-9D05-D8E4935F1A9F} = {27886E90-E328-4AE9-86DA-1F596554D26B}
{D73CB485-6290-4E37-B441-8068E60CBF7E} = {FE032A91-A790-4274-A194-02E161D1F14B}
{39E01A9E-C352-4B7E-96CA-612A07937470} = {FE032A91-A790-4274-A194-02E161D1F14B}
{3C3A4FD6-333B-480B-8354-3BB209FA89DB} = {1FCB5593-B06F-4DC3-B63F-315CF6DCF2BA}
{B892B53C-752A-4700-8845-CD095F3AC08B} = {1FCB5593-B06F-4DC3-B63F-315CF6DCF2BA}
{17CCDE40-5335-479A-8B67-E7B0A1332EA9} = {1FCB5593-B06F-4DC3-B63F-315CF6DCF2BA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C25E6016-F278-457B-87D6-39EC0E0A6849}
EndGlobalSection
EndGlobal
9 changes: 9 additions & 0 deletions CustomWpf/Demo/DemoApp/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="DemoApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:DemoApp"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions CustomWpf/Demo/DemoApp/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace DemoApp
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
10 changes: 10 additions & 0 deletions CustomWpf/Demo/DemoApp/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
21 changes: 21 additions & 0 deletions CustomWpf/Demo/DemoApp/DemoApp.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="dotnetCampus.WPF" Version="6.0.4-alpha02" />
<PackageReference Include="dotnetCampus.WPF.Dependencies" Version="6.0.4-alpha02" />
<PackageReference Include="dotnetCampus.WPF.Resource" Version="6.0.4-alpha02" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DemoLib1\DemoLib1.csproj" />
</ItemGroup>

</Project>
12 changes: 12 additions & 0 deletions CustomWpf/Demo/DemoApp/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Window x:Class="DemoApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:DemoApp" xmlns:demolib1="clr-namespace:DemoLib1;assembly=DemoLib1"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<demolib1:UserControl1></demolib1:UserControl1>
</Grid>
</Window>
28 changes: 28 additions & 0 deletions CustomWpf/Demo/DemoApp/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace DemoApp
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
}
10 changes: 10 additions & 0 deletions CustomWpf/Demo/DemoLib1/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
18 changes: 18 additions & 0 deletions CustomWpf/Demo/DemoLib1/DemoLib1.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="dotnetCampus.WPF" Version="6.0.4-alpha02" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DemoLib2\DemoLib2.csproj" />
</ItemGroup>

</Project>
12 changes: 12 additions & 0 deletions CustomWpf/Demo/DemoLib1/UserControl1.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<UserControl x:Class="DemoLib1.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DemoLib1"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>

</Grid>
</UserControl>
31 changes: 31 additions & 0 deletions CustomWpf/Demo/DemoLib1/UserControl1.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using DemoLib2;

namespace DemoLib1
{
/// <summary>
/// Interaction logic for UserControl1.xaml
/// </summary>
public partial class UserControl1 : UserControl
{
public UserControl1()
{
InitializeComponent();
}

public Foo Foo { get; } = new Foo();
}
}
10 changes: 10 additions & 0 deletions CustomWpf/Demo/DemoLib2/DemoLib2.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>

</Project>
12 changes: 12 additions & 0 deletions CustomWpf/Demo/DemoLib2/Foo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DemoLib2
{
public class Foo
{
}
}
18 changes: 18 additions & 0 deletions CustomWpf/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project>
<Import Project="build\Version.props" />
<PropertyGroup>
<LangVersion>latest</LangVersion>
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\$(Configuration)</PackageOutputPath>
<Company>dotnet campus(.NET 职业技术学院)</Company>

<Authors>dotnet-campus</Authors>
<RepositoryUrl>https://github.com/dotnet-campus/dotnetCampus.CustomWpf</RepositoryUrl>
<PackageProjectUrl>https://github.com/dotnet-campus/dotnetCampus.CustomWpf</PackageProjectUrl>
<Description>包含定制的 WPF 版本</Description>

<RepositoryType>git</RepositoryType>
<Copyright>Copyright © 2020-2022 dotnet campus, All Rights Reserved.</Copyright>
</PropertyGroup>


</Project>
3 changes: 3 additions & 0 deletions CustomWpf/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Project>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project>
<Target Name="CustomWpfResolveReferences"
BeforeTargets="ResolveReferences">
<PropertyGroup>
<CustomWpfRuntimeIdentifier Condition="'$(CustomWpfRuntimeIdentifier)' == ''">$(RuntimeIdentifier)</CustomWpfRuntimeIdentifier>
<CustomWpfRuntimeIdentifier Condition="'$(CustomWpfRuntimeIdentifier)' == ''">win-x86</CustomWpfRuntimeIdentifier>
</PropertyGroup>
<ItemGroup>
<ReferenceCopyLocalPaths Include="$(CustomWpfAssetsFolder)lib\net6.0\*.dll" />
<ReferenceCopyLocalPaths Include="$(CustomWpfAssetsFolder)\runtimes\$(CustomWpfRuntimeIdentifier)\native\*.dll" />
</ItemGroup>
</Target>
</Project>
Loading

0 comments on commit e1d2cfe

Please sign in to comment.