Skip to content

Commit 72e4b6d

Browse files
committed
Fix urls and guest additions
1 parent 1de5491 commit 72e4b6d

9 files changed

+42
-26
lines changed

control/build.sh

+13-10
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ install_packages() {
2121
}
2222

2323
download_cross_compiler() {
24-
url="http://landley.net/aboriginal/downloads/binaries/cross-compiler-i686.tar.bz2"
24+
url="http://landley.net/aboriginal/downloads/binaries/cross-compiler-i686.tar.gz"
2525
archive=`basename "${url}"`
2626
log "Downloading cross compiler archive from ${url} to ${ievms_home}/${archive}"
2727
if [[ ! -e "${archive}" ]] && ! curl -L "${url}" -o "${archive}"
@@ -31,9 +31,9 @@ download_cross_compiler() {
3131
}
3232

3333
extract_cross_compiler() {
34-
cross_compiler=`basename "${archive}" .tar.bz2`
34+
cross_compiler=`basename "${archive}" .tar.gz`
3535
log "Extracting cross compiler archive from ${archive} to ${ievms_home}/${cross_compiler}"
36-
if [[ ! -e "${cross_compiler}" ]] && ! tar -jxf "${archive}"
36+
if [[ ! -e "${cross_compiler}" ]] && ! tar -zxf "${archive}"
3737
then
3838
fail "Failed to extract ${archive} to ${ievms_home}/${cross_compiler} using 'tar', error code ($?)"
3939
fi
@@ -46,7 +46,7 @@ download_kernel() {
4646
if [[ ! -e "${archive}" ]] && ! curl -L "${url}" -o "${archive}"
4747
then
4848
fail "Failed to download ${url} to ${ievms_home}/${archive} using 'curl', error code ($?)"
49-
fi
49+
fi
5050
}
5151

5252
extract_kernel() {
@@ -55,7 +55,7 @@ extract_kernel() {
5555
if [[ ! -e "${kernel_src}" ]] && ! tar -jxf "${archive}"
5656
then
5757
fail "Failed to extract ${archive} to ${ievms_home}/${kernel_src} using 'tar', error code ($?)"
58-
fi
58+
fi
5959
}
6060

6161
configure_kernel() {
@@ -82,7 +82,7 @@ download_iso() {
8282
if [[ ! -e "${archive}" ]] && ! curl -L "${url}" -o "${archive}"
8383
then
8484
fail "Failed to download ${url} to ${ievms_home}/${archive} using 'curl', error code ($?)"
85-
fi
85+
fi
8686
}
8787

8888
extract_iso() {
@@ -91,7 +91,7 @@ extract_iso() {
9191
if [[ ! -e "${iso}" ]] && ! unzip "${archive}"
9292
then
9393
fail "Failed to extract ${archive} to ${ievms_home}/${iso} using 'unzip', error code ($?)"
94-
fi
94+
fi
9595
}
9696

9797
unpack_iso() {
@@ -118,10 +118,13 @@ extract_initrd() {
118118
copy_scripts() {
119119
log "Copying scripts"
120120
cp "/vagrant/control/stage2" "${initrd}/scripts/"
121-
cp "/vagrant/control/xp.reg" "${initrd}/scripts/"
121+
cp "/vagrant/control/xpsw.reg" "${initrd}/scripts/"
122+
cp "/vagrant/control/xpusr.reg" "${initrd}/scripts/"
123+
cp "/vagrant/control/xpvboxga.bat" "${initrd}/scripts/"
122124
cp "/vagrant/control/deuac.reg" "${initrd}/scripts/"
123125
cp "/vagrant/control/reuac.reg" "${initrd}/scripts/"
124126
cp "/vagrant/control/vboxga.bat" "${initrd}/scripts/"
127+
cp "/vagrant/control/vsint.cer" "${initrd}/scripts/"
125128
cp "/vagrant/control/ievms.xml" "${initrd}/scripts/"
126129
cp "/vagrant/control/ievms.bat" "${initrd}/scripts/"
127130
cp "/vagrant/control/isolinux.cfg" "${remaster_iso}/isolinux.cfg"
@@ -143,7 +146,7 @@ compress_initrd() {
143146
pack_iso() {
144147
iso_out="/vagrant/ievms-control.iso"
145148
log "Packing ievms ISO from ${remaster_iso} to ${iso_out}"
146-
if ! genisoimage -o "${iso_out}" -b isolinux.bin -c boot.cat -p "ievms" -no-emul-boot -boot-load-size 4 -boot-info-table -V "IEVMS" -cache-inodes -r -J -l -joliet-long "${remaster_iso}"
149+
if ! genisoimage -o "${iso_out}" -b isolinux.bin -c boot.cat -p "ievms" -no-emul-boot -boot-load-size 4 -boot-info-table -V "IEVMS" -cache-inodes -r -J -l -joliet-long "${remaster_iso}"
147150
then
148151
fail "Failed to pack ${remaster_iso} to ${iso_out} using 'genisoimage', error code ($?)"
149152
fi
@@ -164,4 +167,4 @@ unpack_iso
164167
extract_initrd
165168
copy_scripts
166169
compress_initrd
167-
pack_iso
170+
pack_iso

control/stage2

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ fi
1414

1515
if [ -d /disk/WINDOWS ]
1616
then
17-
reged -IC /disk/WINDOWS/system32/config/system HKEY_LOCAL_MACHINE\\SYSTEM /scripts/xp.reg
17+
reged -IC /disk/WINDOWS/system32/config/software HKEY_LOCAL_MACHINE\\SOFTWARE /scripts/xpsw.reg
18+
reged -IC /disk/Documents\ and\ Settings/IEUser/NTUSER.DAT HKEY_USERS\\S-1-5-21-776561741-308236825-1417001333-1003 /scripts/xpusr.reg
19+
cp /scripts/xpvboxga.bat /disk/Documents\ and\ Settings/All\ Users/Start\ Menu/Programs/Startup/
1820
else
1921
reged -IC /disk/Windows/System32/config/SOFTWARE HKEY_LOCAL_MACHINE\\SOFTWARE /scripts/deuac.reg
2022

@@ -25,9 +27,10 @@ else
2527
cp /scripts/vboxga.bat /disk/ProgramData/Microsoft/Windows/Start\ Menu/Programs/StartUp/
2628
fi
2729

30+
cp /scripts/vsint.cer /disk/vsint.cer
2831
cp /scripts/reuac.reg /disk/reuac.reg
2932
cp /scripts/ievms.xml /disk/ievms.xml
3033
cp /scripts/ievms.bat /disk/ievms.bat
3134
fi
3235
umount /disk 2>/dev/null
33-
poweroff
36+
poweroff

control/vboxga.bat

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
cd /d D:\
22
cd \cert
3-
VBoxCertUtil.exe add-trusted-publisher oracle-vbox.cer --root oracle-vbox.cer
3+
VBoxCertUtil.exe add-trusted-publisher vbox-sha1.cer --root C:\vsint.cer
4+
del C:\vsint.cer
45
cd \
56
VBoxWindowsAdditions.exe /S
67
regedit.exe /S C:\reuac.reg
@@ -12,4 +13,4 @@ schtasks.exe /run /tn ievms
1213
timeout /t 30
1314
del C:\Users\IEUser\ievms.bat
1415
shutdown.exe /s /t 00
15-
del %0
16+
del %0

control/vsint.cer

1.21 KB
Binary file not shown.

control/xp.reg

-276 Bytes
Binary file not shown.

control/xpsw.reg

510 Bytes
Binary file not shown.

control/xpusr.reg

322 Bytes
Binary file not shown.

control/xpvboxga.bat

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cd /d D:\
2+
VBoxWindowsAdditions.exe /S
3+
shutdown.exe /s /t 00
4+
del %0

ievms.sh

+17-12
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set -o pipefail
99
# ## Global Variables
1010

1111
# The ievms version.
12-
ievms_version="0.3.1"
12+
ievms_version="0.3.2"
1313

1414
# Options passed to each `curl` command.
1515
curl_opts=${CURL_OPTS:-""}
@@ -163,10 +163,10 @@ check_ext_pack() {
163163

164164
# Download and install `unar` from Google Code.
165165
install_unar() {
166-
local url="http://theunarchiver.googlecode.com/files/unar1.5.zip"
166+
local url="http://unarchiver.c3.cx/downloads/unar1.10.1.zip"
167167
local archive=`basename "${url}"`
168168

169-
download "unar" "${url}" "${archive}" "fbf544d1332c481d7d0f4e3433fbe53b"
169+
download "unar" "${url}" "${archive}" "d548661e4b6c33512074df81e39ed874"
170170

171171
unzip "${archive}" || fail "Failed to extract ${ievms_home}/${archive} to ${ievms_home}/, unzip command returned error code $?"
172172

@@ -188,7 +188,7 @@ wait_for_shutdown() {
188188
while true ; do
189189
log "Waiting for ${1} to shutdown..."
190190
sleep "${sleep_wait}"
191-
VBoxManage showvminfo "${1}" | grep "State:" | grep -q "powered off" && return 0 || true
191+
VBoxManage showvminfo "${1}" | grep "State:" | grep -q "powered off" && sleep "${sleep_wait}" && return 0 || true
192192
done
193193
}
194194

@@ -210,7 +210,7 @@ find_iso() {
210210
iso=$dev_iso
211211
else
212212
iso="${ievms_home}/ievms-control-${ievms_version}.iso"
213-
download "ievms control ISO" "${url}" "${iso}" "6699cb421fc2f56e854fd3f5e143e84c"
213+
download "ievms control ISO" "${url}" "${iso}" "1fe3f95e0731bbcba949564cf9bbe28a"
214214
fi
215215
}
216216

@@ -344,6 +344,7 @@ build_ievm() {
344344
unset archive
345345
unset unit
346346
local prefix="IE"
347+
local suffix=""
347348
local version="${1}"
348349
case $1 in
349350
6|7|8)
@@ -371,6 +372,7 @@ build_ievm() {
371372
;;
372373
EDGE)
373374
prefix="MS"
375+
suffix="_preview"
374376
version="Edge"
375377
os="Win10"
376378
unit="8"
@@ -382,14 +384,14 @@ build_ievm() {
382384
local def_archive="${vm/ - /_}.zip"
383385
archive=${archive:-$def_archive}
384386
unit=${unit:-"11"}
385-
local ova=`basename "${archive/_/ - }" .zip`.ova
387+
local ova="`basename "${archive/_/ - }" .zip`${suffix}.ova"
386388

387389
local url
388390
if [ "${os}" == "Win10" ]
389391
then
390-
url="https://az792536.vo.msecnd.net/vms/VMBuild_20150801/VirtualBox/MSEdge/Mac/Microsoft%20Edge.Win10.For.Mac.VirtualBox.zip"
392+
url="https://az792536.vo.msecnd.net/vms/VMBuild_20160802/VirtualBox/MSEdge/MSEdge.Win10_RS1.VirtualBox.zip"
391393
else
392-
url="http://virtualization.modern.ie/vhd/IEKitV1_Final/VirtualBox/OSX/${archive}"
394+
url="https://az412801.vo.msecnd.net/vhd/IEKitV1_Final/VirtualBox/OSX/${archive}"
393395
fi
394396

395397
local md5
@@ -399,9 +401,9 @@ build_ievm() {
399401
IE8_Win7.zip) md5="21b0aad3d66dac7f88635aa2318a3a55" ;;
400402
IE9_Win7.zip) md5="58d201fe7dc7e890ad645412264f2a2c" ;;
401403
IE10_Win8.zip) md5="cc4e2f4b195e1b1e24e2ce6c7a6f149c" ;;
402-
MSEdge_Win10.zip) md5="c1011b491d49539975fb4c3eeff16dae" ;;
404+
MSEdge_Win10.zip) md5="467d8286cb8cbed90f0761c3566abdda" ;;
403405
esac
404-
406+
405407
log "Checking for existing OVA at ${ievms_home}/${ova}"
406408
if [[ ! -f "${ova}" ]]
407409
then
@@ -427,14 +429,15 @@ build_ievm() {
427429

428430
log "Tagging VM with ievms version"
429431
VBoxManage setextradata "${vm}" "ievms" "{\"version\":\"${ievms_version}\"}"
430-
432+
431433
log "Creating clean snapshot"
432434
VBoxManage snapshot "${vm}" take clean --description "The initial VM state"
433435
fi
434436
}
435437

436438
# Build the IE6 virtual machine.
437439
build_ievm_ie6() {
440+
boot_auto_ga "IE6 - WinXP"
438441
set_xp_password "IE6 - WinXP"
439442
shutdown_xp "IE6 - WinXP"
440443
}
@@ -445,6 +448,7 @@ build_ievm_ie7() {
445448
then
446449
boot_auto_ga "IE7 - Vista"
447450
else
451+
boot_auto_ga "IE7 - WinXP"
448452
set_xp_password "IE7 - WinXP"
449453
install_ie_xp "IE7 - WinXP" "http://download.microsoft.com/download/3/8/8/38889dc1-848c-4bf2-8335-86c573ad86d9/IE7-WindowsXP-x86-enu.exe" "ea16789f6fc1d2523f704e8f9afbe906"
450454
fi
@@ -456,6 +460,7 @@ build_ievm_ie8() {
456460
then
457461
boot_auto_ga "IE8 - Win7"
458462
else
463+
boot_auto_ga "IE8 - WinXP"
459464
set_xp_password "IE8 - WinXP"
460465
install_ie_xp "IE8 - WinXP" "http://download.microsoft.com/download/C/C/0/CC0BD555-33DD-411E-936B-73AC6F95AE11/IE8-WindowsXP-x86-ENU.exe" "616c2e8b12aaa349cd3acb38bf581700"
461466
fi
@@ -473,7 +478,7 @@ build_ievm_ie10() {
473478
boot_auto_ga "IE10 - Win8"
474479
else
475480
boot_auto_ga "IE10 - Win7"
476-
install_ie_win7 "IE10 - Win7" "http://download.microsoft.com/download/8/A/C/8AC7C482-BC74-492E-B978-7ED04900CEDE/IE10-Windows6.1-x86-en-us.exe" "0f14b2de0b3cef611b9c1424049e996b"
481+
install_ie_win7 "IE10 - Win7" "https://raw.githubusercontent.com/kbandla/installers/master/MSIE/IE10-Windows6.1-x86-en-us.exe" "0f14b2de0b3cef611b9c1424049e996b"
477482
fi
478483
}
479484

0 commit comments

Comments
 (0)