https://bugs.winehq.org/show_bug.cgi?id=20444
--- Comment #21 from Anastasius Focht focht@gmx.net --- Hello Wylda,
thanks for the MSI database file :)
I think I've identified the problem.
'File' table, dumped with ORCA:
--- snip --- File Component_ FileName FileSize Version Language Attributes Seq s72 s72 l255 i4 S72 S20 I2 i2
_08BBF... Executable Doom3.exe 5427200 1.0.0.1 1033 8192 1 pak002.pk4 Pak1 pak002.pk4 416937674 8192 2 ... pak000.pk4 Pak2 pak000.pk4 353159257 8192 76 pak001.pk4 Pak2 pak001.pk4 229649726 8192 77 ... pak003.pk4 Pak3 pak003.pk4 317590154 8192 90 pak004.pk4 Pak3 pak004.pk4 237752384 8192 91 ... game00.pk4 CallBack game00.pk4 953718 8192 104 --- snip ---
'Media' table, dumped with ORCA:
--- snip --- DiskId LastSequence DiskPrompt Cabinet VolumeLabel Source i2 i2 L64 S255 S32 S72
1 75 DOOM 3 Disk 1 DOOM3_1 2 89 DOOM 3 Disk 2 DOOM3_2 3 103 DOOM 3 Disk 3 DOOM3_3 4 104 DOOM 3 Disk 1 DOOM3_1 --- snip ---
The problem is that 'game00.pk4' has sequence number 104 which references disk id 4 in the Media table - which is the first disk again -> volume label 'DOOM3_1'.
--- snip --- ... 004a:trace:msi:MSI_DatabaseOpenViewW L"SELECT * FROM `Media` WHERE `LastSequence` >= 104 ORDER BY `DiskId`" 0x448d298 ... 004a:trace:msi:msi_get_property returning L"D:\" for property L"SourceDir" 004a:trace:msi:msi_load_media_info sequence 104 -> cabinet (null) disk id 4 004a:trace:msi:msi_resolve_file_source Working to resolve source of file L"game00.pk4" 004a:trace:msi:msi_resolve_source_folder working to resolve L"BASE" 004a:trace:msi:msi_resolve_source_folder already resolved to L"D:\Setup\Data\base\" 004a:trace:msi:msi_resolve_file_source file L"game00.pk4" source resolves to L"D:\Setup\Data\base\game00.pk4" 004a:trace:msi:ACTION_InstallFiles copying L"D:\Setup\Data\base\game00.pk4" to L"C:\Program Files\Doom 3\base\game00.pk4" 004a:trace:msi:copy_install_file Copying L"D:\Setup\Data\base\game00.pk4" to L"C:\Program Files\Doom 3\base\game00.pk4" 004a:err:msi:ACTION_InstallFiles Failed to copy L"D:\Setup\Data\base\game00.pk4" to L"C:\Program Files\Doom 3\base\game00.pk4" (2) --- snip ---
There is probably some reasoning behind this.
By putting a file from the first CD into highest sequence/disk id, the user is automatically forced to change to CD1 again at the end of installation. This avoids "Please insert CD1 for game verification" when starting the game. CD1 is probably used for DRM verification scheme (SafeDisc?).
Wine's msi unfortunately doesn't anticipate such case and fails here.
Source: http://source.winehq.org/git/wine.git/blob/953359c73f5c609132e6d7caea0947d16...
--- snip --- 857 UINT ready_media( MSIPACKAGE *package, BOOL compressed, MSIMEDIAINFO *mi ) 858 { ... 893 /* check volume matches, change media if not */ 894 if (mi->volume_label && mi->disk_id > 1 && strcmpW( mi->first_volume, mi->volume_label )) 895 { ... --- snip ---
The volume label string comparison used here breaks this, when a file references the first volume again, after changing the media at least once.
Regards