File: pymailgui-products/unzipped/build/build-icons/_README.txt

RUN resize-and-build.sh to make icons here.

--PyEdit version notes follow--

This build folder creates icons shipped in ../icons.

Ths PNG images at the top of this folder are the originals, from
which resizes and icons are made.  "images-*" subfolders are resizes
used for icon builds, and generated icons are moved to ../icons.

In this icon build folder: 

  The Windows .ico is made on any platform with:
      py -3 iconify.py -win images pyedit 

  The Mac .icns is made on any platform with:
      python3 iconify.py -mac images pyedit

  or on a Mac with its built-in:
      iconutil -c icns pyedit.iconset

This step is run if required from ../build-app-exe build scripts.

Build details:

Before iconify is run, a 1024x1024 PNG image is first resized for icons
by resize-on-mac.sh on Mac using sips (or manually elsewhere).  This makes
a folder with one image per scaled size (16, 32, 64, 128, 256, 512, and 
1024), which is then used as input to iconify.py:

    ./resize-on-mac.sh pyedit.png images-pyedit 
    python3 iconify.py -mac images-pyedit pyedit

GIFs for Linux + Help are made manually from 1024 PNGs via Mac Preview: 
Tools=>Adjust Size to 256, File=>Export+option-click to GIF no Alpha
(this could be automated with sips too, but it's a one-time task).

The tool iconify.py was also extended for Mac .icns as part of the 
Mac OS X port work.  Apple's iconutil is built-in on Macs, but must
also be run there only; iconify.py makes Windows and Mac icons, 
on either.  See learning-python.com/iconify.

UPDATE: Windows now uses two icons - one for main windows and one
for popup windows, to make them distinct (main window quits close
the program).  The popop icon is named pyeditpopup.ico.  Linux uses
two too, but uses manually-ceated GIFs.  Mac uses just one icon
in all contexts (border icons aren't supported, so Mac PyEdit uses
Unicode characters in titles to differentiate window types instead).

Where icons appear:

On Mac, icons are used for Desktop aliases, Dock, common dialogs in Tk,
icons of associated files in Finder, the app itself in Finder, and the 
app bundle itself in Lauchpad if it's been drug (copied) there or to 
folder /Applications.  They do not appear on windows themselves.

On Windows, icons are used for Desktop shortcuts, taskbar, icons of
associated files, and the executable itself in Explorer and Start.
Programs can also arrange to set them on the borders of windows.

On Linux, programs can arrange to set an icon on the app bar, from
a general image type.  Other contexts may vary per window system.

Icons do not appear in some of these contexts for source-code based 
programs - only for executables and Mac apps (a.k.a. app bundles).
Desktop icons can generally be set manually by users, though the 
latest/current Macs require a security system to be disabled first.



[Home page] Books Code Blog Python Author Train Find ©M.Lutz