Skip to content

Commit 880415e

Browse files
committed
* Implement #2503
* Implemented #2503 * No build log needed
1 parent 2aa4993 commit 880415e

File tree

5 files changed

+352
-45
lines changed

5 files changed

+352
-45
lines changed

Documents/Changelog/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
====
44

55
## 2025-11-xx - Build 2511 (V10 - alpha) - November 2025
6+
* Implemented [#2503](https://github.com/Krypton-Suite/Standard-Toolkit/issues/2503), Add the ability to create zip files for binaries
67
* Resolved [#2495](https://github.com/Krypton-Suite/Standard-Toolkit/issues/2495), `KryptonProgressBar` private field `_mementoContent` can be null.
78
* Resolved [#2490](https://github.com/Krypton-Suite/Standard-Toolkit/issues/2490), `KryptonComboBox` uses an incorrect Items editor string.
89
* Resolved [#2487](https://github.com/Krypton-Suite/Standard-Toolkit/issues/2487), `PaletteBase.PalettePaint` event is not synchronized toward the user.

Scripts/build.proj

Lines changed: 58 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
11
<Project>
22
<Import Project="..\Directory.Build.props" />
3-
3+
44
<PropertyGroup>
55
<RootFolder>$(MSBuildProjectDirectory)</RootFolder>
66
<Configuration>Release</Configuration>
7+
<ReleaseBuildPath>..\Bin\Release\Zips</ReleaseBuildPath>
8+
<ReleaseZipName>Krypton-Release</ReleaseZipName>
79
</PropertyGroup>
810

911
<Target Name="Clean">
1012
<ItemGroup>
1113
<Projects Include="..\Source\Krypton Components\Krypton.*\*.csproj" />
1214
</ItemGroup>
1315
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=all" Targets="Clean" />
14-
</Target>
16+
</Target>
1517

1618
<Target Name="Restore">
1719
<ItemGroup>
1820
<Projects Include="..\Source\Krypton Components\Krypton.*\*.csproj" />
1921
</ItemGroup>
2022
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=all" Targets="Restore" />
2123
</Target>
22-
24+
2325
<Target Name="Build" DependsOnTargets="Restore">
2426
<ItemGroup>
2527
<Projects Include="..\Source\Krypton Components\Krypton.*\*.csproj" />
2628
</ItemGroup>
2729
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=all" />
2830
</Target>
29-
31+
3032
<Target Name="CleanPackages">
3133
<ItemGroup>
3234
<NugetPkgs Include="..\Bin\Release\*.nupkg" />
@@ -49,7 +51,7 @@
4951
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=lite" Targets="Restore" />
5052
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=lite" Targets="Pack" />
5153
</Target>
52-
54+
5355
<Target Name="PackAll">
5456
<ItemGroup>
5557
<Projects Include="..\Source\Krypton Components\Krypton.*\*.csproj" />
@@ -65,13 +67,62 @@
6567
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=all" Targets="Restore" />
6668
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=all" Targets="Pack" />
6769
</Target>
68-
70+
6971
<Target Name="Pack" DependsOnTargets="CleanPackages;PackLite;PackAll" />
70-
72+
7173
<Target Name="Push">
7274
<ItemGroup>
7375
<NugetPkgs Include="..\Bin\Release\*.$(LibraryVersion).nupkg" />
7476
</ItemGroup>
7577
<Exec Command="nuget.exe push %(NugetPkgs.Identity)" />
7678
</Target>
79+
80+
<Target Name="CreateReleaseZip">
81+
<PropertyGroup>
82+
<StringDate>$([System.DateTime]::Now.ToString('yyyyMMdd'))</StringDate>
83+
</PropertyGroup>
84+
<ItemGroup>
85+
<DebugApplicationFiles Include="..\Bin\Release\**\*.*" Exclude="..\Bin\Release\*vshost.exe*;..\Bin\Release\**\*.json;..\Bin\Release\**\*.pdb" />
86+
</ItemGroup>
87+
<MakeDir Directories="$(ReleaseBuildPath)"/>
88+
89+
<!-- Using 7-Zip for ZIP creation (compatible with all MSBuild versions) -->
90+
<Exec Command="7z.exe a -tzip &quot;$(ReleaseBuildPath)\$(ReleaseZipName)_$(StringDate).zip&quot; &quot;..\Bin\Release\*&quot; -x!*.json -x!*.pdb"
91+
Condition="Exists('C:\Program Files\7-Zip\7z.exe')"
92+
WorkingDirectory="$(ReleaseBuildPath)" />
93+
94+
<!-- Fallback: Using PowerShell Compress-Archive if 7-Zip not available -->
95+
<Exec Command="powershell.exe -Command &quot;Get-ChildItem '..\Bin\Release\*' -Recurse | Where-Object {$_.Extension -notin '.json','.pdb'} | Compress-Archive -DestinationPath '$(ReleaseBuildPath)\$(ReleaseZipName)_$(StringDate).zip' -Force&quot;"
96+
Condition="!Exists('C:\Program Files\7z.exe')" />
97+
</Target>
98+
99+
<Target Name="CreateReleaseTar">
100+
<PropertyGroup>
101+
<StringDate>$([System.DateTime]::Now.ToString('yyyyMMdd'))</StringDate>
102+
</PropertyGroup>
103+
<ItemGroup>
104+
<DebugApplicationFiles Include="..\Bin\Release\**\*.*" Exclude="..\Bin\Release\*vshost.exe*;..\Bin\Release\**\*.json;..\Bin\Release\**\*.pdb" />
105+
</ItemGroup>
106+
<MakeDir Directories="$(ReleaseBuildPath)"/>
107+
108+
<!-- Method 1: Using 7-Zip if available (recommended for Windows) -->
109+
<Exec Command="7z.exe a -ttar &quot;$(ReleaseBuildPath)\$(ReleaseZipName)_$(StringDate).tar&quot; &quot;..\Bin\Release\*&quot; -x!*.json -x!*.pdb"
110+
Condition="Exists('C:\Program Files\7-Zip\7z.exe')"
111+
WorkingDirectory="$(ReleaseBuildPath)" />
112+
<Exec Command="7z.exe a -tgzip &quot;$(ReleaseBuildPath)\$(ReleaseZipName)_$(StringDate).tar.gz&quot; &quot;$(ReleaseBuildPath)\$(ReleaseZipName)_$(StringDate).tar&quot;"
113+
Condition="Exists('C:\Program Files\7-Zip\7z.exe')"
114+
WorkingDirectory="$(ReleaseBuildPath)" />
115+
<Delete Files="$(ReleaseBuildPath)\$(ReleaseZipName)_$(StringDate).tar"
116+
Condition="Exists('C:\Program Files\7-Zip\7z.exe')" />
117+
118+
<!-- Method 2: Using PowerShell tar command (Windows 10/11) -->
119+
<Exec Command="powershell.exe -Command tar -czf &quot;$(ReleaseBuildPath)\$(ReleaseZipName)_$(StringDate)_ps.tar.gz&quot; -C &quot;..\Bin\Release&quot; . --exclude=*.json --exclude=*.pdb"
120+
Condition="Exists('C:\Windows\System32\tar.exe')" />
121+
122+
<!-- Method 3: Using Git Bash tar if available -->
123+
<Exec Command="&quot;C:\Program Files\Git\bin\bash.exe&quot; -c &quot;cd ../Bin/Release &amp;&amp; tar -czf &quot;$(ReleaseBuildPath)/$(ReleaseZipName)_$(StringDate)_git.tar.gz&quot; * --exclude=*.json --exclude=*.pdb&quot;"
124+
Condition="Exists('C:\Program Files\Git\bin\bash.exe')" />
125+
</Target>
126+
127+
<Target Name="CreateAllReleaseArchives" DependsOnTargets="CreateReleaseZip;CreateReleaseTar" />
77128
</Project>

Scripts/canary.proj

Lines changed: 55 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
11
<Project>
22
<Import Project="..\Directory.Build.props" />
3-
3+
44
<PropertyGroup>
55
<RootFolder>$(MSBuildProjectDirectory)</RootFolder>
66
<Configuration>Canary</Configuration>
7+
<CanaryBuildPath>..\Bin\Canary\Zips</CanaryBuildPath>
8+
<CanaryZipName>Krypton-Canary</CanaryZipName>
79
</PropertyGroup>
810

911
<Target Name="Clean">
1012
<ItemGroup>
1113
<Projects Include="..\Source\Krypton Components\Krypton.*\*.csproj" />
1214
</ItemGroup>
1315
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=all" Targets="Clean" />
14-
</Target>
16+
</Target>
1517

1618
<Target Name="Restore">
1719
<ItemGroup>
1820
<Projects Include="..\Source\Krypton Components\Krypton.*\*.csproj" />
1921
</ItemGroup>
2022
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=all" Targets="Restore" />
2123
</Target>
22-
24+
2325
<Target Name="Build" DependsOnTargets="Restore">
2426
<ItemGroup>
2527
<Projects Include="..\Source\Krypton Components\Krypton.*\*.csproj" />
2628
</ItemGroup>
2729
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=all" />
2830
</Target>
29-
31+
3032
<Target Name="CleanPackages">
3133
<ItemGroup>
3234
<NugetPkgs Include="..\Bin\Canary\*.nupkg" />
3335
</ItemGroup>
3436
<Delete Files="@(NugetPkgs)" />
3537
</Target>
36-
38+
3739
<Target Name="PackAll">
3840
<ItemGroup>
3941
<Projects Include="..\Source\Krypton Components\Krypton.*\*.csproj" />
@@ -49,27 +51,65 @@
4951
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=all" Targets="Restore" />
5052
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=all" Targets="Pack" />
5153
</Target>
52-
53-
<Target Name="Pack" DependsOnTargets="CleanPackages;PackAll" /> <!--PackLite;-->
54-
54+
55+
<Target Name="Pack" DependsOnTargets="CleanPackages;PackAll" />
56+
<!--PackLite;-->
57+
5558
<Target Name="Push">
5659
<ItemGroup>
5760
<NugetPkgs Include="..\Bin\Canary\*.$(LibraryVersion).nupkg" />
5861
</ItemGroup>
5962
<Exec Command="nuget.exe push %(NugetPkgs.Identity)" />
6063
</Target>
6164

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 &quot;$(CanaryBuildPath)\$(CanaryZipName)_$(StringDate).zip&quot; &quot;..\Bin\Canary\*&quot; -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 &quot;Get-ChildItem '..\Bin\Canary\*' -Recurse | Where-Object {$_.Extension -notin '.json','.pdb'} | Compress-Archive -DestinationPath '$(CanaryBuildPath)\$(CanaryZipName)_$(StringDate).zip' -Force&quot;"
83+
Condition="!Exists('C:\Program Files\7z.exe')" />
84+
</Target>
85+
86+
<Target Name="CreateCanaryTar">
6387
<PropertyGroup>
6488
<StringDate>$([System.DateTime]::Now.ToString('yyyyMMdd'))</StringDate>
6589
</PropertyGroup>
6690
<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" />
6892
</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 &quot;$(CanaryBuildPath)\$(CanaryZipName)_$(StringDate).tar&quot; &quot;..\Bin\Canary\*&quot; -x!*.json -x!*.pdb"
97+
Condition="Exists('C:\Program Files\7-Zip\7z.exe')"
98+
WorkingDirectory="$(CanaryBuildPath)" />
99+
<Exec Command="7z.exe a -tgzip &quot;$(CanaryBuildPath)\$(CanaryZipName)_$(StringDate).tar.gz&quot; &quot;$(CanaryBuildPath)\$(CanaryZipName)_$(StringDate).tar&quot;"
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 &quot;$(CanaryBuildPath)\$(CanaryZipName)_$(StringDate)_ps.tar.gz&quot; -C &quot;..\Bin\Canary&quot; . --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="&quot;C:\Program Files\Git\bin\bash.exe&quot; -c &quot;cd ../Bin/Canary &amp;&amp; tar -czf &quot;$(CanaryBuildPath)/$(CanaryZipName)_$(StringDate)_git.tar.gz&quot; * --exclude=*.json --exclude=*.pdb&quot;"
111+
Condition="Exists('C:\Program Files\Git\bin\bash.exe')" />
74112
</Target>
113+
114+
<Target Name="CreateAllCanaryArchives" DependsOnTargets="CreateCanaryZip;CreateCanaryTar" />
75115
</Project>

Scripts/nightly.proj

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
<Project>
22
<Import Project="..\Directory.Build.props" />
3-
3+
44
<PropertyGroup>
55
<RootFolder>$(MSBuildProjectDirectory)</RootFolder>
66
<Configuration>Nightly</Configuration>
7+
<NightlyBuildPath>..\Bin\Nightly\Zips</NightlyBuildPath>
8+
<NightlyZipName>Krypton-Nightly</NightlyZipName>
79
</PropertyGroup>
810

911
<Target Name="Clean">
1012
<ItemGroup>
1113
<Projects Include="..\Source\Krypton Components\Krypton.*\*.csproj" />
1214
</ItemGroup>
1315
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=all" Targets="Clean" />
14-
</Target>
16+
</Target>
1517

1618
<Target Name="Restore">
1719
<ItemGroup>
1820
<Projects Include="..\Source\Krypton Components\Krypton.*\*.csproj" />
1921
</ItemGroup>
2022
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=all" Targets="Restore" />
2123
</Target>
22-
24+
2325
<Target Name="Build" DependsOnTargets="Restore">
2426
<ItemGroup>
2527
<Projects Include="..\Source\Krypton Components\Krypton.*\*.csproj" />
@@ -28,14 +30,14 @@
2830
</Target>
2931

3032
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
31-
33+
3234
<Target Name="CleanPackages">
3335
<ItemGroup>
3436
<NugetPkgs Include="..\Bin\Nightly\*.nupkg" />
3537
</ItemGroup>
3638
<Delete Files="@(NugetPkgs)" />
3739
</Target>
38-
40+
3941
<Target Name="PackAll">
4042
<ItemGroup>
4143
<Projects Include="..\Source\Krypton Components\Krypton.*\*.csproj" />
@@ -51,9 +53,9 @@
5153
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=all" Targets="Restore" />
5254
<MSBuild Projects="@(Projects)" Properties="Configuration=$(Configuration);TFMs=all" Targets="Pack" />
5355
</Target>
54-
56+
5557
<Target Name="Pack" DependsOnTargets="CleanPackages;PackAll" />
56-
58+
5759
<Target Name="Push">
5860
<ItemGroup>
5961
<NugetPkgs Include="..\Bin\Nightly\*.$(LibraryVersion).nupkg" />
@@ -66,12 +68,47 @@
6668
<StringDate>$([System.DateTime]::Now.ToString('yyyyMMdd'))</StringDate>
6769
</PropertyGroup>
6870
<ItemGroup>
69-
<DebugApplicationFiles Include="..\Bin\Nightly\**\*.*" Exclude="..\Bin\Nightly\*vshost.exe*" />
71+
<DebugApplicationFiles Include="..\Bin\Nightly\**\*.*" Exclude="..\Bin\Nightly\*vshost.exe*;..\Bin\Nightly\**\*.json;..\Bin\Nightly\**\*.pdb" />
7072
</ItemGroup>
7173
<MakeDir Directories="$(NightlyBuildPath)"/>
72-
<Zip Files="@(DebugApplicationFiles)"
73-
WorkingDirectory="..\Bin\Nightly"
74-
ZipFileName="$(NightlyBuildPath)\$(StringDate)_$(NightlyZipName).zip"
75-
ZipLevel="9" />
74+
75+
<!-- Using 7-Zip for ZIP creation (compatible with all MSBuild versions) -->
76+
<Exec Command="7z.exe a -tzip &quot;$(NightlyBuildPath)\$(NightlyZipName)_$(StringDate).zip&quot; &quot;..\Bin\Nightly\*&quot; -x!*.json -x!*.pdb"
77+
Condition="Exists('C:\Program Files\7-Zip\7z.exe')"
78+
WorkingDirectory="$(NightlyBuildPath)" />
79+
80+
<!-- Fallback: Using PowerShell Compress-Archive if 7-Zip not available -->
81+
<Exec Command="powershell.exe -Command &quot;Get-ChildItem '..\Bin\Nightly\*' -Recurse | Where-Object {$_.Extension -notin '.json','.pdb'} | Compress-Archive -DestinationPath '$(NightlyBuildPath)\$(NightlyZipName)_$(StringDate).zip' -Force&quot;"
82+
Condition="!Exists('C:\Program Files\7z.exe')" />
7683
</Target>
84+
85+
<Target Name="CreateNightlyTar">
86+
<PropertyGroup>
87+
<StringDate>$([System.DateTime]::Now.ToString('yyyyMMdd'))</StringDate>
88+
</PropertyGroup>
89+
<ItemGroup>
90+
<DebugApplicationFiles Include="..\Bin\Nightly\**\*.*" Exclude="..\Bin\Nightly\*vshost.exe*;..\Bin\Nightly\**\*.json;..\Bin\Nightly\**\*.pdb" />
91+
</ItemGroup>
92+
<MakeDir Directories="$(NightlyBuildPath)"/>
93+
94+
<!-- Method 1: Using 7-Zip if available (recommended for Windows) -->
95+
<Exec Command="7z.exe a -ttar &quot;$(NightlyBuildPath)\$(NightlyZipName)_$(StringDate).tar&quot; &quot;..\Bin\Nightly\*&quot; -x!*.json -x!*.pdb"
96+
Condition="Exists('C:\Program Files\7-Zip\7z.exe')"
97+
WorkingDirectory="$(NightlyBuildPath)" />
98+
<Exec Command="7z.exe a -tgzip &quot;$(NightlyBuildPath)\$(NightlyZipName)_$(StringDate).tar.gz&quot; &quot;$(NightlyBuildPath)\$(NightlyZipName)_$(StringDate).tar&quot;"
99+
Condition="Exists('C:\Program Files\7-Zip\7z.exe')"
100+
WorkingDirectory="$(NightlyBuildPath)" />
101+
<Delete Files="$(NightlyBuildPath)\$(NightlyZipName)_$(StringDate).tar"
102+
Condition="Exists('C:\Program Files\7-Zip\7z.exe')" />
103+
104+
<!-- Method 2: Using PowerShell tar command (Windows 10/11) -->
105+
<Exec Command="powershell.exe -Command tar -czf &quot;$(NightlyBuildPath)\$(NightlyZipName)_$(StringDate)_ps.tar.gz&quot; -C &quot;..\Bin\Nightly&quot; . --exclude=*.json --exclude=*.pdb"
106+
Condition="Exists('C:\Windows\System32\tar.exe')" />
107+
108+
<!-- Method 3: Using Git Bash tar if available -->
109+
<Exec Command="&quot;C:\Program Files\Git\bin\bash.exe&quot; -c &quot;cd ../Bin/Nightly &amp;&amp; tar -czf &quot;$(NightlyBuildPath)/$(NightlyZipName)_$(StringDate)_git.tar.gz&quot; * --exclude=*.json --exclude=*.pdb&quot;"
110+
Condition="Exists('C:\Program Files\Git\bin\bash.exe')" />
111+
</Target>
112+
113+
<Target Name="CreateAllArchives" DependsOnTargets="CreateNightlyZip;CreateNightlyTar" />
77114
</Project>

0 commit comments

Comments
 (0)