win-pvdrivers

changeset 427:599061042271

updates to add copyconfig to the installer
author James Harper <james.harper@bendigoit.com.au>
date Mon Sep 08 22:10:30 2008 +1000 (2008-09-08)
parents 9b712742b8e8
children 7ff73a450370
files copyconfig/copyconfig.c installer.nsi
line diff
     1.1 --- a/copyconfig/copyconfig.c	Mon Sep 08 22:10:14 2008 +1000
     1.2 +++ b/copyconfig/copyconfig.c	Mon Sep 08 22:10:30 2008 +1000
     1.3 @@ -7,32 +7,6 @@
     1.4  #include <winioctl.h>
     1.5  #include <ntddndis.h>
     1.6  
     1.7 -/*
     1.8 -1. Get an adapter id. You can get it from registry,
     1.9 -\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\\Adapters
    1.10 -- they are specified in this key.
    1.11 -
    1.12 -2. For each adapter id you have to open it using ZwCreateFile to obtain it's
    1.13 -handle to make ioctl's on,
    1.14 -
    1.15 -status = ZwOpenFile(&adapter, GENERIC_READ|GENERIC_WRITE, &oa, &ioStatus,
    1.16 -FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_NON_DIRECTORY_FILE);
    1.17 -
    1.18 -Don't forget to prepend \\??\\ at the begning of the adapter id string.
    1.19 -
    1.20 -3. Once you obtained valid apadter handle, you can query
    1.21 -OID_802_3_PERMANENT_ADDRESS:
    1.22 -
    1.23 -args = OID_802_3_PERMANENT_ADDRESS;
    1.24 -status = ZwDeviceIoControlFile(adapter, 0, 0, 0, &ioStatus,
    1.25 -IOCTL_NDIS_QUERY_GLOBAL_STATS, &args, sizeof(ULONG), controlbuff,
    1.26 -sizeofcontrolbuf);
    1.27 -
    1.28 -Make sure, that you can obtain adapter mac address while the device is up.
    1.29 -If it is down - imagine wi-fi apadter on notebook when it is switched off -
    1.30 -you're out of luck.
    1.31 -*/
    1.32 -
    1.33  #define ADAPTER_TYPE_XEN
    1.34  #define ADAPTER_TYPE_OTHER
    1.35  
     2.1 --- a/installer.nsi	Mon Sep 08 22:10:14 2008 +1000
     2.2 +++ b/installer.nsi	Mon Sep 08 22:10:30 2008 +1000
     2.3 @@ -73,6 +73,7 @@ SectionEnd
     2.4  Section "Windows XP" winxp
     2.5    SetOutPath $INSTDIR
     2.6    File /nonfatal .\ca.cer
     2.7 +  File .\target\i386\copyconfig.exe
     2.8    SetOutPath $INSTDIR\drivers
     2.9    File .\target\winxp\xenpci.inf
    2.10    File .\target\winxp\xennet.inf
    2.11 @@ -93,6 +94,7 @@ SectionEnd
    2.12  Section "Windows 2003 x32" win2k3x32
    2.13    SetOutPath $INSTDIR
    2.14    File /nonfatal .\ca.cer
    2.15 +  File .\target\i386\copyconfig.exe
    2.16    SetOutPath $INSTDIR\drivers
    2.17    File .\target\winnet\xenpci.inf
    2.18    File .\target\winnet\xennet.inf
    2.19 @@ -113,6 +115,7 @@ SectionEnd
    2.20  Section "Windows 2003 x64" win2k3x64
    2.21    SetOutPath $INSTDIR
    2.22    File /nonfatal .\ca.cer
    2.23 +  File .\target\i386\copyconfig.exe
    2.24    SetOutPath $INSTDIR\drivers
    2.25    File .\target\winnet\xenpci.inf
    2.26    File .\target\winnet\xennet.inf
    2.27 @@ -133,6 +136,7 @@ SectionEnd
    2.28  Section "Windows 2008 x32" win2k8x32
    2.29    SetOutPath $INSTDIR
    2.30    File /nonfatal .\ca.cer
    2.31 +  File .\target\i386\copyconfig.exe
    2.32    SetOutPath $INSTDIR\drivers
    2.33    File .\target\winlh\xenpci.inf
    2.34    File .\target\winlh\xennet.inf
    2.35 @@ -153,6 +157,7 @@ SectionEnd
    2.36  Section "Windows 2008 x64" win2k8x64
    2.37    SetOutPath $INSTDIR
    2.38    File /nonfatal .\ca.cer
    2.39 +  File .\target\i386\copyconfig.exe
    2.40    SetOutPath $INSTDIR\drivers
    2.41    File .\target\winlh\xenpci.inf
    2.42    File .\target\winlh\xennet.inf
    2.43 @@ -211,6 +216,12 @@ Section "Install Drivers" installdrivers
    2.44    Call InstallUpgradeDriver
    2.45  SectionEnd
    2.46  
    2.47 +Section "Copy Network Config" copynetworkconfig
    2.48 +  MessageBox MB_OKCANCEL "This will copy the network IP configuration from the qemu network adapter to the gplpv xennet network adapter. Ensure that all the drivers are loaded for all the network adapters before clicking OK" IDCANCEL done
    2.49 +  ExecWait '"$INSTDIR\copyconfig.exe"'
    2.50 +done:
    2.51 +SectionEnd
    2.52 +
    2.53  Var arch
    2.54  
    2.55  Function .onInit