Closed dontech closed 1 year ago
To try it you need:
https://learn.microsoft.com/en-us/windows-hardware/drivers/other-wdk-downloads Windows 11, version 21H2 EWDK
Then map the ISO to "E:\"
And then just run "make.cmd dist" as usual.
Thanks,
/pedro
Somehow the build does not work for me (both make.cmd ALL
and make.cmd DIST
will fail).
I have made some changes to make.cfg
to adapt to my system and removed some optional features.
c:\work\libusb\libusb-win32\libusb-win32-ewdk\libusb>git diff
diff --git a/libusb/ddk_make/make.cfg b/libusb/ddk_make/make.cfg
index 9b5215f..e27888c 100644
--- a/libusb/ddk_make/make.cfg
+++ b/libusb/ddk_make/make.cfg
@@ -12,7 +12,7 @@
VERSION_MAJOR=1
VERSION_MINOR=2
VERSION_MICRO=7
-VERSION_NANO=4
+VERSION_NANO=5^M
;
; The libusb-win32 version string.
@@ -22,7 +22,7 @@ VERSION=!VERSION_MAJOR!.!VERSION_MINOR!.!VERSION_MICRO!.!VERSION_NANO!
;
; Default WinDDK directory(s) Adjust these values to match your environment
; (REQUIRED)
-WINDDK_BASE=E:\
+WINDDK_BASE=D:\^M
WINDDK_DIR=!WINDDK_BASE!
;
; (optional)
@@ -46,7 +46,7 @@ WINDDK_AUTOCODEREVIEW=true
; (package directories must NOT reside in the libusb-win32 trunk)
;
; Additional libusb-win32 content is placed here
-PACKAGE_ROOT_DIR=Z:\packages\libusb-win32\
+PACKAGE_ROOT_DIR=C:\packages\libusb-win32\^M
; Binaries are placed here (exe,sys,dll)
PACKAGE_BIN_DIR=!PACKAGE_ROOT_DIR!bin\
@@ -73,17 +73,17 @@ ZIP=C:\Program Files\7-Zip\7z.exe
;
; Path to Inno Setup Compiler (http://www.jrsoftware.org/isdl.php)
-ISCC=C:\Program Files (x86)\Inno Setup 5\ISCC.exe
+ISCC=C:\Program Files (x86)\Inno Setup 6\ISCC.exe^M
;
; Path to borland c implib tool (http://downloads.embarcadero.com/free/c_builder)
; (optional)
-IMPLIB=C:\Borland\BCC55\Bin\implib.exe
+;IMPLIB=C:\Borland\BCC55\Bin\implib.exe^M
;
; Path to gcc dlltool tool (http://www.mingw.org/)
; (optional)
-DLLTOOL=C:\MinGW\bin\dlltool.exe
+;DLLTOOL=C:\MinGW\bin\dlltool.exe^M
;
; Filename (only) of the digital test certificate to use for signing
@@ -91,7 +91,7 @@ DLLTOOL=C:\MinGW\bin\dlltool.exe
; file in the !PACKAGE_ROOT_DIR!\cert directory. If the cert file does
; not exists is is created and used for subsequent signing requests.
; (optional)
-CERT_FILE=LibusbWin32TestCert.cer
+;CERT_FILE=LibusbWin32TestCert.cer^M
; The directory where all log files are placed.
; File logging is disabled by default (see make.cmd help for more information)
diff --git a/libusb/src/libusb-win32_version.h b/libusb/src/libusb-win32_version.h
index 427410a..81cf348 100755
--- a/libusb/src/libusb-win32_version.h
+++ b/libusb/src/libusb-win32_version.h
@@ -9,8 +9,8 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_MICRO 7
-#define VERSION_NANO 4
-#define VERSION_DATE 09/20/2023
+#define VERSION_NANO 5^M
+#define VERSION_DATE 09/28/2023^M
#define VERSION VERSION_MAJOR.VERSION_MINOR.VERSION_MICRO.VERSION_NANO
#define RC_VERSION VERSION_MAJOR,VERSION_MINOR,VERSION_MICRO,VERSION_NANO
Build log:
Latest git commit is okay when using make.cmd ALL
.
Looks I can not use Inno Setup 6.
...
Inno Setup 6 Command-Line Compiler
Copyright (C) 1997-2023 Jordan Russell. All rights reserved.
Portions Copyright (C) 2000-2023 Martijn Laan. All rights reserved.
Portions Copyright (C) 2001-2004 Alex Yackimoff. All rights reserved.
https://www.innosetup.com
Compiler engine version: Inno Setup 6.2.2
Preprocessing
Reading file: C:\PROGRA~2\INNOSE~1\ISPPBuiltins.iss
Parsing [Setup] section, line 21
Parsing [Setup] section, line 22
Parsing [Setup] section, line 23
Parsing [Setup] section, line 24
Parsing [Setup] section, line 25
Parsing [Setup] section, line 26
Parsing [Setup] section, line 27
Parsing [Setup] section, line 28
Parsing [Setup] section, line 29
Parsing [Setup] section, line 30
Parsing [Setup] section, line 31
Parsing [Setup] section, line 32
Parsing [Setup] section, line 33
Parsing [Setup] section, line 34
Parsing [Setup] section, line 35
Parsing [Setup] section, line 37
Error on line 37 in C:\packages\libusb-win32\_working\libusb-win32-devel-filter\filter-bin-setup.iss: Minimum NT version specified by MinVersion must be at least 6.0. (Windows 2000/XP/Server 2003 are no longer supported.)
Compile aborted.
Packaging process failed, even after I change to Inno Setup 5.
Yeah i have not gotton to that part
But yeah, we should probably switch to InnoSetup 6. We might even include the InnoSetup binaries, so we do not need to install it manually
We can do that as the license states:
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter and redistribute it, provided that the following conditions are met:
All redistributions of source code files must retain all copyright notices that are currently in place, and this list of conditions without modification.
All redistributions in binary form must retain all occurrences of the above copyright notice and web site addresses that are currently in place (for example, in the About boxes).
But yeah, we should probably switch to InnoSetup 6. We might even include the InnoSetup binaries, so we do not need to install it manually
Yes I agree that is a good idea.
OK I think this part is ready. Please try to run the build on your setup.
@mcuee Please test on your setup
I think we currently have it working with EWDK to the point where the output is the same as the old setup. There is still some cleanup to do, but i think this is a good start.
@mcuee Please test on your setup
I think we currently have it working with EWDK to the point where the output is the same as the old setup. There is still some cleanup to do, but i think this is a good start.
Great. This works fine. I only need minor changes to make.cfg
for my build environment.
c:\work\libusb\libusb-win32\libusb-win32-ewdk2200>git diff
diff --git a/libusb/ddk_make/make.cfg b/libusb/ddk_make/make.cfg
index 9b5215f..0c1df90 100644
--- a/libusb/ddk_make/make.cfg
+++ b/libusb/ddk_make/make.cfg
@@ -22,7 +22,7 @@ VERSION=!VERSION_MAJOR!.!VERSION_MINOR!.!VERSION_MICRO!.!VERSION_NANO!
;
; Default WinDDK directory(s) Adjust these values to match your environment
; (REQUIRED)
-WINDDK_BASE=E:\
+WINDDK_BASE=D:\
WINDDK_DIR=!WINDDK_BASE!
;
; (optional)
@@ -46,7 +46,7 @@ WINDDK_AUTOCODEREVIEW=true
; (package directories must NOT reside in the libusb-win32 trunk)
;
; Additional libusb-win32 content is placed here
-PACKAGE_ROOT_DIR=Z:\packages\libusb-win32\
+PACKAGE_ROOT_DIR=C:\packages\libusb-win32\
; Binaries are placed here (exe,sys,dll)
PACKAGE_BIN_DIR=!PACKAGE_ROOT_DIR!bin\
@@ -78,12 +78,12 @@ ISCC=C:\Program Files (x86)\Inno Setup 5\ISCC.exe
;
; Path to borland c implib tool (http://downloads.embarcadero.com/free/c_builder)
; (optional)
-IMPLIB=C:\Borland\BCC55\Bin\implib.exe
+;IMPLIB=C:\Borland\BCC55\Bin\implib.exe
;
; Path to gcc dlltool tool (http://www.mingw.org/)
; (optional)
-DLLTOOL=C:\MinGW\bin\dlltool.exe
+;DLLTOOL=C:\MinGW\bin\dlltool.exe
;
; Filename (only) of the digital test certificate to use for signing
@dontech
I think we can have few minor changes to the build scripts.
1) Inno Setup 5 is still okay, but it may be good to move to Inno Setup 6 if the change is not significant.
2) I think we can get rid of Borland C import lib generation.
3) I think we can get rid of MinGW.org import lib generation as well. I think MinGW-w64 is now more popular but it is better to let the user of MinGW.org (now at https://osdn.net/projects/mingw/ ) or MinGW-w64 (eg: MSYS2) to generate the import library using their toolchain or just link to the DLL.
@mcuee OK. I will make a new branch gor those cleanups
@dontech
Since this adds the ARM64 support, just wondering if you could release a new signed snapshot release. Thanks.
BTW, I have updated README.md to refelct the real status of the project. You can modify it as well. Thanks.
This is the last part of the new WDK update.
It needs more work, but this is a start. For now the projects can build, but the systems fails later.
@mcuee: Please try this on your PC
Thanks.
When the complete system works, we can merge this pull request.