7 lines
407 B
PowerShell
7 lines
407 B
PowerShell
|
|
# 从 exe 提取关联图标存为 png,用于验证 syso 图标是否打包成功
|
|||
|
|
Add-Type -AssemblyName System.Drawing
|
|||
|
|
$exe = 'D:\myCode\code-count\view\bin\code-count.exe'
|
|||
|
|
$icon = [System.Drawing.Icon]::ExtractAssociatedIcon($exe)
|
|||
|
|
$icon.ToBitmap().Save('D:\myCode\code-count\view\tools\exe-icon-check.png', [System.Drawing.Imaging.ImageFormat]::Png)
|
|||
|
|
Write-Output ("exe size: " + (Get-Item $exe).Length)
|