1
1
<Project >
2
2
<Import Project =" ..\Directory.Build.props" />
3
-
3
+
4
4
<PropertyGroup >
5
5
<RootFolder >$(MSBuildProjectDirectory)</RootFolder >
6
6
<Configuration >Canary</Configuration >
7
+ <CanaryBuildPath >..\Bin\Canary\Zips</CanaryBuildPath >
8
+ <CanaryZipName >Krypton-Canary</CanaryZipName >
7
9
</PropertyGroup >
8
10
9
11
<Target Name =" Clean" >
10
12
<ItemGroup >
11
13
<Projects Include =" ..\Source\Krypton Components\Krypton.*\*.csproj" />
12
14
</ItemGroup >
13
15
<MSBuild Projects =" @(Projects)" Properties =" Configuration=$(Configuration);TFMs=all" Targets =" Clean" />
14
- </Target >
16
+ </Target >
15
17
16
18
<Target Name =" Restore" >
17
19
<ItemGroup >
18
20
<Projects Include =" ..\Source\Krypton Components\Krypton.*\*.csproj" />
19
21
</ItemGroup >
20
22
<MSBuild Projects =" @(Projects)" Properties =" Configuration=$(Configuration);TFMs=all" Targets =" Restore" />
21
23
</Target >
22
-
24
+
23
25
<Target Name =" Build" DependsOnTargets =" Restore" >
24
26
<ItemGroup >
25
27
<Projects Include =" ..\Source\Krypton Components\Krypton.*\*.csproj" />
26
28
</ItemGroup >
27
29
<MSBuild Projects =" @(Projects)" Properties =" Configuration=$(Configuration);TFMs=all" />
28
30
</Target >
29
-
31
+
30
32
<Target Name =" CleanPackages" >
31
33
<ItemGroup >
32
34
<NugetPkgs Include =" ..\Bin\Packages\Canary\*.nupkg" />
33
35
</ItemGroup >
34
36
<Delete Files =" @(NugetPkgs)" />
35
37
</Target >
36
-
38
+
37
39
<Target Name =" PackAll" >
38
40
<ItemGroup >
39
41
<Projects Include =" ..\Source\Krypton Components\Krypton.*\*.csproj" />
49
51
<MSBuild Projects =" @(Projects)" Properties =" Configuration=$(Configuration);TFMs=all" Targets =" Restore" />
50
52
<MSBuild Projects =" @(Projects)" Properties =" Configuration=$(Configuration);TFMs=all" Targets =" Pack" />
51
53
</Target >
52
-
53
- <Target Name =" Pack" DependsOnTargets =" CleanPackages;PackAll" /> <!-- PackLite;-->
54
-
54
+
55
+ <Target Name =" Pack" DependsOnTargets =" CleanPackages;PackAll" />
56
+ <!-- PackLite;-->
57
+
55
58
<Target Name =" Push" >
56
59
<ItemGroup >
57
60
<NugetPkgs Include =" ..\Bin\Packages\Canary\*.$(LibraryVersion).nupkg" />
58
61
</ItemGroup >
59
62
<Exec Command =" nuget.exe push %(NugetPkgs.Identity)" />
60
63
</Target >
61
64
62
- <Target Name =" CreateNightlyZip" >
65
+
66
+
67
+ <Target Name =" CreateCanaryZip" >
68
+ <PropertyGroup >
69
+ <StringDate >$([System.DateTime]::Now.ToString('yyyyMMdd'))</StringDate >
70
+ </PropertyGroup >
71
+ <ItemGroup >
72
+ <DebugApplicationFiles Include =" ..\Bin\Canary\**\*.*" Exclude =" ..\Bin\Canary\*vshost.exe*;..\Bin\Canary\**\*.json;..\Bin\Canary\**\*.pdb" />
73
+ </ItemGroup >
74
+ <MakeDir Directories =" $(CanaryBuildPath)" />
75
+
76
+ <!-- Using 7-Zip for ZIP creation (compatible with all MSBuild versions) -->
77
+ <Exec Command =" 7z.exe a -tzip " $(CanaryBuildPath)\$(CanaryZipName)_$(StringDate).zip" " ..\Bin\Canary\*" -x!*.json -x!*.pdb"
78
+ Condition =" Exists('C:\Program Files\7-Zip\7z.exe')"
79
+ WorkingDirectory =" $(CanaryBuildPath)" />
80
+
81
+ <!-- Fallback: Using PowerShell Compress-Archive if 7-Zip not available -->
82
+ <Exec Command =" powershell.exe -Command " Get-ChildItem '..\Bin\Canary\*' -Recurse | Where-Object {$_.Extension -notin '.json','.pdb'} | Compress-Archive -DestinationPath '$(CanaryBuildPath)\$(CanaryZipName)_$(StringDate).zip' -Force" "
83
+ Condition =" !Exists('C:\Program Files\7z.exe')" />
84
+ </Target >
85
+
86
+ <Target Name =" CreateCanaryTar" >
63
87
<PropertyGroup >
64
88
<StringDate >$([System.DateTime]::Now.ToString('yyyyMMdd'))</StringDate >
65
89
</PropertyGroup >
66
90
<ItemGroup >
67
- <DebugApplicationFiles Include =" ..\Bin\Canary\**\*.*" Exclude =" ..\Bin\Canary\*vshost.exe*" />
91
+ <DebugApplicationFiles Include =" ..\Bin\Canary\**\*.*" Exclude =" ..\Bin\Canary\*vshost.exe*;..\Bin\Canary\**\*.json;..\Bin\Canary\**\*.pdb " />
68
92
</ItemGroup >
69
- <MakeDir Directories =" $(NightlyBuildPath)" />
70
- <Zip Files =" @(DebugApplicationFiles)"
71
- WorkingDirectory =" ..\Bin\Canary"
72
- ZipFileName =" $(NightlyBuildPath)\$(StringDate)_$(NightlyZipName).zip"
73
- ZipLevel =" 9" />
93
+ <MakeDir Directories =" $(CanaryBuildPath)" />
94
+
95
+ <!-- Method 1: Using 7-Zip if available (recommended for Windows) -->
96
+ <Exec Command =" 7z.exe a -ttar " $(CanaryBuildPath)\$(CanaryZipName)_$(StringDate).tar" " ..\Bin\Canary\*" -x!*.json -x!*.pdb"
97
+ Condition =" Exists('C:\Program Files\7-Zip\7z.exe')"
98
+ WorkingDirectory =" $(CanaryBuildPath)" />
99
+ <Exec Command =" 7z.exe a -tgzip " $(CanaryBuildPath)\$(CanaryZipName)_$(StringDate).tar.gz" " $(CanaryBuildPath)\$(CanaryZipName)_$(StringDate).tar" "
100
+ Condition =" Exists('C:\Program Files\7-Zip\7z.exe')"
101
+ WorkingDirectory =" $(CanaryBuildPath)" />
102
+ <Delete Files =" $(CanaryBuildPath)\$(CanaryZipName)_$(StringDate).tar"
103
+ Condition =" Exists('C:\Program Files\7-Zip\7z.exe')" />
104
+
105
+ <!-- Method 2: Using PowerShell tar command (Windows 10/11) -->
106
+ <Exec Command =" powershell.exe -Command tar -czf " $(CanaryBuildPath)\$(CanaryZipName)_$(StringDate)_ps.tar.gz" -C " ..\Bin\Canary" . --exclude=*.json --exclude=*.pdb"
107
+ Condition =" Exists('C:\Windows\System32\tar.exe')" />
108
+
109
+ <!-- Method 3: Using Git Bash tar if available -->
110
+ <Exec Command =" " C:\Program Files\Git\bin\bash.exe" -c " cd ../Bin/Canary && tar -czf " $(CanaryBuildPath)/$(CanaryZipName)_$(StringDate)_git.tar.gz" * --exclude=*.json --exclude=*.pdb" "
111
+ Condition =" Exists('C:\Program Files\Git\bin\bash.exe')" />
74
112
</Target >
113
+
114
+ <Target Name =" CreateAllCanaryArchives" DependsOnTargets =" CreateCanaryZip;CreateCanaryTar" />
75
115
</Project >
0 commit comments