https://bugs.winehq.org/show_bug.cgi?id=49352
Bug ID: 49352 Summary: JamKazam msi installer fails at copy Product: Wine Version: 5.9 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msi Assignee: wine-bugs@winehq.org Reporter: junk@therobinsonfamily.net Distribution: ---
Created attachment 67389 --> https://bugs.winehq.org/attachment.cgi?id=67389 console output with WINEDEBUG=warn+all
Attempting to install JamKazam-1.0.3744.msi fails with the installer apparently not able to copy files.
https://bugs.winehq.org/show_bug.cgi?id=49352
Baggypants junk@therobinsonfamily.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86 |x86-64
https://bugs.winehq.org/show_bug.cgi?id=49352
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Status|UNCONFIRMED |NEW Keywords| |download, Installer Summary|JamKazam msi installer |JamKazam 1.0.3744 msi |fails at copy |installer fails at | |'InstallFiles' action | |(incorrect handling of | |administrative image with | |compressed source files) Ever confirmed|0 |1 URL| |https://www.jamkazam.com/do | |wnloads
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
https://d34f55ppvvtgi3.cloudfront.net/artifacts/JamClient/Win32/1.0.3744/Jam...
--- snip --- $ WINEDEBUG=+msi wine msiexec -i JamKazam-1.0.3744.msi >>log.txt 2>&1 ... 0178:warn:msidb:read_stream_data open stream failed r = 80030002 - empty table? 0178:trace:msi:msi_get_suminfo 00EDA7F0, 0 0178:trace:msi:load_summary_info 00EFBB20 00EFAFE0 0178:trace:msi:parse_suminfo version: 405 0178:trace:msi:parse_suminfo template: L"Intel;0,1033,4,1029,1030,1031,1034,1036,1040,1041,1043,1044,1045,1049,1053,31748" 0178:trace:msi:msiobj_release object 00EFBB20 destroyed 0178:trace:msi:msi_set_property 00EDA960 L"DATABASE" L"C:\windows\Installer\a041.msi" -1 0178:trace:msi:msi_get_property 00EDA960 L"DATABASE" 00000000 0031F6FC ... 0178:trace:msi:msi_schedule_action Scheduling action L"InstallFiles" in script 2 0178:trace:msi:ACTION_PerformAction Performing action (L"InstallFiles") ... 0178:trace:msi:msi_get_property returning L"Z:\home\focht\Downloads\" for property L"SOURCEDIR" 0178:trace:msi:calculate_install_state installing L"avcodec_56.dll" (missing) 0178:trace:msi:calculate_install_state installing L"avdevice_56.dll" (missing) 0178:trace:msi:calculate_install_state installing L"avfilter_5.dll" (missing) ... 0178:trace:msi:msi_get_property returning L"Z:\home\focht\Downloads\JamKazam-1.0.3744.msi" for property L"OriginalDatabase" 0178:trace:msi:msi_load_media_info sequence 1 -> cabinet L"#JamKazam.cab" disk id 1 0178:trace:msi:msi_resolve_file_source Working to resolve source of file L"avcodec_56.dll" 0178:trace:msi:msi_resolve_source_folder working to resolve L"INSTALLDIR" 0178:trace:msi:msi_resolve_source_folder ! parent is L"ProgramFilesFolder" 0178:trace:msi:msi_resolve_source_folder working to resolve L"ProgramFilesFolder" 0178:trace:msi:msi_resolve_source_folder ! parent is L"TARGETDIR" 0178:trace:msi:msi_resolve_source_folder working to resolve L"TARGETDIR" ... 0178:trace:msi:msi_get_property returning L"Z:\home\focht\Downloads\JamKazam-1.0.3744.msi" for property L"OriginalDatabase" 0178:trace:msi:msi_load_media_info sequence 1 -> cabinet L"#JamKazam.cab" disk id 1 0178:trace:msi:msi_resolve_file_source Working to resolve source of file L"avcodec_56.dll" 0178:trace:msi:msi_resolve_source_folder working to resolve L"INSTALLDIR" 0178:trace:msi:msi_resolve_source_folder ! parent is L"ProgramFilesFolder" 0178:trace:msi:msi_resolve_source_folder working to resolve L"ProgramFilesFolder" 0178:trace:msi:msi_resolve_source_folder ! parent is L"TARGETDIR" 0178:trace:msi:msi_resolve_source_folder working to resolve L"TARGETDIR" ... 0178:trace:msi:msi_get_property returning L"Z:\home\focht\Downloads\" for property L"SourceDir" 0178:trace:msi:msi_resolve_source_folder -> L"Z:\home\focht\Downloads\" 0178:trace:msi:msi_resolve_file_source file L"avcodec_56.dll" source resolves to L"Z:\home\focht\Downloads\avcodec-56.dll" 0178:trace:msi:ACTION_InstallFiles copying L"Z:\home\focht\Downloads\avcodec-56.dll" to L"C:\Program Files (x86)\JamKazam\avcodec-56.dll" 0178:trace:msi:copy_install_file Copying L"Z:\home\focht\Downloads\avcodec-56.dll" to L"C:\Program Files (x86)\JamKazam\avcodec-56.dll" 0178:err:msi:ACTION_InstallFiles Failed to copy L"Z:\home\focht\Downloads\avcodec-56.dll" to L"C:\Program Files (x86)\JamKazam\avcodec-56.dll" (2) ... 0178:err:msi:execute_script Execution of script 0 halted; action L"InstallFiles" returned 1603 --- snip ---
The msi package contains compressed source file image. Inspecting the package with Orca:
Dump of 'Media' table:
--- snip --- DiskId LastSequence DiskPrompt Cabinet VolumeLabel Source i2 i4 L64 S255 S32 S72 Media DiskId 1 72 #JamKazam.cab --- snip ---
Dump of 'Directory' table:
--- snip --- Directory Directory_Parent DefaultDir s72 S72 l255
INSTALLDIR ProgramFilesFolder JamKazam ApplicationProgramsFolder ProgramMenuFolder JamKazam QtPluginIconEnginesFolder QtPluginFolder nncozvrx|iconengines QtPluginImageFormatsFolder QtPluginFolder 9r98ozmh|imageformats QtPluginPlatformsFolder QtPluginFolder i312mgxh|platforms QtPluginMediaFolder QtPluginFolder nyau_krp|mediaservice QtPluginCryptoFolder QtPluginFolder crypto FfmpegFolder INSTALLDIR ffmpeg ProgramFilesFolder TARGETDIR . TARGETDIR SourceDir DesktopFolder TARGETDIR . ProgramMenuFolder TARGETDIR . SqlDrivers INSTALLDIR ynwaszq3|sqldrivers QtPluginFolder INSTALLDIR uwwhlcsh|QtPlugins SystemFolder_x86_VC.194841A2_D0F2_3B96_9F71_05BA91BEA0FA SystemFolder . SystemFolder ProgramFilesFolder Sys|System --- snip ---
TARGETDIR -> DefaultDir -> SourceDir (source is location of original msi)
Dump of 'File' table:
--- snip --- File Component_ FileName FileSize Version Language Attributes Sequence s72 s72 l255 i4 S72 S20 I2 i4
avcodec_56.dll avcodec_56.dll nwy83ssc.dll|avcodec-56.dll 10287104 56.60.100.0 1033 512 1 ... zlib1.dll zlib1.dll zlib1.dll 75264 1.2.3.2027 1033 512 72 --- snip ---
I've reordered the entries by sequence number. All files are compressed and provided with the #JamKazam.cab stream (media table sequence numbers 1..72). This means none of the file entries need 'msidbFileAttributesCompressed' (0x4000) or 'msidbFileAttributesNoncompressed' (0x2000) set in 'Attributes'. The compression state is determinated by 'Word Count' summary property.
https://docs.microsoft.com/en-us/windows/win32/msi/compressed-and-uncompress...
--- quote --- Compressed Sources
A source consisting entirely of compressed files should include the compressed flag bit in the Word Count Summary Property. The compressed source files must be stored in cabinet files located in a data stream inside the .msi file or in a separate cabinet file located at the root of the source tree. All of the cabinets in the source must be listed in the Media table. --- quote ---
https://docs.microsoft.com/en-us/windows/win32/msi/word-count-summary
--- quote --- Bit 1 0 2 Source is uncompressed. Source is compressed. Bit 2 0 4 Source is original media. Source is a administrative image created by an administrative installation. --- quote ---
Unfortunately Wine's MSI isn't verbose about some important summary information properties. Adding some trace info helps.
In this case the summary info 'Word Count' property value is 0x6 -> msidbSumInfoSourceTypeAdminImage | msidbSumInfoSourceTypeCompressed
Apparently Wine doesn't handle this combination properly.
Wine source:
https://source.winehq.org/git/wine.git/blob/17529582402ebe27ef975fc7dcb8353f...
--- snip --- 1182 static UINT load_file(MSIRECORD *row, LPVOID param) 1183 { 1184 MSIPACKAGE* package = param; 1185 LPCWSTR component; 1186 MSIFILE *file; 1187 1188 /* fill in the data */ 1189 1190 file = msi_alloc_zero( sizeof (MSIFILE) ); 1191 if (!file) 1192 return ERROR_NOT_ENOUGH_MEMORY; 1193 1194 file->File = msi_dup_record_field( row, 1 ); 1195 1196 component = MSI_RecordGetString( row, 2 ); 1197 file->Component = msi_get_loaded_component( package, component ); 1198 1199 if (!file->Component) 1200 { 1201 WARN("Component not found: %s\n", debugstr_w(component)); 1202 msi_free(file->File); 1203 msi_free(file); 1204 return ERROR_SUCCESS; 1205 } 1206 1207 file->FileName = msi_dup_record_field( row, 3 ); 1208 msi_reduce_to_long_filename( file->FileName ); 1209 1210 file->ShortName = msi_dup_record_field( row, 3 ); 1211 file->LongName = strdupW( folder_split_path(file->ShortName, '|')); 1212 1213 file->FileSize = MSI_RecordGetInteger( row, 4 ); 1214 file->Version = msi_dup_record_field( row, 5 ); 1215 file->Language = msi_dup_record_field( row, 6 ); 1216 file->Attributes = MSI_RecordGetInteger( row, 7 ); 1217 file->Sequence = MSI_RecordGetInteger( row, 8 ); 1218 1219 file->state = msifs_invalid; 1220 1221 /* if the compressed bits are not set in the file attributes, 1222 * then read the information from the package word count property 1223 */ 1224 if (package->WordCount & msidbSumInfoSourceTypeAdminImage) 1225 { 1226 file->IsCompressed = FALSE; 1227 } 1228 else if (file->Attributes & 1229 (msidbFileAttributesCompressed | msidbFileAttributesPatchAdded)) 1230 { 1231 file->IsCompressed = TRUE; 1232 } 1233 else if (file->Attributes & msidbFileAttributesNoncompressed) 1234 { 1235 file->IsCompressed = FALSE; 1236 } 1237 else 1238 { 1239 file->IsCompressed = package->WordCount & msidbSumInfoSourceTypeCompressed; 1240 } 1241 1242 load_file_hash(package, file); 1243 load_file_disk_id(package, file); 1244 1245 TRACE("File loaded (file %s sequence %u)\n", debugstr_w(file->File), file->Sequence); 1246 1247 list_add_tail( &package->files, &file->entry ); 1248 1249 return ERROR_SUCCESS; 1250 } --- snip ---
With 'WordCount' property 'msidbSumInfoSourceTypeAdminImage' bit set, all files will be treated as 'uncompressed' although 'msidbSumInfoSourceTypeCompressed' bit is set as well.
Microsoft docs, showing the combinations of "Word Count":
https://docs.microsoft.com/en-us/windows/win32/msi/word-count-summary
--- quote --- These are combined to give the Word Count Summary property one of the following values that indicate a type of source file image.
Table 2
Value Type 0 Original source using long file names. Matches tree in Directory Table. Elevated privileges can be required to install this package.
1 Original source using short file names. Matches tree in Directory Table. Elevated privileges can be required to install this package.
2 Compressed source files using long file names. Matches cabinets and files in the Media Table. Elevated privileges can be required to install this package.
3 Compressed source files using short file names. Matches cabinets and files in the Media Table. Elevated privileges can be required to install this package.
4 Administrative image using long file names. Matches tree in Directory Table. Elevated privileges can be required to install this package.
5 Administrative image using short file names. Matches tree in Directory Table. Elevated privileges can be required to install this package.
8 Elevated privileges are not required to install this package. Use this value when Authoring Packages without the UAC Dialog Box.Available starting with Windows Installer version 4.0 and Windows Vista or Windows Server 2008. --- quote ---
Value 6 is not mentioned for whatever reason.
$ sha1sum JamKazam-1.0.3744.msi d2f7ea5c83846cf035cff88a6d078ca367a9f3220 JamKazam-1.0.3744.msi
$ du -sh JamKazam-1.0.3744.msi 76M JamKazam-1.0.3744.msi
$ wine --version wine-5.10-39-g1752958240
Regards
https://bugs.winehq.org/show_bug.cgi?id=49352
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |15c8e5dee6fa3b7eac1d1b3cd6d | |27aa744faff4d Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit https://source.winehq.org/git/wine.git/commitdiff/15c8e5dee6fa3b7eac1d1b3cd6... ("msi: Fix installing from administrative image with compressed source files.").
Thanks Hans
The installer works now as expected ;-)
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files (x86)
$ tree --charset=ANSI -L 2 JamKazam/ JamKazam/ |-- avcodec-56.dll |-- avdevice-56.dll |-- avfilter-5.dll |-- avformat-56.dll |-- avutil-54.dll |-- boringssl.dll |-- ffmpeg | |-- ffmpeg64.exe | |-- ffmpeg.exe | |-- jamkazam_video_bug_lg.png | |-- jamkazam_video_bug.png | `-- jamkazam_video_bug_sm.png |-- icudt54.dll |-- icuin54.dll |-- icuuc54.dll |-- JamKazam.exe |-- jk_icon.ico |-- libeay32.dll |-- libgcc_s_sjlj-1.dll |-- libjack.dll |-- libsndfile-1.dll |-- miniupnpc.dll |-- natpmp.dll |-- opus.dll |-- portaudio_x86.dll |-- qca.dll |-- Qt5Core.dll |-- Qt5Gui.dll |-- Qt5Multimedia.dll |-- Qt5MultimediaWidgets.dll |-- Qt5Network.dll |-- Qt5OpenGL.dll |-- Qt5Positioning.dll |-- Qt5PrintSupport.dll |-- Qt5Qml.dll |-- Qt5Quick.dll |-- Qt5Script.dll |-- Qt5Sensors.dll |-- Qt5Sql.dll |-- Qt5Svg.dll |-- Qt5WebChannel.dll |-- Qt5WebKit.dll |-- Qt5WebKitWidgets.dll |-- Qt5WebSockets.dll |-- Qt5Widgets.dll |-- Qt5Xml.dll |-- qt.conf |-- QtPlugins | |-- crypto | |-- iconengines | |-- imageformats | |-- mediaservice | `-- platforms |-- qt.txt |-- renderStartImage.bmp |-- speex.dll |-- ssleay32.dll |-- swresample-1.dll |-- swscale-3.dll |-- wb_male.oga `-- zlib1.dll
7 directories, 54 files --- snip ---
$ wine --version wine-5.10-112-g343043153b
Regards
https://bugs.winehq.org/show_bug.cgi?id=49352
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.11.
https://bugs.winehq.org/show_bug.cgi?id=49352
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |5.0.x
https://bugs.winehq.org/show_bug.cgi?id=49352
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|5.0.x |---
--- Comment #4 from Michael Stefaniuc mstefani@winehq.org --- Removing the 5.0.x milestone from bug fixes included in 5.0.3.