[comp.sys.mac.programmer] Copying resources from within MPW shell

wb1j+@andrew.cmu.edu (William M. Bumgarner) (04/10/89)

I have a set of freshly compiled/linked XFCN's in independent resource files.
I would like to automatically consilidate them into one file...

How?

I have tried: rez -a file.out < resource.1 resource.2 ...

But rez won't read the resources in the files...

There is no way (that I have found) to link independent resources of the same
type into a resource file.
b.bum
wb1j+@andrew.cmu.edu

Yes, I have just moved from LSC to MPW v3.0 and am having some problems
adjusting to the new environment.

han@Apple.COM (Byron Han, wyl E. coyote ) (04/10/89)

In article <wYDyu=y00WBVM8oJJz@andrew.cmu.edu> wb1j+@andrew.cmu.edu (William M. Bumgarner) writes:
>I have a set of freshly compiled/linked XFCN's in independent resource files.
>I would like to automatically consilidate them into one file...
>
>I have tried: rez -a file.out < resource.1 resource.2 ...
>
In your makefile...

targetfile  FF   Makefile  resource.1 
    echo 'INCLUDE "resource.1";' | Rez -append -o targetfile

where F is option F.  I have noticed that Rez sometimes chokes when you
specify -append and the file does not already exist so I use...

targetfile  FF   Makefile  resource.1 
    if "`exists -q -f "targetfile"`" == "targetfile"
        echo 'INCLUDE "resource.1";' | Rez -append -o targetfile
    else
        echo 'INCLUDE "resource.1";' | Rez -o targetfile
    end
+-----------------------------------------------------------------------------+
| Disclaimer: Apple has no connection with my postings.                       |
+-----------------------------------------------------------------------------+ 
Byron Han, Communications Architect      Cereal, anyone?  :-)  A1!
Apple Computer, Inc.                     -------------------------------------
20525 Mariani Ave, MS27Y                 Internet: han@apple.COM
Cupertino, CA 95014                      UUCP:{sun,voder,nsc,decwrl}!apple!han
--------------------------------------   GENIE: BYRONHAN
ATTnet: 408-974-6450   Applelink: HAN1   CompuServe: 72167,1664
------------------------------------------------------------------------------

tim@hoptoad.uucp (Tim Maroney) (04/11/89)

In article <wYDyu=y00WBVM8oJJz@andrew.cmu.edu> wb1j+@andrew.cmu.edu (William
M. Bumgarner) writes:
>I have a set of freshly compiled/linked XFCN's in independent resource files.
>I would like to automatically consilidate them into one file...
>
>How?
>
>I have tried: rez -a file.out < resource.1 resource.2 ...
>
>But rez won't read the resources in the files...
>
>There is no way (that I have found) to link independent resources of the same
>type into a resource file.

You just write a script for rez to use.  If your script says:

include "resource.1";
include "resource.2";

and is named "getxcmds.rez", then the command line:

rez -o file.out getxcmds.rez

will do what you want.
-- 
Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim
"Satanic is merely the name they give to the behavior of those who would
 disrupt the orderly way in which men want to live."
    -- Gabrielle, THE VAMPIRE LESTAT, Anne Rice

austing@Apple.COM (Glenn L. Austin) (04/12/89)

In article <wYDyu=y00WBVM8oJJz@andrew.cmu.edu> wb1j+@andrew.cmu.edu (William M. Bumgarner) writes:
>I have a set of freshly compiled/linked XFCN's in independent resource files.
>I would like to automatically consilidate them into one file...
>
>How?
>
>I have tried: rez -a file.out < resource.1 resource.2 ...

Try:
  echo "INCLUDE resource.1;" | rez -a file.out


-----------------------------------------------------------------------------
| Glenn L. Austin             | The nice thing about standards is that      | 
| Apple Computer, Inc.        | there are so many of them to choose from.   | 
| Internet: austing@apple.com |       -Andrew S. Tanenbaum                  |
-----------------------------------------------------------------------------
| All opinions stated above are mine -- who else would want them?           |
-----------------------------------------------------------------------------