mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 01:48:00 +00:00
Finally add support for building Mac resource forks. This adds a new kind
of compiled resource file, .rsrc, which is built from .r, and adds mechanisms to the MPW makefile generator to handle this. [originally from svn r2385]
This commit is contained in:
parent
6ca089d035
commit
672404dc4e
3
Recipe
3
Recipe
@ -142,4 +142,5 @@ pterm : [X] pterm terminal wcwidth uxucs uxmisc tree234 misc ldisc ldiscucs
|
|||||||
plink : [U] uxplink uxcons NONSSH UXSSH be_all logging UXMISC
|
plink : [U] uxplink uxcons NONSSH UXSSH be_all logging UXMISC
|
||||||
|
|
||||||
PuTTY : [M] terminal wcwidth tree234 misc ldisc ldiscucs
|
PuTTY : [M] terminal wcwidth tree234 misc ldisc ldiscucs
|
||||||
+ logging settings be_none mac macstore macterm macucs testback
|
+ logging settings be_none mac macstore macterm macucs mac_res.rsrc
|
||||||
|
+ testback
|
||||||
|
37
mkfiles.pl
37
mkfiles.pl
@ -90,12 +90,17 @@ foreach $i (@prognames) {
|
|||||||
foreach $j (@list) {
|
foreach $j (@list) {
|
||||||
# Dependencies for "x" start with "x.c".
|
# Dependencies for "x" start with "x.c".
|
||||||
# Dependencies for "x.res" start with "x.rc".
|
# Dependencies for "x.res" start with "x.rc".
|
||||||
|
# Dependencies for "x.rsrc" start with "x.r".
|
||||||
# Both types of file are pushed on the list of files to scan.
|
# Both types of file are pushed on the list of files to scan.
|
||||||
# Libraries (.lib) don't have dependencies at all.
|
# Libraries (.lib) don't have dependencies at all.
|
||||||
if ($j =~ /^(.*)\.res$/) {
|
if ($j =~ /^(.*)\.res$/) {
|
||||||
$file = "$1.rc";
|
$file = "$1.rc";
|
||||||
$depends{$j} = [$file];
|
$depends{$j} = [$file];
|
||||||
push @scanlist, $file;
|
push @scanlist, $file;
|
||||||
|
} elsif ($j =~ /^(.*)\.rsrc$/) {
|
||||||
|
$file = "$1.r";
|
||||||
|
$depends{$j} = [$file];
|
||||||
|
push @scanlist, $file;
|
||||||
} elsif ($j =~ /\.lib$/) {
|
} elsif ($j =~ /\.lib$/) {
|
||||||
# libraries don't have dependencies
|
# libraries don't have dependencies
|
||||||
} else {
|
} else {
|
||||||
@ -183,7 +188,7 @@ sub objects {
|
|||||||
@ret = ();
|
@ret = ();
|
||||||
foreach $i (@{$programs{$prog}}) {
|
foreach $i (@{$programs{$prog}}) {
|
||||||
$x = "";
|
$x = "";
|
||||||
if ($i =~ /^(.*)\.res/) {
|
if ($i =~ /^(.*)\.(res|rsrc)/) {
|
||||||
$y = $1;
|
$y = $1;
|
||||||
($x = $rtmpl) =~ s/X/$y/;
|
($x = $rtmpl) =~ s/X/$y/;
|
||||||
} elsif ($i =~ /^(.*)\.lib/) {
|
} elsif ($i =~ /^(.*)\.lib/) {
|
||||||
@ -218,7 +223,7 @@ sub deps {
|
|||||||
@ret = ();
|
@ret = ();
|
||||||
$depchar ||= ':';
|
$depchar ||= ':';
|
||||||
foreach $i (sort keys %depends) {
|
foreach $i (sort keys %depends) {
|
||||||
if ($i =~ /^(.*)\.res/) {
|
if ($i =~ /^(.*)\.(res|rsrc)/) {
|
||||||
next if !defined $rtmpl;
|
next if !defined $rtmpl;
|
||||||
$y = $1;
|
$y = $1;
|
||||||
($x = $rtmpl) =~ s/X/$y/;
|
($x = $rtmpl) =~ s/X/$y/;
|
||||||
@ -634,35 +639,49 @@ foreach $p (&prognames("M")) {
|
|||||||
print &splitline("$prog \xc4 $prog.68k $prog.cfm68k $prog.ppc",
|
print &splitline("$prog \xc4 $prog.68k $prog.cfm68k $prog.ppc",
|
||||||
undef, "\xb6"), "\n\n";
|
undef, "\xb6"), "\n\n";
|
||||||
|
|
||||||
$objstr = &objects($p, "X.68k.o", undef, undef);
|
$rsrc = &objects($p, "", "X.rsrc", undef);
|
||||||
print &splitline("$prog.68k \xc4 $objstr", undef, "\xb6"), "\n";
|
|
||||||
|
$objstr = &objects($p, "X.68k.o", "", undef);
|
||||||
|
print &splitline("$prog.68k \xc4 $objstr $rsrc", undef, "\xb6"), "\n";
|
||||||
|
print &splitline("\tDuplicate -y $rsrc {Targ}", 69, "\xb6"), "\n";
|
||||||
print &splitline("\tILink -o {Targ} {LinkOptions_68K} " .
|
print &splitline("\tILink -o {Targ} {LinkOptions_68K} " .
|
||||||
$objstr . " {Libs_68K}", 69, "\xb6"), "\n";
|
$objstr . " {Libs_68K}", 69, "\xb6"), "\n";
|
||||||
print &splitline("\tSetFile -a BM {Targ}", 69, "\xb6"), "\n\n";
|
print &splitline("\tSetFile -a BM {Targ}", 69, "\xb6"), "\n\n";
|
||||||
|
|
||||||
$objstr = &objects($p, "X.cfm68k.o", undef, undef);
|
$objstr = &objects($p, "X.cfm68k.o", "", undef);
|
||||||
print &splitline("$prog.cfm68k \xc4 $objstr", undef, "\xb6"), "\n";
|
print &splitline("$prog.cfm68k \xc4 $objstr", undef, "\xb6"), "\n";
|
||||||
|
print &splitline("\tDuplicate -y $rsrc {Targ}", 69, "\xb6"), "\n";
|
||||||
print &splitline("\tILink -o {Targ} {LinkOptions_CFM68K} " .
|
print &splitline("\tILink -o {Targ} {LinkOptions_CFM68K} " .
|
||||||
$objstr . " {Libs_CFM68K}", 69, "\xb6"), "\n";
|
$objstr . " {Libs_CFM68K}", 69, "\xb6"), "\n";
|
||||||
print &splitline("\tSetFile -a BM {Targ}", 69, "\xb6"), "\n\n";
|
print &splitline("\tSetFile -a BM {Targ}", 69, "\xb6"), "\n\n";
|
||||||
|
|
||||||
$objstr = &objects($p, "X.ppc.o", undef, undef);
|
$objstr = &objects($p, "X.ppc.o", "", undef);
|
||||||
print &splitline("$prog.ppc \xc4 $objstr", undef, "\xb6"), "\n";
|
print &splitline("$prog.ppc \xc4 $objstr", undef, "\xb6"), "\n";
|
||||||
|
print &splitline("\tDuplicate -y $rsrc {Targ}", 69, "\xb6"), "\n";
|
||||||
print &splitline("\tPPCLink -o {Targ} {LinkOptions_PPC} " .
|
print &splitline("\tPPCLink -o {Targ} {LinkOptions_PPC} " .
|
||||||
$objstr . " {Libs_PPC}", 69, "\xb6"), "\n";
|
$objstr . " {Libs_PPC}", 69, "\xb6"), "\n";
|
||||||
print &splitline("\tSetFile -a BM {Targ}", 69, "\xb6"), "\n\n";
|
print &splitline("\tSetFile -a BM {Targ}", 69, "\xb6"), "\n\n";
|
||||||
}
|
}
|
||||||
foreach $d (&deps("X.68k.o", undef, "::", ":")) {
|
foreach $d (&deps("", "X.rsrc", "::", ":")) {
|
||||||
|
next unless $d->{obj};
|
||||||
|
print &splitline(sprintf("%s \xc4 %s", $d->{obj}, join " ", @{$d->{deps}}),
|
||||||
|
undef, "\xb6"), "\n";
|
||||||
|
print "\tRez ", $d->{deps}->[0], " -o {Targ} {ROptions}\n\n";
|
||||||
|
}
|
||||||
|
foreach $d (&deps("X.68k.o", "", "::", ":")) {
|
||||||
|
next unless $d->{obj};
|
||||||
print &splitline(sprintf("%s \xc4 %s", $d->{obj}, join " ", @{$d->{deps}}),
|
print &splitline(sprintf("%s \xc4 %s", $d->{obj}, join " ", @{$d->{deps}}),
|
||||||
undef, "\xb6"), "\n";
|
undef, "\xb6"), "\n";
|
||||||
print "\t{C} ", $d->{deps}->[0], " -o {Targ} {COptions_68K}\n\n";
|
print "\t{C} ", $d->{deps}->[0], " -o {Targ} {COptions_68K}\n\n";
|
||||||
}
|
}
|
||||||
foreach $d (&deps("X.cfm68k.o", undef, "::", ":")) {
|
foreach $d (&deps("X.cfm68k.o", "", "::", ":")) {
|
||||||
|
next unless $d->{obj};
|
||||||
print &splitline(sprintf("%s \xc4 %s", $d->{obj}, join " ", @{$d->{deps}}),
|
print &splitline(sprintf("%s \xc4 %s", $d->{obj}, join " ", @{$d->{deps}}),
|
||||||
undef, "\xb6"), "\n";
|
undef, "\xb6"), "\n";
|
||||||
print "\t{C} ", $d->{deps}->[0], " -o {Targ} {COptions_CFM68K}\n\n";
|
print "\t{C} ", $d->{deps}->[0], " -o {Targ} {COptions_CFM68K}\n\n";
|
||||||
}
|
}
|
||||||
foreach $d (&deps("X.ppc.o", undef, "::", ":")) {
|
foreach $d (&deps("X.ppc.o", "", "::", ":")) {
|
||||||
|
next unless $d->{obj};
|
||||||
print &splitline(sprintf("%s \xc4 %s", $d->{obj}, join " ", @{$d->{deps}}),
|
print &splitline(sprintf("%s \xc4 %s", $d->{obj}, join " ", @{$d->{deps}}),
|
||||||
undef, "\xb6"), "\n";
|
undef, "\xb6"), "\n";
|
||||||
# The odd stuff here seems to stop afpd getting confused.
|
# The odd stuff here seems to stop afpd getting confused.
|
||||||
|
Loading…
Reference in New Issue
Block a user