bmt22033
Posts: 21
Joined: Tue Jun 26, 2012 2:14 pm

Building installer to deploy x86/x64 drivers

I need to build an installer that does nothing but deploy a driver (the win32 port of libusb which can be found at http://sourceforge.net/apps/trac/libusb-win32/wiki). The INF file (see below) specifies files for the x86 and x64 platforms. Presumably, the package type will need to be "Mixed 32/64-bit matching the platform" but I'm a little unclear on the use of the "Mixed 32/64 Package Organization Wizard". My files consist of the following:

\amd64\libusb0.dll
\amd64\libusb0.sys
\x86\libusb0.sys
\x86\libusb0_x86.dll
Bootloader.inf

As you can see, there are two files for each platform, plus the INF file. As I said before, the INF file specifies the files for both platforms. So with regard to the "Mixed 32/64 Package Organization Wizard", how should I define these files? Thanks very much for any suggestions.

Here is the INF file (this is generated by a utility that ships with the win32 port of libusb):

; Bootloader.inf
; Copyright (c) 2010 libusb-win32 (GNU LGPL)
[Strings]
DeviceName = "Bootloader"
VendorName = "None"
SourceName = "Bootloader Install Disk"
DeviceID = "VID_7070&PID_1234"
DeviceGUID = "{DDFE6861-4D56-4897-9618-F8211C502129}"

[Version]
Signature = "$Windows NT$"
Class = "libusb-win32 devices"
ClassGuid = {EB781AAF-9C70-4523-A5DF-642A87ECA567}
Provider = "libusb-win32"
CatalogFile = Bootloader.cat
DriverVer = 01/17/2012, 1.2.6.0

[ClassInstall32]
Addreg = libusb_class_install_add_reg

[libusb_class_install_add_reg]
HKR,,,0,"libusb-win32 devices"
HKR,,Icon,,-20

[Manufacturer]
%VendorName% = Devices, NT, NTAMD64

;--------------------------------------------------------------------------
; libusb-win32 files
;--------------------------------------------------------------------------

[SourceDisksNames]
1 = %SourceName%

[SourceDisksFiles.x86]
libusb0.sys = 1,x86
libusb0_x86.dll = 1,x86

[SourceDisksFiles.amd64]
libusb0.sys = 1,amd64
libusb0.dll = 1,amd64
libusb0_x86.dll = 1,x86

[DestinationDirs]
libusb_files_sys = 10,system32\drivers
libusb_files_dll = 10,system32
libusb_files_dll_wow64 = 10,syswow64
libusb_files_dll_x86 = 10,system32

[libusb_files_sys]
libusb0.sys

[libusb_files_dll]
libusb0.dll

[libusb_files_dll_x86]
libusb0.dll, libusb0_x86.dll

[libusb_files_dll_wow64]
libusb0.dll, libusb0_x86.dll

;--------------------------------------------------------------------------
; libusb-win32 device driver
;--------------------------------------------------------------------------

[LIBUSB_WIN32_DEV.NT]
CopyFiles = libusb_files_sys, libusb_files_dll_x86

[LIBUSB_WIN32_DEV.NTAMD64]
CopyFiles = libusb_files_sys, libusb_files_dll, libusb_files_dll_wow64

[LIBUSB_WIN32_DEV.NT.HW]
DelReg = libusb_del_reg_hw
AddReg = libusb_add_reg_hw

[LIBUSB_WIN32_DEV.NTAMD64.HW]
DelReg = libusb_del_reg_hw
AddReg = libusb_add_reg_hw

[LIBUSB_WIN32_DEV.NT.Services]
AddService = libusb0, 0x00000002, libusb_add_service

[LIBUSB_WIN32_DEV.NTAMD64.Services]
AddService = libusb0, 0x00000002, libusb_add_service

; Older versions of this .inf file installed filter drivers. They are not
; needed any more and must be removed
[libusb_del_reg_hw]
HKR,,LowerFilters
HKR,,UpperFilters

; libusb-win32 device properties
[libusb_add_reg_hw]
HKR,,SurpriseRemovalOK,0x00010001,1

; (Optional) the usb configuration value to select when this device
; is started. If this key does not exist the first config is selected.
;HKR,,InitialConfigValue,0x00010001,<your config value>

;--------------------------------------------------------------------------
; libusb-win32 service
;--------------------------------------------------------------------------

[libusb_add_service]
DisplayName = "libusb-win32 - Kernel Driver 01/17/2012 1.2.6.0"
ServiceType = 1
StartType = 3
ErrorControl = 0
ServiceBinary = %12%\libusb0.sys

;--------------------------------------------------------------------------
; libusb-win32 devices
;--------------------------------------------------------------------------

; Hardware IDs in a 'Devices' section can be installed by libusb-win32
; using usb_install_driver_np(), usb_install_driver_np_rundll(), or the
; inf-wizard utility.
;
[Devices]
%DeviceName% = LIBUSB_WIN32_DEV, USB\%DeviceID%

[Devices.NT]
%DeviceName% = LIBUSB_WIN32_DEV.NT, USB\%DeviceID%

[Devices.NTAMD64]
%DeviceName% = LIBUSB_WIN32_DEV.NTAMD64, USB\%DeviceID%
bmt22033
Posts: 21
Joined: Tue Jun 26, 2012 2:14 pm

Re: Building installer to deploy x86/x64 drivers

I found a post from a couple of years ago which indicates that Advanced Installer only supports separate .INF files for each driver in the Drivers Page. Is it not possible to install a driver for multiple platforms using one INF file?

http://www.advancedinstaller.com/forums ... inf#p41206
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Building installer to deploy x86/x64 drivers

Hi,

Unfortunately, we didn't improve this feature as this was not requested so far. So, can you try the approach mentioned in the 32bit package install on 64bit DIFXAPP error thread and see if this works?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
bmt22033
Posts: 21
Joined: Tue Jun 26, 2012 2:14 pm

Re: Building installer to deploy x86/x64 drivers

Eusebiu wrote:Unfortunately, we didn't improve this feature as this was not requested so far.
Please consider this as a request to get this implemented in a future release! ;-) In the meantime, I'll look at splitting my existing INF file into separate x86 and x64 INFs.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Building installer to deploy x86/x64 drivers

Hi,

I added this improvement on our TODO list and we will try to implement it in a future version of Advanced Installer. Thank you for your suggestion.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mrauhecker
Posts: 1
Joined: Tue Aug 27, 2013 11:24 pm

Re: Building installer to deploy x86/x64 drivers

I second the addition of this improvement. I have the same issue currently.

Regards,
Markus
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Building installer to deploy x86/x64 drivers

Hi Markus,

I increased the priority for this improvement and it will be available in a future version of Advanced Installer. Thank you for your feedback.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”