⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wrc.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
📖 第 1 页 / 共 2 页
字号:
.chap The &wrcname
.*
.if &e'&dohelp eq 0 .do begin
.section Introduction
.do end
.*
.np
The &wrcname (&wrccmdup) performs two functions. It converts human
readable resource script files (usually with the extension ".RC") into
machine readable resource files (usually with the extension ".RES").
We call this process pass one. The &wrcname then combines this ".RES"
file with an existing executable file or dynamic link library. We call
this process pass two. Pass two may also be run without a ".RES" file
to set flags or to produce a fastload section.
.np
The &wrcname can process Win16, Win32 and OS/2 resources.
.np
The &wrcname command line syntax is the following.
.ix '&wrccmdup' 'command line format'
.ix 'command line format' '&wrccmdup'
.ix '&wrcname' 'command line format'
.mbigbox
&wrccmdup {options} input-filename {options} [output-filename] {options}
.embigbox
.np
The square brackets [ ] denote items which are optional.
.np
.begpoint $break
.point &wrccmdup
is the name of the &wrcname..
.point input-filename
The filename specification of the resource file to compile.
.np
If no extension is specified for input-filename, then the extension
"rc" is assumed. If the period (.) is specified but not the extension,
the file is assumed to have no file extension.
.point output-filename
The filename specification for the output of the compilation.
.np
The meaning of this filename and its default extension is dependent on
the actions being performed.
See the section entitled :HDREF refid='wrcinfo'. for information on
this.
.point options
A list of valid options, each preceded by a slash (/) or a dash (&minus.).
.np
Options may be specified in any order.
.begpoint $compact $setptnt 11
:DTHD.Options:
:DDHD.Description:
.point &sw.?
print this help summary
.point &sw.q
.ix 'resource compiler options' 'q'
operate quietly
.point &sw.30
.ix 'resource compiler options' '30'
mark file as requiring Windows 3.0
.point &sw.31
.ix 'resource compiler options' '31'
mark file as requiring Windows 3.1 (default)
.point &sw.dNAME=value
.ix 'resource compiler options' 'd'
behave as if
.mono #define NAME value
was at top of file
.point &sw.ad
.ix 'resource compiler options' 'ad'
generate auto dependency information for use by the &makname utility
.point &sw.bt=<target>
.ix 'resource compiler options' 'bt'
build target is one of the following:
.begpoint $compact
.point windows
build a Win16 resource file (default for the DOS-hosted resource
compiler)
.point nt
build a Win32 resource file (default for the Win32-hosted resource
compiler)
.point os2
build an OS/2 resource file (default for the OS/2-hosted resource
compiler)
.endpoint
.point &sw.c=name
set the code page conversion file
.point &sw.e
for a DLL, global memory above EMS line
.point &sw.fe=name
set the output EXE file to name
.point &sw.fo=name
set the output RES file to name
.point &sw.fr=name
specify an additional input RES file.
.point &sw.i=path
look in path for include files
.point &sw.k
don't sort segments (same as /s0)
.point &sw.l
program uses LIM 3.2 EMS directly
.point &sw.m
each instance of program has its own EMS bank
.point &sw.p
private DLL
.point &sw.r
only build the RES file
.point &sw.s{0,1,2}
segment and resource sorting method:
.begpoint $compact
.point 0:
no sorting, leave segments in the linker order
.point 1:
move preload segments to front and mark for fast load if possible
.point 2:
(default) move preload, data, and non-discardable segments to front
and mark for fast load if possible
.endpoint
.point &sw.t
protected mode only
.point &sw.v
verbose: print tokens as they are scanned
.point &sw.v1
verbose: print grammar rules as they are reduced
.point &sw.v2
verbose: print both tokens and grammar rules
.point &sw.x
ignore the INCLUDE environment variable
.point &sw.zk{0,1,2}
double-byte character support:
.begpoint $compact
.point 0:
(default) Kanji
.point 1:
Chinese/Taiwanese (for Windows only)
.point 2:
Korean (for Windows only)
.endpoint
.point &sw.zm
output Microsoft/IBM format
.fi &sysper.RES
files
.point &sw.zn
don't preprocess the file
.endpoint
.endpoint
.*
.section Resource Definition Files
.*
.ix '&wrcname' 'resource definition files'
.np
A resource definition file (".RC" file) lists all resources that your
application will use.
You should refer to your Windows 3.x, Win32 or OS/2 programmer's
documentation for information on the script language used in resource
definition files.
.*
.beglevel
.*
.section Sample .RC file
.*
.np
The following example is the resource script file from an application
called Life:
.tinyexam begin
#include "windows.h"
#include "life.h"

ABOUTBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 7, 15,
147, 87
    CAPTION "About Life"
    STYLE WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_SYSMENU |
                DS_MODALFRAME | WS_POPUP
    BEGIN
        CONTROL "&company Life Program for Windows", -1, "static",
                SS_CENTER | WS_GROUP | WS_CHILD, 0, 5, 144, 8
        CONTROL "Version 1.0", -1, "static", SS_CENTER | WS_GROUP
                | WS_CHILD, 0, 14, 144, 8
        CONTROL "OK", 1, "button", BS_DEFPUSHBUTTON | WS_GROUP
                | WS_TABSTOP | WS_CHILD, 55, 64, 32, 14
        CONTROL "LifeIcon", -1, "static", SS_ICON | WS_CHILD,
                58, 28, 27, 22
    END

.tinyexam break
CellBitMap BITMAP cell.bmp
MenuBitMap BITMAP menu.bmp

LifeIcon ICON life.ico

LifeMenu MENU
    BEGIN
        POPUP "&File"
            BEGIN
                MENUITEM "&Save Selected Region ...", MENU_SAVE
                MENUITEM "&Load New Pattern ...", MENU_LOAD
                MENUITEM SEPARATOR
                MENUITEM "&About Life ...", MENU_ABOUT
            END
        POPUP "&Boundary"
            BEGIN
                MENUITEM "&Wrap Around", MENU_WRAP_AROUND
                MENUITEM "&Bounded Edges", MENU_BOUNDED_EDGES
            END
    END
.tinyexam end
.np
The two
.bd #include
statements for
.fi &sysper.h
files are used to include definitions necessary to compile the
resource file.
The
.fi windows.h
header file contains general definitions for Windows, and the
.fi life.h
header file contains definitions specific to the LIFE application.
.np
The
.bd DIALOG
statement defines the "ABOUT" dialog box used by the LIFE application.
.np
The two
.bd BITMAP
statements define a pair of bitmap resources found in the files
.fi cell.bmp
and
.fi menu.bmp.
The bitmaps are identified by the names
.us CellBitMap
and
.us MenuBitMap
respectively.
.np
The
.bd ICON
statement defines an icon resource found in the file
.fi life.ico.
The icon is identified by the name
.us LifeIcon.
.np
The
.bd MENU
statement defines the various menu items that are in the menu, and
what identifiers are sent to the application when the menu item is
selected.
.*
.section Differences from IBM Resource Compiler
.*
.np
&wrcname is largely compatible with IBM's OS/2 Resource Compiler, but
there are some differences.
.*
.begnote
.*
.note Octal constants
&wrcname recogizes octal constants such as 007, 056 etc. Hence values
such as 008 are considered to be an error. This is consistent with IBM's RC
version 5 and also consistent with the C/C++ language. In resource files
that need to be portable between RC versions, do not use octal constants
and strip all leading zeros.
.*
.note Expression parsing
There are differences in parsing statements such as
.tinyexam begin
#define IDR_ACCEL   1
ICON    IDR_ACCEL  -1,  8, 40,   0,  0
.tinyexam end
Older versions of IBM RC consider 'IDR_ACCEL' and '-1' to be separate tokens
while &wrcname considers them to be a single arithmetic expression. This is
consistent with IBM's RC version 5. The correct and unambiguous syntax is as
follows:
.tinyexam begin
ICON    IDR_ACCEL, -1,  8, 40,   0,  0
.tinyexam end
.*
.note Binary resource files
Using the -zm switch, &wrcname produces resource files compatible with those
that IBM RC produces, however, the files are not always identical. In
particular the ordering of dialog data within binary resource files is
not always the same between &wrcname and IBM RC. This has no effect on the
semantics of such resource files.
.endnote
.*
.endlevel
.*
.section Resource Compiler Options
.*
.np
.ix '&wrccmdup options'
.ix '&wrcname' 'options'
.begpoint $break
:DTHD.Options:
:DDHD.Description:
.*
.point &sw.?
Displays a summary of &wrcname command line options.
.*
.point &sw.q
.ix 'resource compiler options' 'q'
Causes the &wrcname to operate quietly.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -