Skip to content

Commit

Permalink
Add MacTCP to install disk
Browse files Browse the repository at this point in the history
  • Loading branch information
rhalkyard committed Mar 4, 2024
1 parent 7639d58 commit e971a35
Show file tree
Hide file tree
Showing 9 changed files with 229 additions and 9 deletions.
8 changes: 6 additions & 2 deletions installer/Build.mpw
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# MPW script to build our Installer script.
Set TYPECREATOR "-t bbkr -c bbkr"
Set REZFLAGS "{TYPECREATOR} -I '{RIncludes}' -d currentDate=`Date -n`"
Set LINKFLAGS "{TYPECREATOR}"

Set REZFLAGS "-t bbkr -c bbkr -I '{RIncludes}' -d currentDate=`Date -n`"
#C {CFLAGS} -o checkSE.o checkSE.c
#Link {LINKFLAGS} -rt infn=13000 -o 'Installer Script' checkSE.o

# Compile our script resources. For some reason, Retro68's Rez does not like the
# InstallerTypes.r include file, so we have to do this bit in MPW.
Rez {REZFLAGS} -o 'Installer Script' filespecs.r
Rez {REZFLAGS} -a -o 'Installer Script' filespecs.r
Rez {REZFLAGS} -a -o 'Installer Script' atoms.r
Rez {REZFLAGS} -a -o 'Installer Script' packages.r
Rez {REZFLAGS} -a -o 'Installer Script' comments.r
Expand Down
17 changes: 17 additions & 0 deletions installer/atoms.r
Original file line number Diff line number Diff line change
Expand Up @@ -1254,3 +1254,20 @@ resource 'inra' (raSystem_DRVR69_ENET0) {
".ENET0"
}
};

resource 'infa' (faMacTCP) {
format0 {
deleteWhenRemoving,
deleteWhenInstalling,
copy,
leaveAloneIfNewer,
updateExisting,
copyIfNewOrUpdate,
rsrcFork,
dataFork,
fsTgtMacTCP,
fsMacTCP,
0,
""
}
};
7 changes: 5 additions & 2 deletions installer/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ BOOT_IMAGE="images/buildenv.dsk.gz"
# Must contain:
# - Installer version 3.4 application
# - Network Software Installer 1.4.4 files under 'AppleTalk Files'
# - MacTCP control panel under 'SEthernet Files'
TEMPLATE_IMAGE="images/template.dsk.gz"

while getopts "dhm:s:t:" opt; do
Expand Down Expand Up @@ -120,6 +121,7 @@ SOURCE_FILES=(
"misc.r"
"packages.r"
"rules.r"
"checkSE.c"
"Build.mpw"
"$BUILDDIR/software/shared/version/include/version.h")

Expand All @@ -130,7 +132,8 @@ SOURCE_FILES=(
# renaming.
declare -A BINARY_FILES=(
["$BUILDDIR/software/driver/SEthernet.bin"]=':SEthernet Files:SEthernet Resources'
["$BUILDDIR/software/driver/SEthernet30.bin"]=':SEthernet Files:SEthernet/30')
["$BUILDDIR/software/driver/SEthernet30.bin"]=':SEthernet Files:SEthernet/30'
["$BUILDDIR/software/toosl/programROM/programROM.bin"]=':ProgramROM')

hmount buildenv.dsk >/dev/null

Expand Down Expand Up @@ -159,7 +162,7 @@ humount buildenv.dsk

# Copy our built artifacts into the installer disk
hmount "${OUTPUTIMAGE}" >/dev/null
hmkdir 'SEthernet Files'
# hmkdir 'SEthernet Files'
for f in ${!BINARY_FILES[@]}; do
hcopy -m "$f" "${BINARY_FILES[$f]}"
done
Expand Down
13 changes: 13 additions & 0 deletions installer/comments.r
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ resource 'icmt' (cmSEthernet) {
" version 58.1.3 as well."
};

resource 'icmt' (cmMacTCP) {
2977967700,
210,
13000,
"This installs MacTCP (version 2.1)."
};

resource 'ICON' (9000) {
$"0000 0000 07FF FFE0 0800 0010 0800 0010 08FF FF10 0900 0090 0955 5090 0900 0090"
Expand Down Expand Up @@ -77,3 +83,10 @@ resource 'ICON' (9463) {
$"8000 4441 8003 C781 8001 0101 8000 8201 8000 4401 8000 2801 8000 1001 FFFF FFFF"
};
*/

resource 'ICON' (13000) {
$"00F8 4000 0306 6000 06FF D000 0D80 0800 0AFF D000 1541 6000 1288 C000 1105 4000"
$"120A C000 3545 4000 5FFA 8000 800D 8360 5FF9 0490 3346 0248 10DB FF24 0040 0012"
$"0056 E009 0050 0012 0051 BF24 0050 0248 0050 0490 0051 B360 0052 4800 0054 9000"
$"00E9 3FF6 0092 0000 00A4 01D8 00D2 0000 00A9 3F60 BF24 9000 0052 4800 BF8D B0",
};
27 changes: 27 additions & 0 deletions installer/filespecs.r
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,30 @@ resource 'infs' (fsTgtSEthernet30Old) {
TypeCrMustMatch,
"special-extn:SEthernet30"
};

resource 'infs' (fsMacTCP) {
'cdev',
'ztcp',
0,
noSearchForFile,
TypeCrMustMatch,
"SEthernet Installer:SEthernet Files:MacTCP"
};

resource 'infs' (fsTgtMacTCP) {
'cdev',
'ztcp',
0,
noSearchForFile,
TypeCrMustMatch,
"special-ctrl:MacTCP"
};

resource 'infs' (fsTgtTCPIP) {
'cdev',
'????',
0,
noSearchForFile,
TypeCrNeedNotMatch,
"special-ctrl:TCP/IP"
};
24 changes: 21 additions & 3 deletions installer/identifiers.r
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define fsEtherTalkPhase2 9113
#define fsSEthernetResources 13000
#define fsSEthernet30 13002
#define fsMacTCP 13010

/* Target filespecs */
#define fsTgtSystem 9001
Expand All @@ -26,6 +27,8 @@
#define fsTgtEtherTalkPrepExtension 9201
#define fsTgtSEthernet30 13003
#define fsTgtSEthernet30Old 13004
#define fsTgtMacTCP 13011
#define fsTgtTCPIP 13012

/* File Atoms */
#define faAppleTalk 9002
Expand All @@ -44,6 +47,7 @@
#define faDeleteEtherTalk21Extension 9120
#define faSEthernet30 13002
#define faDeleteOldSEthernet30 13004
#define faMacTCP 13010

/* Action Atoms */
#define aaCheckSystem6 9001
Expand Down Expand Up @@ -109,6 +113,7 @@
#define pkEtherTalkNB 9202
#define pkENETDriverUpdate 9519
#define pkEtherTalkNBCustom 14000
#define pkMacTCP 13000
#define pkSEthernet30 13001
#define pkSEthernet30Custom 13000
#define pkSEthernet 13002
Expand All @@ -120,6 +125,7 @@
#define cmEtherTalkNB 14000
#define cmSEthernet30 13000
#define cmSEthernet 13001
#define cmMacTCP 13010

/* Rules */
#define rlInstallENETDriver 9504
Expand All @@ -141,8 +147,6 @@
#define rlInstallAppleTalk6 12003
#define rlInstallAppleTalk7 12004
#define rlInstallNetworkControlPanel 12008
#define rlSEthernet30 13001
#define rlSEthernet30Description 13002
#define rlCCRD1_2 9521
#define rlCCRD1_0 9522
#define rlCCRD1_1 9523
Expand All @@ -156,6 +160,17 @@
#define rlHasNetworkControl 9535
#define rlUpdateNetworkControl 9537

#define rlSEthernet30 13001
#define rlSEthernet30Description 13002

#define rlSEthernet 13003
#define rlSEthernetDescription 13004

#define rlAlreadyHasMacTCP 13010
#define rlMacTCP 13011
#define rlMacTCPDescription 13012
#define rlOpenTransport 13013

/* Assertions */
#define asInstallAppleTalkSystem6 9511
#define asInstallAppleTalkSystem7 9512
Expand All @@ -165,8 +180,11 @@
#define asSystem6_0_4 9542
#define asSystem7 9543
#define asEtherTalkNB 9550
#define asSEthernet30 13001
#define asInstallAppleTalk 9503
#define asInstallEtherTalk 9507
#define asInstallingNetworkControl 9510
#define asHasNetworkControl 9535

#define asSEthernet30 13001
#define asSEthernet 13003
#define asMacTCP 13010
Binary file modified installer/images/template.dsk.gz
Binary file not shown.
15 changes: 15 additions & 0 deletions installer/packages.r
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,21 @@ resource 'inpk' (pkEnabler201Patch) {
}
};

resource 'inpk' (pkMacTCP) {
format0 {
showsOnCustom,
removable,
forceRestart,
cmMacTCP,
0,
"MacTCP",
{
'infa', faMacTCP
}
}
};


resource 'inpk' (pkDivider) {
format0 {
showsOnCustom,
Expand Down
127 changes: 125 additions & 2 deletions installer/rules.r
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ resource 'inrl' (rlSEthernet30) {
}
};

resource 'inrl' (13002) {
resource 'inrl' (rlSEthernet30Description) {
format0 {
{
checkAllAssertions {
Expand All @@ -696,6 +696,120 @@ resource 'inrl' (13002) {
}
};

/* Detection rule for SEthernet */
resource 'inrl' (rlSEthernet) {
format0 {
{
checkAnyAssertion {
{
asSystem6_0_4,
asSystem7
}
},
/*
checkUserFunction {
'infn',
13000,
0x800000
},
*/
addAssertion {
{
asInstallAppleTalk,
asSEthernet,
asInstallENETDriver
}
},
addAssertion {
{
asInstallNetworkControl
}
},
addPackages {
{
pkSEthernet
}
}
}
}
};

resource 'inrl' (rlSEthernetDescription) {
format0 {
{
checkAllAssertions {
{
asSEthernet
}
},
addUserDescription {
"\n• EtherTalk for SEthernet Card"
}
}
}
};

/* Check for presence of Open Transport TCP/IP control panel */
resource 'inrl' (rlOpenTransport) {
format0 {
{
checkFileRsrcForkExists {
fsTgtTCPIP
}
}
}
};

/* Check for already-existing MacTCP control panel */
resource 'inrl' (rlAlreadyHasMacTCP) {
format0 {
{
checkFileRsrcForkExists {
fsTgtMacTCP
}
}
}
};

/* Install MacTCP */
resource 'inrl' (rlMacTCP) {
format0 {
{
checkAnyAssertion {
{
asSystem6_0_4,
asSystem7
}
},
addAssertion {
{
asMacTCP
}
},
addPackages {
{
pkMacTCP
}
}
}
}
};

resource 'inrl' (rlMacTCPDescription) {
format0 {
{
checkAllAssertions {
{
asMacTCP
}
},
addUserDescription {
"\n• MacTCP"
}
}
}
};

/* Main rule framework that drives processing of rules. Rules are evaluated in
sequence - 'pickFirst' clauses are only evaluated until a rule 'fires',
'pickAll' clauses cause all rules within to be evaluated. */
Expand Down Expand Up @@ -723,10 +837,17 @@ resource 'infr' (0) {
rlEtherTalkNB, /* Detect and add packages for EtherTalk NB */
#endif
rlSEthernet30, /* Detect and add packages for SEthernet/30 */
rlSEthernet, /* Detect and add packages for SEthernet */
rlInstallENETDriver /* Detect existing .ENET driver and install
update if needed */
},
pickFirst,
{
rlOpenTransport, /* Don't install MacTCP if OT TCP/IP control panel present */
rlAlreadyHasMacTCP, /* Don't mess with MacTCP if it's already present */
rlMacTCP /* Otherwise, install MacTCP */
},
pickFirst,
{
rlCCRD1_2, /* Call CCRD 1 with RefCon=2 if .ENET driver is
being installed */
Expand Down Expand Up @@ -772,7 +893,9 @@ resource 'infr' (0) {
#endif
rlEtherTalkUpdateDescription,
rlNetworkControlPanelDescription,
rlSEthernet30Description
rlMacTCPDescription,
rlSEthernet30Description,
rlSEthernetDescription
},
pickAll,
{ /* Install requested support packages */
Expand Down

0 comments on commit e971a35

Please sign in to comment.