diff --git a/distribute/Definitions.txt b/distribute/Definitions.txt new file mode 100644 index 0000000..eae71ee --- /dev/null +++ b/distribute/Definitions.txt @@ -0,0 +1,4 @@ +Manufacturer string: NTB +Product string: MC-Interface +VID: 0x8235 +PDI: 0x0100 diff --git a/distribute/LibusbWin.dll b/distribute/LibusbWin.dll new file mode 100644 index 0000000..fb5fd4a Binary files /dev/null and b/distribute/LibusbWin.dll differ diff --git a/distribute/MCInt.cat b/distribute/MCInt.cat new file mode 100644 index 0000000..2ef39c5 --- /dev/null +++ b/distribute/MCInt.cat @@ -0,0 +1,3 @@ +This file will contain the digital signature of the files to be installed +on the system. +This file will be provided by Microsoft upon certification of your drivers. diff --git a/distribute/MCInt.inf b/distribute/MCInt.inf new file mode 100644 index 0000000..5752c97 --- /dev/null +++ b/distribute/MCInt.inf @@ -0,0 +1,107 @@ +[Version] +Signature = "$Chicago$" +provider = %manufacturer% +DriverVer = 10/14/2005,0.1.10.2 +CatalogFile = MCInt.cat + +Class = LibUsbDevices +ClassGUID = {EB781AAF-9C70-4523-A5DF-642A87ECA567} + +[ClassInstall] +AddReg=ClassInstall.AddReg + +[ClassInstall32] +AddReg=ClassInstall.AddReg + +[ClassInstall.AddReg] +HKR,,,,"LibUSB-Win32 Devices" +HKR,,Icon,,"-20" + +[Manufacturer] +%manufacturer%=Devices + +;-------------------------------------------------------------------------- +; Files +;-------------------------------------------------------------------------- + +[SourceDisksNames] +1 = "Libusb-Win32 Driver Installation Disk",, + +[SourceDisksFiles] +libusb0.sys = 1,, +libusb0.dll = 1,, +LibusbWin.dll = 1,, + +[DestinationDirs] +LIBUSB.Files.Sys = 10,System32\Drivers +LIBUSB.Files.Dll = 10,System32 +LIBUSB.Files.Dll2 = 10,System32 + +[LIBUSB.Files.Sys] +libusb0.sys + +[LIBUSB.Files.Dll] +libusb0.dll + +[LIBUSB.Files.Dll2] +LibusbWin.dll + +;-------------------------------------------------------------------------- +; Device driver +;-------------------------------------------------------------------------- + +[LIBUSB_DEV] +CopyFiles = LIBUSB.Files.Sys, LIBUSB.Files.Dll, LIBUSB.Files.Dll2 +AddReg = LIBUSB_DEV.AddReg + +[LIBUSB_DEV.NT] +CopyFiles = LIBUSB.Files.Sys, LIBUSB.Files.Dll, LIBUSB.Files.Dll2 + +[LIBUSB_DEV.HW] +DelReg = LIBUSB_DEV.DelReg.HW +AddReg = LIBUSB_DEV.AddReg.HW + +[LIBUSB_DEV.NT.HW] +DelReg = LIBUSB_DEV.DelReg.HW +AddReg = LIBUSB_DEV.AddReg.HW + +[LIBUSB_DEV.NT.Services] +AddService = libusb0, 0x00000002, LIBUSB.AddService + +[LIBUSB_DEV.AddReg] +HKR,,DevLoader,,*ntkern +HKR,,NTMPDriver,,libusb0.sys + +[LIBUSB_DEV.DelReg.HW] +HKR,,LowerFilters +HKR,,UpperFilters + +[LIBUSB_DEV.AddReg.HW] +HKR,,libusb_is_device_driver, 0x00010001 ,1 + +;-------------------------------------------------------------------------- +; Services +;-------------------------------------------------------------------------- + +[LIBUSB.AddService] +DisplayName = "LibUsb-Win32 - Kernel Driver 10/14/2005, 0.1.10.2" +ServiceType = 1 +StartType = 3 +ErrorControl = 0 +ServiceBinary = %12%\libusb0.sys + +;-------------------------------------------------------------------------- +; Devices +;-------------------------------------------------------------------------- + +[Devices] +"NTB MC-Interface"=LIBUSB_DEV, USB\VID_8235&PID_0100 + + +;-------------------------------------------------------------------------- +; Strings +;-------------------------------------------------------------------------- + +[Strings] + +manufacturer = "NTB" diff --git a/distribute/Output/setup.exe b/distribute/Output/setup.exe new file mode 100644 index 0000000..08b9799 Binary files /dev/null and b/distribute/Output/setup.exe differ diff --git a/distribute/driver_installer_template.iss b/distribute/driver_installer_template.iss new file mode 100644 index 0000000..c9decab --- /dev/null +++ b/distribute/driver_installer_template.iss @@ -0,0 +1,46 @@ +; This examples demonstrates how libusb's drivers +; can be installed automatically along with your application using an installer. +; +; Requirements: Inno Setup (http://www.jrsoftware.org/isdl.php) +; +; To use this script, do the following: +; - copy libusb's driver (libusb0.sys, libusb0.dll) to this folder +; - create an .inf and .cab file using libusb's 'inf-wiward.exe' +; and save the generated files in this folder. +; - in this script replace with the name of your .inf file +; - customize other settings (strings) +; - open this scipt with Inno Setup +; - compile and run + +[Setup] +AppName=NTB MC-Interface +AppVerName=NTB MC-Interface 0.0.1 +AppPublisher=NTB +AppPublisherURL=http://inf.ntb.ch/ +AppVersion=0.0.1 +DefaultDirName={pf}\MC-Interface +DefaultGroupName=MC-Interface +Compression=lzma +SolidCompression=yes +; WinMe or higher +MinVersion=4.9,5 +PrivilegesRequired=admin + +[Files] +; copy the file to the App folder +Source: "*.sys"; DestDir: "{app}\driver" +Source: "*.cat"; DestDir: "{app}\driver" +Source: "*.dll"; DestDir: "{app}\driver" +Source: "*.inf"; DestDir: "{app}\driver" + +; also copy the DLL to the system folders so that rundll32.exe will find it +Source: "*.dll"; DestDir: "{win}\system32"; FLags: replacesameversion restartreplace uninsneveruninstall + +[Icons] +Name: "{group}\Uninstall MC-Interface"; Filename: "{uninstallexe}" + +[Run] +; invoke libusb's DLL to install the .inf file +Filename: "rundll32"; Parameters: "libusb0.dll,usb_install_driver_np_rundll {app}\driver\MCInt.inf"; StatusMsg: "Installing NTB MC-Interface driver (this may take a few seconds) ..." + + diff --git a/distribute/libusb0.dll b/distribute/libusb0.dll new file mode 100644 index 0000000..ce635ef Binary files /dev/null and b/distribute/libusb0.dll differ diff --git a/distribute/libusb0.sys b/distribute/libusb0.sys new file mode 100644 index 0000000..639c0f1 Binary files /dev/null and b/distribute/libusb0.sys differ