http://bugs.winehq.org/show_bug.cgi?id=6194
------- Additional Comments From focht@gmx.net 2007-14-05 04:11 ------- Hello,
--- quote --- Anastasius, I'm not trying to work around using the installer to get the service running. I'm trying to find the exact steps and workarounds needed to make the installer complete successfully. --- quote ---
Ok, i was under impression someone wanted to get that BITS stuff running :)
Technically, this installer (.exe) is a self extracting cab (sfx). One can verify this with "cabextract" or any other .cab tool. After extraction you have "_sfx_manifest_", "_sfx_.dll" and "*._p" files. The manifest is just an ini file which describes the actions to be taken by differential patcher. "_sfx_.dll" is mspatcha.dll (Microsoft patching API). "*._p" are just files in Windows Installer 3.x differential patch format (Microsoft, magic "PA19")
Some time ago, i wrote a little tool which parses the patcher manifest, loads the M$ patch API dll and calls it with necessary info to extract all patches. Afterwards the sub-installer "./update/update.exe" is run to carry out the real update (described in .inf file).
Ok, this was a bit off-topic :-) Your steps can be simplified.
--- quote --- 1) rename .wine/drive_c -> .wine/harddiskvolume1 and fixup dosdevices --- quote ---
Too intrusive. For installation a better way is to use two temporary symlinks This doesnt affect/break other wine stuff while installing.
cd "$WINEPREFIX" ln -s "drive_c" "harddisk" cd "$WINEPREFIX/dosdevices" ln -s "../harddisk" "$DRIVE"
The installer just scans drives a: .. z: for dos device name containing "harddisk" substring. Take an unused drive letter and symlink it, effectively pointing to drive_c after both symlinks are resolved. After installation both symlinks can be easily removed (by script).
--- quote --- 2) copy c:\windows\system32\CatRoot* from Windows to Wine --- quote ---
No need for any windows stuff to be copied. Just fake the windows components catalog directory:
mkdir -p "$WINEPREFIX/drive_c/windows/system32/CatRoot/{F750E6C3-38EE-11D1-85E5-00C04FC295EE}"
and put at least a fake *.cat file into it (can be empty, doesnt have to be a valid one).
echo > "$WINEPREFIX/drive_c/windows/system32/CatRoot/{F750E6C3-38EE-11D1-85E5-00C04FC295EE}/oem0.cat"
--- quote --- 3) Set version to Win XP in winecfg 4) Open regedit and change HKLM\Systems\CurrentControlSet\Control\Windows\CSDVersion from 0x200 to 0x100 --- quote ---
Ok, can be done by script too (like winetricks).
--- quote --- 5) Copy native hal.dll, schannel.dll, shdocvw.dll to system32 --- quote ---
No need for windows components. The installer checks for "$WINEPREFIX/drive_c/windows/system32/hal.dll" version resource. Any valid PE with version resource (even wines placeholder ones) will do.
cp "$WINEPREFIX/drive_c/windows/system32/kernel32.dll" "$WINEPREFIX/drive_c/windows/system32/hal.dll"
(after installation fake hal.dll can be removed).
With these steps, the real update-installer is finally started (though it comes with error after you agree to EULA).
Dealing with the real installer will be part of my next post.
Regards