Skip to content

Commit 5f68a25

Browse files
committed
添加项目文件。
0 parents  commit 5f68a25

339 files changed

Lines changed: 2184314 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

.github/workflows/build.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Build CommunityToolkit.WinUI sln
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
build:
12+
runs-on: windows-latest
13+
14+
strategy:
15+
matrix:
16+
arch: [ x64, arm64 ]
17+
18+
env:
19+
VCPKG_DEFAULT_TRIPLET: ${{ matrix.arch }}-windows-static
20+
SOLUTION_FILE: CommunityToolkit.WinUI.sln
21+
22+
steps:
23+
- name: Checkout source
24+
uses: actions/checkout@v4
25+
26+
- name: Setup MSVC environment
27+
uses: ilammy/msvc-dev-cmd@v1
28+
with:
29+
arch: ${{ matrix.arch }}
30+
31+
- name: Install vcpkg
32+
run: |
33+
git clone https://github.com/microsoft/vcpkg.git C:\vcpkg
34+
cd C:\vcpkg
35+
.\bootstrap-vcpkg.bat
36+
37+
- name: Install dependencies (tree-sitter static)
38+
run: |
39+
cd C:\vcpkg
40+
.\vcpkg install tree-sitter:${{ matrix.arch }}-windows-static
41+
42+
- name: Integrate vcpkg with MSBuild
43+
run: |
44+
C:\vcpkg\vcpkg integrate install
45+
46+
- name: Restore NuGet packages
47+
working-directory: ${{env.GITHUB_WORKSPACE}}
48+
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
49+
50+
- name: Build solution
51+
env:
52+
VCPKG_ROOT: C:\vcpkg
53+
run: |
54+
msbuild ${{ env.SOLUTION_FILE_PATH }} `
55+
/p:Configuration=Release `
56+
/p:Platform=${{ matrix.arch }} `
57+
/p:VcpkgTriplet=${{ matrix.arch }}-windows-static `
58+
/p:VcpkgRoot=${{ env.VCPKG_ROOT }} `
59+
/m
60+
61+
- name: Package artifacts
62+
run: |
63+
mkdir package
64+
Compress-Archive -Path "${{ matrix.arch }}/Release/*" -DestinationPath "package/CommunityToolkit.WinUI-${{ matrix.arch }}.zip"
65+
66+
- name: Upload artifacts to GitHub Release
67+
uses: softprops/action-gh-release@v2
68+
with:
69+
files: package/*.zip
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)