# Build a Bootable Windows XP disk with SP3 and all critical post-SP3 hotfixes slipstreamed in
# Copyright (c) 2003-2009, Ross Smith. All rights reserved.
# ChangeLog:
# Added jun-sep 08 releases
# Added oct 08 releases
# Added nov-jan 09 release: thanks to cavd and cubanric!
# Added feb 09-mar 09 releases
# Added apr 09 releases
# $Id$
# requires the Cygwin commands:
#
# basename bash chmod cp cut cygpath echo grep ls make md5sum mkdir mv perl pwd rm test touch tr unzip wget which
#
# To have these commands, you will need to install the following optional packages:
#
# make
# perl
# unzip
# wget
#
# optional:
# mkisofs/cdrecord
# Inspiration:
# http://www.windows-help.net/WindowsXP/winxp-sp1-bootcd.html
# See also:
# http://www.theeldergeek.com/slipstream_01.htm
# Windows drive letter for CD drive containing original Windows XP disk
CD ?=D:
# cdrecord device for the CD-R drive to burn the new disk (run 'cdrecord -scanbus' to discover)
CD_DEV ?=1,0,0
# Additional cdrecord options
CDRECORD_OPTS ?=
# Set to Y to wait until you press Enter before burning CD (CD and CD_DEV above refer to the same drive)
PAUSE ?=Y
BBIE_VER?=10
PEBUILDER_VER?=3110a
BBIE_ZIP=bbie$(BBIE_VER).zip
PEBUILDER_ZIP=pebuilder$(PEBUILDER_VER).zip
NU2_MIRRORS=\
http://69.90.47.6/mybootdisks.com/mybootdisks_com/nu2 \
ftp://dl.xs4all.nl/pub/mirror/nu2files \
http://ftp.rz.tu-bs.de/pub/mirror/www.nu2.nu/nu2files \
http://securitywonks.org/n2u/mirrorfiles \
http://nu2.turbohosting.ch \
http://download.nu2.nu/nu2files \
http://nu2.abwehr.net \
http://nu2mirror.frashii.com \
http://217.160.177.182/nu2files \
http://nu2.zone-x.com/mirrorfiles \
http://www.nu2.mostlycreativeworkshop.com/files \
ftp://ftp.planetmirror.com/pub/nu2files \
http://gd.tuwien.ac.at/pc/nu2files \
http://nu2.rediska.ru \
http://64.142.102.122/nu2/mirrorfiles \
ftp://dlsrv3.winboard.org/nu2 \
http://nu2files.osterberg.org \
http://nu2.gipsvagga.com
DD_MMM_YY=$(shell date +%d-%b-%y)
# http://www.microsoft.com/security/default.mspx
SERVICE_PACK_URL=http://download.microsoft.com/download/d/3/0/d30e32d8-418a-469d-b600-f32ce3edf42d/WindowsXP-KB936929-SP3-x86-ENU.exe
SERVICE_PACK_EXE=$(shell basename $(SERVICE_PACK_URL))
# http://support.microsoft.com/kb/873339: MS04-043: Vulnerability in HyperTerminal could allow code execution
KB873339_URL?=http://download.microsoft.com/download/8/3/e/83e7e311-f8ea-4e59-9b50-64dbfdcb0f1f/WindowsXP-KB873339-x86-ENU.exe
KB873339_EXE?=$(shell basename $(KB873339_URL))
# Jun 08:
# MS08-030 – Critical
# Vulnerability in Bluetooth Stack Could Allow Remote Code Execution (951376)
# SP2: replaces none
# SP3: replaces none
KB951376_URL?=http://download.microsoft.com/download/a/6/5/a65308a2-7ede-4219-981a-20feb38bfd0e/WindowsXP-KB951376-v2-x86-ENU.exe
KB951376_EXE?=$(shell basename $(KB951376_URL))
# MS08-031 - Critical
# Cumulative Security Update for Internet Explorer (950759)
# SP2: replaces MS08-024
# SP3: replaces none
# replaced by MS08-45
# call :download http://download.microsoft.com/download/2/2/5/2255ad65-47ba-44f1-9e88-feba8f019c55/WindowsXP-KB950759-x86-ENU.exe
# MS08-032 - Moderate
# Cumulative Security Update of ActiveX Kill Bits (950760)
# SP2: replaces MS08-023
# SP3: replaces none
KB950760_URL?=http://download.microsoft.com/download/c/6/e/c6e4b3e0-0af6-4ac8-92f7-5f7e8d471fb2/WindowsXP-KB950760-x86-ENU.exe
KB950760_EXE?=$(shell basename $(KB950760_URL))
# MS08-033 – Critical
# Vulnerabilities in DirectX Could Allow Remote Code Execution (951698)
# SP2: replaces MS07-064
# SP3: replaces none
#KB951698_URL?=http://download.microsoft.com/download/3/1/5/315c86ba-2910-47f0-9f02-b5616511536d/WindowsXP-KB951698-x86-ENU.exe
#KB951698_EXE?=$(shell basename $(KB951698_URL))
# MS08-035 – Important
# Vulnerability in Active Directory Could Allow Denial of Service (953235)
# SP2: replaces MS08-003
# SP3: replaces none
KB949269_URL?=http://download.microsoft.com/download/5/f/a/5fa7006d-023f-496f-9c85-796fb82dfd16/WindowsXP-KB949269-x86-ENU.exe
KB949269_EXE?=$(shell basename $(KB949269_URL))
# MS08-036 – Important
# Vulnerabilities in Pragmatic General Multicast (PGM) Could Allow Denial of Service (950762)
# SP2: replaces MS06-052
# SP3: replaces none
KB950762_URL?=http://download.microsoft.com/download/1/4/3/1438b520-8200-466d-9daf-4de18bd4dc0f/WindowsXP-KB950762-x86-ENU.exe
KB950762_EXE?=$(shell basename $(KB950762_URL))
# Jul 08:
# MS08-037 – Important
# Vulnerabilities in DNS Could Allow Spoofing (953230)
# SP2: replaces MS06-064, MS08-001
# SP3: replaces none
KB951748_URL?=http://download.microsoft.com/download/f/5/f/f5f31962-0215-44e6-be41-02818b4373f3/WindowsXP-KB951748-x86-ENU.exe
KB951748_EXE?=$(shell basename $(KB951748_URL))
# Aug 08:
# MS08-045 - Critical
# Cumulative Security Update for Internet Explorer (953838)
# SP2: replaces MS08-031
# SP3: replaces MS08-031
# replaced by MS08-058
# call :download http://download.microsoft.com/download/3/9/3/3933471e-a08e-4640-8980-d3d3eb5b3c34/WindowsXP-KB953838-x86-ENU.exe
# MS08-046 – Critical
# Vulnerability in Microsoft Windows Image Color Management System Could Allow Remote Code Execution (952954)
# SP2: replaces none
# SP3: replaces none
KB952954_URL?=http://download.microsoft.com/download/a/1/9/a19c9aff-bd94-4fc1-98ff-db432358f902/WindowsXP-KB952954-x86-ENU.exe
KB952954_EXE?=$(shell basename $(KB952954_URL))
# MS08-048 - Important
# Security Update for Outlook Express and Windows Mail (951066)
# SP2: replaces none
# SP3: replaces none
KB951066_URL?=http://download.microsoft.com/download/3/a/f/3afd84f3-729c-4f54-9d38-e77c5112ae0d/WindowsXP-KB951066-x86-ENU.exe
KB951066_EXE?=$(shell basename $(KB951066_URL))
# MS08-049 – Important
# Vulnerabilities in Event System Could Allow Remote Code Execution (950974)
# SP2: replaces none
# SP3: replaces none
KB950974_URL?=http://download.microsoft.com/download/5/d/d/5dd0ab05-b357-4175-bd93-894903f07579/WindowsXP-KB950974-x86-ENU.exe
KB950974_EXE?=$(shell basename $(KB950974_URL))
# MS08-050 – Important
# Vulnerability in Windows Messenger Could Allow Information Disclosure (955702)
# SP2: replaces none
# SP3: replaces none
KB946648_URL?=http://download.microsoft.com/download/4/d/8/4d84fd95-9124-461a-95eb-6b5908b6fe62/WindowsXP-KB946648-x86-ENU.exe
KB946648_EXE?=$(shell basename $(KB946648_URL))
# Sep 08:
# MS08-052 - Critical
# Vulnerabilities in GDI+ Could Allow Remote Code Execution (9545#93)
# SP2: replaces none
# SP3: replaces none
KB938464_URL?=http://download.microsoft.com/download/7/8/1/78141DC7-3B1D-42F3-9AA2-4DCA79AD739B/WindowsXP-KB938464-v2-x86-ENU.exe
KB938464_EXE?=$(shell basename $(KB938464_URL))
# MS08-053 - Critical
# Vulnerability in Windows Media Encoder 9 Could Allow Remote Code Execution (954156)
# SP2: replaces none
# SP3: replaces none
KB954156_URL?=http://download.microsoft.com/download/2/b/2/2b252ed6-39fe-423d-a74e-d48c85d24c2a/WindowsMedia9-KB954156-x86-ENU.exe
KB954156_EXE?=$(shell basename $(KB954156_URL))
# MS08-054 - Critical
# Vulnerability in Windows Media Player Could Allow Remote Code Execution (954154)
# SP2: replaces none
# SP3: replaces none
KB954154_URL?=http://download.microsoft.com/download/b/6/6/b662a844-9aa2-4b80-8713-27a6c0da16d8/WindowsMedia11-KB954154-x86-ENU.exe
KB954154_EXE?=$(shell basename $(KB954154_URL))
# Oct 08:
# MS08-058 - Critical
# Cumulative Security Update for Internet Explorer (956390)
# SP2: replaces MS08-045
# SP3: replaces MS08-045
# replaced by MS08-073
# call :download http://download.microsoft.com/download/4/c/f/4cf3fd3b-a024-494a-b285-49f5920016e8/WindowsXP-KB956390-x86-ENU.exe
# http://download.microsoft.com/download/f/5/3/f53a9daf-3d2a-4743-a8a3-7a92ba0e2638/IE7-WindowsXP-KB956390-x86-ENU.exe
# MS08-061 – Important
# Vulnerabilities in Windows Kernel Could Allow Elevation of Privilege (954211)
# SP2: replaces MS08-025
# SP3: replaces none
# KB954211_URL?=http://download.microsoft.com/download/2/5/3/25324004-a2df-4163-95f5-ae9127b0f3ad/WindowsXP-KB954211-x86-ENU.exe
# KB954211_EXE?=$(shell basename $(KB954211_URL))
# MS08-062 - Important
# Vulnerability in Windows Internet Printing Service Could Allow Remote Code Execution (953155)
# SP2: replaces none
# SP3: replaces none
KB953155_URL?=http://download.microsoft.com/download/d/7/f/d7f097e0-f290-4ff6-98ea-edaf8e78140f/WindowsXP-KB953155-x86-ENU.exe
KB953155_EXE?=$(shell basename $(KB953155_URL))
# MS08-063 – Important
# Vulnerability in SMB Could Allow Remote Code Execution (957095)
# SP2: replaces MS06-063
# SP3: replaces none
# replaced by MS09-001
# call :download http://download.microsoft.com/download/3/3/f/33f997d5-b567-4ee9-82aa-3868629a1ec5/WindowsXP-KB957095-x86-ENU.exe
# MS08-064 – Important
# Vulnerability in Virtual Address Descriptor Manipulation Could Allow Elevation of Privilege (956841)
# SP2: replaces MS07-022
# SP3: replaces none
# KB956841_URL?=http://download.microsoft.com/download/0/0/9/009cb4f8-9a59-412b-8811-f9f0b7703ee6/WindowsXP-KB956841-x86-ENU.exe
# KB956841_EXE?=$(shell basename $(KB956841_URL))
# MS08-066 – Important
# Vulnerability in the Microsoft Ancillary Function Driver Could Allow Elevation of Privilege (956803)
# SP2: replaces none
# SP3: replaces none
KB956803_URL?=http://download.microsoft.com/download/4/0/5/405222d0-5171-4ffb-a86e-7889e1161c1d/WindowsXP-KB956803-x86-ENU.exe
KB956803_EXE?=$(shell basename $(KB956803_URL))
# MS08-067 – Critical
# Vulnerability in Server Service Could Allow Remote Code Execution (958644)
# SP2: replaces MS06-040
# SP3: replaces none
KB958644_URL?=http://download.microsoft.com/download/4/f/a/4fabe08e-5358-418b-81dd-d5038730b324/WindowsXP-KB958644-x86-ENU.exe
KB958644_EXE?=$(shell basename $(KB958644_URL))
# Nov 08:
# MS08-068 | Important
# Vulnerability in SMB Could Allow Remote Code Execution (957097)
# SP2: replaces MS05-011
# SP3: replaces none
KB957097_URL?=http://download.microsoft.com/download/4/b/c/4bcfd71b-1f5a-4f9c-8c57-0b7ba2aae684/WindowsXP-KB957097-x86-ENU.exe
KB957097_EXE?=$(shell basename $(KB957097_URL))
# MS08-069 | Critical
# Vulnerabilities in Microsoft XML Core Services Could Allow Remote Code Execution (955218)
# SP2: replaces MS06-042
# SP3: replaces none
KB955069_URL?=http://download.microsoft.com/download/d/6/5/d65961a2-d09b-4560-af78-1e4f97b77359/WindowsXP-KB955069-x86-ENU.exe
KB955069_EXE?=$(shell basename $(KB955069_URL))
# these won't slipstream, but they can be run after windows is installed:
KB954430_URL?=http://download.microsoft.com/download/9/7/1/971f55c8-d512-494f-9c5e-7cc3f9b190ee/msxml4-KB954430-enu.exe
KB954430_EXE?=$(shell basename $(KB954430_URL))
KB954459_URL?=http://download.microsoft.com/download/2/7/5/2753aabc-24de-41be-a05b-d41fc76f3aad/msxml6-KB954459-enu-x86.exe
KB954459_EXE?=$(shell basename $(KB954459_URL))
# Dec 08
# MS08-071 – Critical
# Vulnerabilities in GDI Could Allow Remote Code Execution (956802)
# SP2: replaces MS08-021
# SP3: replaces none
KB956802_URL?=http://download.microsoft.com/download/0/0/D/00DBCA9D-B3CF-4F9E-A671-6CD79FC1DC4C/WindowsXP-KB956802-x86-ENU.exe
KB956802_EXE?=$(shell basename $(KB956802_URL))
# MS08-073 - Critical
# Cumulative Security Update for Internet Explorer (958215)
# SP2: replaces MS08-058
# SP3: replaces MS08-058
# cavd - 22-jan-09 - changed from ie7 to ie6 - baseline xp doesn't have ie7!
# call :download http://download.microsoft.com/download/0/2/9/0297FF58-CEFC-48DB-9CED-97796B754137/IE7-WindowsXP-KB958215-x86-ENU.exe
# KB958215_URL?=http://download.microsoft.com/download/6/D/8/6D8C124A-CFC2-43D7-A2DA-9411DA0D3CB5/WindowsXP-KB958215-x86-ENU.exe
# KB958215_EXE?=$(shell basename $(KB958215_URL))
# MS08-076 – Important
# Vulnerabilities in Windows Media Components Could Allow Remote Code Execution (959807)
# SP2: replaces none
# SP3: replaces none
# cavd - 22-jan-09
# there is now a v2 of 952069
# the dox also suggest that for baseline XP is 954600
# call :download http://download.microsoft.com/download/8/8/2/8822FCC3-55EB-4B37-B448-51FBE65DDC39/WindowsXP-WindowsMedia-KB952069-x86-ENU.exe
KB952069_URL?=http://download.microsoft.com/download/8/8/2/8822FCC3-55EB-4B37-B448-51FBE65DDC39/WindowsXP-WindowsMedia-KB952069-v2-x86-ENU.exe
KB952069_EXE?=$(shell basename $(KB952069_URL))
KB954600_URL?=http://download.microsoft.com/download/E/C/7/EC7B6956-2C13-4196-9E35-375C828ACB6C/WindowsXP-KB954600-x86-ENU.exe
KB954600_EXE?=$(shell basename $(KB954600_URL))
# MS08-078 - Critical
# Security Update for Internet Explorer (960714)
# SP2: replaces none
# SP3: replaces none
# cavd - 22-jan-09 - changed from ie7 to ie6 - baseline xp doesn't have ie7!
# call :download http://download.microsoft.com/download/6/C/3/6C3F5EB1-846B-4E59-8346-6A380A77125C/IE7-WindowsXP-KB960714-x86-ENU.exe
# KB960714_URL?=http://download.microsoft.com/download/F/2/7/F27B3516-F7FD-4B84-919F-9B8CEC4BC4A5/WindowsXP-KB960714-x86-ENU.exe
# KB960714_EXE?=$(shell basename $(KB960714_URL))
# Jan 09
# MS09-001 – Critical
# Vulnerabilities in SMB Could Allow Remote Code Execution (958687)
# SP2: replaces MS08-063
# SP3: replaces MS08-063
KB958687_URL?=http://download.microsoft.com/download/B/9/7/B9798068-1B3B-4EE7-BC2A-2371C54B0ADD/WindowsXP-KB958687-x86-ENU.exe
KB958687_EXE?=$(shell basename $(KB958687_URL))
# Feb 09
# baseline xp doesn't have ie7!
# http://download.microsoft.com/download/0/C/6/0C629D20-9FDC-4D29-B71F-BA4F2461C634/IE7-WindowsXP-KB961260-x86-ENU.exe
# Mar 09
# MS09-006 – Critical
# Vulnerabilities in Windows Kernel Could Allow Remote Code Execution (958690)
# SP2: replaces MS08-061
# SP3: replaces MS08-061
KB958690_URL?=http://download.microsoft.com/download/9/5/D/95DB5691-545D-4D50-81FF-D7D002601CE6/WindowsXP-KB958690-x86-ENU.exe
KB958690_EXE?=$(shell basename $(KB958690_URL))
# MS09-007 - Important
# Vulnerability in SChannel Could Allow Spoofing (960225)
# SP2: replaces MS07-031
# SP3: replaces none
KB960225_URL?=http://download.microsoft.com/download/8/2/3/8233E377-3D72-42C2-827E-7F7A7B7A9B19/WindowsXP-KB960225-x86-ENU.exe
KB960225_EXE?=$(shell basename $(KB960225_URL))
# Apr 09
# MS09-010 - Critical
# Vulnerabilities in WordPad and Office Text Converters Could Allow Remote Code Execution (960477)
# KB923561
# SP2: replaces none
# SP3: replaces none
KB923561_URL?=http://download.microsoft.com/download/7/0/B/70B97A4C-2D61-44F1-B8F7-EAFF9C07B172/WindowsXP-KB923561-x86-ENU.exe
KB923561_EXE?=$(shell basename $(KB923561_URL))
# MS09-013 - Critical
# Vulnerabilities in Windows HTTP Services Could Allow Remote Code Execution (960803)
# SP2: replaces none
# SP3: replaces none
KB960803_URL?=http://download.microsoft.com/download/3/C/A/3CA5C5CF-7752-4401-A5C3-42AE64C1C754/WindowsXP-KB960803-x86-ENU.exe
KB960803_EXE?=$(shell basename $(KB960803_URL))
# MS09-011 - Critical
# Vulnerability in Microsoft DirectShow Could Allow Remote Code Execution (961373)
# SP2: replaces MS08-033
# SP3: replaces MS08-033
KB961373_URL?=http://download.microsoft.com/download/3/1/4/31488E52-F4E1-43EB-9745-5D0D1F156685/WindowsXP-KB961373-x86-ENU.exe
KB961373_EXE?=$(shell basename $(KB961373_URL))
# MS09-014 - Critical
# Cumulative Security Update for Internet Explorer (963027)
# SP2: replaces MS08-073, MS08-078
# SP3: replaces MS08-073, MS08-078
KB963027_URL?=http://download.microsoft.com/download/6/8/3/683EF04C-F675-4A52-A2E4-86B01C484F22/WindowsXP-KB963027-x86-ENU.exe
KB963027_EXE?=$(shell basename $(KB963027_URL))
# MS09-012 - Important
# Vulnerabilities in Windows Could Allow Elevation of Privilege (959454)
# SP2: replaces MS07-022, MS08-002, MS08-064
# SP3: replaces MS08-064
KB952004_URL?=http://download.microsoft.com/download/1/7/8/17850352-F46F-46C9-97DF-14CB73461B16/WindowsXP-KB952004-x86-ENU.exe
KB952004_EXE?=$(shell basename $(KB952004_URL))
KB956572_URL?=http://download.microsoft.com/download/F/E/3/FE3F2F03-8128-4912-B079-7EF283013BD9/WindowsXP-KB956572-x86-ENU.exe
KB956572_EXE?=$(shell basename $(KB956572_URL))
# MS09-015 – Moderate
# Blended Threat Vulnerability in SearchPath Could Allow Elevation of Privilege (959426)
# SP2: replaces MS07-035
# SP2: replaces MS07-035
KB959426_URL?=http://download.microsoft.com/download/4/D/0/4D0E640D-5297-4F86-BB59-06350DF73AA8/WindowsXP-KB959426-x86-ENU.exe
KB959426_EXE?=$(shell basename $(KB959426_URL))
KBS=\
923561 \
938464 \
946648 \
949269 \
950760 \
950762 \
950974 \
951066 \
951376 \
951748 \
952004 \
952069 \
952954 \
953155 \
954154 \
954156 \
954600 \
955069 \
956572 \
956802 \
956803 \
957097 \
958644 \
958687 \
958690 \
959426 \
960225 \
960714 \
960803 \
961373 \
963027
# doesn't work :(
#define kbexe
#KB$(1)_EXE=$(shell basename $$(KB$(1)_URL))
#endef
#$(foreach kb,$(KBS),$(eval $(call kbexe,$(kb))))
define kbtouch
KB$(1)_TOUCH=$$(KB$(1)_EXE).touch
endef
$(foreach kb,$(KBS),$(eval $(call kbtouch,$(kb))))
define kbsetup
KB_EXES+=$$(KB$(1)_EXE)
endef
$(foreach kb,$(KBS),$(eval $(call kbsetup,$(kb))))
KB_TOUCHES=$(KB_EXES:.exe=.exe.touch)
WGET?=wget -N
CYGPATH_EXE:=$(shell which cygpath)
BUILD_DIR:=$(shell pwd)
BUILD_DIR_WIN:=$(shell $(CYGPATH_EXE) -m -s "$(BUILD_DIR)")
CD_DIR_WIN=$(BUILD_DIR_WIN)/$(CD_DIR)
LOCAL_MAK?=$(shell ls local.mak 2>/dev/null)
ifneq ('$(LOCAL_MAK)', '')
include local.mak
endif
#ifeq ('$(VOLID)', '')
# #Get the volume ID from the CD volume label itself (the CD must be in the drive)
# VOLID=$(shell cmd /c vol $(CD) | grep "Volume in" | cut -b 23-34)
#endif
ifeq ('$(VOLID)', '')
# Volume ID of new disk (11 characters max)
# 12345678901
VOLID=xpsp3
#$(error Please define the VOLID variable: VOLID=A_11CHAR_ID make)
endif
# Label to display after CD is burned
CD_LABEL=Windows XP SP3 + Hotfixes as of $(DD_MMM_YY) ($(VOLID))
CD_DIR=$(VOLID)_cd
I386=$(CD_DIR)/I386
SVCPACK_DIR=$(I386)/svcpack
BOOT_DIR=$(VOLID)_boot_image
BOOT_IMG=image1.bin
VOLID_ISO=$(VOLID).ISO
BOOT_TOUCH=$(BOOT_DIR).touch
PEBUILDER_TOUCH=$(PEBUILDER_ZIP).touch
SERVICE_PACK_TOUCH=$(SERVICE_PACK_EXE).touch
VOLID_ISO_TOUCH=$(VOLID_ISO).touch
VOLID_TOUCH=$(VOLID).touch
.PHONY: all
all: cdrecord
XP2MD5S=
$(VOLID_TOUCH):
@echo Copying $(CD) to $(CD_DIR)...
mkdir -p $(CD_DIR)
xcopy $(CD)\\ $(CD_DIR)\\ /e /r /y
touch $@
define md5sum
if [ -f md5s.txt ] ;\
then \
echo Verifying MD5 checksum for $(1).. ;\
grep -i $(1) md5s.txt | md5sum --check - || exit 1;\
fi
endef
$(SERVICE_PACK_EXE):
@if [ ! -e $(CD_DIR)/I386/sp3.cab ] ;\
then \
echo Downloading $(SERVICE_PACK_URL)... ;\
$(WGET) $(SERVICE_PACK_URL) ;\
$(call md5sum,$(SERVICE_PACK_EXE)) ;\
chmod +rx $@ ;\
fi
$(SERVICE_PACK_TOUCH): $(SERVICE_PACK_EXE)
@# Don't update if the disk already has SP3
@if [ ! -e $(CD_DIR)/I386/sp3.cab ] ;\
then \
echo Integrating $(SERVICE_PACK_EXE) into $(CD_DIR_WIN)... ;\
chmod +rx $< ;\
./$< /quiet /integrate:"$(CD_DIR_WIN)" ;\
fi
touch $@
define kbapply
$(info Preprocessing $(1)...)
$$(KB$(1)_EXE):
@echo Downloading $$(KB$(1)_URL)...
$(WGET) $$(KB$(1)_URL)
@$(call md5sum,$$(KB$(1)_EXE))
@chmod +rx $$(KB$(1)_EXE)
$$(KB$(1)_TOUCH): $$(KB$(1)_EXE) $(SERVICE_PACK_TOUCH)
@chmod +rx $$(KB$(1)_EXE)
-@if [ ! -e $(SVCPACK_DIR)/KB$(1).cat ] ; \
then \
echo Integrating $$(KB$(1)_EXE) into $(CD_DIR_WIN)... ;\
./$$(KB$(1)_EXE) /quiet /integrate:"$(CD_DIR_WIN)" ; \
fi
@#if [ ! -e $(SVCPACK_DIR)/KB$(1).cat ] ; \
@#then \
@# /bin/false ;\
@#fi
@# Note: KB885835 and KB885250 share the same file (mrxsmb.sys), so they can't be applied together.
@# This script solves this issue by ignoring KB885835's version of the file (5.1.2600.2541, xpsp_sp2_gdr.040919-1056, dated 10-27-2004, 448,128 bytes),
@# and using KB885250's version (5.1.2600.2598, xpsp_sp2_gdr.041130-1729, dated 1-18-2005, 451,584 bytes) as it is newer.
@if [ "$(1)" = "885835" ] ; \
then \
perl -pi.bak -e 's/mrxsmb\.sys/;mrxsmb\.sys: replaceed by KB885250/i' $(SVCPACK_DIR)/HFINT.dat ; \
fi
touch $$(KB$(1)_TOUCH)
.PHONY: KB$(1)
KB$(1): $$(KB$(1)_TOUCH)
endef
$(foreach kb,$(KBS),$(eval $(call kbapply,$(kb))))
$(info Preprocessing finished)
#################################
define download
@for url in "$(2)" ; \
do \
echo Downloading $$url/$(1)... ;\
$(WGET) $$url/$(1) && break ;\
done
endef
# from
$(BBIE_ZIP):
$(call download,$@,"$(NU2_MIRRORS)")
bbie.exe: $(BBIE_ZIP)
unzip -o $(BBIE_ZIP) $@
chmod +rx bbie.exe
touch $@
$(BOOT_TOUCH): bbie.exe
mkdir -p $(BOOT_DIR)
bbie.exe $(CD)
mv image*.bin $(BOOT_DIR)
touch $@
# patched mkisofs from pebuilder
$(PEBUILDER_ZIP):
$(call download,$@,"$(NU2_MIRRORS)")
mkisofs.exe: $(PEBUILDER_ZIP)
unzip -o $(PEBUILDER_ZIP) $@
chmod +rx $@
download: ${KB_TOUCHES}
$(VOLID_ISO_TOUCH): \
$(VOLID_TOUCH) \
$(SERVICE_PACK_TOUCH) \
${KB_TOUCHES} \
$(BOOT_TOUCH) \
mkisofs.exe
cd $(CD_DIR) && \
PATH="$$PATH:.." mkisofs.exe \
-iso-level 4 \
-force-uppercase \
-volid "$(VOLID)" \
-A MKISOFS \
-sysid "DOS" \
-b "$(BOOT_IMG)" \
-no-emul-boot \
-boot-load-size 4 \
-hide "$(BOOT_IMG)" \
-hide "boot.catalog" \
-o "../$(VOLID_ISO)" \
"../$(BOOT_DIR)" \
.
touch $@
cdrecord.exe: $(PEBUILDER_ZIP)
unzip -o $(PEBUILDER_ZIP) $@
chmod +rx $@
.PHONY: cdrecord
cdrecord: $(VOLID_ISO_TOUCH) cdrecord.exe
ifneq ('$(PAUSE)', '')
@echo
@echo Insert a blank CD-R/CD-RW/DVD±R/DVD±RW into the following drive
@-PATH="$$PATH:." cdrecord --scanbus | grep "$(CD_DEV)" | cut -b 2-
@echo and press [Enter] to continue
@echo -e \\a
@read dummy
endif
PATH="$$PATH:." cdrecord -dev=$(CD_DEV) -v $(CDRECORD_OPTS) $(VOLID_ISO)
@echo
@echo "Please label this disk '$(CD_LABEL)'"
.PHONY: tidy
tidy:
rm -fr \
$(VOLID_TOUCH) \
$(SERVICE_PACK_TOUCH) \
${KB_TOUCHES} \
$(BOOT_TOUCH) \
$(BOOT_DIR) \
$(CD_DIR) \
$(BBIE_ZIP) \
$(PEBUILDER_ZIP)
.PHONY: clean
clean: tidy
rm -fr \
$(VOLID_ISO_TOUCH) \
$(VOLID_ISO)
.PHONY: realclean
realclean: clean
rm -fr \
bbie.exe \
cdrecord.exe \
mkisofs.exe \
$(SERVICE_PACK_EXE) \
${KB_EXES}
.PHONY: undo
undo:
rm -f *.exe.touch $(SVCPACK_DIR)/*
.PHONY: md5sum md5s
md5sum: md5s.txt
md5s: md5s.txt
md5s.txt: *.exe
md5sum [Ww]indows*.[Ee][Xx][Ee] | sort -k 2 >md5s.txt