Announcement

Collapse
No announcement yet.

Compiling a resource script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Compiling a resource script

    Does the compiler key off a .rc extension to know that it should create .res and .pbr files? Or can I use any a resource script extension I want?

    I created a .rc file and used the normal compile button. That worked. I'm just trying to understand the process better.

    Thanks
    Gary

  • #2
    The compiler shellexecutes (or equal) "RC.EXE sourcefilename " and maybe some options.
    Code:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    D:\Software_Development\pbwin90\bin>rc /?
    
    
    Microsoft (R) Windows 32 Resource Compiler, Version 4.00 - Build 1367
    
    Usage:  rc [options] .RC input file
    Switches:
       /r    Emit .RES file (optional)
       /v    Verbose (print progress messages)
       /d    Define a symbol
       /u    Undefine a symbol
       /fo   Rename .RES file
       /l    Default language ID in hex
       /i    Add a path for INCLUDE searches
       /x    Ignore INCLUDE environment variable
       /c    Define a code page used by NLS conversion
    Flags may be either upper or lower case
    Then it shellexecutes PBRES.EXE against the *.RES file created by RC.EXE
    Code:
    D:\Software_Development\pbwin90\bin>pbres /?
    PBRES - PowerBASIC Resource Converter
    Copyright (c) 1997-2000 PowerBASIC, Inc.
    
    Usage:  PBRES filename[.res]
    
    D:\Software_Development\pbwin90\bin>
    Apprently there aren't many options for this. But PBRES command-line usage SHOULD be in the help file.

    MCM
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Michael,
      Thanks for the response. With the flash-up of the DOS window that occurs when I compiled an RC file, it was clear that the compiler was using the command line tools.

      But since there was no "Compile Resource File" menu selection, I wasn't completely sure how the compiler knew to create RES/PBR files vs just going ahead with an EXE/DLL compile attempt (which would fail).

      When I simply changed the RC extension to something else, the compiler ignored the file completely. I'll just stick with the RC extension since the compiler seems to trigger off the extension to know whether to shellexecute the command line tools.

      Regards,
      Gary

      Comment


      • #4
        You can set the extensions for "source files" and "resource files" in the IDE, but I don't know if those settings are used for "compile" or only for "open"

        IIRC older (6x, 5x?) versions of IDE you actually entered the command line on some screen, so you could run a the compile with your own options. But you can't do that anymore, your choice of options has been pre-selected for you.
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment

        Working...
        X