OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [itcl/] [mac/] [itclMacLibrary.r] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/*
2
 * tclMacLibrary.r --
3
 *
4
 *      This file creates resources used by the Tcl shared library.
5
 *      Many thanks go to "Jay Lieske, Jr."  who
6
 *      wrote the initial version of this file.
7
 *
8
 * Copyright (c) 1996 Sun Microsystems, Inc.
9
 *
10
 * See the file "license.terms" for information on usage and redistribution
11
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12
 *
13
 * SCCS: @(#) tclMacLibrary.r 1.3 96/09/12 17:40:07
14
 */
15
 
16
#include 
17
#include 
18
 
19
/*
20
 * The folowing include and defines help construct
21
 * the version string for Tcl.
22
 */
23
 
24
#define RESOURCE_INCLUDED
25
#include "tcl.h"
26
#include "itcl.h"
27
 
28
#if (TCL_RELEASE_LEVEL == 0)
29
#   define RELEASE_LEVEL alpha
30
#elif (TCL_RELEASE_LEVEL == 1)
31
#   define RELEASE_LEVEL beta
32
#elif (TCL_RELEASE_LEVEL == 2)
33
#   define RELEASE_LEVEL final
34
#endif
35
 
36
#if (TCL_RELEASE_LEVEL == 2)
37
#   define MINOR_VERSION (ITCL_MINOR_VERSION * 16) + TCL_RELEASE_SERIAL
38
#else
39
#   define MINOR_VERSION ITCL_MINOR_VERSION * 16
40
#endif
41
 
42
resource 'vers' (1) {
43
        ITCL_MAJOR_VERSION, MINOR_VERSION,
44
        RELEASE_LEVEL, 0x00, verUS,
45
        ITCL_PATCH_LEVEL,
46
        ITCL_PATCH_LEVEL ", by Michael McLennan © Lucent Technologies, Inc."
47
};
48
 
49
resource 'vers' (2) {
50
        ITCL_MAJOR_VERSION, MINOR_VERSION,
51
        RELEASE_LEVEL, 0x00, verUS,
52
        ITCL_PATCH_LEVEL,
53
        "Itcl Shell " ITCL_PATCH_LEVEL " © 1993-1998"
54
};
55
 
56
 
57
/*
58
 * Currently the creator for all Tcl/Tk libraries and extensions
59
 * should be 'TclL'.  This will allow those extension and libraries
60
 * to use the common icon for Tcl extensions.  However, this signature
61
 * still needs to be approved by the signature police at Apple and may
62
 * change.
63
 */
64
#define ITCL_CREATOR 'ITcL'
65
#define TCL_LIBRARY_RESOURCES 2000
66
#define ITCL_LIBRARY_RESOURCES 2000
67
 
68
/*
69
 * The 'BNDL' resource is the primary link between a file's
70
 * creator/type and its icon.  This resource acts for all Tcl shared
71
 * libraries; other libraries will not need one and ought to use
72
 * custom icons rather than new file types for a different appearance.
73
 */
74
 
75
resource 'BNDL' (TCL_LIBRARY_RESOURCES, "Tcl bundle", purgeable)
76
{
77
        ITCL_CREATOR,
78
        0,
79
        {       /* array TypeArray: 2 elements */
80
                /* [1] */
81
                'FREF',
82
                {       /* array IDArray: 1 elements */
83
                        /* [1] */
84
                        0, TCL_LIBRARY_RESOURCES
85
                },
86
                /* [2] */
87
                'ICN#',
88
                {       /* array IDArray: 1 elements */
89
                        /* [1] */
90
                        0, TCL_LIBRARY_RESOURCES
91
                }
92
        }
93
};
94
 
95
resource 'FREF' (TCL_LIBRARY_RESOURCES, purgeable)
96
{
97
        'shlb', 0, ""
98
};
99
 
100
type ITCL_CREATOR as 'STR ';
101
resource ITCL_CREATOR (0, purgeable) {
102
        "Itcl Library " ITCL_PATCH_LEVEL " © 1993-1998"
103
};
104
 
105
/*
106
 * The 'kind' resource works with a 'BNDL' in Macintosh Easy Open
107
 * to affect the text the Finder displays in the "kind" column and
108
 * file info dialog.  This information will be applied to all files
109
 * with the listed creator and type.
110
 */
111
 
112
resource 'kind' (TCL_LIBRARY_RESOURCES, "Itcl kind", purgeable) {
113
        ITCL_CREATOR,
114
        0, /* region = USA */
115
        {
116
                'shlb', "Itcl Library"
117
        }
118
};
119
 
120
 
121
/*
122
 * The -16397 string will be displayed by Finder when a user
123
 * tries to open the shared library. The string should
124
 * give the user a little detail about the library's capabilities
125
 * and enough information to install the library in the correct location.
126
 * A similar string should be placed in all shared libraries.
127
 */
128
resource 'STR ' (-16397, purgeable) {
129
        "Itcl Library\n\n"
130
        "This is one of the libraries needed to run the Itcl flavor of the Tool Command Language programs. "
131
        "To work properly, it should be placed in the ŒTool Command Languageč folder "
132
        "within the Extensions folder."
133
};
134
 
135
/*
136
 * The mechanisim below loads Tcl source into the resource fork of the
137
 * application.  The example below creates a TEXT resource named
138
 * "Init" from the file "init.tcl".  This allows applications to use
139
 * Tcl to define the behavior of the application without having to
140
 * require some predetermined file structure - all needed Tcl "files"
141
 * are located within the application.  To source a file for the
142
 * resource fork the source command has been modified to support
143
 * sourcing from resources.  In the below case "source -rsrc {Init}"
144
 * will load the TEXT resource named "Init".
145
 */
146
 
147
#include "itclMacTclCode.r"
148
 
149
data 'TEXT' (ITCL_LIBRARY_RESOURCES+1,"pkgIndex",purgeable, preload) {
150
        "# Tcl package index file, version 1.0\n"
151
        "package ifneeded Itcl 3.0 [list load [file join $dir itcl30[info sharedlibextension]] Itcl]\n"
152
};
153
 
154
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.