Author Topic: Use CB to build Windows Driver  (Read 6768 times)

Offline iceant

  • Multiple posting newcomer
  • *
  • Posts: 13
Use CB to build Windows Driver
« on: March 28, 2016, 07:32:04 pm »
Finally I found a solution to use CB to build Windows Driver, here is the reference:
https://myworks2012.wordpress.com/2014/05/26/how-to-compile-windows-x64-driver-using-mingw-w64-gcc/

Who can help me to create an Project Wizard for create the WDK/KMDF/UMDF project template?
I can do that by using User Template. But I don't know how to create the project wizard for that. Who can help me on this?
Thanks very much.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: Use CB to build Windows Driver
« Reply #1 on: March 28, 2016, 09:44:22 pm »
Finally I found a solution to use CB to build Windows Driver, here is the reference:
https://myworks2012.wordpress.com/2014/05/26/how-to-compile-windows-x64-driver-using-mingw-w64-gcc/

Who can help me to create an Project Wizard for create the WDK/KMDF/UMDF project template?
I can do that by using User Template. But I don't know how to create the project wizard for that. Who can help me on this?
Thanks very much.

If you can create a working Project, I might be able to turn it into a wizard.
NOTE: You will have to take ownership of getting the CB Wizard patch accepted by the CB Dev Team.

I would need the options the user needs to select during the wizard.
Edit1: I will need to know which MinGW compiler you used to Compile the Project Template. And, a link to download the compiler.
Edit2: It looks like the directions might be for user under Linux; I need to know what OS you will be using Linux or Windows both are OK.

Wizard Options?
MinGW Compiler download link or Linux package name?
Operating System Info?

Edit4: After re-reading your post a half dozen times, I realized you want someone to create a CB project for you to build Windows Drivers.
This is beyond my ability and the site you linked has links that implies it is NOT possible to do what you want. But, that site was very old.

From http://strdup.livejournal.com/34596.html
Quote
Mon, Jul. 21st, 2008, 06:07 pm
Don't use KMDF/WDF, MinGW doesn't support it

Tim S.

« Last Edit: March 29, 2016, 12:08:01 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline iceant

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: Use CB to build Windows Driver
« Reply #2 on: March 29, 2016, 03:12:01 am »
Hi, stahta01

Thanks for your reply. I think I have not make it clear. Actually I used DDK only right now.  And TDM-GCC 5.1 32/64.
There is a project template I want to make, include 2 files in the project(dbg.h and driver.c) and some compiler and link options should be setup automaticly when I create an project using project wizard.

So, I create a wizard under codeblocks\src\plugins\scriptedwizard\resources location, called win32ddk, by reference this document: http://wiki.codeblocks.org/index.php/Wizard_scripts
Modified config.script and Makefile.am in <resources> location and rebuild CB again.
The project wizard can be used to configure the compiler and linker options. But the project file can not been created automatically. I want to know how to do that by using Wizard?

I found by using UserTemplate can do that, but I still want to understand how to make an wizard work. Is there any document about this?

Thanks for your help.

Finally I found a solution to use CB to build Windows Driver, here is the reference:
https://myworks2012.wordpress.com/2014/05/26/how-to-compile-windows-x64-driver-using-mingw-w64-gcc/

Who can help me to create an Project Wizard for create the WDK/KMDF/UMDF project template?
I can do that by using User Template. But I don't know how to create the project wizard for that. Who can help me on this?
Thanks very much.

If you can create a working Project, I might be able to turn it into a wizard.
NOTE: You will have to take ownership of getting the CB Wizard patch accepted by the CB Dev Team.

I would need the options the user needs to select during the wizard.
Edit1: I will need to know which MinGW compiler you used to Compile the Project Template. And, a link to download the compiler.
Edit2: It looks like the directions might be for user under Linux; I need to know what OS you will be using Linux or Windows both are OK.

Wizard Options?
MinGW Compiler download link or Linux package name?
Operating System Info?

Edit4: After re-reading your post a half dozen times, I realized you want someone to create a CB project for you to build Windows Drivers.
This is beyond my ability and the site you linked has links that implies it is NOT possible to do what you want. But, that site was very old.

From http://strdup.livejournal.com/34596.html
Quote
Mon, Jul. 21st, 2008, 06:07 pm
Don't use KMDF/WDF, MinGW doesn't support it

Tim S.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: Use CB to build Windows Driver
« Reply #3 on: March 29, 2016, 03:20:26 am »
I have learned from the link you posted and by reading the code of all the other Wizards.
If you zip up a simple driver template, I might be able make a try on creating a wizard.
But, I have no idea what are the questions a Wizard should/can ask; since, I have very little knowdge on the subject of Windows Drivers.

Tim S.

Hi, stahta01

Thanks for your reply. I think I have not make it clear. Actually I used DDK only right now.  And TDM-GCC 5.1 32/64.
There is a project template I want to make, include 2 files in the project(dbg.h and driver.c) and some compiler and link options should be setup automaticly when I create an project using project wizard.

So, I create a wizard under codeblocks\src\plugins\scriptedwizard\resources location, called win32ddk, by reference this document: http://wiki.codeblocks.org/index.php/Wizard_scripts
Modified config.script and Makefile.am in <resources> location and rebuild CB again.
The project wizard can be used to configure the compiler and linker options. But the project file can not been created automatically. I want to know how to do that by using Wizard?

I found by using UserTemplate can do that, but I still want to understand how to make an wizard work. Is there any document about this?

Thanks for your help.

Finally I found a solution to use CB to build Windows Driver, here is the reference:
https://myworks2012.wordpress.com/2014/05/26/how-to-compile-windows-x64-driver-using-mingw-w64-gcc/

Who can help me to create an Project Wizard for create the WDK/KMDF/UMDF project template?
I can do that by using User Template. But I don't know how to create the project wizard for that. Who can help me on this?
Thanks very much.

If you can create a working Project, I might be able to turn it into a wizard.
NOTE: You will have to take ownership of getting the CB Wizard patch accepted by the CB Dev Team.

I would need the options the user needs to select during the wizard.
Edit1: I will need to know which MinGW compiler you used to Compile the Project Template. And, a link to download the compiler.
Edit2: It looks like the directions might be for user under Linux; I need to know what OS you will be using Linux or Windows both are OK.

Wizard Options?
MinGW Compiler download link or Linux package name?
Operating System Info?

Edit4: After re-reading your post a half dozen times, I realized you want someone to create a CB project for you to build Windows Drivers.
This is beyond my ability and the site you linked has links that implies it is NOT possible to do what you want. But, that site was very old.

From http://strdup.livejournal.com/34596.html
Quote
Mon, Jul. 21st, 2008, 06:07 pm
Don't use KMDF/WDF, MinGW doesn't support it

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7787
    • My Best Post
Re: Use CB to build Windows Driver
« Reply #4 on: March 29, 2016, 12:45:44 pm »
I think we might be talking by each other.

Do you or do you NOT have working CB Project (Using the Compiler you wish to use) for each type of project you wish the Wizard to do?

If yes, I can help you.
If no, then I can NOT help you.

Note: If you have working makefiles (with the source code) for each type; I might be able to help convert them to CB Projects. Depends on how complex the Makefiles are.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org