Skip to content

Commit

Permalink
Revise: improve Windows .ico (multi-image icon files) (#4089)
Browse files Browse the repository at this point in the history
The "dev" one needed some reworking to avoid some clipping and I found the
GIMP script to generate a new one given a 256x256 starting image I applied
the same script to produce new files (with more different images sizes and
formats) for the other two as well.

import high resolution .PNGs from artwork repository:
They have been rebuilt from separately extracted elements from the original
SVG file and then stored at 1024x1024 resolution in a GIMP XCF file in
the mudlet/artwork repository. Have pulled them into this repo so they
can be used to make replacement Windows ICO icon files that are stored in
the ./src/icons sub-directory.

They might be needed for other really high definition icons and suchlike as
well.

Revise by changing some image save parameters to reduce file size:
I had selected some non-optimum (max compression, interlacing) options
that could be fixed without compromising anything.

Replace/upgrade mudlet Windows .ico icon file as well.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
  • Loading branch information
SlySven committed Oct 22, 2020
1 parent 022f31d commit 5ad2a4b
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 5 deletions.
4 changes: 3 additions & 1 deletion CI/appveyor.after_success.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ if ("$Env:APPVEYOR_REPO_TAG" -eq "false" -and -Not $Script:PublicTestBuild) {
Write-Output "=== Creating installers from Nuget package ==="
if ($Script:PublicTestBuild) {
$TestBuildString = "-PublicTestBuild"
$InstallerIconFile = "${Env:APPVEYOR_BUILD_FOLDER}\src\icons\mudlet_ptb.ico"
} else {
$TestBuildString = ""
$InstallerIconFile = "${Env:APPVEYOR_BUILD_FOLDER}\src\icons\mudlet.ico"
}

$nupkg_path = "C:\projects\squirrel-packaging-prep\Mudlet$TestBuildString.$Script:VersionAndSha.nupkg"
Expand All @@ -93,7 +95,7 @@ if ("$Env:APPVEYOR_REPO_TAG" -eq "false" -and -Not $Script:PublicTestBuild) {
}

# fails silently if the nupkg file is not found
.\squirrel.windows\tools\Squirrel --releasify $nupkg_path --releaseDir C:\projects\squirreloutput --loadingGif C:\projects\installers\windows\splash-installing-2x.png --no-msi --setupIcon C:\projects\installers\windows\mudlet_main_48px.ico -n "/a /f C:\projects\installers\windows\code-signing-certificate.p12 /p $Env:signing_password /fd sha256 /tr http://timestamp.digicert.com /td sha256"
.\squirrel.windows\tools\Squirrel --releasify $nupkg_path --releaseDir C:\projects\squirreloutput --loadingGif C:\projects\installers\windows\splash-installing-2x.png --no-msi --setupIcon $InstallerIconFile -n "/a /f C:\projects\installers\windows\code-signing-certificate.p12 /p $Env:signing_password /fd sha256 /tr http://timestamp.digicert.com /td sha256"
Write-Output "=== Removing old directory content of release folder ==="
Remove-Item -Recurse -Force $Env:APPVEYOR_BUILD_FOLDER\src\release\*
Write-Output "=== Copying installer over for appveyor ==="
Expand Down
Binary file added icon_1024x1204.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon_dev_1024x1204.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon_ptb_1024x1204.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ if(USE_FONTS)
endif()

if(WIN32)
list(APPEND mudlet_RCCS icons/mudlet_main_512x512_6XS_icon.ico)
if(BUILD matches "-ptb.+")
list(APPEND mudlet_RCCS icons/mudlet_ptb.ico)
elseif((BUILD matches "-dev.+") or (BUILD matches "-test.+"))
list(APPEND mudlet_RCCS icons/mudlet_dev.ico)
else()
list(APPEND mudlet_RCCS icons/mudlet.ico)
endif()
endif()

set(mudlet_SRCS
Expand Down
Binary file added src/icons/mudlet.ico
Binary file not shown.
Binary file modified src/icons/mudlet_dev.ico
Binary file not shown.
Binary file modified src/icons/mudlet_ptb.ico
Binary file not shown.
7 changes: 4 additions & 3 deletions src/mudlet.pro
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@ macx {
contains(BUILD, "-ptb.+") {
ICON = icons/mudlet_ptb.icns
} else {
contains(BUILD, "-dev.+") {
contains(BUILD, "-dev.+")|contains(BUILD, "-test.+") {
ICON = icons/mudlet_dev.icns
} else {
ICON = icons/mudlet.icns
Expand Down Expand Up @@ -1435,14 +1435,15 @@ macx {
}

win32 {
# set the Windows binary icon
# set the Windows binary icon, a proper .ico file will contains several
# images/layers in specific formats and is used in MORE than one way!
contains(BUILD, "-ptb.+") {
RC_ICONS = icons/mudlet_ptb.ico
} else {
contains(BUILD, "-dev.+")|contains(BUILD, "-test.+") {
RC_ICONS = icons/mudlet_dev.ico
} else {
RC_ICONS = icons/mudlet_main_512x512_6XS_icon.ico
RC_ICONS = icons/mudlet.ico
}
}

Expand Down

0 comments on commit 5ad2a4b

Please sign in to comment.