home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
geo
/
iconmk11.zip
/
ICONMAKE.ENG
< prev
next >
Wrap
Text File
|
1993-06-12
|
10KB
|
249 lines
ICONMAKE 1.1
written by Marcus Groeber 1992/93
Fido: 2:2402/61.1
Iconmake enables you to create your own icons for PC/Geos by converting
existing picture files (PCX and ICO). These icons can be assigned to Dos files
using the GEOS.INI settings; the method is the same as for the built-in icons
and for those from the icon collection by Geoworks themselves.
---
User of ICONMAKE 1.0 should note the paragraph on creating "Tokens from
Geoworks exectuables". It describes how existing icons can be converted for
use with Geoworks 2.0.
The batchfile ICONVERT.BAT (read "I convert" :-)) in this archive transfers
entire subdirectories of icons from old (1.x) to new (2.0) format. Usage is:
ICONVERT old_path new_path
ICONVERT must be in the current directory for performing this function.
The ICON2TO1.BAT batch file converts icons in the opposite direction (i.e.
GW 2.0 to 1.x).
---
The technology
--------------
To "teach" Geoworks new icons, you'll have to create so-called "tokens". These
are references to executable programs or document types, consisting of a
four-letter-code and a number in the range of 0..65535. A token can be
assigned the name of a program, one or more icons (for different screen types)
and sometimes the name of the application that created the document.
When a directory is first opened, Geoworks loads the tokens from all
applications that are not yet known into its internal TOKEN.DB database.
Therefore, new tokens can be easily created by using a "dummy" application
that contains not much more than the token itself. By changing into a
directory with such a dummy file, the new icon is automagically installed in
the system.
The converter
-------------
ICONMAKE enables you to convert icons from PCX (PC Paintbrush) or ICO (Windows
Icons) into such dummy applications, thus giving you access to a huge amount
of graphics.
The conversion uses a code fragment from the orignal Geoworks icon collection
(which is probably (c) Geoworks).
Important: Geoworks versions 1.x and 2.0
----------------------------------------
To make this program "future compatible" the default setting for newly created
icons is Geoworks 2.0, i.e. icon files that can only be used with the new
version.
To create icons for a 1.x version, you should specify the "/O" (old) option in
second place after the command letter (see below). E.g.
ICONMAKE w /O \geoworks\icons\TEST,12345 test.ICO
to convert the Windows icon TEST.ICO into a Geoworks 1.x icon.
Tokens from PCX files
---------------------
Each token requires up to three icon files (assume that the token name is
xxxx, names are only examples):
xxxx_CGA.PCX Low (CGA) resolution: 48x14 pixels, mono
xxxx_HGC.PCX High resolution mono (HGC, MCGA): 48x30 Pixel, mono
xxxx_EGA.PCX High resolution color (EGA, VGA): 48x30 Pixel, 16 col
To create a "dummy" for the token named xxxx (will be called xxxx.000), you
must enter the command
ICONMAKE m xxxx <list of pcx files>
e.g.: ICONMAKE m icons\TEST,12345 test_cga.pcx test_hgc.pcx test_ega.pcx
at the command prompt. You can also specify an additional valued after xxxx
(separated by a ",") to set the numeric component of the token to this value
(default is 255). You could for example use this feature to distinguish
various tokens with the same name in different collections.
In addition, the token name can contain a full pathname that specifies where
the dummy file will be put. An extension will be ignored; the name is always
truncated to 4 characteres. Therefore you can specify the name of the source
file as a suggested icon name in automatic batch runs, and ICONMAKE will
convert it according to its standards. An existing file by the same name will
never be overwritten, instead the program changes the filename to avoid name
conflicts.
The filename for the token file is created by taking the token name and adding
the token number (as a hex value). The extension is always "000".
By default, als pixel with color 14 will be displayed as "transparent", i.e.
the background is visible in those places. This color can be changed by
specifying a different value using the "/m" switch after the command letter
"m" (e.g. "/m1"), "/m0" will completely disable transparency. The following
color codes may be used:
black 1 dark grey 9
blue 2 light blue 10
green 3 light green 11
cyan 4 light cyan 12
red 5 light red 13
magenta 6 light magenta 14
brown 7 yellow 15
light grey 8 white 16
Extracting tokens from PC/Geos Files
------------------------------------
The command
ICONMAKE x <filename> [<target>]
extracts icon definitions from existing Geoworks programs (or icon dummys)
into pcx files (the names will follow the example given above). If <target> is
specified, the path (and, if any, four letter file prefix) is used for naming
the PCX files created by this command. When specifying a target pathname only,
it should end in a "\" to be properly recognized.
Tokens from ICO files
---------------------
The command
ICONMAKE w xxxx <ICO file>
e.g.: ICONMAKE w \geoworks\icons\TEST,12345 test.ICO
will create a dummy for the token xxxx (naming conventions are the same as for
pcx files) using the graphics in the given Windows icon file. ICONMAKE tries to
get as many different types of icons (CGA, HGC, EGA) from the ICO file, but it
will not attempt to convert a picture that is not available in a "useful"
resultion. Contrary to the Geoworks standard format, the icons created by this
option will usually be of 32x32 size, but this doesn't seem to pose any
problems.
Tokens from Geoworks executables
--------------------------------
This option extracts a program icon from an exectuable Geoworks program
("Geode") or "dummy" and creates a "dummy" file containing only the icon. If
necessary, the image is converted between Geoworks 1.x and 2.0 format. Use a
command line like the following
ICONMAKE g xxxx <Geoworks_Datei>
e.g.: ICONMAKE g \geoworks\icons\test,123 \geoworks\world\draw.geo
with xxxx being the name (and path, if required) of the token to be created.
The sample line extracts the icon from the program GeoDraw and puts it into
the icons directory under the token TEST.123. If the name of the token is
omitted, ICONMAKE uses the name of the original token. A path without a token
name must end in a "\" to be recognized properly.
Possible uses for this function:
- Converting icons between Geoworks 1.x and 2.0 by reading the icon from
the old file into a new one with the correct format.
- Extracting icons from other programs into separate files for editing.
- Copying existing icons to another token (to keep tokens unique when
editing an icon).
Argument files
--------------
DOS still limts the length of parameter lines the can be passed to programs to
126 characters. Therefore, ICONMAKE includes the possibilty to pass command
line arguments using an argument file. Simply include the argument
"@<filename>" in the calling command. The file <filename> can contain as many
parameters as you like, separated by a newline instead of a blank as in the
commandline.
In most cases, this will be a list of filenames, e.g.:
ICONMAKE m TEST,123 @FILES.LST
with a list of files to be converted in FILES.LST:
test_ega.pcx
test_hgc.pcx
test_cga.pcx
but you can also use any other combination of parameters and parameter files.
This option can also be useful when calling ICONMAKE from your own programs...
Suggestions:
------------
- Once you have installed a token, any changes in the token file will go
unnoticed until you delete your TOKEN.DB in the SYSTEM directory to make
PC/Geos rebuild it. You don't normally loose any information by doing so,
because TOKEN.DB is only a work file that can be recreated from the
applications you have.
- In some paint programs (e.g. Windows Paintbrush) you can avoid color
distortions by loading and re-saving a picture.
- Of course, the fastest way to get LOTS of icons is to take an existing PD
collection for Windows and convert them using a batch command. If the pictures
are packed into an EXE or DLL file, you'll have to use an icon extractor
before starting ICONMAKE (e.g. Daniel Tietze's GETICONS). Most Windows
collections contain only icons for EGA/VGA color resolution.
- The following command line is very useful - it converts all Windows icons
in the current directory into Geoworks icons (names must be different in the
first four characters):
FOR %a IN (*.ICO) DO iconmake w %a,254 %a
This command assign the token number 254 to all the icons (this number can of
course be freely chosen).
- To convert all Geoworks 1.x icons from a directory into the new format
you can use the following line:
FOR %a IN (icons1\*.*) DO iconmake g icons2\ %a
It creates a new icon "dummy" file in the icons2 directory for every icon
found in the directory named icons1 (which should contain only icons for this
example). Token name and number are duplicated.
- Other programs that can be very useful when working with Geoworks icons:
* ICONED by Thomas Wachsmann is a full-featured icon editor, also
available in a beta version for Geoworks 1.x.
* TOKENVM by Rudi Ferrari enables you to assign new icons to Geoworks
documents, e.g. a picture representing the topic of a GeoWrite text.
Revision history
================
1.0
Initial release
1.01
Wildcarded filenames and argument files
PCX import module revised, equivalent to BKGD2PCX 2.2a
1.1
Support for Geoworks 2.0
Slightly modified some of the argument formats
New function to extract/convert icons from Geoworks files